Commit Graph

35918 Commits

Author SHA1 Message Date
Evan Cheng
d6b62a5722 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
2007-12-19 23:33:23 +00:00
Gordon Henriksen
404a1942e4 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
2007-12-19 22:54:12 +00:00
Gordon Henriksen
da1435f86e 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
2007-12-19 22:30:40 +00:00
Dale Johannesen
696f768daf 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
2007-12-19 21:54:36 +00:00
Scott Michel
0e5665bf03 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
2007-12-19 21:17:42 +00:00
Duncan Sands
f0c3354d99 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
2007-12-19 21:13:37 +00:00
Scott Michel
0a92af487b 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
2007-12-19 20:50:49 +00:00
Scott Michel
170783a5fc 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
2007-12-19 20:15:47 +00:00
Chris Lattner
f021f8a5ac fix formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45214 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 19:48:49 +00:00
Duncan Sands
6f74b48862 Simplify LowerCallTo by using a callsite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 09:48:52 +00:00
Duncan Sands
481dc721c3 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
2007-12-19 07:36:31 +00:00
Scott Michel
9999e685ea 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
2007-12-19 07:35:06 +00:00
Bill Wendling
83870769c6 Modified to support comments better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45192 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 06:20:05 +00:00
Bill Wendling
ee912540e7 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
2007-12-19 06:07:48 +00:00
Chris Lattner
23ff1f910f fix more table abuses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 05:04:11 +00:00
Evan Cheng
02132d62c1 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
2007-12-19 01:34:38 +00:00
Ted Kremenek
79200788df Added "GetCurrentDirectory()" to sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 22:07:33 +00:00
Bill Wendling
280f4565eb 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
2007-12-18 21:38:04 +00:00
Christopher Lamb
7a0678cae6 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
2007-12-18 21:32:20 +00:00
Anton Korobeynikov
feb8893d17 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
2007-12-18 20:53:41 +00:00
Christopher Lamb
1d87cb1c12 Fix comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 20:33:11 +00:00
Christopher Lamb
fd8b1fd7f6 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
2007-12-18 20:30:28 +00:00
Ted Kremenek
fd52711675 Added "isDirectory" method to llvm::sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45168 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:46:22 +00:00
Evan Cheng
636e5a216c 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
2007-12-18 19:38:14 +00:00
Bill Wendling
18edd20605 Ignore shell scripts when doing "dsymutil" call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45166 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:21:52 +00:00
Chris Lattner
ef361a638a remove obviously dead uses of IncludeFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:15:48 +00:00
Evan Cheng
8131013861 Also print alignment and volatileness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45164 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:06:30 +00:00
Chris Lattner
e395598c98 remove a dead annotation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:04:24 +00:00
Ted Kremenek
c6acc585b8 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
2007-12-18 18:25:55 +00:00
Chris Lattner
4185b52183 add an obvious load folding missed optzn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45161 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 16:48:14 +00:00
Duncan Sands
2b0e8990ab 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
2007-12-18 09:59:50 +00:00
Christopher Lamb
f311f53a0f Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 09:45:40 +00:00
Christopher Lamb
30f017ad89 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
2007-12-18 09:34:41 +00:00
Evan Cheng
beec823d4b 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
2007-12-18 08:42:10 +00:00
Evan Cheng
88ce93e0ef 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
2007-12-18 07:02:08 +00:00
Chris Lattner
b9488a6890 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
2007-12-18 06:18:21 +00:00
Christopher Lamb
ef989a275c 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
2007-12-18 03:49:35 +00:00
Dale Johannesen
9bc55bcbc0 Testcase for preceding FE fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45144 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 01:58:38 +00:00
Chris Lattner
fd2025e9db add a missed case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45141 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 01:19:18 +00:00
Evan Cheng
a5cecd0a13 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
2007-12-18 01:04:25 +00:00
Evan Cheng
a4d6818dbe 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
2007-12-18 00:52:20 +00:00
Scott Michel
4a5b66bc2f i32 immediate constant test case for CellSPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45134 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 23:45:52 +00:00
Bill Wendling
4be2f7fe57 s/hasSideEffects/hasUnmodelledSideEffects/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45133 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 23:19:54 +00:00
Bill Wendling
627c00b663 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
2007-12-17 23:07:56 +00:00
Evan Cheng
f9b83fcf95 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
2007-12-17 22:33:23 +00:00
Scott Michel
504c369213 - 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
2007-12-17 22:32:34 +00:00
Ted Kremenek
8f559ef820 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
2007-12-17 22:25:12 +00:00
Bill Wendling
691de38295 LD_Fp64m should have "isRematerializable" set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 22:17:14 +00:00
Bill Wendling
882d291487 Add "hasSideEffects" method to MachineInstrInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45126 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 21:53:30 +00:00
Bill Wendling
ced09c47d9 Add MachineLICM.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 21:14:45 +00:00