Commit Graph

17096 Commits

Author SHA1 Message Date
Reid Spencer 2ea1bb2b8a Make sure that section and visibility are properly propagated.
llvm-svn: 33870
2007-02-04 04:28:18 +00:00
Chris Lattner edfc7e5fa2 move MorphNode to out of line and merge setNodeOperands into it. There is
no behavior or performance change here.

llvm-svn: 33869
2007-02-04 02:49:29 +00:00
Chris Lattner 3bf17b6fa5 simplify MorphNodeTo to take a VTList operand.
llvm-svn: 33868
2007-02-04 02:41:42 +00:00
Chris Lattner 486edfbc6f eliminate some extraneous methods in SDNode
llvm-svn: 33867
2007-02-04 02:32:44 +00:00
Chris Lattner 20754cc579 Give each selectiondag node class a home for it's vtable and rtti info
llvm-svn: 33866
2007-02-04 02:23:32 +00:00
Chris Lattner 010ee96261 Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often.
llvm-svn: 33864
2007-02-04 01:48:10 +00:00
Chris Lattner 289aa4495c Switch VAlueMap from std::map to DenseMap.
llvm-svn: 33863
2007-02-04 01:35:11 +00:00
Chris Lattner 79084305ee Switch NodeMap from std::map to DenseMap, this speeds up isel by 2.3%
llvm-svn: 33862
2007-02-04 01:31:47 +00:00
Chris Lattner 94c44c96d3 swtich vector-> smallvector, speeding up selectiondag stuff 1%
llvm-svn: 33861
2007-02-04 01:20:02 +00:00
Chris Lattner 4b0ddb22e9 Switch promoted/expanded ops over to using a DenseMap. Vector related maps
aren't worth it.

llvm-svn: 33860
2007-02-04 01:17:38 +00:00
Chris Lattner ed39c86176 switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
time as a whole on kc++ by 11%.

llvm-svn: 33857
2007-02-04 00:50:02 +00:00
Reid Spencer 3f4e6e84dc For PR1163:
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.

llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner ebeb48d4bc Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
up isel on kimwitu by 0.7%.

llvm-svn: 33853
2007-02-04 00:27:56 +00:00
Chris Lattner cba058ce51 Eliminate some std::sets. This speeds up isel of kimwitu by about 0.9%
llvm-svn: 33852
2007-02-04 00:24:41 +00:00
Chris Lattner feec7137ce Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
the users set (most nodes have 1 or 2 users).  This speeds up the isel pass
3.2% on kimwitu.

llvm-svn: 33849
2007-02-04 00:14:31 +00:00
Chris Lattner 6c344e56b1 remove some dead code
llvm-svn: 33845
2007-02-03 23:28:07 +00:00
Reid Spencer 8de97bba5a For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.

llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Evan Cheng 456db39ea9 ARM callseq_end should have a input flag operand so it would be scheduled right after the call.
llvm-svn: 33832
2007-02-03 09:11:58 +00:00
Evan Cheng 4b6c8f7f5e Fix comments.
llvm-svn: 33831
2007-02-03 08:53:01 +00:00
Bill Wendling a883f55eca Moved the GetTargetRelocation method from PPCMachOWriter to here. It uses
non-Mach-O-specific information.

llvm-svn: 33819
2007-02-03 02:41:58 +00:00
Bill Wendling 2c350921e2 Moved the GetTargetRelocation method to the PPCMachOWriterInfo object. The
PPCMachOWriter is now trivial.

llvm-svn: 33818
2007-02-03 02:40:57 +00:00
Bill Wendling c85e32c730 Put destructor out-of-line.
llvm-svn: 33817
2007-02-03 02:40:10 +00:00
Bill Wendling c27c70dc3d Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
llvm-svn: 33816
2007-02-03 02:39:40 +00:00
Evan Cheng 36d559d369 - Branch max. displacement calculation bug.
- Add debugging info.

llvm-svn: 33811
2007-02-03 02:08:34 +00:00
Chris Lattner 0a30b1f00f switch the sched unit map over to use a DenseMap instead of std::map. This
speeds up isel as a whole time by 2.6%.

llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner e83030b9c8 Switch ComputeTopDownOrdering over to using a densemap. This speeds up
isel as a whole by 3.3%.

llvm-svn: 33809
2007-02-03 01:12:36 +00:00
Evan Cheng f309d13677 Pasto
llvm-svn: 33806
2007-02-03 00:43:46 +00:00
Chris Lattner 1bfc7ab6a7 Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%.

llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Lauro Ramos Venancio b739f7d337 bugfix: SP isn't resetted when function has FP and there is no spills.
llvm-svn: 33800
2007-02-02 23:08:40 +00:00
Chris Lattner fc8190dbb7 Switch this back to using an std::map. DenseMap entries are getting invalidated
llvm-svn: 33799
2007-02-02 22:36:16 +00:00
Chris Lattner 37d400a83d Remove more malloc thrashing, this speeds up IPSCCP on kimwitu another 6.7%.
llvm-svn: 33796
2007-02-02 21:15:06 +00:00
Evan Cheng f089c99f1d Another thumb large stack offset codegen bug.
llvm-svn: 33795
2007-02-02 21:08:39 +00:00
Chris Lattner 3e667f3e61 Convert an std::set to SmallSet, this speeds up IPSCCP 17% on kimwitu.
llvm-svn: 33794
2007-02-02 20:57:39 +00:00
Chris Lattner 0e7ec675da eliminate a malloc/free for (almost) every GEP processed. This speeds up
IPSCCP 3.3% on kimwitu.

llvm-svn: 33793
2007-02-02 20:51:48 +00:00
Chris Lattner 067d607e0e switch hash_map's over to DenseMap in SCCP. This speeds up SCCP by 30% in
a release-assert build on kimwitu++.

llvm-svn: 33792
2007-02-02 20:38:30 +00:00
Evan Cheng d9d94700a4 Use MBB.empty() instead of MBB.size() for speed.
llvm-svn: 33789
2007-02-02 19:09:19 +00:00
Evan Cheng 3ad22567b3 Watch out for empty BB.
llvm-svn: 33788
2007-02-02 18:49:02 +00:00
Reid Spencer 2f34b98cbf Remove dead code and fix indentation per Chris' review comments.
llvm-svn: 33785
2007-02-02 14:41:37 +00:00
Reid Spencer 5dc84cdab7 Use short form of BinaryOperator create function.
llvm-svn: 33784
2007-02-02 14:09:34 +00:00
Reid Spencer 0d5f9237b6 Use short form of binary operator create functions.
llvm-svn: 33783
2007-02-02 14:08:20 +00:00
Reid Spencer 0cdd04fa90 Fix a comment that needed to change after SHIFT patch landed.
llvm-svn: 33781
2007-02-02 13:54:55 +00:00
Evan Cheng fda6550545 Ugh. Only meant to do this in thumb mode.
llvm-svn: 33780
2007-02-02 08:58:48 +00:00
Chris Lattner d5fea61d98 bugfix for reid's shift patch.
llvm-svn: 33779
2007-02-02 05:29:55 +00:00
Chris Lattner 2d5b4ac38f add a note
llvm-svn: 33778
2007-02-02 04:36:46 +00:00
Reid Spencer 2341c22ec7 Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Evan Cheng 48b094d9dd Fix a bug in getARMCMP (which translate CondCode to ARM specific CC) when the RHS is a constant.
llvm-svn: 33775
2007-02-02 01:53:26 +00:00
Evan Cheng 9b9e4ae796 Thumb does not have clz.
llvm-svn: 33773
2007-02-01 23:34:03 +00:00
Devang Patel b8a29bdde9 Dump function names when debug-pass=Executions is used.
llvm-svn: 33772
2007-02-01 22:38:33 +00:00
Chris Lattner c904205d28 Fix Transforms/InstCombine/2007-02-01-LoadSinkAlloca.ll, a serious code
pessimization where instcombine can sink a load (good for code size) that
prevents an alloca from being promoted by mem2reg (bad for everything).

llvm-svn: 33771
2007-02-01 22:30:07 +00:00
Devang Patel f7fea8adf3 Pretty print pass manager
llvm-svn: 33766
2007-02-01 22:09:37 +00:00
Devang Patel e3858e6674 cvs commit
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Lauro Ramos Venancio 2c355da986 Define PrivateGlobalPrefix for ARM Linux. (Fix CodeGen/ARM/large_stack.ll)
llvm-svn: 33763
2007-02-01 21:43:53 +00:00
Evan Cheng fd522996c8 Pasto. Lots of it.
llvm-svn: 33762
2007-02-01 20:44:52 +00:00
Reid Spencer 26c642de74 Ensure that ConvertOperandToType generates a result conversion by
initializing the Res variable to 0 and asserting it is not zero after the
result should have been created.

llvm-svn: 33761
2007-02-01 19:14:51 +00:00
Chris Lattner ce494229a1 Fix bugs in the inliner having to do with single-entry phi nodes and valuemap
updating.  These were exposed by Devang's recent passmgr changes (with
non-default passorderings) because now the inliner can be interleved with
the LCSSA pass.

llvm-svn: 33760
2007-02-01 18:48:38 +00:00
Lauro Ramos Venancio 903e01d407 Fix .thumb_func directive on linux.
llvm-svn: 33759
2007-02-01 18:25:34 +00:00
Jim Laskey f970221c4d Slip up
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey 894ceb1c6f Emit labels as label_n and not as debug_n
llvm-svn: 33757
2007-02-01 17:46:10 +00:00
Andrew Lenharth dd924e4e95 preserve sections of globals
llvm-svn: 33756
2007-02-01 17:12:54 +00:00
Jim Laskey c3de9b4b14 Support for non-landing pad exception handling.
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Evan Cheng f9a4c690de - Off by one bugs in maximum displacement calculation / testing.
- In thumb mode, a new constpool island BB size should be 4 + 2 to
  compensate for the potential padding due to alignment requirement.

llvm-svn: 33753
2007-02-01 10:16:15 +00:00
Anton Korobeynikov 1b4e6015b4 Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144

llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner 4f5cdecde3 improve comments, add an assertion
llvm-svn: 33750
2007-02-01 05:33:21 +00:00
Chris Lattner 1003dc72b4 rename DenseMap to IndexedMap.
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner f14c76cf5d silence some warnings when assertions are disabled.
llvm-svn: 33747
2007-02-01 04:59:37 +00:00
Chris Lattner 104fc7f823 silence warning
llvm-svn: 33746
2007-02-01 04:57:00 +00:00
Chris Lattner 296a83cefb Fit in 80 columns
llvm-svn: 33745
2007-02-01 04:55:59 +00:00
Evan Cheng 06736d0f88 .set pc relative displacement bug: label should be moved down one instruction
to just before the add r1, pc:

Before:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        mov r1, #PCRELV0
        add r1, pc

Now:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
        mov r1, #PCRELV0
LPCRELL0:
        add r1, pc

llvm-svn: 33744
2007-02-01 03:04:49 +00:00
Evan Cheng 0df1536173 Add a note.
llvm-svn: 33743
2007-02-01 02:46:20 +00:00
Evan Cheng e724492566 Also set alignment of stack-based structs to 4 in thumb mode.
llvm-svn: 33741
2007-02-01 02:18:36 +00:00
Evan Cheng e7e966de5e Special epilogue for vararg functions. We cannot do a pop to pc because
there follows a sp increment for the va register save region. Instead issue
a separate pop to another register, increment sp, and then return:
        pop {r4, r5, r6, r7}
        pop {r3}
        add sp, #3 * 4
        bx r3

llvm-svn: 33739
2007-02-01 01:49:46 +00:00
Devang Patel 9eb2caaeb6 Add PrintVersionMessage() that tools can use to print version number
without exiting program.

llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Chris Lattner e3eeb24a86 Emit a better assertion message for PR1133
llvm-svn: 33736
2007-02-01 01:21:12 +00:00
Evan Cheng 234e031e36 Pessmistically assume the .align 2 before the first constpool entry adds
two bytes padding.

llvm-svn: 33734
2007-02-01 01:09:47 +00:00
Evan Cheng 29f920877d Possible JT improvements.
llvm-svn: 33733
2007-02-01 01:07:48 +00:00
Chris Lattner f7937005a3 Fix CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll
llvm-svn: 33732
2007-02-01 00:39:08 +00:00
Evan Cheng ed81dea45b Don't emit unnecessary .align directive.
llvm-svn: 33729
2007-01-31 23:39:39 +00:00
Evan Cheng e5c19993cd Handle an interesting corner case: the constpool_entry being reference is two
instructions away, i.e. its address is equal to PC.
        %r0 = tLDRpci <cp#0>
        bx
        CONSTPOOL_ENTRY 0 <cp#0>, 4

llvm-svn: 33728
2007-01-31 23:35:18 +00:00
Evan Cheng b0ff625a31 Don't want to add FramePtr to callee save spill list twice.
llvm-svn: 33727
2007-01-31 23:17:29 +00:00
Reid Spencer dee14b50e4 Fix build breakage by using correct arguments to getIndexedType in the
GEP constructors.

llvm-svn: 33726
2007-01-31 22:30:26 +00:00
Evan Cheng 6f1c20a8e6 Darwin ABI requires FP to point to stack slot of prev FP.
llvm-svn: 33724
2007-01-31 22:25:33 +00:00
Evan Cheng 2e309b15a7 Add entry.
llvm-svn: 33723
2007-01-31 22:11:38 +00:00
Evan Cheng 1c5837dc4a Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
change preferred alignment of short, byte, bool to 4.

llvm-svn: 33722
2007-01-31 22:08:40 +00:00
Evan Cheng ffe1d9f7fa Update comment.
llvm-svn: 33721
2007-01-31 22:06:44 +00:00
Evan Cheng d7e39eb443 Dead comment.
llvm-svn: 33719
2007-01-31 21:31:25 +00:00
Reid Spencer e7422f6b8d Add some debug output.
llvm-svn: 33718
2007-01-31 21:27:38 +00:00
Evan Cheng 0584836340 Thumb asm syntax does not want 's' suffix for flag setting opcodes.
llvm-svn: 33717
2007-01-31 20:12:31 +00:00
Chris Lattner 416a8939c3 remove temporary vectors.
llvm-svn: 33715
2007-01-31 20:08:52 +00:00
Chris Lattner 7a63e7a7ad eliminate temporary vectors
llvm-svn: 33713
2007-01-31 20:07:32 +00:00
Chris Lattner 927653f27f eliminate temporary vectors
llvm-svn: 33712
2007-01-31 19:59:55 +00:00
Evan Cheng 1f3fc4b3f0 When determining whether a pc relative branch / load displacement fits in the
instruction field, adjust it for PC value (4 for thumb, 8 for arm).

llvm-svn: 33711
2007-01-31 19:57:44 +00:00
Chris Lattner 3aefeb957b eliminate a temporary vector while parsing gep's from bc files.
llvm-svn: 33710
2007-01-31 19:56:15 +00:00
Chris Lattner 37ebf9317b A relatively simple PPC optimization.
llvm-svn: 33709
2007-01-31 19:49:20 +00:00
Chris Lattner 79807c3dfe implement the new GEP instruction ctors.
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Evan Cheng 7169bd8784 Some comments.
llvm-svn: 33707
2007-01-31 18:29:27 +00:00
Evan Cheng 456928bbbc ConstPool island bug: watch out for cases where UserMI is the last MI of the BB.
llvm-svn: 33706
2007-01-31 18:19:07 +00:00
Chris Lattner 4fc18a4cb8 Revert another incorrectly applied chunk, which fixes InstCombine/vec_insert_to_shuffle.ll
llvm-svn: 33705
2007-01-31 18:09:17 +00:00
Chris Lattner 5f8809078f Fix a minor bug in my patch yesterday that broken ConstProp/bswap.ll
llvm-svn: 33704
2007-01-31 18:04:55 +00:00
Lauro Ramos Venancio 7ae4f5599e ARM fix: Miscompilation when frame pointer can't be eliminated. Uninitialized frame pointer register is used.
llvm-svn: 33703
2007-01-31 13:12:46 +00:00
Evan Cheng 143576ddd2 Specify the right CC for comparison libcalls.
llvm-svn: 33702
2007-01-31 09:30:58 +00:00