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
686bbd9b19
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
llvm-svn: 45217
2007-12-19 20:50:49 +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
Chris Lattner
80aaa07025
fix formatting
...
llvm-svn: 45214
2007-12-19 19:48:49 +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
a0b8b2ade7
Modified to support comments better.
...
llvm-svn: 45192
2007-12-19 06:20:05 +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
Chris Lattner
c42bf3be15
fix more table abuses.
...
llvm-svn: 45187
2007-12-19 05:04:11 +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
Bill Wendling
06cd90a12f
Ignore shell scripts when doing "dsymutil" call.
...
llvm-svn: 45166
2007-12-18 19:21:52 +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
Ted Kremenek
200bc2d387
Added some sectioning comments to Serialize.h.
...
Added additional serialization functors for use with std::foreach.
llvm-svn: 45162
2007-12-18 18:25:55 +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
Chris Lattner
f87fd16366
avoid confusing terminology (what is a "word"?), fix scary markup, add section to TOC.
...
llvm-svn: 45150
2007-12-18 06:18:21 +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
Dale Johannesen
d0377b8eb2
Testcase for preceding FE fix
...
llvm-svn: 45144
2007-12-18 01:58:38 +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
Evan Cheng
21f2afd4df
These have matching builtin's in 4.2.
...
llvm-svn: 45139
2007-12-18 00:52:20 +00:00
Scott Michel
94d7a2f1f2
i32 immediate constant test case for CellSPU
...
llvm-svn: 45134
2007-12-17 23:45:52 +00:00
Bill Wendling
0df69490dd
s/hasSideEffects/hasUnmodelledSideEffects/g
...
llvm-svn: 45133
2007-12-17 23:19:54 +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
2d672998c5
Add "hasSideEffects" method to MachineInstrInfo class.
...
llvm-svn: 45126
2007-12-17 21:53:30 +00:00
Bill Wendling
b18d52fc02
Add MachineLICM.cpp
...
llvm-svn: 45123
2007-12-17 21:14:45 +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
Devang Patel
3d301e65ad
Add cast operators in LLVMFoldingBuilder.
...
Patch by Richard Pennington.
llvm-svn: 45115
2007-12-17 19:06:26 +00:00
Chris Lattner
ea78f7ae10
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.
llvm-svn: 45112
2007-12-17 18:58:23 +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