oota-llvm.git
16 years agoAdd a utility function that detects whether a loop is guaranteed to be finite.
Nick Lewycky [Tue, 18 Nov 2008 15:10:54 +0000 (15:10 +0000)]
Add a utility function that detects whether a loop is guaranteed to be finite.

Use it to safely handle less-than-or-equals-to exit conditions in loops. These
also occur when the loop exit branch is exit on true because SCEV inverses the
icmp predicate.

Use it again to handle non-zero strides, but only with an unsigned comparison
in the exit condition.

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

16 years agoRename stackprotector_create intrinsic to stackprotector.
Bill Wendling [Tue, 18 Nov 2008 11:01:33 +0000 (11:01 +0000)]
Rename stackprotector_create intrinsic to stackprotector.

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

16 years agoCast to remove warning about comparing signed and unsigned.
Bill Wendling [Tue, 18 Nov 2008 10:57:27 +0000 (10:57 +0000)]
Cast to remove warning about comparing signed and unsigned.

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

16 years agoImplement support for JIT exceptions on X86_64. Relative offsets are
Nicolas Geoffray [Tue, 18 Nov 2008 10:44:46 +0000 (10:44 +0000)]
Implement support for JIT exceptions on X86_64. Relative offsets are
encoded on 32 bytes, and the personality function is not encoded as
relative.

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

16 years agoRemove unused variable.
Duncan Sands [Tue, 18 Nov 2008 10:39:04 +0000 (10:39 +0000)]
Remove unused variable.

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

16 years agoReapply r59464, this time using the correct type
Duncan Sands [Tue, 18 Nov 2008 09:15:03 +0000 (09:15 +0000)]
Reapply r59464, this time using the correct type
when softening FNEG.

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

16 years agoA simple test for stack protectors. This should be valid on all platforms.
Bill Wendling [Tue, 18 Nov 2008 07:34:50 +0000 (07:34 +0000)]
A simple test for stack protectors. This should be valid on all platforms.

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

16 years agoRemove the stackprotector_check intrinsic. Use a volatile load instead.
Bill Wendling [Tue, 18 Nov 2008 07:30:57 +0000 (07:30 +0000)]
Remove the stackprotector_check intrinsic. Use a volatile load instead.

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

16 years ago- Use "moveAfter" instead of "remove/insert" of a basic block.
Bill Wendling [Tue, 18 Nov 2008 05:32:11 +0000 (05:32 +0000)]
- Use "moveAfter" instead of "remove/insert" of a basic block.
- Use less indentation in coding.
- Shorten description.
- Update comments.
- Move code around

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

16 years agoFix a typo in a comment.
Dan Gohman [Tue, 18 Nov 2008 02:50:01 +0000 (02:50 +0000)]
Fix a typo in a comment.

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

16 years agoChange SUnit's dump method to take a ScheduleDAG* instead of
Dan Gohman [Tue, 18 Nov 2008 02:06:40 +0000 (02:06 +0000)]
Change SUnit's dump method to take a ScheduleDAG* instead of
a SelectionDAG*.

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

16 years agoRevert r59464. It was causing this failure:
Bill Wendling [Tue, 18 Nov 2008 01:49:24 +0000 (01:49 +0000)]
Revert r59464. It was causing this failure:

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/fneg.ll
Failed with signal(SIGABRT) at line 1
while running:  llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/XCore/fneg.ll |  llc -march=xcore > fneg.ll.tmp1.s
Assertion failed: (VT.isFloatingPoint() && "Cannot create integer FP constant!"), function getConstantFP, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 913.
0   llc                                 0x0092115c _ZN4llvm3sys18RemoveFileOnSignalERKNS0_4PathEPSs + 844
1   libSystem.B.dylib                   0x9217809b _sigtramp + 43
2   ???                                 0xffffffff 0x0 + 4294967295
3   libSystem.B.dylib                   0x921f0ec2 raise + 26
4   libSystem.B.dylib                   0x9220047f abort + 73
5   libSystem.B.dylib                   0x921f2063 __assert_rtn + 101
6   llc                                 0x005a5b0a _ZN4llvm12SelectionDAG13getConmake[1]: *** [check-local] Error 1
make: *** [check] Error 2

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

16 years agoThere is no InstrStage class.
Dan Gohman [Tue, 18 Nov 2008 01:05:04 +0000 (01:05 +0000)]
There is no InstrStage class.

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

16 years agoGive SIToFPInst preference over UIToFPInst because it is faster on platforms that...
Devang Patel [Tue, 18 Nov 2008 00:40:02 +0000 (00:40 +0000)]
Give SIToFPInst preference over UIToFPInst because it is faster on platforms that are widely used.

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

16 years agoAvoid using a loop in ReleasePred and ReleaseSucc methods to compute the
Dan Gohman [Tue, 18 Nov 2008 00:38:59 +0000 (00:38 +0000)]
Avoid using a loop in ReleasePred and ReleaseSucc methods to compute the
new CycleBound value. Instead, just update CycleBound on each call.
Also, make ReleasePred and ReleaseSucc methods more consistent accross
the various schedulers.

This also happens to make ScheduleDAGRRList's CycleBound computation
somewhat more interesting, though it still doesn't have any noticeable
effect, because no current targets that use the register-pressure
reduction scheduler provide pipeline models.

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

16 years agoWhile handling floating point IVs lift restrictions on initial value and increment...
Devang Patel [Mon, 17 Nov 2008 23:27:13 +0000 (23:27 +0000)]
While handling floating point IVs lift restrictions on initial value and increment value.

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

16 years agoHandle floating point ivs during doInitialization().
Devang Patel [Mon, 17 Nov 2008 21:32:02 +0000 (21:32 +0000)]
Handle floating point ivs during doInitialization().

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

16 years agoEliminate some trivial differences between the ScheduleNodeTopDown
Dan Gohman [Mon, 17 Nov 2008 21:31:02 +0000 (21:31 +0000)]
Eliminate some trivial differences between the ScheduleNodeTopDown
functions in these two schedulers.

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

16 years agoAdd soft float support for a bunch more operations. Original
Duncan Sands [Mon, 17 Nov 2008 20:52:38 +0000 (20:52 +0000)]
Add soft float support for a bunch more operations.  Original
patch by Richard Osborne, tweaked and extended by your humble
servant.

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

16 years agoDon't bother doing latency calculations in the "fast" scheduler.
Dan Gohman [Mon, 17 Nov 2008 19:52:36 +0000 (19:52 +0000)]
Don't bother doing latency calculations in the "fast" scheduler.

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

16 years agoUse SUnit's CycleBound field instead of duplicating it in
Dan Gohman [Mon, 17 Nov 2008 19:45:19 +0000 (19:45 +0000)]
Use SUnit's CycleBound field instead of duplicating it in
a side-car datastructure

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

16 years agoRemove these, which test for optimizations that
Dale Johannesen [Mon, 17 Nov 2008 18:57:45 +0000 (18:57 +0000)]
Remove these, which test for optimizations that
are not currently done (cf PowerPC/README.txt).

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

16 years agoMove some former testcases (low-probability codegen
Dale Johannesen [Mon, 17 Nov 2008 18:56:34 +0000 (18:56 +0000)]
Move some former testcases (low-probability codegen
optimizations) into this wishlist.

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

16 years agoLet AnalyzeAlloca() remove debug intrinsics.
Devang Patel [Mon, 17 Nov 2008 18:37:53 +0000 (18:37 +0000)]
Let AnalyzeAlloca() remove debug intrinsics.

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

16 years agoDon't produce ADDC/ADDE when expanding SHL unless they are legal
Richard Osborne [Mon, 17 Nov 2008 17:34:31 +0000 (17:34 +0000)]
Don't produce ADDC/ADDE when expanding SHL unless they are legal
for the target. This fixes PR3080.

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

16 years agoSupport dependencies between plugins by priority-sorting.
Mikhail Glushenkov [Mon, 17 Nov 2008 17:30:25 +0000 (17:30 +0000)]
Support dependencies between plugins by priority-sorting.

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

16 years agoFilter ToolPropertiesList to exclude all Tools not mentioned in the compilation graph.
Mikhail Glushenkov [Mon, 17 Nov 2008 17:29:42 +0000 (17:29 +0000)]
Filter ToolPropertiesList to exclude all Tools not mentioned in the compilation graph.

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

16 years agoAdd a layer of indirection to make plugins more flexible.
Mikhail Glushenkov [Mon, 17 Nov 2008 17:29:18 +0000 (17:29 +0000)]
Add a layer of indirection to make plugins more flexible.

Use strings instead of TableGen defs in the compilation graph
definition. Makes it easier for the plugins to modify an existing graph.

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

16 years agoDon't use the isPending flag to mean what the isAvailable flag means.
Dan Gohman [Mon, 17 Nov 2008 16:37:30 +0000 (16:37 +0000)]
Don't use the isPending flag to mean what the isAvailable flag means.

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

16 years agomove partial template specialization to FoldingSet.h.
Zhongxing Xu [Mon, 17 Nov 2008 02:40:00 +0000 (02:40 +0000)]
move partial template specialization to FoldingSet.h.

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

16 years agoFixed legalization of CONVERT_RNDSAT for integers.
Mon P Wang [Mon, 17 Nov 2008 00:41:12 +0000 (00:41 +0000)]
Fixed legalization of CONVERT_RNDSAT for integers.

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

16 years agoRemoved 2008-10-17-SpillerBug.ll as it does not provide an accurate test of PR2898.
Lang Hames [Sun, 16 Nov 2008 23:30:12 +0000 (23:30 +0000)]
Removed 2008-10-17-SpillerBug.ll as it does not provide an accurate test of PR2898.

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

16 years agopunctuate, add wording about patches contributed by others.
Chris Lattner [Sun, 16 Nov 2008 17:40:16 +0000 (17:40 +0000)]
punctuate, add wording about patches contributed by others.

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

16 years agoIf SI->size() is 0, we are not allowed to dereference ->begin().
Torok Edwin [Sun, 16 Nov 2008 17:21:25 +0000 (17:21 +0000)]
If SI->size() is 0, we are not allowed to dereference ->begin().
This fixed PR3078.

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

16 years ago2008-10-17-SpillerBug.ll is currently failing, but this doesn't reflect an actual...
Lang Hames [Sun, 16 Nov 2008 13:11:09 +0000 (13:11 +0000)]
2008-10-17-SpillerBug.ll is currently failing, but this doesn't reflect an actual regression of PR2898. This test should probably be removed. I've XFAILed it for now to keep buildbot quiet while this is considered.

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

16 years agoBig PBQP allocator update. Adds coalescing support, stack slot coloring, several...
Lang Hames [Sun, 16 Nov 2008 12:12:54 +0000 (12:12 +0000)]
Big PBQP allocator update. Adds coalescing support, stack slot coloring, several bug-fixes.

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

16 years agoeliminate some std::set's.
Chris Lattner [Sun, 16 Nov 2008 07:17:51 +0000 (07:17 +0000)]
eliminate some std::set's.

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

16 years agosimplify loop
Chris Lattner [Sun, 16 Nov 2008 06:35:18 +0000 (06:35 +0000)]
simplify loop

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

16 years agosimplify a bunch more instcombines to use m_Specific etc.
Chris Lattner [Sun, 16 Nov 2008 05:38:51 +0000 (05:38 +0000)]
simplify a bunch more instcombines to use m_Specific etc.

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

16 years agofactor the code for simplifying (icmp)|(icmp) into its own function.
Chris Lattner [Sun, 16 Nov 2008 05:20:07 +0000 (05:20 +0000)]
factor the code for simplifying (icmp)|(icmp) into its own function.

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

16 years agodo some computation with apints instead of ConstantInts.
Chris Lattner [Sun, 16 Nov 2008 05:14:43 +0000 (05:14 +0000)]
do some computation with apints instead of ConstantInts.

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

16 years agomerge a check into a place where it is simpler.
Chris Lattner [Sun, 16 Nov 2008 05:10:52 +0000 (05:10 +0000)]
merge a check into a place where it is simpler.

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

16 years agoImproved shuffle normalization to avoid using extract/build when we
Mon P Wang [Sun, 16 Nov 2008 05:06:27 +0000 (05:06 +0000)]
Improved shuffle normalization to avoid using extract/build when we
can extract using different indexes for two vectors. Added a few tests
for vector shuffles.

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

16 years agofactor a whole bunch of code out into a helper function.
Chris Lattner [Sun, 16 Nov 2008 05:06:21 +0000 (05:06 +0000)]
factor a whole bunch of code out into a helper function.

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

16 years agosimplify the conditions on two gigantic if's, decreasing indentation
Chris Lattner [Sun, 16 Nov 2008 04:55:20 +0000 (04:55 +0000)]
simplify the conditions on two gigantic if's, decreasing indentation
a bit.  Next step is to factor out into their own helper functions.

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

16 years agosimplify some instcombine matches by using m_Specific
Chris Lattner [Sun, 16 Nov 2008 04:46:19 +0000 (04:46 +0000)]
simplify some instcombine matches by using m_Specific

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

16 years agoFix 80-col violation.
Zhongxing Xu [Sun, 16 Nov 2008 04:44:41 +0000 (04:44 +0000)]
Fix 80-col violation.

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

16 years agoadd a new m_Specific pattern that matches only if we have a specific Value*.
Chris Lattner [Sun, 16 Nov 2008 04:38:30 +0000 (04:38 +0000)]
add a new m_Specific pattern that matches only if we have a specific Value*.

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

16 years agoUse new m_SelectCst template to eliminate macros.
Chris Lattner [Sun, 16 Nov 2008 04:33:38 +0000 (04:33 +0000)]
Use new m_SelectCst template to eliminate macros.

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

16 years agoadd a new template for matching a select between two constants.
Chris Lattner [Sun, 16 Nov 2008 04:33:10 +0000 (04:33 +0000)]
add a new template for matching a select between two constants.

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

16 years agosimplify code.
Chris Lattner [Sun, 16 Nov 2008 04:26:55 +0000 (04:26 +0000)]
simplify code.

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

16 years agoHandle the case where there is no "not". It is possible it got
Chris Lattner [Sun, 16 Nov 2008 04:25:26 +0000 (04:25 +0000)]
Handle the case where there is no "not".  It is possible it got
folded into the select.

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

16 years agofactor a bunch of copy/paste code out into a helper function.
Chris Lattner [Sun, 16 Nov 2008 04:24:12 +0000 (04:24 +0000)]
factor a bunch of copy/paste code out into a helper function.
Eliminate the cases checking for cond?0:-1, since that is already
handled by commutative checking.

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

16 years agoAdd partial specialization of FoldingSetTrait for ImmutableList.
Zhongxing Xu [Sun, 16 Nov 2008 04:23:49 +0000 (04:23 +0000)]
Add partial specialization of FoldingSetTrait for ImmutableList.

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

16 years agomake this actually test what it is trying to.
Chris Lattner [Sun, 16 Nov 2008 04:21:51 +0000 (04:21 +0000)]
make this actually test what it is trying to.

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

16 years agoFix 80-column violation.
Zhongxing Xu [Sun, 16 Nov 2008 04:14:33 +0000 (04:14 +0000)]
Fix 80-column violation.

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

16 years agoDon't brute-force analyze cubic or higher polynomials.
Nick Lewycky [Sun, 16 Nov 2008 04:14:25 +0000 (04:14 +0000)]
Don't brute-force analyze cubic or higher polynomials.

If this patch causes a performance regression for anyone, please let me know,
and it can be fixed in a different way with much more effort.

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

16 years agoCMake: MSVC: Pass list of components the right way to msvc_llvm_config
Oscar Fuentes [Sun, 16 Nov 2008 04:13:19 +0000 (04:13 +0000)]
CMake: MSVC: Pass list of components the right way to msvc_llvm_config
and siblings. Support targets whose name does not end on
`CodeGen'. Remove a performance bottleneck.

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

16 years agorearrange some code, no functionality change.
Chris Lattner [Sun, 16 Nov 2008 03:56:24 +0000 (03:56 +0000)]
rearrange some code, no functionality change.

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

16 years agoif we're going to use a macro, use it maximally. no functionality change.
Chris Lattner [Sun, 16 Nov 2008 03:54:57 +0000 (03:54 +0000)]
if we're going to use a macro, use it maximally.  no functionality change.

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

16 years agoCMake: Forces linking of the rest of architecture targets and its
Oscar Fuentes [Sat, 15 Nov 2008 22:51:03 +0000 (22:51 +0000)]
CMake: Forces linking of the rest of architecture targets and its
respective asm printers on MSVC.

Based on a patch by Scott Graham.

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

16 years agoAdds extern "C" ints to the .cpp files that use RegisterTarget, as
Oscar Fuentes [Sat, 15 Nov 2008 21:36:30 +0000 (21:36 +0000)]
Adds extern "C" ints to the .cpp files that use RegisterTarget, as
well as 2 files that use "Registrator"s. These are to be used by the
MSVC builds, as the Win32 linker does not include libs that are
otherwise unreferenced, even if global constructors in the lib have
side-effects.

Patch by Scott Graham!

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

16 years agoCMake: Removed some cruft.
Oscar Fuentes [Sat, 15 Nov 2008 20:51:18 +0000 (20:51 +0000)]
CMake: Removed some cruft.

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

16 years agoCMake: Recursively invokes cmake using the right directories.
Oscar Fuentes [Sat, 15 Nov 2008 20:35:25 +0000 (20:35 +0000)]
CMake: Recursively invokes cmake using the right directories.

LLVM_MAIN_SRC_DIR and LLVM_BINARY_DIR are not the cmake top level
directories when LLVM is embedded on the build of other project.

Fixes PR #3072.

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

16 years agoClean up some strange whitespace.
Nick Lewycky [Sat, 15 Nov 2008 20:32:33 +0000 (20:32 +0000)]
Clean up some strange whitespace.

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

16 years agoCorrect this error message.
Nick Lewycky [Sat, 15 Nov 2008 17:50:47 +0000 (17:50 +0000)]
Correct this error message.

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

16 years agoAdd Profile method to ImmutableList.
Zhongxing Xu [Sat, 15 Nov 2008 09:26:02 +0000 (09:26 +0000)]
Add Profile method to ImmutableList.

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

16 years agoWhen splitting a SHUFFLE_VECTOR, try to have the result
Duncan Sands [Sat, 15 Nov 2008 09:25:38 +0000 (09:25 +0000)]
When splitting a SHUFFLE_VECTOR, try to have the result
use SHUFFLE_VECTOR instead.  If not practical, fall back
to the old scheme of building the split result by hand
using a BUILD_VECTOR.

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

16 years agoAdd missing widen operations, fixed widening for extracting a subvector,
Mon P Wang [Sat, 15 Nov 2008 06:05:52 +0000 (06:05 +0000)]
Add missing widen operations, fixed widening for extracting a subvector,
and when loading/storing a widen vector, make sure that they are loaded
and stored in consecutive order.

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

16 years agoCMake: Adds header and TableGen files to Visual Studio solution. A new
Oscar Fuentes [Sat, 15 Nov 2008 02:08:08 +0000 (02:08 +0000)]
CMake: Adds header and TableGen files to Visual Studio solution. A new
dummy library, `llvm_headers_do_not_build', is created for containing
all header and TableGen files under include/llvm.

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

16 years agoFix fuitos encoding.
Evan Cheng [Sat, 15 Nov 2008 00:40:57 +0000 (00:40 +0000)]
Fix fuitos encoding.

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

16 years agoCMake: Moved generation of Intrinsics.gen to
Oscar Fuentes [Sat, 15 Nov 2008 00:24:38 +0000 (00:24 +0000)]
CMake: Moved generation of Intrinsics.gen to
include/llvm/CMakeLists.txt. Does it with the `tablegen' cmake macro.

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

16 years agoCorrect a comment.
Dan Gohman [Sat, 15 Nov 2008 00:24:23 +0000 (00:24 +0000)]
Correct a comment.

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

16 years agoMove ScheduleDAGList's LatencyPriorityQueue class out to a separate file.
Dan Gohman [Sat, 15 Nov 2008 00:23:40 +0000 (00:23 +0000)]
Move ScheduleDAGList's LatencyPriorityQueue class out to a separate file.

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

16 years agoCMake: Remove unused tablegenning code from tools/llvmc2/driver.
Oscar Fuentes [Fri, 14 Nov 2008 23:59:50 +0000 (23:59 +0000)]
CMake: Remove unused tablegenning code from tools/llvmc2/driver.

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

16 years agoRefactor code.
Devang Patel [Fri, 14 Nov 2008 22:49:37 +0000 (22:49 +0000)]
Refactor code.
Strip debug information before stripping symbol names.

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

16 years agoCMake: Use LLVM_MAIN_SRC_DIR instead of CMAKE_SOURCE_DIR, for
Oscar Fuentes [Fri, 14 Nov 2008 22:21:02 +0000 (22:21 +0000)]
CMake: Use LLVM_MAIN_SRC_DIR instead of CMAKE_SOURCE_DIR, for
consistency.

Patch by Kevin Andre!

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

16 years agoCMake: Fixed dependencies of .cpp source files on .td and tablegenned
Oscar Fuentes [Fri, 14 Nov 2008 22:06:14 +0000 (22:06 +0000)]
CMake: Fixed dependencies of .cpp source files on .td and tablegenned
files.

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

16 years agoAdd support for building a ScheduleDAG from MachineInstrs. This is currently
Dan Gohman [Fri, 14 Nov 2008 21:47:58 +0000 (21:47 +0000)]
Add support for building a ScheduleDAG from MachineInstrs. This is currently
fairly conservative; it doesn't do alias-analysis queries and it doesn't
attempt to break anti-dependencies.

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

16 years agoFix MOVrx, MOVsrl_flag, and MOVsra_flag encodings.
Evan Cheng [Fri, 14 Nov 2008 20:09:11 +0000 (20:09 +0000)]
Fix MOVrx, MOVsrl_flag, and MOVsra_flag encodings.

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

16 years agoRemove unneeded stuff from GRAD register class.
Dale Johannesen [Fri, 14 Nov 2008 18:10:48 +0000 (18:10 +0000)]
Remove unneeded stuff from GRAD register class.

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

16 years ago[XCore] Remove whitespace in the description used when
Richard Osborne [Fri, 14 Nov 2008 16:19:56 +0000 (16:19 +0000)]
[XCore] Remove whitespace in the description used when
registering XCoreTargetMachine.

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

16 years ago[XCore] Fix expansion of 64 bit add/sub. Don't custom expand
Richard Osborne [Fri, 14 Nov 2008 15:59:19 +0000 (15:59 +0000)]
[XCore] Fix expansion of 64 bit add/sub. Don't custom expand
these operations if ladd/lsub are not available on the current
subtarget.

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

16 years agoAdd XCore intrinsics for getid (returns thread id) and bitrev (reverses
Richard Osborne [Fri, 14 Nov 2008 10:12:16 +0000 (10:12 +0000)]
Add XCore intrinsics for getid (returns thread id) and bitrev (reverses
bits in a word).

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

16 years agoTest commit.
Lang Hames [Fri, 14 Nov 2008 06:51:35 +0000 (06:51 +0000)]
Test commit.

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

16 years agoCMake: Disallow in-source builds except when building with the Visual
Oscar Fuentes [Fri, 14 Nov 2008 03:43:18 +0000 (03:43 +0000)]
CMake: Disallow in-source builds except when building with the Visual
Studio IDE. CMake would overwrite the makefiles distributed with LLVM.

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

16 years agoARM / Mac OS X also wants to invalidate icache after jitting.
Evan Cheng [Fri, 14 Nov 2008 02:33:17 +0000 (02:33 +0000)]
ARM / Mac OS X also wants to invalidate icache after jitting.

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

16 years agoAdd a version of NewSUnit for creating units with MachineInstrs.
Dan Gohman [Fri, 14 Nov 2008 00:41:36 +0000 (00:41 +0000)]
Add a version of NewSUnit for creating units with MachineInstrs.

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

16 years agoFor post-regalloc scheduling, remove the instructions from the block
Dan Gohman [Fri, 14 Nov 2008 00:33:17 +0000 (00:33 +0000)]
For post-regalloc scheduling, remove the instructions from the block
before re-inserting them.

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

16 years agoCheck in the correct version of the patch in r59279.
Dan Gohman [Fri, 14 Nov 2008 00:32:34 +0000 (00:32 +0000)]
Check in the correct version of the patch in r59279.

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

16 years agoDebug printing for SUnits that carry MachineInstrs.
Dan Gohman [Fri, 14 Nov 2008 00:28:56 +0000 (00:28 +0000)]
Debug printing for SUnits that carry MachineInstrs.

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

16 years agoInitial support for carrying MachineInstrs in SUnits.
Dan Gohman [Fri, 14 Nov 2008 00:06:09 +0000 (00:06 +0000)]
Initial support for carrying MachineInstrs in SUnits.

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

16 years agoChange DOTGraphTraits<ScheduleDAG*>::getGraphName how to find the name of
Dan Gohman [Thu, 13 Nov 2008 23:45:55 +0000 (23:45 +0000)]
Change DOTGraphTraits<ScheduleDAG*>::getGraphName how to find the name of
the current function on its own, rather than relying on the SelectionDAG.

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

16 years agoClarify the comment about NumPreds and NumSuccs to reflect that they only
Dan Gohman [Thu, 13 Nov 2008 23:41:41 +0000 (23:41 +0000)]
Clarify the comment about NumPreds and NumSuccs to reflect that they only
count non-control preds and succs.

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

16 years agoHandle the rest of pseudo instructions.
Evan Cheng [Thu, 13 Nov 2008 23:36:57 +0000 (23:36 +0000)]
Handle the rest of pseudo instructions.

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

16 years agoLazy compilation callback save / restore VFP registers.
Evan Cheng [Thu, 13 Nov 2008 23:28:54 +0000 (23:28 +0000)]
Lazy compilation callback save / restore VFP registers.

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

16 years agoRemove the FlaggedNodes member from SUnit. Instead of requiring each SUnit
Dan Gohman [Thu, 13 Nov 2008 23:24:17 +0000 (23:24 +0000)]
Remove the FlaggedNodes member from SUnit. Instead of requiring each SUnit
to carry a SmallVector of flagged nodes, just calculate the flagged nodes
dynamically when they are needed.

The local-liveness change is due to a trivial scheduling change where
the scheduler arbitrary decision differently.

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

16 years agotestcase for PR 1779.
Dale Johannesen [Thu, 13 Nov 2008 22:17:10 +0000 (22:17 +0000)]
testcase for PR 1779.

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

16 years agoDon't allow the restore point to be placed after terminators. With this change,
Owen Anderson [Thu, 13 Nov 2008 21:53:14 +0000 (21:53 +0000)]
Don't allow the restore point to be placed after terminators.  With this change,
MultiSource/Applications is clean with the prealloc splitter.  Some failures
remain in SPEC.

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

16 years agoExtend InlineAsm::C_Register to allow multiple specific registers
Dale Johannesen [Thu, 13 Nov 2008 21:52:36 +0000 (21:52 +0000)]
Extend InlineAsm::C_Register to allow multiple specific registers
(actually, code already all worked, only the comment
changed).  Use this to implement 'A' constraint on x86.
Fixes PR 1779.

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