Evan Cheng
1994e3038e
Bring back a burr scheduling heuristic that's still needed.
...
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng
eb07401701
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.
...
llvm-svn: 45251
2007-12-20 02:20:53 +00:00
Chris Lattner
1a386cbdae
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.
llvm-svn: 45250
2007-12-20 01:56:58 +00:00
Bill Wendling
cba1938285
Updated comments to reflect what "side effects" means in this situation.
...
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Scott Michel
5cbdbd26a8
More working CellSPU tests:
...
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads
llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Evan Cheng
cf7b6b419a
Allow iv reuse if the user is a PHI node which is in turn used as addresses.
...
llvm-svn: 45230
2007-12-19 23:33:23 +00:00
Gordon Henriksen
46137f1e2e
Adding bindings for memory buffers and module providers. Switching
...
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Dale Johannesen
f93ea63eaa
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.)
llvm-svn: 45221
2007-12-19 21:54:36 +00:00
Scott Michel
83ac96e27d
CellSPU testcase, extract_elt.ll: extract vector element.
...
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands
56f3add5b7
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.
llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel
6cb9f6d20c
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
...
(vector insertions)
llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Duncan Sands
b2e0a67cc0
Simplify LowerCallTo by using a callsite.
...
llvm-svn: 45198
2007-12-19 09:48:52 +00:00
Duncan Sands
09250d2dff
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).
llvm-svn: 45197
2007-12-19 07:36:31 +00:00
Scott Michel
d4d96bb6f6
Add new immed16.ll test case, fix CellSPU errata to make test case work.
...
llvm-svn: 45196
2007-12-19 07:35:06 +00:00
Bill Wendling
ce9eae6687
Mark the "isRemat" instruction as never having side effects.
...
llvm-svn: 45190
2007-12-19 06:07:48 +00:00
Evan Cheng
694994ba7b
Don't leave newly created nodes around if it turns out they are not needed.
...
llvm-svn: 45186
2007-12-19 01:34:38 +00:00
Ted Kremenek
b8c85efce1
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Bill Wendling
fe0e399130
Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.
...
llvm-svn: 45178
2007-12-18 21:38:04 +00:00
Christopher Lamb
be0cbc7e92
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
llvm-svn: 45173
2007-12-18 21:32:20 +00:00
Anton Korobeynikov
f81993feaf
Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
...
llvm-svn: 45172
2007-12-18 20:53:41 +00:00
Christopher Lamb
051a1320e8
Fix comments
...
llvm-svn: 45170
2007-12-18 20:33:11 +00:00
Christopher Lamb
d56318b885
Remove an orthogonal transformation of the selection condition from my most recent submission.
...
llvm-svn: 45169
2007-12-18 20:30:28 +00:00
Ted Kremenek
a0ff305551
Added "isDirectory" method to llvm::sys::Path.
...
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Evan Cheng
8824950e8f
Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.
...
llvm-svn: 45167
2007-12-18 19:38:14 +00:00
Chris Lattner
cb4a54fe17
remove obviously dead uses of IncludeFile.
...
llvm-svn: 45165
2007-12-18 19:15:48 +00:00
Evan Cheng
e8de683a74
Also print alignment and volatileness.
...
llvm-svn: 45164
2007-12-18 19:06:30 +00:00
Chris Lattner
fabeb5e6c1
remove a dead annotation
...
llvm-svn: 45163
2007-12-18 19:04:24 +00:00
Chris Lattner
93d750bbe3
add an obvious load folding missed optzn.
...
llvm-svn: 45161
2007-12-18 16:48:14 +00:00
Duncan Sands
242f80be86
Rename isNoReturn to doesNotReturn, and isNoUnwind to
...
doesNotThrow.
llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Christopher Lamb
437b4d229e
Fix typos.
...
llvm-svn: 45159
2007-12-18 09:45:40 +00:00
Christopher Lamb
aeb76743dc
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
llvm-svn: 45158
2007-12-18 09:34:41 +00:00
Evan Cheng
36bfae49e3
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.
...
llvm-svn: 45157
2007-12-18 08:42:10 +00:00
Evan Cheng
e6c89b6120
SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
...
llvm-svn: 45151
2007-12-18 07:02:08 +00:00
Christopher Lamb
efdf2791b2
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
...
llvm-svn: 45147
2007-12-18 03:49:35 +00:00
Chris Lattner
ad090a712a
add a missed case.
...
llvm-svn: 45141
2007-12-18 01:19:18 +00:00
Evan Cheng
8b4947fe98
Remove int_x86_sse2_movl_dq. It's replaced with a string compare.
...
llvm-svn: 45140
2007-12-18 01:04:25 +00:00
Bill Wendling
e5af8b6e5c
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.
llvm-svn: 45132
2007-12-17 23:07:56 +00:00
Evan Cheng
d9df071ead
Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
...
it's auto-upgraded to a shufflevector instruction.
llvm-svn: 45131
2007-12-17 22:33:23 +00:00
Scott Michel
4f980e1acd
- Restore some i8 functionality in CellSPU
...
- New test case: nand.ll
llvm-svn: 45130
2007-12-17 22:32:34 +00:00
Ted Kremenek
28a75d4674
Modified Deserializer::ReadCStr to allow C-strings to be read into a
...
std::vector<char> starting from any index in the vector.
llvm-svn: 45129
2007-12-17 22:25:12 +00:00
Bill Wendling
b33d6155da
LD_Fp64m should have "isRematerializable" set.
...
llvm-svn: 45128
2007-12-17 22:17:14 +00:00
Bill Wendling
ec8be72a8b
As per feedback, revised comments to (hopefully) make the different side effect
...
flags clearer.
llvm-svn: 45120
2007-12-17 21:02:07 +00:00
Duncan Sands
3a0d757bd5
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).
llvm-svn: 45108
2007-12-17 18:08:19 +00:00
David Greene
d85bd2805d
GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.
...
llvm-svn: 45101
2007-12-17 17:42:03 +00:00
David Greene
3f3a521a33
Get rid of annoying spaces.
...
llvm-svn: 45100
2007-12-17 17:40:29 +00:00
David Greene
8fda00ca05
Fix GLIBCXX_DEBUG errors. Erase invalidates std::vector iterators
...
passed the erased element.
llvm-svn: 45099
2007-12-17 17:39:51 +00:00
Gordon Henriksen
ef2c27d164
C and Ocaml bindings for address spaces, for that burgeoning market
...
for Ocaml-based compilers targeting embedded devices. :)
llvm-svn: 45096
2007-12-17 16:08:32 +00:00
Christopher Lamb
2087584f25
regenerate.
...
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
a608afb52e
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.
...
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Christopher Lamb
d3bac47ce6
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.
...
llvm-svn: 45080
2007-12-17 01:00:21 +00:00