oota-llvm.git
16 years agoTurn floating point IVs into integer IVs where possible.
Devang Patel [Mon, 3 Nov 2008 18:32:19 +0000 (18:32 +0000)]
Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.

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

16 years agoRefactor various TargetAsmInfo subclasses' TargetMachine members away
Dan Gohman [Mon, 3 Nov 2008 18:22:42 +0000 (18:22 +0000)]
Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.

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

16 years agoChange how extended types are represented in MVTs. Instead of fiddling
Dan Gohman [Mon, 3 Nov 2008 17:56:27 +0000 (17:56 +0000)]
Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.

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

16 years agoComment fix.
Daniel Dunbar [Mon, 3 Nov 2008 17:33:36 +0000 (17:33 +0000)]
Comment fix.

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

16 years agoRemove redundant inline keywords from functions defined within
Dan Gohman [Mon, 3 Nov 2008 17:10:24 +0000 (17:10 +0000)]
Remove redundant inline keywords from functions defined within
class definitions.

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

16 years agoEnsure that we are checking only calls to the function we are interested in specializing
Andrew Lenharth [Mon, 3 Nov 2008 16:05:35 +0000 (16:05 +0000)]
Ensure that we are checking only calls to the function we are interested in specializing

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

16 years agoTestcase for recent llvm-gcc fix
Anton Korobeynikov [Mon, 3 Nov 2008 14:43:31 +0000 (14:43 +0000)]
Testcase for recent llvm-gcc fix

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

16 years agoMake VAARG work with x86 long double (which is
Duncan Sands [Mon, 3 Nov 2008 11:51:11 +0000 (11:51 +0000)]
Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).

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

16 years agoMake MachineFrameInfo::print not crash when no TargetFrameInfo is available.
Matthijs Kooijman [Mon, 3 Nov 2008 11:16:43 +0000 (11:16 +0000)]
Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.

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

16 years agoSilence a compiler warning.
Evan Cheng [Mon, 3 Nov 2008 07:14:02 +0000 (07:14 +0000)]
Silence a compiler warning.

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

16 years agoTypo
Nick Lewycky [Mon, 3 Nov 2008 03:50:40 +0000 (03:50 +0000)]
Typo

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

16 years agoReplace explicit loop with utility function.
Nick Lewycky [Mon, 3 Nov 2008 03:49:14 +0000 (03:49 +0000)]
Replace explicit loop with utility function.

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

16 years agoDon't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
Nick Lewycky [Mon, 3 Nov 2008 02:43:49 +0000 (02:43 +0000)]
Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.

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

16 years agoRevert my last patch until I consult with Evan about it.
Owen Anderson [Mon, 3 Nov 2008 02:33:28 +0000 (02:33 +0000)]
Revert my last patch until I consult with Evan about it.

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

16 years agoChanges from Duncan's review:
Nick Lewycky [Sun, 2 Nov 2008 16:46:26 +0000 (16:46 +0000)]
Changes from Duncan's review:
 * merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types

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

16 years agoTestcase for PR2691
Anton Korobeynikov [Sun, 2 Nov 2008 16:46:17 +0000 (16:46 +0000)]
Testcase for PR2691

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

16 years agoSilence a warning
Anton Korobeynikov [Sun, 2 Nov 2008 11:47:11 +0000 (11:47 +0000)]
Silence a warning

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

16 years agoGet this building on 64 bit machines (error:
Duncan Sands [Sun, 2 Nov 2008 09:00:33 +0000 (09:00 +0000)]
Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).

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

16 years agoDon't do pre-splitting if doing so would create a value join that did not
Owen Anderson [Sun, 2 Nov 2008 08:08:18 +0000 (08:08 +0000)]
Don't do pre-splitting if doing so would create a value join that did not
exist before.  Updating the live intervals in that care is tricky in the general
case.

Evan, if you see a tighter guard condition for this, let me know.

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

16 years agoCMake: added a source file.
Oscar Fuentes [Sun, 2 Nov 2008 06:01:39 +0000 (06:01 +0000)]
CMake: added a source file.

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

16 years agoWhoops! Remove test Output/ directory.
Nick Lewycky [Sun, 2 Nov 2008 05:53:37 +0000 (05:53 +0000)]
Whoops! Remove test Output/ directory.

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

16 years agoAdd a new MergeFunctions pass. It finds identical functions and merges them.
Nick Lewycky [Sun, 2 Nov 2008 05:52:50 +0000 (05:52 +0000)]
Add a new MergeFunctions pass. It finds identical functions and merges them.

This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.

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

16 years agoFix demanded bits analysis with srem by negative number. Based on a patch
Nick Lewycky [Sun, 2 Nov 2008 02:41:50 +0000 (02:41 +0000)]
Fix demanded bits analysis with srem by negative number. Based on a patch
by Richard Osborne.

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

16 years agoFix this recently moved code to use the correct type. CI is now a
Dan Gohman [Sun, 2 Nov 2008 00:17:33 +0000 (00:17 +0000)]
Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.

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

16 years agoAdded interface to allow clients to create a MemIntrinsicNode for
Mon P Wang [Sat, 1 Nov 2008 20:24:53 +0000 (20:24 +0000)]
Added interface to allow clients to create a MemIntrinsicNode for
target intrinsics that touches memory

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

16 years agoReverting back 58505. Will commit it once I have the bc reader/writer/docs
Sanjiv Gupta [Sat, 1 Nov 2008 10:57:12 +0000 (10:57 +0000)]
Reverting back 58505. Will commit it once I have the bc reader/writer/docs
ready.

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

16 years agoWhitespace fixes. No functionality change.
Bill Wendling [Fri, 31 Oct 2008 21:26:08 +0000 (21:26 +0000)]
Whitespace fixes. No functionality change.

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

16 years agoTestcase for PR2613
Anton Korobeynikov [Fri, 31 Oct 2008 20:10:49 +0000 (20:10 +0000)]
Testcase for PR2613

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

16 years agoInvalidate debug/eh/gc labels when unreachable MBB is deleted.
Anton Korobeynikov [Fri, 31 Oct 2008 20:08:30 +0000 (20:08 +0000)]
Invalidate debug/eh/gc labels when unreachable MBB is deleted.
Based on patch by Martin Nowack!

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

16 years agoAdd comment.
Evan Cheng [Fri, 31 Oct 2008 19:56:03 +0000 (19:56 +0000)]
Add comment.

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

16 years agoUse better data structure for ConstPoolId2AddrMap.
Evan Cheng [Fri, 31 Oct 2008 19:55:13 +0000 (19:55 +0000)]
Use better data structure for ConstPoolId2AddrMap.

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

16 years agoActually make debug output understandable.
Evan Cheng [Fri, 31 Oct 2008 19:15:52 +0000 (19:15 +0000)]
Actually make debug output understandable.

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

16 years agox86_64 rip-relative and magic mode address
Mon P Wang [Fri, 31 Oct 2008 19:13:42 +0000 (19:13 +0000)]
x86_64 rip-relative and magic mode address

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

16 years agoForgot this in last commit.
Evan Cheng [Fri, 31 Oct 2008 19:11:09 +0000 (19:11 +0000)]
Forgot this in last commit.

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

16 years agoEncode PICADD; some code clean up.
Evan Cheng [Fri, 31 Oct 2008 19:10:44 +0000 (19:10 +0000)]
Encode PICADD; some code clean up.

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

16 years agoRemove some unused virtual function bodies.
Dan Gohman [Fri, 31 Oct 2008 19:06:33 +0000 (19:06 +0000)]
Remove some unused virtual function bodies.

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

16 years agoRevert r58489. It isn't correct for all cases.
Bill Wendling [Fri, 31 Oct 2008 18:30:19 +0000 (18:30 +0000)]
Revert r58489. It isn't correct for all cases.

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

16 years agoSymbol visibility is unsupported on cygwin too.
Anton Korobeynikov [Fri, 31 Oct 2008 18:05:01 +0000 (18:05 +0000)]
Symbol visibility is unsupported on cygwin too.
Patch by Jay Foad!

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

16 years agoAdd an assert to catch user errors like:
Torok Edwin [Fri, 31 Oct 2008 17:27:41 +0000 (17:27 +0000)]
Add an assert to catch user errors like:
MyFunctionPass() : FunctionPass(ID) {}

when the user actually meant to write:
MyFunctionPass() : FunctionPass(&ID) {}

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

16 years agoChange x86 register allocation ordering to match that of gcc. Otherwise some tools...
Evan Cheng [Fri, 31 Oct 2008 16:52:57 +0000 (16:52 +0000)]
Change x86 register allocation ordering to match that of gcc. Otherwise some tools get confused by prologue generated by llvm.

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

16 years agoAdd a fixme.
Evan Cheng [Fri, 31 Oct 2008 16:41:59 +0000 (16:41 +0000)]
Add a fixme.

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

16 years agoTotally disable the setSubgraphColor calls temporarily, as they're
Dan Gohman [Fri, 31 Oct 2008 16:12:56 +0000 (16:12 +0000)]
Totally disable the setSubgraphColor calls temporarily, as they're
currently troublesome even for #ifndef NDEBUG builds.

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

16 years agoAdd a bunch of libcalls for ppcf128 that were somehow
Duncan Sands [Fri, 31 Oct 2008 14:06:52 +0000 (14:06 +0000)]
Add a bunch of libcalls for ppcf128 that were somehow
completely forgotten about when writing LegalizeTypes.

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

16 years agoFor some targets pointer and int are 16-bits. Allow 16-bits as a valid index
Sanjiv Gupta [Fri, 31 Oct 2008 10:26:20 +0000 (10:26 +0000)]
For some targets pointer and int are 16-bits. Allow 16-bits as a valid index
in such cases.

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

16 years agoDon't skip over all "terminator" instructions when determining where to put the
Bill Wendling [Fri, 31 Oct 2008 04:00:23 +0000 (04:00 +0000)]
Don't skip over all "terminator" instructions when determining where to put the
callee-saved restore code. It could skip over conditional jumps
accidentally. Instead, just skip the "return" instructions.

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

16 years agoFix warning.
Daniel Dunbar [Fri, 31 Oct 2008 01:50:01 +0000 (01:50 +0000)]
Fix warning.

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

16 years agoCMake: Fix some unwanted commentary line wraps on the last change.
Oscar Fuentes [Fri, 31 Oct 2008 01:37:26 +0000 (01:37 +0000)]
CMake: Fix some unwanted commentary line wraps on the last change.

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

16 years agoCMake: Establish dependencies among executables and libraries, using
Oscar Fuentes [Fri, 31 Oct 2008 01:24:51 +0000 (01:24 +0000)]
CMake: Establish dependencies among executables and libraries, using
data manually extracted from llvm-config.

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

16 years agoUse MOVSSmr instead of EXTRACTPSmr in the case of extracting
Dan Gohman [Fri, 31 Oct 2008 00:57:24 +0000 (00:57 +0000)]
Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
vector element 0 for a store, as it's smaller and faster.

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

16 years agoRevert errant deletion. The target needs to be able to specify that it doesn't want...
Jim Grosbach [Thu, 30 Oct 2008 23:44:39 +0000 (23:44 +0000)]
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.

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

16 years agoI think we got non-machine specific constpool entries covered.
Evan Cheng [Thu, 30 Oct 2008 23:43:36 +0000 (23:43 +0000)]
I think we got non-machine specific constpool entries covered.

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

16 years agoChange the name of the generated solution file for a CMake build. (from 'project...
Cedric Venet [Thu, 30 Oct 2008 21:22:00 +0000 (21:22 +0000)]
Change the name of the generated solution file for a CMake build. (from 'project' to 'LLVM').
!!!!!!!!!! Warning !!!!!!!!!!!!!!!
If you already have created a solution with cmake, you will need to manually open to the new one.

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

16 years agoTestcase for PR2987.
Duncan Sands [Thu, 30 Oct 2008 21:13:11 +0000 (21:13 +0000)]
Testcase for PR2987.

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

16 years agoCanonicalize sext(i1) to i1?-1:0, and update various instcombine
Dan Gohman [Thu, 30 Oct 2008 20:40:10 +0000 (20:40 +0000)]
Canonicalize sext(i1) to i1?-1:0, and update various instcombine
optimizations accordingly.

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

16 years agoTestcase for PR2986.
Duncan Sands [Thu, 30 Oct 2008 20:34:30 +0000 (20:34 +0000)]
Testcase for PR2986.

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

16 years agoFix PR2986: do not use a potentially illegal
Duncan Sands [Thu, 30 Oct 2008 20:26:50 +0000 (20:26 +0000)]
Fix PR2986: do not use a potentially illegal
type for the shift amount type.  Add a check
that shifts and rotates use the type returned
by getShiftAmountTy for the amount.  This
exposed some problems in CellSPU and PPC,
which have already been fixed.

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

16 years agoSet svn:ignore on cscope.{files,out} in root llvm directory.
Daniel Dunbar [Thu, 30 Oct 2008 19:35:32 +0000 (19:35 +0000)]
Set svn:ignore on cscope.{files,out} in root llvm directory.

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

16 years agoSet svn:ignore for some Release-Asserts and Output dirs.
Daniel Dunbar [Thu, 30 Oct 2008 19:31:35 +0000 (19:31 +0000)]
Set svn:ignore for some Release-Asserts and Output dirs.

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

16 years agoShift amounts should have type getShiftAmountTy
Duncan Sands [Thu, 30 Oct 2008 19:28:32 +0000 (19:28 +0000)]
Shift amounts should have type getShiftAmountTy
(i32 for PPC, not i8).  Correct this, and some
formatting while there.

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

16 years agoAdd InlineCost class for represent the estimated cost of inlining a
Daniel Dunbar [Thu, 30 Oct 2008 19:26:59 +0000 (19:26 +0000)]
Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.

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

16 years agoShift amounts should have the type given by
Duncan Sands [Thu, 30 Oct 2008 19:24:28 +0000 (19:24 +0000)]
Shift amounts should have the type given by
getShiftAmountTy (i32 in the case of CellSPU).

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

16 years agoAdd missing vsetcc expansion for widening
Mon P Wang [Thu, 30 Oct 2008 18:21:52 +0000 (18:21 +0000)]
Add missing vsetcc expansion for widening

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

16 years agoCMake: Reverted some unintentional changes on the previous commit.
Oscar Fuentes [Thu, 30 Oct 2008 17:21:37 +0000 (17:21 +0000)]
CMake: Reverted some unintentional changes on the previous commit.

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

16 years agoCMake: Cygwin pretends to be Unix.
Oscar Fuentes [Thu, 30 Oct 2008 17:15:54 +0000 (17:15 +0000)]
CMake: Cygwin pretends to be Unix.
Patch by Jay Foad.

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

16 years agoARM JIT should observe -relocation-model command line option.
Evan Cheng [Thu, 30 Oct 2008 16:10:54 +0000 (16:10 +0000)]
ARM JIT should observe -relocation-model command line option.

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

16 years agoAdd initial support for vector widening. Logic is set to widen for X86.
Mon P Wang [Thu, 30 Oct 2008 08:01:45 +0000 (08:01 +0000)]
Add initial support for vector widening.  Logic is set to widen for X86.
One will only see an effect if legalizetype is not active.  Will move
support to LegalizeType soon.

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

16 years agomention fortran status.
Chris Lattner [Thu, 30 Oct 2008 03:58:13 +0000 (03:58 +0000)]
mention fortran status.

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

16 years agoResolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
Scott Michel [Thu, 30 Oct 2008 01:51:48 +0000 (01:51 +0000)]
Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.

N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.

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

16 years agoRevert r58411. The user needs to #define this when using the JITMemoryManager.h header.
Bill Wendling [Thu, 30 Oct 2008 01:22:58 +0000 (01:22 +0000)]
Revert r58411. The user needs to #define this when using the JITMemoryManager.h header.

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

16 years agoSpell DISABLE_ASSERTIONS correctly.
Dan Gohman [Thu, 30 Oct 2008 01:08:03 +0000 (01:08 +0000)]
Spell DISABLE_ASSERTIONS correctly.

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

16 years agoRevert part of r58048. It was breaking on SnowLeopard claiming that
Bill Wendling [Thu, 30 Oct 2008 00:11:55 +0000 (00:11 +0000)]
Revert part of r58048. It was breaking on SnowLeopard claiming that
"__STDC_CONSTANT_MACROS" needs to be #defined first.

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

16 years agoCorrect way to handle CONSTPOOL_ENTRY instructions.
Evan Cheng [Wed, 29 Oct 2008 23:55:43 +0000 (23:55 +0000)]
Correct way to handle CONSTPOOL_ENTRY instructions.

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

16 years agoAdd debugging support.
Evan Cheng [Wed, 29 Oct 2008 23:55:17 +0000 (23:55 +0000)]
Add debugging support.

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

16 years agoLet target resolve some relocation results.
Evan Cheng [Wed, 29 Oct 2008 23:54:46 +0000 (23:54 +0000)]
Let target resolve some relocation results.

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

16 years agoThis is not needed anymore.
Evan Cheng [Wed, 29 Oct 2008 23:54:10 +0000 (23:54 +0000)]
This is not needed anymore.

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

16 years agoAdd a bit to MachineRelocation that tells JIT that target is responsible for resolvin...
Evan Cheng [Wed, 29 Oct 2008 23:53:42 +0000 (23:53 +0000)]
Add a bit to MachineRelocation that tells JIT that target is responsible for resolving the address. e.g. ARM constpool.

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

16 years agoFix PEXTRQ encoding
Nate Begeman [Wed, 29 Oct 2008 23:07:17 +0000 (23:07 +0000)]
Fix PEXTRQ encoding

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

16 years agoadd testcase for PR2964
Chris Lattner [Wed, 29 Oct 2008 18:42:22 +0000 (18:42 +0000)]
add testcase for PR2964

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

16 years agoAdd a RM pseudoreg for the rounding mode, which
Dale Johannesen [Wed, 29 Oct 2008 18:26:45 +0000 (18:26 +0000)]
Add a RM pseudoreg for the rounding mode, which
allows ppcf128->int conversion to work with
DeadInstructionElimination.  This is now turned
off but RM is harmless.  It does not do a complete
job of modeling the rounding mode.

Revert marking MFCR as using all 7 CR subregisters;
while correct, this caused the problem in PR 2964,
plus the local RA crash noted in the comments.
This was needed to make DeadInstructionElimination,
but as we are not running that, it is backed out
for now.  Eventually it should go back in and the
other problems fixed where they're broken.

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

16 years agoTestcase for PR2917.
Duncan Sands [Wed, 29 Oct 2008 18:06:20 +0000 (18:06 +0000)]
Testcase for PR2917.

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

16 years agoUniformize capitalization of NodeId.
Duncan Sands [Wed, 29 Oct 2008 17:52:12 +0000 (17:52 +0000)]
Uniformize capitalization of NodeId.

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

16 years agoFix PR2967 by not deleting volatile load/stores that occur before unreachable.
Chris Lattner [Wed, 29 Oct 2008 17:46:26 +0000 (17:46 +0000)]
Fix PR2967 by not deleting volatile load/stores that occur before unreachable.
I don't really see this as being needed, but there is little harm from doing
it.

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

16 years agofix typo
Torok Edwin [Wed, 29 Oct 2008 16:32:06 +0000 (16:32 +0000)]
fix typo

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

16 years agoMake the declaration of bzero match size_t on
Duncan Sands [Wed, 29 Oct 2008 15:57:37 +0000 (15:57 +0000)]
Make the declaration of bzero match size_t on
x86-64-linux.

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

16 years agoFix PR2977: LegalizeTypes support for expanding
Duncan Sands [Wed, 29 Oct 2008 14:25:28 +0000 (14:25 +0000)]
Fix PR2977: LegalizeTypes support for expanding
VAARG.

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

16 years agoAdd sanity checking for BUILD_PAIR (I noticed the
Duncan Sands [Wed, 29 Oct 2008 14:22:20 +0000 (14:22 +0000)]
Add sanity checking for BUILD_PAIR (I noticed the
other day that PPC custom lowering could create
a BUILD_PAIR of two f64 with a result type of...
f64! - already fixed).  Fix a place that triggers
the sanity check.

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

16 years ago- More pre-split fixes: spill slot live interval computation bug; restore point bug.
Evan Cheng [Wed, 29 Oct 2008 08:39:34 +0000 (08:39 +0000)]
- More pre-split fixes: spill slot live interval computation bug; restore point bug.
- If a def is spilt, remember its spill index to allow its reuse.

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

16 years agoFix a FIXME: in ReplaceNodeWith, if the new node
Duncan Sands [Wed, 29 Oct 2008 06:42:19 +0000 (06:42 +0000)]
Fix a FIXME: in ReplaceNodeWith, if the new node
is morphed by AnalyzeNewNode into a previously
processed node, and different result values of
that node are remapped to values with different
nodes, then we could end up using wrong values
here [we were assuming that all results remap
to values with the same underlying node].  This
seems theoretically possible, but I don't have
a testcase.  The meat of the patch is in the
changes to AnalyzeNewNode/AnalyzeNewValue and
ReplaceNodeWith.  While there, I changed names
like RemapNode to RemapValue, since it really
remaps values.  To tell the truth, I would be
much happier if we were only remapping nodes
(it would simplify a bunch of logic, and allow
for some cute speedups) but I haven't yet worked
out how to do that.

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

16 years agoFix 80 column violations.
Duncan Sands [Wed, 29 Oct 2008 06:33:00 +0000 (06:33 +0000)]
Fix 80 column violations.

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

16 years agoFix 80 column violations.
Duncan Sands [Wed, 29 Oct 2008 06:31:03 +0000 (06:31 +0000)]
Fix 80 column violations.

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

16 years ago- Rewrite code that update register live interval that's split.
Evan Cheng [Wed, 29 Oct 2008 05:06:14 +0000 (05:06 +0000)]
- Rewrite code that update register live interval that's split.
- Create and update spill slot live intervals.
- Lots of bug fixes.

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

16 years agoCMake: Removed some cruft.
Oscar Fuentes [Wed, 29 Oct 2008 02:33:15 +0000 (02:33 +0000)]
CMake: Removed some cruft.

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

16 years agoFactor shouldInline method out of Inliner.
Daniel Dunbar [Wed, 29 Oct 2008 01:02:02 +0000 (01:02 +0000)]
Factor shouldInline method out of Inliner.
 - No functionality change.

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

16 years agoDon't force things to be Value * when they're not.
David Greene [Wed, 29 Oct 2008 00:30:54 +0000 (00:30 +0000)]
Don't force things to be Value * when they're not.

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

16 years agoAssorted comment/naming fixes, 80-col violations, and reindentation.
Daniel Dunbar [Tue, 28 Oct 2008 23:24:26 +0000 (23:24 +0000)]
Assorted comment/naming fixes, 80-col violations, and reindentation.
 - No functionality change.

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

16 years ago(A & sext(C)) | (B & ~sext(C) -> C ? A : B
Dan Gohman [Tue, 28 Oct 2008 22:38:57 +0000 (22:38 +0000)]
(A & sext(C)) | (B & ~sext(C)  ->  C ? A : B

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

16 years agoTake Chris' suggestion and define EnableFastISelVerbose and
Dan Gohman [Tue, 28 Oct 2008 20:35:31 +0000 (20:35 +0000)]
Take Chris' suggestion and define EnableFastISelVerbose and
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.

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

16 years agollvm-ld doesn't have a -march option. This fixes PR2961
Chris Lattner [Tue, 28 Oct 2008 20:05:06 +0000 (20:05 +0000)]
llvm-ld doesn't have a -march option.  This fixes PR2961

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

16 years agoReuse PrintEscapedString for printing names in .ll
Daniel Dunbar [Tue, 28 Oct 2008 19:33:02 +0000 (19:33 +0000)]
Reuse PrintEscapedString for printing names in .ll
 - One functionality change, '\\' in a name is now printed as a hex
   escape instead of "\\\\". This is consistent with other users of
   PrintEscapedString.

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

16 years agoProtect the code for fast-isel debugging with #ifndef NDEBUG.
Dan Gohman [Tue, 28 Oct 2008 19:08:46 +0000 (19:08 +0000)]
Protect the code for fast-isel debugging with #ifndef NDEBUG.

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