oota-llvm.git
16 years agoImplement review feedback, including additional transforms
Christopher Lamb [Thu, 20 Dec 2007 07:21:11 +0000 (07:21 +0000)]
Implement review feedback, including additional transforms

(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.

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

16 years agoAdd m_Zero().
Chris Lattner [Thu, 20 Dec 2007 04:47:44 +0000 (04:47 +0000)]
Add m_Zero().

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

16 years agoRemove xfail. This is fixed.
Evan Cheng [Thu, 20 Dec 2007 02:25:21 +0000 (02:25 +0000)]
Remove xfail. This is fixed.

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

16 years agoThe physical register + virtual register joining requirement was much too strict.
Evan Cheng [Thu, 20 Dec 2007 02:23:25 +0000 (02:23 +0000)]
The physical register + virtual register joining requirement was much too strict.

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

16 years agoBring back a burr scheduling heuristic that's still needed.
Evan Cheng [Thu, 20 Dec 2007 02:22:36 +0000 (02:22 +0000)]
Bring back a burr scheduling heuristic that's still needed.

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

16 years agoClean up previous patch: PHI uses should not prevent iv reuse if all other uses are...
Evan Cheng [Thu, 20 Dec 2007 02:20:53 +0000 (02:20 +0000)]
Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.

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

16 years agosimplify this code with the new m_Zero() pattern. Make sure the select only
Chris Lattner [Thu, 20 Dec 2007 01:56:58 +0000 (01:56 +0000)]
simplify this code with the new m_Zero() pattern.  Make sure the select only
has a single use, and generalize it to not require N to be a constant.

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

16 years agoRevert my previous check-in.
Devang Patel [Thu, 20 Dec 2007 01:46:01 +0000 (01:46 +0000)]
Revert my previous check-in.

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

16 years agoMore eye-candy stuff :)
Anton Korobeynikov [Thu, 20 Dec 2007 01:30:27 +0000 (01:30 +0000)]
More eye-candy stuff :)

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

16 years agoAdd iterators for child traversal.
Anton Korobeynikov [Thu, 20 Dec 2007 01:21:50 +0000 (01:21 +0000)]
Add iterators for child traversal.

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

16 years agoUpdated comments to reflect what "side effects" means in this situation.
Bill Wendling [Thu, 20 Dec 2007 01:08:10 +0000 (01:08 +0000)]
Updated comments to reflect what "side effects" means in this situation.

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

16 years agoMore working CellSPU tests:
Scott Michel [Thu, 20 Dec 2007 00:44:13 +0000 (00:44 +0000)]
More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads

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

16 years agoAdd lto version check mechanism.
Devang Patel [Thu, 20 Dec 2007 00:24:01 +0000 (00:24 +0000)]
Add lto version check mechanism.

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

16 years agoUse a module to group calling convention values, too.
Gordon Henriksen [Thu, 20 Dec 2007 00:13:26 +0000 (00:13 +0000)]
Use a module to group calling convention values, too.

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

16 years agoAllow iv reuse if the user is a PHI node which is in turn used as addresses.
Evan Cheng [Wed, 19 Dec 2007 23:33:23 +0000 (23:33 +0000)]
Allow iv reuse if the user is a PHI node which is in turn used as addresses.

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

16 years agoUsing modules to group enumerations in Ocaml bindings.
Gordon Henriksen [Wed, 19 Dec 2007 22:54:12 +0000 (22:54 +0000)]
Using modules to group enumerations in Ocaml bindings.

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

16 years agoAdding bindings for memory buffers and module providers. Switching
Gordon Henriksen [Wed, 19 Dec 2007 22:30:40 +0000 (22:30 +0000)]
Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

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

16 years agoEnable EH on PPC Darwin. This basically works; there
Dale Johannesen [Wed, 19 Dec 2007 21:54:36 +0000 (21:54 +0000)]
Enable EH on PPC Darwin.  This basically works; there
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note:  By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work.  You need to trick it into
using the installed system unwinding code to get useful
results.)

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

16 years agoCellSPU testcase, extract_elt.ll: extract vector element.
Scott Michel [Wed, 19 Dec 2007 21:17:42 +0000 (21:17 +0000)]
CellSPU testcase, extract_elt.ll: extract vector element.

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

16 years agoWhen inlining through an 'nounwind' call, mark inlined
Duncan Sands [Wed, 19 Dec 2007 21:13:37 +0000 (21:13 +0000)]
When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

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

16 years agoMore working CellSPU test cases:
Scott Michel [Wed, 19 Dec 2007 20:50:49 +0000 (20:50 +0000)]
More working CellSPU test cases:
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic

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

16 years agoTwo more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
Scott Michel [Wed, 19 Dec 2007 20:15:47 +0000 (20:15 +0000)]
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)

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

16 years agofix formatting
Chris Lattner [Wed, 19 Dec 2007 19:48:49 +0000 (19:48 +0000)]
fix formatting

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

16 years agoSimplify LowerCallTo by using a callsite.
Duncan Sands [Wed, 19 Dec 2007 09:48:52 +0000 (09:48 +0000)]
Simplify LowerCallTo by using a callsite.

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

16 years agoThe C++ exception handling personality function wants
Duncan Sands [Wed, 19 Dec 2007 07:36:31 +0000 (07:36 +0000)]
The C++ exception handling personality function wants
to know about calls that cannot throw ('nounwind'):
if such a call does throw for some reason then the
personality will terminate the program.  The distinction
between an ordinary call and a nounwind call is that
an ordinary call gets an entry in the exception table
but a nounwind call does not.  This patch sets up the
exception table appropriately.  One oddity is that
I've chosen to bracket nounwind calls with labels (like
invokes) - the other choice would have been to bracket
ordinary calls with labels.  While bracketing
ordinary calls is more natural (because bracketing
by labels would then correspond exactly to getting an
entry in the exception table), I didn't do it because
introducing labels impedes some optimizations and I'm
guessing that ordinary calls occur more often than
nounwind calls.  This fixes the gcc filter2 eh test,
at least at -O0 (the inliner needs some tweaking at
higher optimization levels).

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

16 years agoAdd new immed16.ll test case, fix CellSPU errata to make test case work.
Scott Michel [Wed, 19 Dec 2007 07:35:06 +0000 (07:35 +0000)]
Add new immed16.ll test case, fix CellSPU errata to make test case work.

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

16 years agoModified to support comments better.
Bill Wendling [Wed, 19 Dec 2007 06:20:05 +0000 (06:20 +0000)]
Modified to support comments better.

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

16 years agoMark the "isRemat" instruction as never having side effects.
Bill Wendling [Wed, 19 Dec 2007 06:07:48 +0000 (06:07 +0000)]
Mark the "isRemat" instruction as never having side effects.

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

16 years agofix more table abuses.
Chris Lattner [Wed, 19 Dec 2007 05:04:11 +0000 (05:04 +0000)]
fix more table abuses.

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

16 years agoDon't leave newly created nodes around if it turns out they are not needed.
Evan Cheng [Wed, 19 Dec 2007 01:34:38 +0000 (01:34 +0000)]
Don't leave newly created nodes around if it turns out they are not needed.

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

16 years agoAdded "GetCurrentDirectory()" to sys::Path.
Ted Kremenek [Tue, 18 Dec 2007 22:07:33 +0000 (22:07 +0000)]
Added "GetCurrentDirectory()" to sys::Path.

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

16 years agoAdd debugging info. Use the newly created "hasUnmodelledSideEffects" method.
Bill Wendling [Tue, 18 Dec 2007 21:38:04 +0000 (21:38 +0000)]
Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.

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

16 years agoFold subtracts into integer compares vs. zero. This improves generate code for this...
Christopher Lamb [Tue, 18 Dec 2007 21:32:20 +0000 (21:32 +0000)]
Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
from
_foo:
        movl    $99, %ecx
        movl    4(%esp), %eax
        subl    %eax, %ecx
        xorl    %edx, %edx
        testl   %ecx, %ecx
        cmovs   %edx, %eax
        ret

to
_foo:
        xorl    %ecx, %ecx
        movl    4(%esp), %eax
        cmpl    $99, %eax
        cmovg   %ecx, %eax
        ret

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

16 years agoSupport more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
Anton Korobeynikov [Tue, 18 Dec 2007 20:53:41 +0000 (20:53 +0000)]
Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).

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

16 years agoFix comments
Christopher Lamb [Tue, 18 Dec 2007 20:33:11 +0000 (20:33 +0000)]
Fix comments

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

16 years agoRemove an orthogonal transformation of the selection condition from my most recent...
Christopher Lamb [Tue, 18 Dec 2007 20:30:28 +0000 (20:30 +0000)]
Remove an orthogonal transformation of the selection condition from my most recent submission.

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

16 years agoAdded "isDirectory" method to llvm::sys::Path.
Ted Kremenek [Tue, 18 Dec 2007 19:46:22 +0000 (19:46 +0000)]
Added "isDirectory" method to llvm::sys::Path.

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

16 years agoFix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store...
Evan Cheng [Tue, 18 Dec 2007 19:38:14 +0000 (19:38 +0000)]
Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.

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

16 years agoIgnore shell scripts when doing "dsymutil" call.
Bill Wendling [Tue, 18 Dec 2007 19:21:52 +0000 (19:21 +0000)]
Ignore shell scripts when doing "dsymutil" call.

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

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