Commit Graph

13165 Commits

Author SHA1 Message Date
Sanjiv Gupta 69346eb94f Added routine to clone the body of a function and maintain a map of already
cloned functions.

llvm-svn: 96485
2010-02-17 18:11:29 +00:00
Sanjiv Gupta 81b3aa1b2f Added a function to clone locals of a function.( which for pic16 are globals
with mangled names).

llvm-svn: 96465
2010-02-17 06:48:50 +00:00
Sanjiv Gupta 0f5c8f2339 Removed header files from .h by adding forward decls.
Renamed PIC16FrameOverlay namespace to PIC16OVERLAY.
Renamed PIC16FrameOverlay class to PIC16Overlay.

llvm-svn: 96463
2010-02-17 06:46:23 +00:00
Johnny Chen 036b2f6542 Added BFI for disassembly only.
A8.6.18  BFI - Bitfield insert (Encoding A1)

llvm-svn: 96462
2010-02-17 06:31:48 +00:00
Chris Lattner 3f48215480 rename and document some arguments so I don't have to keep
reverse engineering what they are.

llvm-svn: 96456
2010-02-17 06:07:47 +00:00
Anton Korobeynikov cf1f5b0286 Use pointer-wide encoding for LSDA and FDE on Darwin.
Hopefully, this will fix the remaining issues seen there.

llvm-svn: 96454
2010-02-17 05:53:11 +00:00
Chris Lattner b67807e7ef daniel remembered why this was needed.
llvm-svn: 96440
2010-02-17 01:55:54 +00:00
Chris Lattner d8716676ea add a comment explaining why darwin/i386 uses ## as a comment.
It's not clear why this is really required, but it was explicitly
added in r48808 with no real explanation or rdar #.

llvm-svn: 96438
2010-02-17 01:38:01 +00:00
Sanjiv Gupta 84a85fcb91 Initial implementation of PIC16 Cloner pass.
This pass is supposed to be run on the linked .bc module.
It traveses the module call graph twice. Once starting from the main function
and marking each reached function as "ML". Again, starting from the ISR
and cloning any reachable function that was marked as "ML". After cloning
the function, it remaps all the call sites in IL functions to call the
cloned functions. 

Currently only marking is being done.

llvm-svn: 96435
2010-02-17 01:11:53 +00:00
Dan Gohman 12995ba3c0 Make the operand and format specifier match, and print all
64 bits, fixing a variety of problems.

llvm-svn: 96421
2010-02-17 00:37:20 +00:00
Bob Wilson 9e89907ed5 Wrap lines to 80 columns and generally try to clean up whitespace and
indentation.  No functional changes.

llvm-svn: 96418
2010-02-17 00:31:29 +00:00
Bill Wendling 85e5081c77 Make error statement more personal.
llvm-svn: 96410
2010-02-16 22:47:14 +00:00
Chris Lattner afac7dad21 fix rdar://7653908, a crash on a case where we would fold a load
into a roundss intrinsic, producing a cyclic dag.  The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection.  Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.

llvm-svn: 96408
2010-02-16 22:35:06 +00:00
Bob Wilson 37f106e18c Handle tGPR register class in a few more places. This fixes some llvm-gcc
build failures due to my fix for pr6111.

llvm-svn: 96402
2010-02-16 22:01:59 +00:00
Johnny Chen 4c444bf606 Add SMC (Secure Monitor Call) system instruction for disassembly only.
llvm-svn: 96401
2010-02-16 21:59:54 +00:00
Dale Johannesen 1b967bf0e4 Really reserve R2 on PPC Darwin. PR 6314.
llvm-svn: 96399
2010-02-16 21:53:27 +00:00
Jim Grosbach 3e2cad3b1a 80 column cleanup
llvm-svn: 96393
2010-02-16 21:23:02 +00:00
Evan Cheng 82b04130cb Look for SSE and instructions of this form: (and x, (build_vector c1,c2,c3,c4)).
If there exists a use of a build_vector that's the bitwise complement of the mask,
then transform the node to
(and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~c1,~c2,~c3,~c4)).

Since this transformation is only useful when 1) the given build_vector will
become a load from constpool, and 2) (and (xor x -1), y) matches to a single
instruction, I decided this is appropriate as a x86 specific transformation.
rdar://7323335

llvm-svn: 96389
2010-02-16 21:09:44 +00:00
Jim Grosbach fba7fce5be Remove trailing whitespace
llvm-svn: 96388
2010-02-16 21:07:46 +00:00
David Greene 9641d06809 Add support for emitting non-temporal stores for DAGs marked
non-temporal.  Fix from r96241 for botched encoding of MOVNTDQ.

Add documentation for !nontemporal metadata.

Add a simpler movnt testcase.

llvm-svn: 96386
2010-02-16 20:50:18 +00:00
Jim Grosbach 2284ddab56 Update Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
to have the predicate on the pattern itself instead. Support for the new
ISel. Remove definitions of CarryDefIsUnused and CarryDefIsUsed since they are
no longer used anywhere.

llvm-svn: 96384
2010-02-16 20:42:29 +00:00
Jim Grosbach 756ab53e60 Remove redundant setting of Defs. CPSR is already marked by the block level set of Defs.
llvm-svn: 96383
2010-02-16 20:35:59 +00:00
Jim Grosbach 0a334d0df9 First step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
They won't work with the new ISel mechanism, as Requires predicates are no
longer allowed to reference the node being selected. Moving the predicate to
the patterns instead solves the problem.

This patch handles ARM mode. Thumb2 will follow.

llvm-svn: 96381
2010-02-16 20:17:57 +00:00
Johnny Chen 46c39d4f1f Added for disassembly the following instructions:
o Store Return State (SRSW, SRS)
o Load/Store Coprocessor (LDC/STC and friends)
o MSR (immediate)

llvm-svn: 96380
2010-02-16 20:04:27 +00:00
Bob Wilson 70aa8d0745 Fix pr6111: Avoid using the LR register for the target address of an indirect
branch in ARM v4 code, since it gets clobbered by the return address before
it is used.  Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.

llvm-svn: 96360
2010-02-16 17:24:15 +00:00
Duncan Sands cbd43f89ac Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.

llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands 19d0b47b1f There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.

llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer d7d8afabd0 Minor warning fixes (semicolons, newline at EOF).
llvm-svn: 96343
2010-02-16 10:25:04 +00:00
Chris Lattner 52bfe24e2c mark all the generated node predicates 'const'.
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner 4964ef88c2 make pcrel immediate values relative to the start of the field,
not the end of the field, fixing rdar://7651978

llvm-svn: 96330
2010-02-16 05:03:17 +00:00
Sanjiv Gupta adcee844ea The code section for an ISR has a specific address.
Currently, whether a function is ISR or not is encoded in the section attribute for that function.

llvm-svn: 96322
2010-02-16 03:41:07 +00:00
Rafael Espindola af25cf825c Drop support for the InReg attribute on the ppc backend. This was used by
llvm-gcc but has been replaced with pad argument which don't need any
special backend support.

llvm-svn: 96312
2010-02-16 01:50:18 +00:00
Bob Wilson a945c64b5a Put repeated empty pattern into the AQI instruction class.
We could almost use a multiclass for the signed/unsigned instructions, but
there are only 6 of them so I guess it's not worth it.

llvm-svn: 96297
2010-02-15 23:43:47 +00:00
Anton Korobeynikov c9adb6a463 Fix a silly darwin-only typo introduced during merge.
llvm-svn: 96289
2010-02-15 22:38:10 +00:00
Anton Korobeynikov ab663a0bfe Move TLOF implementations to libCodegen to resolve layering violation.
llvm-svn: 96288
2010-02-15 22:37:53 +00:00
Anton Korobeynikov 397aecb6d6 Add suffix for stubs, so we won't have name clashes with private symbols.
llvm-svn: 96286
2010-02-15 22:36:26 +00:00
Anton Korobeynikov ae4ccc10da Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there
llvm-svn: 96285
2010-02-15 22:35:59 +00:00
Chris Lattner bcbaaba532 revert r96241. It breaks two regression tests, isn't documented,
and the testcase needs improvement.

llvm-svn: 96265
2010-02-15 20:53:01 +00:00
Evan Cheng 5e73ff2e3a Split SelectionDAGISel::IsLegalAndProfitableToFold to
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.

This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.

llvm-svn: 96255
2010-02-15 19:41:07 +00:00
David Greene 63cedef74b Add support for emitting non-temporal stores for DAGs marked
non-temporal.

llvm-svn: 96241
2010-02-15 17:02:56 +00:00
David Greene cbd39c5def Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96239
2010-02-15 16:57:43 +00:00
David Greene 15478ac350 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96238
2010-02-15 16:57:13 +00:00
David Greene 772fc34209 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96237
2010-02-15 16:57:02 +00:00
David Greene 87a5abea33 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96236
2010-02-15 16:56:53 +00:00
David Greene 2138b0fc90 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96235
2010-02-15 16:56:34 +00:00
David Greene 27d044d65d Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96234
2010-02-15 16:56:22 +00:00
David Greene 3cd87cc5ee Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96233
2010-02-15 16:56:10 +00:00
David Greene cfa68983e8 Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96232
2010-02-15 16:55:58 +00:00
David Greene af2931d7bf Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96231
2010-02-15 16:55:37 +00:00
David Greene 0d0149f5ac Remove an assumption of default arguments. This is in anticipation of a
change to SelectionDAG build APIs.

llvm-svn: 96230
2010-02-15 16:55:24 +00:00