oota-llvm.git
16 years agoremove obviously dead uses of IncludeFile.
Chris Lattner [Tue, 18 Dec 2007 19:15:48 +0000 (19:15 +0000)]
remove obviously dead uses of IncludeFile.

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

16 years agoAlso print alignment and volatileness.
Evan Cheng [Tue, 18 Dec 2007 19:06:30 +0000 (19:06 +0000)]
Also print alignment and volatileness.

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

16 years agoremove a dead annotation
Chris Lattner [Tue, 18 Dec 2007 19:04:24 +0000 (19:04 +0000)]
remove a dead annotation

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

16 years agoAdded some sectioning comments to Serialize.h.
Ted Kremenek [Tue, 18 Dec 2007 18:25:55 +0000 (18:25 +0000)]
Added some sectioning comments to Serialize.h.
Added additional serialization functors for use with std::foreach.

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

16 years agoadd an obvious load folding missed optzn.
Chris Lattner [Tue, 18 Dec 2007 16:48:14 +0000 (16:48 +0000)]
add an obvious load folding missed optzn.

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

16 years agoRename isNoReturn to doesNotReturn, and isNoUnwind to
Duncan Sands [Tue, 18 Dec 2007 09:59:50 +0000 (09:59 +0000)]
Rename isNoReturn to doesNotReturn, and isNoUnwind to
doesNotThrow.

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

16 years agoFix typos.
Christopher Lamb [Tue, 18 Dec 2007 09:45:40 +0000 (09:45 +0000)]
Fix typos.

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

16 years agoFold certain additions through selects (and their compares) so as to eliminate subtra...
Christopher Lamb [Tue, 18 Dec 2007 09:34:41 +0000 (09:34 +0000)]
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.

This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll

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

16 years agoFIX for PR1799: When a load is unfolded from an instruction, check if it is a new...
Evan Cheng [Tue, 18 Dec 2007 08:42:10 +0000 (08:42 +0000)]
FIX for PR1799: When a load is unfolded from an instruction, check if it is a new node. If not, do not create a new SUnit.

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

16 years agoSelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
Evan Cheng [Tue, 18 Dec 2007 07:02:08 +0000 (07:02 +0000)]
SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.

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

16 years agoavoid confusing terminology (what is a "word"?), fix scary markup, add section to...
Chris Lattner [Tue, 18 Dec 2007 06:18:21 +0000 (06:18 +0000)]
avoid confusing terminology (what is a "word"?), fix scary markup, add section to TOC.

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

16 years agoDon't forget to print address space qualifiers when printing out the type table!...
Christopher Lamb [Tue, 18 Dec 2007 03:49:35 +0000 (03:49 +0000)]
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.

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

16 years agoTestcase for preceding FE fix
Dale Johannesen [Tue, 18 Dec 2007 01:58:38 +0000 (01:58 +0000)]
Testcase for preceding FE fix

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

16 years agoadd a missed case.
Chris Lattner [Tue, 18 Dec 2007 01:19:18 +0000 (01:19 +0000)]
add a missed case.

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

16 years agoRemove int_x86_sse2_movl_dq. It's replaced with a string compare.
Evan Cheng [Tue, 18 Dec 2007 01:04:25 +0000 (01:04 +0000)]
Remove int_x86_sse2_movl_dq. It's replaced with a string compare.

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

16 years agoThese have matching builtin's in 4.2.
Evan Cheng [Tue, 18 Dec 2007 00:52:20 +0000 (00:52 +0000)]
These have matching builtin's in 4.2.

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

16 years agoi32 immediate constant test case for CellSPU
Scott Michel [Mon, 17 Dec 2007 23:45:52 +0000 (23:45 +0000)]
i32 immediate constant test case for CellSPU

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

16 years agos/hasSideEffects/hasUnmodelledSideEffects/g
Bill Wendling [Mon, 17 Dec 2007 23:19:54 +0000 (23:19 +0000)]
s/hasSideEffects/hasUnmodelledSideEffects/g

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

16 years agoAdd "mayHaveSideEffects" and "neverHasSideEffects" flags to some instructions. I
Bill Wendling [Mon, 17 Dec 2007 23:07:56 +0000 (23:07 +0000)]
Add "mayHaveSideEffects" and "neverHasSideEffects" flags to some instructions. I
based what flag to set on whether it was already marked as
"isRematerializable". If there was a further check to determine if it's "really"
rematerializable, then I marked it as "mayHaveSideEffects" and created a check
in the X86 back-end similar to the remat one.

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

16 years agoBring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
Evan Cheng [Mon, 17 Dec 2007 22:33:23 +0000 (22:33 +0000)]
Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
it's auto-upgraded to a shufflevector instruction.

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

16 years ago- Restore some i8 functionality in CellSPU
Scott Michel [Mon, 17 Dec 2007 22:32:34 +0000 (22:32 +0000)]
- Restore some i8 functionality in CellSPU
- New test case: nand.ll

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

16 years agoModified Deserializer::ReadCStr to allow C-strings to be read into a
Ted Kremenek [Mon, 17 Dec 2007 22:25:12 +0000 (22:25 +0000)]
Modified Deserializer::ReadCStr to allow C-strings to be read into a
std::vector<char> starting from any index in the vector.

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

16 years agoLD_Fp64m should have "isRematerializable" set.
Bill Wendling [Mon, 17 Dec 2007 22:17:14 +0000 (22:17 +0000)]
LD_Fp64m should have "isRematerializable" set.

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

16 years agoAdd "hasSideEffects" method to MachineInstrInfo class.
Bill Wendling [Mon, 17 Dec 2007 21:53:30 +0000 (21:53 +0000)]
Add "hasSideEffects" method to MachineInstrInfo class.

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

16 years agoAdd MachineLICM.cpp
Bill Wendling [Mon, 17 Dec 2007 21:14:45 +0000 (21:14 +0000)]
Add MachineLICM.cpp

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

16 years agoAs per feedback, revised comments to (hopefully) make the different side effect
Bill Wendling [Mon, 17 Dec 2007 21:02:07 +0000 (21:02 +0000)]
As per feedback, revised comments to (hopefully) make the different side effect
flags clearer.

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

16 years agoAdd cast operators in LLVMFoldingBuilder.
Devang Patel [Mon, 17 Dec 2007 19:06:26 +0000 (19:06 +0000)]
Add cast operators in LLVMFoldingBuilder.
Patch by Richard Pennington.

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

16 years agocleanup this code, making it more "llvm-like".
Chris Lattner [Mon, 17 Dec 2007 18:58:23 +0000 (18:58 +0000)]
cleanup this code, making it more "llvm-like".
Add comments to reset indicating that it deletes its pointer.
Add a new take() method, which can be used to get the pointer
without it being deleted.

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

16 years agoMake invokes of inline asm legal. Teach codegen
Duncan Sands [Mon, 17 Dec 2007 18:08:19 +0000 (18:08 +0000)]
Make invokes of inline asm legal.  Teach codegen
how to lower them (with no attempt made to be
efficient, since they should only occur for
unoptimized code).

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

16 years agoGLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.
David Greene [Mon, 17 Dec 2007 17:42:03 +0000 (17:42 +0000)]
GLIBCXX_DEBUG fix.  std::vector<>::end() is invalidated by erase.

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

16 years agoGet rid of annoying spaces.
David Greene [Mon, 17 Dec 2007 17:40:29 +0000 (17:40 +0000)]
Get rid of annoying spaces.

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

16 years agoFix GLIBCXX_DEBUG errors. Erase invalidates std::vector iterators
David Greene [Mon, 17 Dec 2007 17:39:51 +0000 (17:39 +0000)]
Fix GLIBCXX_DEBUG errors.  Erase invalidates std::vector iterators
passed the erased element.

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

16 years agoDisabling a RUN line that's broken until addrspace roundtrips
Gordon Henriksen [Mon, 17 Dec 2007 16:09:28 +0000 (16:09 +0000)]
Disabling a RUN line that's broken until addrspace roundtrips
through llvm-as|llvm-dis.

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

16 years agoC and Ocaml bindings for address spaces, for that burgeoning market
Gordon Henriksen [Mon, 17 Dec 2007 16:08:32 +0000 (16:08 +0000)]
C and Ocaml bindings for address spaces, for that burgeoning market
for Ocaml-based compilers targeting embedded devices. :)

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

16 years agoregenerate.
Christopher Lamb [Mon, 17 Dec 2007 01:17:35 +0000 (01:17 +0000)]
regenerate.

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

16 years agoChange the PointerType api for creating pointer types. The old functionality of Point...
Christopher Lamb [Mon, 17 Dec 2007 01:12:55 +0000 (01:12 +0000)]
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.

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

16 years agoMake it clear in the LangRef that allocation instructions only operated on the generi...
Christopher Lamb [Mon, 17 Dec 2007 01:00:21 +0000 (01:00 +0000)]
Make it clear in the LangRef that allocation instructions only operated on the generic address space. Implement support in the verifier for ensuring this is true.

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

16 years agoRevert this part of r45073 until the verifier is
Duncan Sands [Sun, 16 Dec 2007 21:01:21 +0000 (21:01 +0000)]
Revert this part of r45073 until the verifier is
changed not to reject invoke of inline asm.

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

16 years agodon't violate C TBAA rules, use FloatToBits instead.
Chris Lattner [Sun, 16 Dec 2007 20:41:33 +0000 (20:41 +0000)]
don't violate C TBAA rules, use FloatToBits instead.

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

16 years agofix a questionable cast, thanks to Mike Stump for pointing this out.
Chris Lattner [Sun, 16 Dec 2007 20:26:54 +0000 (20:26 +0000)]
fix a questionable cast, thanks to Mike Stump for pointing this out.

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

16 years agoFix the JIT encoding of cmp*ss, which aborts with this assertion currently:
Chris Lattner [Sun, 16 Dec 2007 20:12:41 +0000 (20:12 +0000)]
Fix the JIT encoding of cmp*ss, which aborts with this assertion currently:
X86CodeEmitter.cpp:378: failed assertion `0 && "Immediate size not set!"'

I *think* this is right, but Evan, please verify.  It also looks like
CMPSDrr and maybe others are missing this info.  Evan, plz investigate.

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

16 years agoMake instcombine promote inline asm calls to 'nounwind'
Duncan Sands [Sun, 16 Dec 2007 15:51:49 +0000 (15:51 +0000)]
Make instcombine promote inline asm calls to 'nounwind'
calls.  Remove special casing of inline asm from the
inliner.  There is a potential problem: the verifier
rejects invokes of inline asm (not sure why).  If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created.  This is bad but
I'm not sure what the best approach is.  I'm tempted
to remove the check in the verifier...

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

16 years agoRemove spurious warnings from GCC:
Bill Wendling [Sun, 16 Dec 2007 09:16:12 +0000 (09:16 +0000)]
Remove spurious warnings from GCC:

warning: suggest a space before ';' or explicit braces around empty
body in 'for' statement

Patch by Mike Stump (modified slightly by yours truly).

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

16 years agoBreak local interferences in StrongPHIElimination. One step closer...
Owen Anderson [Sun, 16 Dec 2007 05:44:27 +0000 (05:44 +0000)]
Break local interferences in StrongPHIElimination.  One step closer...

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

16 years agoA few more comments.
Owen Anderson [Sun, 16 Dec 2007 04:07:23 +0000 (04:07 +0000)]
A few more comments.

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

16 years agoDefine addString() and lookup() out-of-line to dissuade the C++ compiler from inlinin...
Anton Korobeynikov [Sun, 16 Dec 2007 01:36:16 +0000 (01:36 +0000)]
Define addString() and lookup() out-of-line to dissuade the C++ compiler from inlining it.

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

16 years agoProvide GraphTraits and DOTGraphTraits interface for Trie.
Anton Korobeynikov [Sun, 16 Dec 2007 01:27:04 +0000 (01:27 +0000)]
Provide GraphTraits and DOTGraphTraits interface for Trie.
Retoss private/public stuff.
Make copy ctor and operator= private.

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

16 years agoConstify graph arguments
Anton Korobeynikov [Sun, 16 Dec 2007 00:42:19 +0000 (00:42 +0000)]
Constify graph arguments

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

16 years agoUse references in DF iterators. This eliminates copy-ctor calls on huge objects ...
Anton Korobeynikov [Sat, 15 Dec 2007 22:23:24 +0000 (22:23 +0000)]
Use references in DF iterators. This eliminates copy-ctor calls on huge objects (graphs)

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

16 years agoThese are more correctly called signaling NaNs.
Duncan Sands [Sat, 15 Dec 2007 17:37:40 +0000 (17:37 +0000)]
These are more correctly called signaling NaNs.

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

16 years agoMake better use of instructions that clear high bits; fix various 2-wide shuffle...
Evan Cheng [Sat, 15 Dec 2007 03:00:47 +0000 (03:00 +0000)]
Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.

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

16 years ago__builtin_ia32_movqv4si is now expanded to a shuffle.
Evan Cheng [Sat, 15 Dec 2007 02:54:12 +0000 (02:54 +0000)]
__builtin_ia32_movqv4si is now expanded to a shuffle.

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

16 years agoStart committing working test cases for CellSPU.
Scott Michel [Sat, 15 Dec 2007 00:38:50 +0000 (00:38 +0000)]
Start committing working test cases for CellSPU.

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

16 years agoActually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.
Evan Cheng [Fri, 14 Dec 2007 20:08:14 +0000 (20:08 +0000)]
Actually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.

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

16 years agoFix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard...
Evan Cheng [Fri, 14 Dec 2007 19:54:07 +0000 (19:54 +0000)]
Fix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard assembler recognizes movq.

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

16 years agoTeach the interpreter to read and write memory in the
Duncan Sands [Fri, 14 Dec 2007 19:38:31 +0000 (19:38 +0000)]
Teach the interpreter to read and write memory in the
endianness of the target not of the host.  Done by the
simple expedient of reversing bytes for primitive types
if the host and target endianness don't match.  This is
correct for integer and pointer types.  I don't know if
it is correct for floating point types.

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

16 years agox86-32 long doubles are 4-byte aligned on the stack
Dale Johannesen [Fri, 14 Dec 2007 19:25:34 +0000 (19:25 +0000)]
x86-32 long doubles are 4-byte aligned on the stack
for parameter passing (only for that, on Darwin).

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

16 years agoFix bsf / bsr jit encoding.
Evan Cheng [Fri, 14 Dec 2007 18:49:43 +0000 (18:49 +0000)]
Fix bsf / bsr jit encoding.

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

16 years agoOops. Forgot these.
Evan Cheng [Fri, 14 Dec 2007 18:25:34 +0000 (18:25 +0000)]
Oops. Forgot these.

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

16 years agoAdd explicit keywords, and fix a minor typo that they uncovered.
Dan Gohman [Fri, 14 Dec 2007 15:41:34 +0000 (15:41 +0000)]
Add explicit keywords, and fix a minor typo that they uncovered.

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

16 years agoDon't redirect stderr when it isn't needed.
Dan Gohman [Fri, 14 Dec 2007 15:15:11 +0000 (15:15 +0000)]
Don't redirect stderr when it isn't needed.

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

16 years agoFix a typo in a comment.
Dan Gohman [Fri, 14 Dec 2007 15:13:08 +0000 (15:13 +0000)]
Fix a typo in a comment.

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

16 years agoFix a typo in a comment.
Dan Gohman [Fri, 14 Dec 2007 15:11:58 +0000 (15:11 +0000)]
Fix a typo in a comment.

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

16 years agoFix Intel asm syntax for the bsr and bsf instructions.
Dan Gohman [Fri, 14 Dec 2007 15:10:00 +0000 (15:10 +0000)]
Fix Intel asm syntax for the bsr and bsf instructions.

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

16 years agoFix ctlz and cttz. llvm definition requires them to return number of bits in of the...
Evan Cheng [Fri, 14 Dec 2007 08:30:15 +0000 (08:30 +0000)]
Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.

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

16 years agoBug fix. Must also match ResNo when matching an operand with a user.
Evan Cheng [Fri, 14 Dec 2007 08:25:15 +0000 (08:25 +0000)]
Bug fix. Must also match ResNo when matching an operand with a user.

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

16 years agoAll MMX shift instructions took a <2 x i32> vector as the shift amount parameter...
Anders Carlsson [Fri, 14 Dec 2007 06:38:54 +0000 (06:38 +0000)]
All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.

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

16 years agoImplement ctlz and cttz with bsr and bsf.
Evan Cheng [Fri, 14 Dec 2007 02:13:44 +0000 (02:13 +0000)]
Implement ctlz and cttz with bsr and bsf.

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

16 years agoAdd flags to indicate that there are "never" side effects or that there "may be"
Bill Wendling [Fri, 14 Dec 2007 01:48:59 +0000 (01:48 +0000)]
Add flags to indicate that there are "never" side effects or that there "may be"
side effects for machine instructions.

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

16 years agoMake it more clear that some things that can't be done in .td files can
Dan Gohman [Thu, 13 Dec 2007 20:43:47 +0000 (20:43 +0000)]
Make it more clear that some things that can't be done in .td files can
still be done in the LLVM code generator. And update the summary for the
X86 target.

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

16 years agoMake these loops follow GetGEPOperands() behavior.
Wojciech Matyjewicz [Thu, 13 Dec 2007 16:22:58 +0000 (16:22 +0000)]
Make these loops follow GetGEPOperands() behavior.
Let: %q = GEP %p, X, ...
If %p is a GEP, we can chase baseptr further, only if X==0.

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

16 years agoFix typo.
Evan Cheng [Thu, 13 Dec 2007 07:50:36 +0000 (07:50 +0000)]
Fix typo.

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

16 years agoAdd register pairs to the list to check for local interferences.
Owen Anderson [Thu, 13 Dec 2007 05:53:03 +0000 (05:53 +0000)]
Add register pairs to the list to check for local interferences.

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

16 years agoRemove ugly and horrible code. It's not necessary for correctness, and can be added...
Owen Anderson [Thu, 13 Dec 2007 05:43:37 +0000 (05:43 +0000)]
Remove ugly and horrible code.  It's not necessary for correctness, and can be added back later if it causes code quality issues.

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

16 years agoBe extra careful with extension use optimation. Now turned on by default.
Evan Cheng [Thu, 13 Dec 2007 03:32:53 +0000 (03:32 +0000)]
Be extra careful with extension use optimation. Now turned on by default.

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

16 years agoApply CBE/MSIL patch to autoconf
Nate Begeman [Thu, 13 Dec 2007 02:24:45 +0000 (02:24 +0000)]
Apply CBE/MSIL patch to autoconf

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

16 years agoAdd install-libs target which only installs libraries, not tools
Nate Begeman [Thu, 13 Dec 2007 02:17:17 +0000 (02:17 +0000)]
Add install-libs target which only installs libraries, not tools

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

16 years agoRemove this testcase as it will always fail on
Zhou Sheng [Thu, 13 Dec 2007 02:03:57 +0000 (02:03 +0000)]
Remove this testcase as it will always fail on
platform like Darwin.

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

16 years agoDo not build CBackend and MSIL regardless of configured targets
Nate Begeman [Thu, 13 Dec 2007 01:18:52 +0000 (01:18 +0000)]
Do not build CBackend and MSIL regardless of configured targets

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

16 years agoFold some and + shift in x86 addressing mode.
Evan Cheng [Thu, 13 Dec 2007 00:43:27 +0000 (00:43 +0000)]
Fold some and + shift in x86 addressing mode.

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

16 years agoOops. Forgot these.
Evan Cheng [Thu, 13 Dec 2007 00:42:35 +0000 (00:42 +0000)]
Oops. Forgot these.

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

16 years agoFix for edge profiling, patch by 'Marc' for PR1857
Chris Lattner [Thu, 13 Dec 2007 00:04:46 +0000 (00:04 +0000)]
Fix for edge profiling, patch by 'Marc' for PR1857

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

16 years agoCosmetic change.
Evan Cheng [Wed, 12 Dec 2007 23:15:59 +0000 (23:15 +0000)]
Cosmetic change.

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

16 years agoImplicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable...
Evan Cheng [Wed, 12 Dec 2007 23:12:09 +0000 (23:12 +0000)]
Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.

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

16 years agoRemove host endianness info from TargetData and
Duncan Sands [Wed, 12 Dec 2007 23:03:45 +0000 (23:03 +0000)]
Remove host endianness info from TargetData and
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.

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

16 years agoRemove a forward-declaration for a non-existant class.
Dan Gohman [Wed, 12 Dec 2007 22:25:09 +0000 (22:25 +0000)]
Remove a forward-declaration for a non-existant class.

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

16 years agoAllow vector integer constants to be created with
Dan Gohman [Wed, 12 Dec 2007 22:21:26 +0000 (22:21 +0000)]
Allow vector integer constants to be created with
SelectionDAG::getConstant, in the same way as vector floating-point
constants. This allows the legalize expansion code for @llvm.ctpop and
friends to be usable with vector types.

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

16 years agoUse vector for child storage instead of map. This will also make
Anton Korobeynikov [Wed, 12 Dec 2007 19:08:44 +0000 (19:08 +0000)]
Use vector for child storage instead of map. This will also make
our life during future GraphTraits'ing slightly easier.

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

16 years agoRevert r44626, which turned off the use of readonly
Duncan Sands [Wed, 12 Dec 2007 16:01:40 +0000 (16:01 +0000)]
Revert r44626, which turned off the use of readonly
and readnone for functions with bodies because it
broke llvm-gcc-4.2 bootstrap.  It turns out that,
because of LLVM's array_ref hack, gcc was computing
pure/const attributes wrong (now fixed by turning
off the gcc ipa-pure-const pass).

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

16 years ago1. "Upgrage" comments.
Wojciech Matyjewicz [Wed, 12 Dec 2007 15:21:32 +0000 (15:21 +0000)]
1. "Upgrage" comments.
2. Using zero-extended value of Scale and unsigned division is safe provided
   that Scale doesn't have the sign bit set.
   Previously these 2 instructions:
        %p = bitcast [100 x {i8,i8,i8}]* %x to i8*
        %q = getelementptr i8* %p, i32 -4
   were combined into:
        %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0,
               i32 1431655764, i32 0
   what was incorrect.

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

16 years agoRegenerate.
Christopher Lamb [Wed, 12 Dec 2007 08:45:45 +0000 (08:45 +0000)]
Regenerate.

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

16 years agoImplement part of review feedback for address spaces.
Christopher Lamb [Wed, 12 Dec 2007 08:44:39 +0000 (08:44 +0000)]
Implement part of review feedback for address spaces.

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

16 years agoUse shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
Evan Cheng [Wed, 12 Dec 2007 07:55:34 +0000 (07:55 +0000)]
Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.

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

16 years agoAdd a test case for -optimize-ext-uses.
Evan Cheng [Wed, 12 Dec 2007 07:54:08 +0000 (07:54 +0000)]
Add a test case for -optimize-ext-uses.

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

16 years agoLower a build_vector with all constants into a constpool load unless it can be done...
Evan Cheng [Wed, 12 Dec 2007 06:45:40 +0000 (06:45 +0000)]
Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.

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

16 years agoAdd a guard to cxxabi header as other platform may
Zhou Sheng [Wed, 12 Dec 2007 06:16:47 +0000 (06:16 +0000)]
Add a guard to cxxabi header as other platform may
not support it.

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

16 years agoFixed PR1629.
Zhou Sheng [Wed, 12 Dec 2007 04:55:43 +0000 (04:55 +0000)]
Fixed PR1629.
Make lli interpreter correctly call external functions sin()/cos(),
__cxa_guard_acquire() and __cxa_guard_release().

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

16 years agoFix a bug in my previous patch, thanks to Jay Foad for
Chris Lattner [Wed, 12 Dec 2007 03:56:54 +0000 (03:56 +0000)]
Fix a bug in my previous patch, thanks to Jay Foad for
pointing this out and correcting the patch!

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

16 years agoDon't muck with phi nodes; bug fixes.
Evan Cheng [Wed, 12 Dec 2007 02:53:41 +0000 (02:53 +0000)]
Don't muck with phi nodes; bug fixes.

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

16 years agoCorrect typo for Linux: s/esp/%rsp/
Scott Michel [Wed, 12 Dec 2007 02:38:28 +0000 (02:38 +0000)]
Correct typo for Linux: s/esp/%rsp/

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