oota-llvm.git
15 years agoimprove const correctness.
Chris Lattner [Thu, 27 Nov 2008 08:39:18 +0000 (08:39 +0000)]
improve const correctness.

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

15 years agoenhance FindAvailableLoadedValue to make use of AliasAnalysis
Chris Lattner [Thu, 27 Nov 2008 08:18:12 +0000 (08:18 +0000)]
enhance FindAvailableLoadedValue to make use of AliasAnalysis
if it has it.

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

15 years agomove FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
Chris Lattner [Thu, 27 Nov 2008 08:10:05 +0000 (08:10 +0000)]
move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.

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

15 years agoGet rid of bogus "control may reach end of non-void function ‘...’ being
Bill Wendling [Thu, 27 Nov 2008 08:00:12 +0000 (08:00 +0000)]
Get rid of bogus "control may reach end of non-void function ‘...’ being
inlined" message.

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

15 years agosimplify this code a bit.
Chris Lattner [Thu, 27 Nov 2008 07:54:38 +0000 (07:54 +0000)]
simplify this code a bit.

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

15 years agoUse the new MergeBasicBlockIntoOnlyPred function.
Chris Lattner [Thu, 27 Nov 2008 07:54:12 +0000 (07:54 +0000)]
Use the new MergeBasicBlockIntoOnlyPred function.

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

15 years agomove MergeBasicBlockIntoOnlyPred to Transforms/Utils.
Chris Lattner [Thu, 27 Nov 2008 07:43:12 +0000 (07:43 +0000)]
move MergeBasicBlockIntoOnlyPred to Transforms/Utils.

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

15 years agoXFAil test due to reverting of patch.
Bill Wendling [Thu, 27 Nov 2008 07:34:10 +0000 (07:34 +0000)]
XFAil test due to reverting of patch.

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

15 years agorename ThreadBlock to ProcessBlock, since it does other things than
Chris Lattner [Thu, 27 Nov 2008 07:20:04 +0000 (07:20 +0000)]
rename ThreadBlock to ProcessBlock, since it does other things than
just simple threading.

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

15 years agoComment out code that isn't entirely correct.
Bill Wendling [Thu, 27 Nov 2008 07:18:35 +0000 (07:18 +0000)]
Comment out code that isn't entirely correct.

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

15 years agoFixed HTML closing tag, cleaned up some spacing.
Misha Brukman [Thu, 27 Nov 2008 06:41:20 +0000 (06:41 +0000)]
Fixed HTML closing tag, cleaned up some spacing.

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

15 years agoRemoving redundant semicolons. No functionality change.
Sanjiv Gupta [Thu, 27 Nov 2008 05:58:04 +0000 (05:58 +0000)]
Removing redundant semicolons. No functionality change.

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

15 years agoMake jump threading substantially more powerful, in the following ways:
Chris Lattner [Thu, 27 Nov 2008 05:07:53 +0000 (05:07 +0000)]
Make jump threading substantially more powerful, in the following ways:

1. Make it fold blocks separated by an unconditional branch.  This enables
   jump threading to see a broader scope.
2. Make jump threading able to eliminate locally redundant loads when they
   feed the branch condition of a block.  This frequently occurs due to
   reg2mem running.
3. Make jump threading able to eliminate *partially redundant* loads when
   they feed the branch condition of a block.  This is common in code with
   lots of loads and stores like C++ code and 255.vortex.

This implements thread-loads.ll and rdar://6402033.

Per the fixme's, several pieces of this should be moved into Transforms/Utils.

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

15 years agoEliminate a compile time warning.
Evan Cheng [Thu, 27 Nov 2008 02:29:25 +0000 (02:29 +0000)]
Eliminate a compile time warning.

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

15 years agoAvoid inserting noop's in the middle of a loop.
Evan Cheng [Thu, 27 Nov 2008 01:16:00 +0000 (01:16 +0000)]
Avoid inserting noop's in the middle of a loop.

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

15 years agoOn x86 favors folding short immediate into some arithmetic operations (e.g. add,...
Evan Cheng [Thu, 27 Nov 2008 00:49:46 +0000 (00:49 +0000)]
On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax

is 2 bytes shorter than

movl $4, %eax
addl 4(%esp), %eax

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

15 years agoAdd a missing case in visitADD.
Dale Johannesen [Thu, 27 Nov 2008 00:43:21 +0000 (00:43 +0000)]
Add a missing case in visitADD.

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

15 years agoAdd -march=x86.
Evan Cheng [Thu, 27 Nov 2008 00:37:06 +0000 (00:37 +0000)]
Add -march=x86.

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

15 years agoAdd typedef to StringMapEntry.
Ted Kremenek [Thu, 27 Nov 2008 00:17:25 +0000 (00:17 +0000)]
Add typedef to StringMapEntry.

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

15 years agoDisallow multiple edges.
Mikhail Glushenkov [Wed, 26 Nov 2008 22:59:45 +0000 (22:59 +0000)]
Disallow multiple edges.

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

15 years agoAdd x86-specific test for add-with-overflow intrinsics.
Bill Wendling [Wed, 26 Nov 2008 22:42:19 +0000 (22:42 +0000)]
Add x86-specific test for add-with-overflow intrinsics.

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

15 years agoGenerate something sensible for an [SU]ADDO op when the overflow/carry flag is
Bill Wendling [Wed, 26 Nov 2008 22:37:40 +0000 (22:37 +0000)]
Generate something sensible for an [SU]ADDO op when the overflow/carry flag is
the conditional for the BRCOND statement. For instance, it will generate:

    addl %eax, %ecx
    jo LOF

instead of

    addl %eax, %ecx
    ; About 10 instructions to compare the signs of LHS, RHS, and sum.
    jl LOF

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

15 years agoTurn on my codegen prepare heuristic by default. It doesn't affect
Chris Lattner [Wed, 26 Nov 2008 22:16:44 +0000 (22:16 +0000)]
Turn on my codegen prepare heuristic by default.  It doesn't affect
performance in most cases on the Grawp tester, but does speed some
things up (like shootout/hash by 15%).  This also doesn't impact
compile time in a noticable way on the Grawp tester.

It also, of course, gets the testcase it was designed for right :)

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

15 years agoSmall formatting change.
Bill Wendling [Wed, 26 Nov 2008 19:19:05 +0000 (19:19 +0000)]
Small formatting change.

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

15 years agoUpdate to explain how ssp and sspreq attributes override each other.
Bill Wendling [Wed, 26 Nov 2008 19:07:40 +0000 (19:07 +0000)]
Update to explain how ssp and sspreq attributes override each other.

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

15 years agoFix typo.
Devang Patel [Wed, 26 Nov 2008 18:13:11 +0000 (18:13 +0000)]
Fix typo.

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

15 years agoCosmetic.
Evan Cheng [Wed, 26 Nov 2008 18:00:00 +0000 (18:00 +0000)]
Cosmetic.

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

15 years agoCheck that running the DAG combiner between type
Duncan Sands [Wed, 26 Nov 2008 16:44:30 +0000 (16:44 +0000)]
Check that running the DAG combiner between type
and operation legalization does something useful.

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

15 years agoDescribe some more options in the man page.
Mikhail Glushenkov [Wed, 26 Nov 2008 13:40:08 +0000 (13:40 +0000)]
Describe some more options in the man page.

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

15 years agoignore build dirs and generated files
Nuno Lopes [Wed, 26 Nov 2008 13:10:39 +0000 (13:10 +0000)]
ignore build dirs and generated files

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

15 years agoAllow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
Sanjiv Gupta [Wed, 26 Nov 2008 11:19:00 +0000 (11:19 +0000)]
Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.

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

15 years agoFix the -I option (llvmc -I dir1 -I dir2 didn't work).
Mikhail Glushenkov [Wed, 26 Nov 2008 10:57:31 +0000 (10:57 +0000)]
Fix the -I option (llvmc -I dir1 -I dir2 didn't work).

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

15 years agoRefactor Tools.td to remove repetition.
Mikhail Glushenkov [Wed, 26 Nov 2008 10:56:56 +0000 (10:56 +0000)]
Refactor Tools.td to remove repetition.

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

15 years agoSmall fix: the error message was incorrect in some cases.
Mikhail Glushenkov [Wed, 26 Nov 2008 10:55:45 +0000 (10:55 +0000)]
Small fix: the error message was incorrect in some cases.

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

15 years agoEmit declaration for globals and externs.
Sanjiv Gupta [Wed, 26 Nov 2008 10:53:50 +0000 (10:53 +0000)]
Emit declaration for globals and externs.
Custom lower AND, OR, XOR bitwise operations.

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

15 years agoFish kill flag annotations in PUSH instructions.
Dan Gohman [Wed, 26 Nov 2008 06:39:12 +0000 (06:39 +0000)]
Fish kill flag annotations in PUSH instructions.

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

15 years agoLiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
Dan Gohman [Wed, 26 Nov 2008 05:50:31 +0000 (05:50 +0000)]
LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

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

15 years agoteach the new heuristic how to handle inline asm.
Chris Lattner [Wed, 26 Nov 2008 04:59:11 +0000 (04:59 +0000)]
teach the new heuristic how to handle inline asm.

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

15 years agoDisable -loop-index-split for now.
Devang Patel [Wed, 26 Nov 2008 04:58:14 +0000 (04:58 +0000)]
Disable -loop-index-split for now.

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

15 years agoAdd 'tell' method to raw_fd_ostream that clients can use to query the current locatio...
Ted Kremenek [Wed, 26 Nov 2008 03:33:13 +0000 (03:33 +0000)]
Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.

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

15 years agoImprove ValueAlreadyLiveAtInst with a cheap and dirty, but effective
Chris Lattner [Wed, 26 Nov 2008 03:20:37 +0000 (03:20 +0000)]
Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block.  This is
cheap and simple to compute (moreso than full liveness).

This improves the new heuristic even more.  For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr,
which is one of the functions that the heuristic regressed.  This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).

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

15 years ago__fastcall and __stdcall are mingw extensions to gcc for windows. Use the
Nick Lewycky [Wed, 26 Nov 2008 03:17:27 +0000 (03:17 +0000)]
__fastcall and __stdcall are mingw extensions to gcc for windows. Use the
__attribute__ notation which is supported on more platforms.

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

15 years agoStart rewroking a subpiece of the profitability heuristic to be
Chris Lattner [Wed, 26 Nov 2008 03:02:41 +0000 (03:02 +0000)]
Start rewroking a subpiece of the profitability heuristic to be
phrased in terms of liveness instead of as a horrible hack.  :)

In pratice, this doesn't change the generated code for either
255.vortex or 403.gcc, but it could cause minor code changes in
theory.  This is framework for coming changes.

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

15 years agoAdjust indent.
Zhongxing Xu [Wed, 26 Nov 2008 02:57:24 +0000 (02:57 +0000)]
Adjust indent.

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

15 years agoadd a long-overdue AllocaInst::isStaticAlloca method.
Chris Lattner [Wed, 26 Nov 2008 02:54:17 +0000 (02:54 +0000)]
add a long-overdue AllocaInst::isStaticAlloca method.

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

15 years agoAdd test for rdar://6394879.
Bill Wendling [Wed, 26 Nov 2008 02:21:12 +0000 (02:21 +0000)]
Add test for rdar://6394879.

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

15 years agoadd a comment, make save/restore logic more obvious.
Chris Lattner [Wed, 26 Nov 2008 02:11:11 +0000 (02:11 +0000)]
add a comment, make save/restore logic more obvious.

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

15 years agoThis adds in some code (currently disabled unless you pass
Chris Lattner [Wed, 26 Nov 2008 02:00:14 +0000 (02:00 +0000)]
This adds in some code (currently disabled unless you pass
-enable-smarter-addr-folding to llc) that gives CGP a better
cost model for when to sink computations into addressing modes.
The basic observation is that sinking increases register
pressure when part of the addr computation has to be available
for other reasons, such as having a use that is a non-memory
operation.  In cases where it works, it can substantially reduce
register pressure.

This code is currently an overall win on 403.gcc and 255.vortex
(the two things I've been looking at), but there are several
things I want to do before enabling it by default:

1. This isn't doing any caching of results, so it is much slower
   than it could be.  It currently slows down release-asserts llc
   by 1.7% on 176.gcc: 27.12s -> 27.60s.
2. This doesn't think about inline asm memory operands yet.
3. The cost model botches the case when the needed value is live
   across the computation for other reasons.

I'll continue poking at this, and eventually turn it on as llcbeta.

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

15 years agoRevert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before...
Evan Cheng [Wed, 26 Nov 2008 01:11:57 +0000 (01:11 +0000)]
Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer.

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

15 years agoTeach CodeGenPrepare to look through Bitcast instructions when attempting to
Chris Lattner [Wed, 26 Nov 2008 00:26:16 +0000 (00:26 +0000)]
Teach CodeGenPrepare to look through Bitcast instructions when attempting to
optimize addressing modes.  This allows us to optimize things like isel-sink2.ll
into:

movl 4(%esp), %eax
cmpb $0, 4(%eax)
jne LBB1_2 ## F
LBB1_1: ## TB
movl $4, %eax
ret
LBB1_2: ## F
movzbl 7(%eax), %eax
ret

instead of:

_test:
movl 4(%esp), %eax
cmpb $0, 4(%eax)
leal 4(%eax), %eax
jne LBB1_2 ## F
LBB1_1: ## TB
movl $4, %eax
ret
LBB1_2: ## F
movzbl 3(%eax), %eax
ret

This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s.

Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt
it is really testing what it thinks it is.

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

15 years agofix an over-reduced test.
Chris Lattner [Wed, 26 Nov 2008 00:12:08 +0000 (00:12 +0000)]
fix an over-reduced test.

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

15 years agothis doesn't need EH
Chris Lattner [Wed, 26 Nov 2008 00:03:26 +0000 (00:03 +0000)]
this doesn't need EH

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

15 years agoignore tests output
Nuno Lopes [Wed, 26 Nov 2008 00:02:09 +0000 (00:02 +0000)]
ignore tests output

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

15 years agochange AnnotationManager to use 'const char*' instead of std::string. this fixes...
Nuno Lopes [Wed, 26 Nov 2008 00:00:44 +0000 (00:00 +0000)]
change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)

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

15 years agoCMake: Removed tools/llvmc2 directory hierarchy.
Oscar Fuentes [Tue, 25 Nov 2008 22:19:48 +0000 (22:19 +0000)]
CMake: Removed tools/llvmc2 directory hierarchy.

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

15 years agoCMake: llvmc2 is now known as llvmc.
Oscar Fuentes [Tue, 25 Nov 2008 22:18:49 +0000 (22:18 +0000)]
CMake: llvmc2 is now known as llvmc.

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

15 years agoAdd a man page for llvmc. Really basic for now, will be updated later.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:38:38 +0000 (21:38 +0000)]
Add a man page for llvmc. Really basic for now, will be updated later.

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

15 years agoSince the old llvmc was removed, rename llvmc2 to llvmc.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:38:12 +0000 (21:38 +0000)]
Since the old llvmc was removed, rename llvmc2 to llvmc.

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

15 years agoMake -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:35:20 +0000 (21:35 +0000)]
Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.

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

15 years agodocs: Add author info + fix incorrect code example.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:34:53 +0000 (21:34 +0000)]
docs: Add author info + fix incorrect code example.

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

15 years agoSmall documentation update.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:34:29 +0000 (21:34 +0000)]
Small documentation update.

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

15 years agoDocument the plugin priority feature.
Mikhail Glushenkov [Tue, 25 Nov 2008 21:34:01 +0000 (21:34 +0000)]
Document the plugin priority feature.

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

15 years agoA simplification for checking whether the signs of the operands and sum differ. Thank...
Bill Wendling [Tue, 25 Nov 2008 19:40:17 +0000 (19:40 +0000)]
A simplification for checking whether the signs of the operands and sum differ. Thanks, Duncan.

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

15 years agoconvertToSignExtendedInteger should return opInvalidOp instead of asserting if semati...
Evan Cheng [Tue, 25 Nov 2008 19:00:29 +0000 (19:00 +0000)]
convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics.

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

15 years agoSuppress warnings.
Dan Gohman [Tue, 25 Nov 2008 18:53:54 +0000 (18:53 +0000)]
Suppress warnings.

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

15 years agoThis method got renamed, thanks to Mattias Holm for pointing this out.
Chris Lattner [Tue, 25 Nov 2008 18:34:50 +0000 (18:34 +0000)]
This method got renamed, thanks to Mattias Holm for pointing this out.

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

15 years agoCellSPU:
Scott Michel [Tue, 25 Nov 2008 17:29:43 +0000 (17:29 +0000)]
CellSPU:
(a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
    best that the A-form and D-form address predicates catch everything before
    the code decides to emit a X-form address.
(b) Expand vector store test cases to include the usual suspects.

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

15 years agoadd info about how to run the tests with valgrind
Nuno Lopes [Tue, 25 Nov 2008 15:57:52 +0000 (15:57 +0000)]
add info about how to run the tests with valgrind

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

15 years agoNow with the correct type for the 0.
Bill Wendling [Tue, 25 Nov 2008 08:19:22 +0000 (08:19 +0000)]
Now with the correct type for the 0.

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

15 years agoGet rid of unused variable.
Bill Wendling [Tue, 25 Nov 2008 08:13:20 +0000 (08:13 +0000)]
Get rid of unused variable.

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

15 years agoHacker's Delight says, "Signed integer overflow of addition occurs if and only
Bill Wendling [Tue, 25 Nov 2008 08:12:19 +0000 (08:12 +0000)]
Hacker's Delight says, "Signed integer overflow of addition occurs if and only
if the operands have the same sign and the sum has sign opposite to that of the
operands."

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

15 years agoTeach MatchScaledValue to handle Scales by 1 with MatchAddr (which
Chris Lattner [Tue, 25 Nov 2008 07:25:26 +0000 (07:25 +0000)]
Teach MatchScaledValue to handle Scales by 1 with MatchAddr (which
can recursively match things) and scales by 0 by ignoring them.
This triggers once in 403.gcc, saving 1 (!!!!) instruction in the
whole huge app.

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

15 years agosignificantly refactor all the addressing mode matching logic
Chris Lattner [Tue, 25 Nov 2008 07:09:13 +0000 (07:09 +0000)]
significantly refactor all the addressing mode matching logic
into a new AddressingModeMatcher class.  This makes it easier
to reason about and reduces passing around of stuff, but has
no functionality change.

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

15 years agorefactor all the constantexpr/instruction handling code out into a
Chris Lattner [Tue, 25 Nov 2008 05:15:49 +0000 (05:15 +0000)]
refactor all the constantexpr/instruction handling code out into a
new FindMaximalLegalAddressingModeForOperation helper method.

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

15 years agoanother minor tweak
Chris Lattner [Tue, 25 Nov 2008 04:47:41 +0000 (04:47 +0000)]
another minor tweak

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

15 years agominor cleanups no functionality change.
Chris Lattner [Tue, 25 Nov 2008 04:42:10 +0000 (04:42 +0000)]
minor cleanups no functionality change.

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

15 years agoCMake: Documented two cmake variables.
Oscar Fuentes [Tue, 25 Nov 2008 04:23:36 +0000 (04:23 +0000)]
CMake: Documented two cmake variables.

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

15 years agoCellSPU: Relax constraints on when to generate a X-form address, evidently
Scott Michel [Tue, 25 Nov 2008 04:03:47 +0000 (04:03 +0000)]
CellSPU: Relax constraints on when to generate a X-form address, evidently
they were too tight according to bug 3126.

Fix bug 3126.

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

15 years agoCellSPU: test should use shlqby, not shlqbyi
Scott Michel [Tue, 25 Nov 2008 01:30:37 +0000 (01:30 +0000)]
CellSPU: test should use shlqby, not shlqbyi

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

15 years agoXFAIL this test. A recent CellSPU check-in broke it.
Bill Wendling [Tue, 25 Nov 2008 00:56:34 +0000 (00:56 +0000)]
XFAIL this test. A recent CellSPU check-in broke it.

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

15 years agoInitial support for anti-dependence breaking. Currently this code does not
Dan Gohman [Tue, 25 Nov 2008 00:52:40 +0000 (00:52 +0000)]
Initial support for anti-dependence breaking. Currently this code does not
introduce any new spilling; it just uses unused registers.

Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.

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

15 years agoCellSPU: Fix mnemonic typo in pattern; "shlqbyi" -> "shlqby".
Scott Michel [Tue, 25 Nov 2008 00:23:16 +0000 (00:23 +0000)]
CellSPU: Fix mnemonic typo in pattern; "shlqbyi" -> "shlqby".

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

15 years agoTestcase for constant CFStrings.
Bill Wendling [Mon, 24 Nov 2008 23:28:09 +0000 (23:28 +0000)]
Testcase for constant CFStrings.

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

15 years agorearrange and tidy some code, no functionality change.
Chris Lattner [Mon, 24 Nov 2008 22:44:16 +0000 (22:44 +0000)]
rearrange and tidy some code, no functionality change.

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

15 years agominor cleanups to debug code, no functionality change.
Chris Lattner [Mon, 24 Nov 2008 22:40:05 +0000 (22:40 +0000)]
minor cleanups to debug code, no functionality change.

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

15 years agoreenable test
Chris Lattner [Mon, 24 Nov 2008 21:27:20 +0000 (21:27 +0000)]
reenable test

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

15 years agoreenable the right part of the code.
Chris Lattner [Mon, 24 Nov 2008 21:26:21 +0000 (21:26 +0000)]
reenable the right part of the code.

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

15 years agoTemporarily XFAIL this test. r59976 and r59972 broke it.
Bill Wendling [Mon, 24 Nov 2008 20:43:33 +0000 (20:43 +0000)]
Temporarily XFAIL this test. r59976 and r59972 broke it.

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

15 years agoMove the scheduler constructor functions to SchedulerRegistry.h, to
Dan Gohman [Mon, 24 Nov 2008 19:53:21 +0000 (19:53 +0000)]
Move the scheduler constructor functions to SchedulerRegistry.h, to
simplify header dependencies for front-ends that just want to choose
a scheduler and don't need all the scheduling machinery declarations.

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

15 years agoFix an unused-parameter warning.
Dan Gohman [Mon, 24 Nov 2008 19:51:59 +0000 (19:51 +0000)]
Fix an unused-parameter warning.

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

15 years agorevert an accidental commit, this fixes the regression on test/CodeGen/X86/isel-sink.ll
Chris Lattner [Mon, 24 Nov 2008 19:40:34 +0000 (19:40 +0000)]
revert an accidental commit, this fixes the regression on test/CodeGen/X86/isel-sink.ll

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

15 years agoFix 3113: If we have a dead cyclic PHI, replace the whole thing
Chris Lattner [Mon, 24 Nov 2008 19:25:36 +0000 (19:25 +0000)]
Fix 3113: If we have a dead cyclic PHI, replace the whole thing
with an undef.

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

15 years ago- Make lowering of "add with overflow" customizable by back-ends.
Bill Wendling [Mon, 24 Nov 2008 19:21:46 +0000 (19:21 +0000)]
- Make lowering of "add with overflow" customizable by back-ends.
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
  lowering representation for now.

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

15 years agoCellSPU:
Scott Michel [Mon, 24 Nov 2008 18:20:46 +0000 (18:20 +0000)]
CellSPU:
(a) Slight rethink on i64 zero/sign/any extend code - use a shuffle to
    directly zero-extend i32 to i64, but use rotates and shifts for
    sign extension. Also ensure unified register consistency.
(b) Add new test harness for i64 operations: i64ops.ll

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

15 years agoCheck in the rest of this change. The isAntiDep flag needs to be passed
Dan Gohman [Mon, 24 Nov 2008 17:33:52 +0000 (17:33 +0000)]
Check in the rest of this change. The isAntiDep flag needs to be passed
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.

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

15 years agoPass the isAntiDep argument.
Dan Gohman [Mon, 24 Nov 2008 17:24:27 +0000 (17:24 +0000)]
Pass the isAntiDep argument.

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

15 years agoRun post-RA scheduling after branch folding, as it tends to
Dan Gohman [Mon, 24 Nov 2008 17:22:52 +0000 (17:22 +0000)]
Run post-RA scheduling after branch folding, as it tends to
obscure tail-merging opportunities.

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

15 years agoFix a few HTML tidiness issues.
Dan Gohman [Mon, 24 Nov 2008 17:18:39 +0000 (17:18 +0000)]
Fix a few HTML tidiness issues.

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

15 years agoCellSPU:
Scott Michel [Mon, 24 Nov 2008 17:11:17 +0000 (17:11 +0000)]
CellSPU:
(a) Improve the extract element code: there's no need to do gymnastics with
    rotates into the preferred slot if a shuffle will do the same thing.
(b) Rename a couple of SPUISD pseudo-instructions for readability and better
    semantic correspondence.
(c) Fix i64 sign/any/zero extension lowering.

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

15 years agoDelete some spurious characters.
Dan Gohman [Mon, 24 Nov 2008 16:45:15 +0000 (16:45 +0000)]
Delete some spurious characters.

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