oota-llvm.git
15 years agoMake hooks virtual
Anton Korobeynikov [Wed, 9 Jul 2008 13:18:21 +0000 (13:18 +0000)]
Make hooks virtual

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53293 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd default section name resolution routine
Anton Korobeynikov [Wed, 9 Jul 2008 13:18:02 +0000 (13:18 +0000)]
Add default section name resolution routine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConstify
Anton Korobeynikov [Wed, 9 Jul 2008 13:17:36 +0000 (13:17 +0000)]
Constify

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53291 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd code for default section falgs computation
Anton Korobeynikov [Wed, 9 Jul 2008 13:16:59 +0000 (13:16 +0000)]
Add code for default section falgs computation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53290 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some unneeded includes.
Duncan Sands [Wed, 9 Jul 2008 12:08:25 +0000 (12:08 +0000)]
Remove some unneeded includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53289 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRedo LegalizeTypes soft float support for
Duncan Sands [Wed, 9 Jul 2008 12:07:22 +0000 (12:07 +0000)]
Redo LegalizeTypes soft float support for
SINT_TO_FP and UINT_TO_FP.  This now produces
the same code as LegalizeDAG (the previous
code was based on a mistaken idea of what
LegalizeDAG did in this case).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53288 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot to update the chain result when softening
Duncan Sands [Wed, 9 Jul 2008 11:15:31 +0000 (11:15 +0000)]
Forgot to update the chain result when softening
loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53287 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLegalizeTypes soft float support for FP_TO_SINT and
Duncan Sands [Wed, 9 Jul 2008 11:13:46 +0000 (11:13 +0000)]
LegalizeTypes soft float support for FP_TO_SINT and
FP_TO_UINT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53286 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLegalizeTypes support for powi soft float.
Duncan Sands [Wed, 9 Jul 2008 11:11:47 +0000 (11:11 +0000)]
LegalizeTypes support for powi soft float.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53285 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the role of MVT::i32 clearer here, and add a
Duncan Sands [Wed, 9 Jul 2008 08:07:41 +0000 (08:07 +0000)]
Make the role of MVT::i32 clearer here, and add a
note since it is not clear whether it is correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53284 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify, suggested by Chris Lattner.
Nick Lewycky [Wed, 9 Jul 2008 07:35:26 +0000 (07:35 +0000)]
Simplify, suggested by Chris Lattner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53283 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.
Nick Lewycky [Wed, 9 Jul 2008 07:29:11 +0000 (07:29 +0000)]
Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissed alignment argument on stores lowered from memcpy.
Evan Cheng [Wed, 9 Jul 2008 06:38:06 +0000 (06:38 +0000)]
Missed alignment argument on stores lowered from memcpy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53281 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBack out 53254. It broke ppc debug info codegen.
Evan Cheng [Wed, 9 Jul 2008 06:36:53 +0000 (06:36 +0000)]
Back out 53254. It broke ppc debug info codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53280 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the DICountVisitor not a visitor. This keeps us from calling virtual
Bill Wendling [Wed, 9 Jul 2008 06:02:33 +0000 (06:02 +0000)]
Make the DICountVisitor not a visitor. This keeps us from calling virtual
functions and junk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSilence warning by initializing variable.
Bill Wendling [Wed, 9 Jul 2008 05:55:53 +0000 (05:55 +0000)]
Silence warning by initializing variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53278 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed features usage.
Bruno Cardoso Lopes [Wed, 9 Jul 2008 05:32:22 +0000 (05:32 +0000)]
Fixed features usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53277 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFold ((1 << a) & 1) to (a == 0).
Nick Lewycky [Wed, 9 Jul 2008 05:20:13 +0000 (05:20 +0000)]
Fold ((1 << a) & 1) to (a == 0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53276 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a little wrapper header that is put around bc files when emitting
Chris Lattner [Wed, 9 Jul 2008 05:14:23 +0000 (05:14 +0000)]
Add a little wrapper header that is put around bc files when emitting
bc files for modules with a target triple that indicates they are for
darwin.  The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.

This change has two benefits for darwin:

1) it allows us to encode the cpu type of the file in an easy to read
   place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
   handling files that are not a multiple of 8 bytes long.  BC files
   are only guaranteed to be multiples of 4 bytes long.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorandom bugfix sitting in my tree.
Chris Lattner [Wed, 9 Jul 2008 05:12:07 +0000 (05:12 +0000)]
random bugfix sitting in my tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53274 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a broken test. Neither load is eliminable without changing the CFG.
Chris Lattner [Wed, 9 Jul 2008 05:01:02 +0000 (05:01 +0000)]
Fix a broken test.  Neither load is eliminable without changing the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53273 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixe typos and 80 column size problems
Bruno Cardoso Lopes [Wed, 9 Jul 2008 04:45:36 +0000 (04:45 +0000)]
Fixe typos and 80 column size problems

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReduce x - y to -y when we know the 'x' part will get masked off anyways.
Nick Lewycky [Wed, 9 Jul 2008 04:32:37 +0000 (04:32 +0000)]
Reduce x - y to -y when we know the 'x' part will get masked off anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53271 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMipsTargetLowering cleanup
Bruno Cardoso Lopes [Wed, 9 Jul 2008 04:15:08 +0000 (04:15 +0000)]
MipsTargetLowering cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53270 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove getValueRange from SCEV. It wasn't doing anything there anyways, and a
Nick Lewycky [Wed, 9 Jul 2008 03:21:51 +0000 (03:21 +0000)]
Remove getValueRange from SCEV. It wasn't doing anything there anyways, and a
more complete version is now available from the LoopVR pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53269 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConsistently put quotes around pass names in debugging output.
Dan Gohman [Wed, 9 Jul 2008 00:50:40 +0000 (00:50 +0000)]
Consistently put quotes around pass names in debugging output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53268 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf loop induction variable's start value is less then its exit value then do not...
Devang Patel [Wed, 9 Jul 2008 00:12:01 +0000 (00:12 +0000)]
If loop induction variable's start value is less then its exit value then do not split the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53265 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconst-ify SelectionDAG::getNodeValueTypes.
Dan Gohman [Wed, 9 Jul 2008 00:00:42 +0000 (00:00 +0000)]
const-ify SelectionDAG::getNodeValueTypes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIt's no longer necessary to test if a MachineBasicBlock's
Dan Gohman [Tue, 8 Jul 2008 23:59:09 +0000 (23:59 +0000)]
It's no longer necessary to test if a MachineBasicBlock's
parent is non-null. It now always is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53263 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoVerify that MachineMemOperand alignment is a non-zero power of 2.
Dan Gohman [Tue, 8 Jul 2008 23:47:04 +0000 (23:47 +0000)]
Verify that MachineMemOperand alignment is a non-zero power of 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53262 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out the code for computing an alignment value, and make it
Dan Gohman [Tue, 8 Jul 2008 23:46:32 +0000 (23:46 +0000)]
Factor out the code for computing an alignment value, and make it
available to getAtomic in addition to just getLoad and getStore,
to prevent MachineMemOperands with 0 alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53261 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the build. Apparently MachineInstr& is no longer implicitly convertable to Machi...
Owen Anderson [Tue, 8 Jul 2008 23:36:37 +0000 (23:36 +0000)]
Fix the build.  Apparently MachineInstr& is no longer implicitly convertable to MachineBasicBlock::iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe graph name really does matter for configurations that use gv.
Dan Gohman [Tue, 8 Jul 2008 23:33:46 +0000 (23:33 +0000)]
The graph name really does matter for configurations that use gv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the local register allocator compute (purely local) liveness information for...
Owen Anderson [Tue, 8 Jul 2008 22:24:50 +0000 (22:24 +0000)]
Make the local register allocator compute (purely local) liveness information for itself
rather than depending on LiveVariables.  This decreases compile time from:
0.5909s (LV + Regalloc) to 0.421s (just regalloc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for debug info from data-only files.
Dale Johannesen [Tue, 8 Jul 2008 21:57:56 +0000 (21:57 +0000)]
Testcase for debug info from data-only files.
This one is x86-32-Darwin specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53255 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake debug info come out in data-only files.
Dale Johannesen [Tue, 8 Jul 2008 21:56:22 +0000 (21:56 +0000)]
Make debug info come out in data-only files.

This is a question of the debugging setup code not
being called at the right time, and it's called from
target-dependent code for some reason.  I have only
attempted to fix Darwin, but I'm pretty sure it's
broken elsewhere; I'll leave that to people who can
test it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53254 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some dead code.
Dale Johannesen [Tue, 8 Jul 2008 21:53:43 +0000 (21:53 +0000)]
Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53253 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix dangling pointer and argv off by one errors. Add support for --disable-inlining
Nick Kledzik [Tue, 8 Jul 2008 21:14:10 +0000 (21:14 +0000)]
fix dangling pointer and argv off by one errors.  Add support for --disable-inlining

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53249 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL SDNode's. This...
Evan Cheng [Tue, 8 Jul 2008 20:06:39 +0000 (20:06 +0000)]
Do not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL SDNode's. This improves compile time slightly at -O0 -g.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53246 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove custom expansion from LegalizeTypes when doing
Duncan Sands [Tue, 8 Jul 2008 20:03:24 +0000 (20:03 +0000)]
Remove custom expansion from LegalizeTypes when doing
soft float: experiments show that targets aren't
expecting this for results or for operands.  Add
support select/select_cc result soft float and
correct operand soft float for these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53245 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing select_cc libcall line, somehow omitted
Duncan Sands [Tue, 8 Jul 2008 20:00:05 +0000 (20:00 +0000)]
Add missing select_cc libcall line, somehow omitted
in LegalizeTypes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove comment
Chris Lattner [Tue, 8 Jul 2008 18:47:38 +0000 (18:47 +0000)]
improve comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53243 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago'Optimize' test
Chris Lattner [Tue, 8 Jul 2008 18:33:33 +0000 (18:33 +0000)]
'Optimize' test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53242 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new hidden option to the interpreter to cause it to print
Chris Lattner [Tue, 8 Jul 2008 17:25:49 +0000 (17:25 +0000)]
Add a new hidden option to the interpreter to cause it to print
out every volatile load and store.  This is useful for tracking
down insane volatile memory bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR2496, a really nasty bug which involved sinking volatile loads
Chris Lattner [Tue, 8 Jul 2008 17:18:32 +0000 (17:18 +0000)]
Fix PR2496, a really nasty bug which involved sinking volatile loads
into phis.  This is actually the same bug as PR2262 /
2008-04-29-VolatileLoadDontMerge.ll, but I missed checking the first
predecessor for multiple successors.  Testcase here:
InstCombine/2008-07-08-VolatileLoadMerge.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agonew testcase for PR2496
Chris Lattner [Tue, 8 Jul 2008 17:18:05 +0000 (17:18 +0000)]
new testcase for PR2496

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53239 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak C++ tests on x86 Darwin.
Evan Cheng [Tue, 8 Jul 2008 16:40:43 +0000 (16:40 +0000)]
Unbreak C++ tests on x86 Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53237 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGlobal variables beginning with \01 have special meaning on Darwin, so we need to...
Owen Anderson [Tue, 8 Jul 2008 16:38:42 +0000 (16:38 +0000)]
Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLegalizeTypes support for FP_ROUND and FP_EXTEND
Duncan Sands [Tue, 8 Jul 2008 10:50:55 +0000 (10:50 +0000)]
LegalizeTypes support for FP_ROUND and FP_EXTEND
soft float.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR2520.
Duncan Sands [Tue, 8 Jul 2008 10:11:36 +0000 (10:11 +0000)]
Testcase for PR2520.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53230 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some helpers for manipulating function
Duncan Sands [Tue, 8 Jul 2008 09:41:30 +0000 (09:41 +0000)]
Add some helpers for manipulating function
parameter attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPacify gcc-4.3.
Duncan Sands [Tue, 8 Jul 2008 09:33:14 +0000 (09:33 +0000)]
Pacify gcc-4.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53227 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNote that 'nest' only applies to pointers.
Duncan Sands [Tue, 8 Jul 2008 09:27:25 +0000 (09:27 +0000)]
Note that 'nest' only applies to pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53226 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd CallSite::getArgumentNo() to be able to translate an operand number into a
Matthijs Kooijman [Tue, 8 Jul 2008 08:51:47 +0000 (08:51 +0000)]
Add CallSite::getArgumentNo() to be able to translate an operand number into a
argument number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53225 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd CallSite::getArgumentOffset() to hide the differences in operands betwen
Matthijs Kooijman [Tue, 8 Jul 2008 08:50:32 +0000 (08:50 +0000)]
Add CallSite::getArgumentOffset() to hide the differences in operands betwen
Call and Invoke in a single method instead of having it hardcoded in multiple
places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53224 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some convenience methods for manipulating
Duncan Sands [Tue, 8 Jul 2008 08:38:44 +0000 (08:38 +0000)]
Add some convenience methods for manipulating
call attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53223 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix three bugs:
Chris Lattner [Tue, 8 Jul 2008 05:46:34 +0000 (05:46 +0000)]
Fix three bugs:

1) evaluate [v]fcmp true/false with undefs to true or false instead
   of undef.
2) fix vector comparisons with undef to return a vector result instead
   of i1
3) fix vector comparisons with evaluatable results to return vector
   true/false instead of i1 true/false (PR2529)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53220 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclarify :)
Chris Lattner [Tue, 8 Jul 2008 05:12:37 +0000 (05:12 +0000)]
clarify :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53218 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpand SCEVUDiv of power of 2 to a lshr instruction.
Nick Lewycky [Tue, 8 Jul 2008 05:05:37 +0000 (05:05 +0000)]
Expand SCEVUDiv of power of 2 to a lshr instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53217 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAvoid unnecessary string construction during asm printing.
Evan Cheng [Tue, 8 Jul 2008 00:55:58 +0000 (00:55 +0000)]
Avoid unnecessary string construction during asm printing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53215 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd _lto_codegen_debug_options so that linker can use it
Nick Kledzik [Mon, 7 Jul 2008 23:24:06 +0000 (23:24 +0000)]
add _lto_codegen_debug_options so that linker can use it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPool-allocation for MachineInstrs, MachineBasicBlocks, and
Dan Gohman [Mon, 7 Jul 2008 23:14:23 +0000 (23:14 +0000)]
Pool-allocation for MachineInstrs, MachineBasicBlocks, and
MachineMemOperands. The pools are owned by MachineFunctions.

This drastically reduces the number of calls to malloc/free made
during the "Emit" phase of scheduling, as well as later phases
in CodeGen. Combined with other changes, this speeds up the
"instruction selection" phase of CodeGen by 10% in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53212 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPool-allocation for SDNodes. The pool is allocated once for each function,
Dan Gohman [Mon, 7 Jul 2008 23:02:41 +0000 (23:02 +0000)]
Pool-allocation for SDNodes. The pool is allocated once for each function,
and reused across SelectionDAGs.

This drastically reduces the number of calls to malloc/free made during
instruction selection, and improves memory locality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53211 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some basic Pool-allocation infrastructure. This adds a Recycler class,
Dan Gohman [Mon, 7 Jul 2008 22:58:06 +0000 (22:58 +0000)]
Add some basic Pool-allocation infrastructure. This adds a Recycler class,
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53210 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up PPC register specification.
Evan Cheng [Mon, 7 Jul 2008 22:22:07 +0000 (22:22 +0000)]
Clean up PPC register specification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53209 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoATT asm printer just print register AsmName's instead of calling tolower on each...
Evan Cheng [Mon, 7 Jul 2008 22:21:06 +0000 (22:21 +0000)]
ATT asm printer just print register AsmName's instead of calling tolower on each charater of Name. This speeds it up by 10%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53208 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTargetRegisterDesc::Name field is the same as the abstract register name. There is...
Evan Cheng [Mon, 7 Jul 2008 22:19:41 +0000 (22:19 +0000)]
TargetRegisterDesc::Name field is the same as the abstract register name. There is no need for targets to specify register names in addition to their AsmName's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53207 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse the canonical way to get an empty structure.
Bill Wendling [Mon, 7 Jul 2008 21:41:57 +0000 (21:41 +0000)]
Use the canonical way to get an empty structure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53206 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor the tablegen DAGISelEmitter code for outputing calls to
Dan Gohman [Mon, 7 Jul 2008 21:00:17 +0000 (21:00 +0000)]
Refactor the tablegen DAGISelEmitter code for outputing calls to
getTargetNode and SelectNodeTo to reduce duplication, and to
make some of the getTargetNode code available to SelectNodeTo.
Use SelectNodeTo instead of getTargetNode in several new
interesting cases, as it mutates nodes in place instead of
creating new ones.

This triggers some scheduling behavior differences due to nodes
being presented to the scheduler in a different order. Some of the
arbitrary scheduling decisions it makes are now arbitrarily made
differently. This is visible in CodeGen/PowerPC/LargeAbsoluteAddr.ll,
where a trivial scheduling difference led to a trivial register
allocation difference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53203 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse StringMap for greater justice!
Bill Wendling [Mon, 7 Jul 2008 20:59:31 +0000 (20:59 +0000)]
Use StringMap for greater justice!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53202 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
Dan Gohman [Mon, 7 Jul 2008 20:57:48 +0000 (20:57 +0000)]
Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
properly track dead nodes that are on the original SDNode's operand
list but not the new one, and have no other uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53201 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove MachineMemOperand's constructor out of line, to avoid a
Dan Gohman [Mon, 7 Jul 2008 20:32:02 +0000 (20:32 +0000)]
Move MachineMemOperand's constructor out of line, to avoid a
#include dependency on Support/MathExtras.h in the header file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53200 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify this use of BuildMI. This is also in preparation for
Dan Gohman [Mon, 7 Jul 2008 20:09:12 +0000 (20:09 +0000)]
Simplify this use of BuildMI. This is also in preparation for
pool-allocating MachineInstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse of operator* is redundant and confusing here.
Dan Gohman [Mon, 7 Jul 2008 20:08:05 +0000 (20:08 +0000)]
Use of operator* is redundant and confusing here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53197 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor const-correctness fixes.
Dan Gohman [Mon, 7 Jul 2008 20:06:06 +0000 (20:06 +0000)]
Minor const-correctness fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoShrink MachineMemOperand by storing the alignment in log form
Dan Gohman [Mon, 7 Jul 2008 20:05:04 +0000 (20:05 +0000)]
Shrink MachineMemOperand by storing the alignment in log form
and rearranging the fields.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53195 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAssert that all MachineInstrs update PhysRegUseDefLists in
Dan Gohman [Mon, 7 Jul 2008 19:55:35 +0000 (19:55 +0000)]
Assert that all MachineInstrs update PhysRegUseDefLists in
their cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53194 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix two serious LSR bugs.
Evan Cheng [Mon, 7 Jul 2008 19:51:32 +0000 (19:51 +0000)]
Fix two serious LSR bugs.
1. LSR runOnLoop is always returning false regardless if any transformation is made.
2. AddUsersIfInteresting can create new instructions that are added to DeadInsts. But there is a later early exit which prevents them from being freed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofixed 32-bit fp_to_sint pattern
Bruno Cardoso Lopes [Mon, 7 Jul 2008 19:11:24 +0000 (19:11 +0000)]
fixed 32-bit fp_to_sint pattern

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake ilist noncopyable too.
Dan Gohman [Mon, 7 Jul 2008 18:43:32 +0000 (18:43 +0000)]
Make ilist noncopyable too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use std::advance just to increment or decrement by one.
Dan Gohman [Mon, 7 Jul 2008 18:39:33 +0000 (18:39 +0000)]
Don't use std::advance just to increment or decrement by one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake BumpPtrAllocator noncopyable.
Dan Gohman [Mon, 7 Jul 2008 18:38:14 +0000 (18:38 +0000)]
Make BumpPtrAllocator noncopyable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53188 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a space between * and /* to help simple-minded lexers.
Dan Gohman [Mon, 7 Jul 2008 18:34:27 +0000 (18:34 +0000)]
Add a space between * and /* to help simple-minded lexers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53187 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove most of the uses of SDOperandPtr, usually replacing it with a
Dan Gohman [Mon, 7 Jul 2008 18:26:29 +0000 (18:26 +0000)]
Remove most of the uses of SDOperandPtr, usually replacing it with a
simple const SDOperand*, which is what's usually needed.

For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.

For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53183 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove uses of "llvm/Support/Debug.h" from LLVM include files, which
Dan Gohman [Mon, 7 Jul 2008 18:14:29 +0000 (18:14 +0000)]
Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
all happened be unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53182 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unnecessary static_casts.
Dan Gohman [Mon, 7 Jul 2008 18:08:20 +0000 (18:08 +0000)]
Remove unnecessary static_casts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unnecessary reinterpret_cast.
Dan Gohman [Mon, 7 Jul 2008 18:07:36 +0000 (18:07 +0000)]
Remove an unnecessary reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53180 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd explicit keywords.
Dan Gohman [Mon, 7 Jul 2008 18:00:37 +0000 (18:00 +0000)]
Add explicit keywords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53179 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse empty() instead of size().
Dan Gohman [Mon, 7 Jul 2008 17:52:43 +0000 (17:52 +0000)]
Use empty() instead of size().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53178 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake DenseMap's insert return a pair, to more closely resemble std::map.
Dan Gohman [Mon, 7 Jul 2008 17:46:23 +0000 (17:46 +0000)]
Make DenseMap's insert return a pair, to more closely resemble std::map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53177 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup. The new...
Ted Kremenek [Mon, 7 Jul 2008 16:20:55 +0000 (16:20 +0000)]
Removed ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup.  The new method does the same thing, except that it returns a pointer to the mapped data type, and not to an internal tree node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53171 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by Richard...
Evan Cheng [Mon, 7 Jul 2008 07:18:09 +0000 (07:18 +0000)]
LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by Richard Osborne.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53169 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle 'lshr' instruction with SCEVUDiv object.
Nick Lewycky [Mon, 7 Jul 2008 06:15:49 +0000 (06:15 +0000)]
Handle 'lshr' instruction with SCEVUDiv object.
Comment the xor %x, -1 case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53167 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrevent option name conflict.
Bill Wendling [Mon, 7 Jul 2008 05:42:27 +0000 (05:42 +0000)]
Prevent option name conflict.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53166 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLegalizeTypes soft-float support for stores of a
Duncan Sands [Mon, 7 Jul 2008 00:08:12 +0000 (00:08 +0000)]
LegalizeTypes soft-float support for stores of a
float value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53165 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd convenient helper for checking whether global is weak in linker sense
Anton Korobeynikov [Sat, 5 Jul 2008 23:48:30 +0000 (23:48 +0000)]
Add convenient helper for checking whether global is weak in linker sense
having weak or linkonce or common or extweak LLVM linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53158 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR2463
Anton Korobeynikov [Sat, 5 Jul 2008 23:33:40 +0000 (23:33 +0000)]
Testcase for PR2463

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53157 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOverride weak stuff during linking of aliases. This fixes PR2463.
Anton Korobeynikov [Sat, 5 Jul 2008 23:33:22 +0000 (23:33 +0000)]
Override weak stuff during linking of aliases. This fixes PR2463.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53156 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for PR2146
Anton Korobeynikov [Sat, 5 Jul 2008 23:03:46 +0000 (23:03 +0000)]
Testcase for PR2146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53155 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProperly link alias and function decls. This fixes PR2146
Anton Korobeynikov [Sat, 5 Jul 2008 23:03:21 +0000 (23:03 +0000)]
Properly link alias and function decls. This fixes PR2146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53154 91177308-0d34-0410-b5e6-96231b3b80d8