Evan Cheng
ac134551c6
Allow JIT with non-static relocation model.
...
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Anton Korobeynikov
1e8c1308bb
Fix silly typo in the FP CEP handling.
...
llvm-svn: 45300
2007-12-21 23:33:44 +00:00
Duncan Sands
85f26f28b9
Fix a brain fart by our beloved leader (the content
...
of this patch is the last line).
llvm-svn: 45289
2007-12-21 20:18:41 +00:00
Duncan Sands
8c5822802e
Get the verifier to check attributes on calls as well
...
as on functions. Make it verify invokes and not just
ordinary calls. As a (desired) side-effect, it is no
longer legal to have call attributes on arguments that
are being passed to the varargs part of a varargs
function (llvm-as drops them on the floor anyway).
llvm-svn: 45286
2007-12-21 19:19:01 +00:00
Duncan Sands
6a7703ed63
Make DAE not wipe out attributes on calls, and not drop
...
return attributes on the floor. In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped. I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).
llvm-svn: 45285
2007-12-21 19:16:16 +00:00
Nicolas Geoffray
31a2c3948e
Fix unintented change from last commit
...
llvm-svn: 45282
2007-12-21 12:22:29 +00:00
Nicolas Geoffray
80c741e160
Enable EH for linux/ppc32 targets
...
llvm-svn: 45281
2007-12-21 12:19:44 +00:00
Evan Cheng
78c460c8c4
New entry.
...
llvm-svn: 45280
2007-12-21 01:31:58 +00:00
Evan Cheng
b54038fc29
Add a few more missing gcc builtin's.
...
llvm-svn: 45278
2007-12-21 01:30:39 +00:00
Ted Kremenek
1cf6c7aa5b
Removed scoped_ptr, as its functionality is subsumed by OwningPtr.
...
llvm-svn: 45274
2007-12-21 00:15:29 +00:00
Evan Cheng
01c7c198ee
Fix JIT encoding for CMPSD as well.
...
llvm-svn: 45268
2007-12-20 19:57:09 +00:00
Ted Kremenek
5e2413384e
Added OwningArrayPtr smart pointer class to provide an analogous class to
...
OwningPtr except that it works for pointers to arrays.
llvm-svn: 45266
2007-12-20 19:53:47 +00:00
Chris Lattner
63fbcdf6ca
add new smart pointer for clang.
...
llvm-svn: 45261
2007-12-20 19:14:02 +00:00
Evan Cheng
c226ed0273
Type specification didn't match gcc's.
...
llvm-svn: 45260
2007-12-20 09:35:28 +00:00
Evan Cheng
f989141d30
More accurate checks for two-address constraints.
...
llvm-svn: 45259
2007-12-20 09:25:31 +00:00
Christopher Lamb
7d82bc46b8
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.
llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Chris Lattner
e2cf5b8c5c
Add m_Zero().
...
llvm-svn: 45255
2007-12-20 04:47:44 +00:00
Evan Cheng
ddc9af11f0
Remove xfail. This is fixed.
...
llvm-svn: 45254
2007-12-20 02:25:21 +00:00
Evan Cheng
a509537e25
The physical register + virtual register joining requirement was much too strict.
...
llvm-svn: 45253
2007-12-20 02:23:25 +00:00
Evan Cheng
61bc51ee97
Bring back a burr scheduling heuristic that's still needed.
...
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng
26ee54eb05
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
16a51da0e2
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
Devang Patel
c006744c38
Revert my previous check-in.
...
llvm-svn: 45249
2007-12-20 01:46:01 +00:00
Anton Korobeynikov
dce44d87f8
More eye-candy stuff :)
...
llvm-svn: 45247
2007-12-20 01:30:27 +00:00
Anton Korobeynikov
5ab614824d
Add iterators for child traversal.
...
llvm-svn: 45246
2007-12-20 01:21:50 +00:00
Bill Wendling
65c001e6bc
Updated comments to reflect what "side effects" means in this situation.
...
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Scott Michel
5f1470f03a
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
Devang Patel
6d279d484a
Add lto version check mechanism.
...
llvm-svn: 45238
2007-12-20 00:24:01 +00:00
Gordon Henriksen
59db63d5fc
Use a module to group calling convention values, too.
...
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Evan Cheng
e2a8ba7fec
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
eb4ce98f98
Using modules to group enumerations in Ocaml bindings.
...
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Gordon Henriksen
34eb6d877e
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
eadbf4b91c
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
5ecac82f71
CellSPU testcase, extract_elt.ll: extract vector element.
...
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands
aa31b92508
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
a246e09aa0
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
098c113bc8
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
f1be288617
fix formatting
...
llvm-svn: 45214
2007-12-19 19:48:49 +00:00
Duncan Sands
e9d8861cdf
Simplify LowerCallTo by using a callsite.
...
llvm-svn: 45198
2007-12-19 09:48:52 +00:00
Duncan Sands
030bce7b83
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
9b834469e0
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
b528a10e0a
Modified to support comments better.
...
llvm-svn: 45192
2007-12-19 06:20:05 +00:00
Bill Wendling
ca77ecb40a
Mark the "isRemat" instruction as never having side effects.
...
llvm-svn: 45190
2007-12-19 06:07:48 +00:00
Chris Lattner
747359f973
fix more table abuses.
...
llvm-svn: 45187
2007-12-19 05:04:11 +00:00
Evan Cheng
9f06e5e2df
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
14020706d8
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Bill Wendling
166f746246
Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.
...
llvm-svn: 45178
2007-12-18 21:38:04 +00:00
Christopher Lamb
f00ac6dd93
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
95cc3e0e66
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
b7016c53d1
Fix comments
...
llvm-svn: 45170
2007-12-18 20:33:11 +00:00
Christopher Lamb
74dbad9216
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
74db04261b
Added "isDirectory" method to llvm::sys::Path.
...
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Evan Cheng
483a969ece
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
7c0bea1ce9
Ignore shell scripts when doing "dsymutil" call.
...
llvm-svn: 45166
2007-12-18 19:21:52 +00:00
Chris Lattner
5f47cae3ce
remove obviously dead uses of IncludeFile.
...
llvm-svn: 45165
2007-12-18 19:15:48 +00:00
Evan Cheng
78ced47a2f
Also print alignment and volatileness.
...
llvm-svn: 45164
2007-12-18 19:06:30 +00:00
Chris Lattner
d92e71cf9a
remove a dead annotation
...
llvm-svn: 45163
2007-12-18 19:04:24 +00:00
Ted Kremenek
3d71ad1976
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
2583a66295
add an obvious load folding missed optzn.
...
llvm-svn: 45161
2007-12-18 16:48:14 +00:00
Duncan Sands
3353ed09ac
Rename isNoReturn to doesNotReturn, and isNoUnwind to
...
doesNotThrow.
llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Christopher Lamb
30291f4a30
Fix typos.
...
llvm-svn: 45159
2007-12-18 09:45:40 +00:00
Christopher Lamb
8b09a464b4
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
91e0fc9cb4
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
e2dbba5828
SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
...
llvm-svn: 45151
2007-12-18 07:02:08 +00:00
Chris Lattner
9a2e3cb48d
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
ac7d631ed2
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
a56aab57e9
Testcase for preceding FE fix
...
llvm-svn: 45144
2007-12-18 01:58:38 +00:00
Chris Lattner
52a9e40789
add a missed case.
...
llvm-svn: 45141
2007-12-18 01:19:18 +00:00
Evan Cheng
a8288f4294
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
61eacb9048
These have matching builtin's in 4.2.
...
llvm-svn: 45139
2007-12-18 00:52:20 +00:00
Scott Michel
8172f85e2f
i32 immediate constant test case for CellSPU
...
llvm-svn: 45134
2007-12-17 23:45:52 +00:00
Bill Wendling
34cc217741
s/hasSideEffects/hasUnmodelledSideEffects/g
...
llvm-svn: 45133
2007-12-17 23:19:54 +00:00
Bill Wendling
b3d85a5d4b
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
0e179d015f
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
c5cccb9e60
- Restore some i8 functionality in CellSPU
...
- New test case: nand.ll
llvm-svn: 45130
2007-12-17 22:32:34 +00:00
Ted Kremenek
bd5362511d
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
a2401be121
LD_Fp64m should have "isRematerializable" set.
...
llvm-svn: 45128
2007-12-17 22:17:14 +00:00
Bill Wendling
d5477afc1b
Add "hasSideEffects" method to MachineInstrInfo class.
...
llvm-svn: 45126
2007-12-17 21:53:30 +00:00
Bill Wendling
842ddea5e4
Add MachineLICM.cpp
...
llvm-svn: 45123
2007-12-17 21:14:45 +00:00
Bill Wendling
939526a930
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
725b73ff42
Add cast operators in LLVMFoldingBuilder.
...
Patch by Richard Pennington.
llvm-svn: 45115
2007-12-17 19:06:26 +00:00
Chris Lattner
4d5bcd938e
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
b5a79d0eaa
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
71eae8a5ee
GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.
...
llvm-svn: 45101
2007-12-17 17:42:03 +00:00
David Greene
c4a80fb574
Get rid of annoying spaces.
...
llvm-svn: 45100
2007-12-17 17:40:29 +00:00
David Greene
2a5967b36a
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
557fb1451e
Disabling a RUN line that's broken until addrspace roundtrips
...
through llvm-as|llvm-dis.
llvm-svn: 45097
2007-12-17 16:09:28 +00:00
Gordon Henriksen
5a3fe03784
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
083bb46370
regenerate.
...
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
edf0788758
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
55c6d4f22f
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
Duncan Sands
56ed48036b
Revert this part of r45073 until the verifier is
...
changed not to reject invoke of inline asm.
llvm-svn: 45077
2007-12-16 21:01:21 +00:00
Chris Lattner
2af27c202c
don't violate C TBAA rules, use FloatToBits instead.
...
llvm-svn: 45076
2007-12-16 20:41:33 +00:00
Chris Lattner
e3b05fe31b
fix a questionable cast, thanks to Mike Stump for pointing this out.
...
llvm-svn: 45075
2007-12-16 20:26:54 +00:00
Chris Lattner
dab6bd902e
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.
llvm-svn: 45074
2007-12-16 20:12:41 +00:00
Duncan Sands
8e4847ee95
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...
llvm-svn: 45073
2007-12-16 15:51:49 +00:00
Bill Wendling
fcf2085731
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).
llvm-svn: 45071
2007-12-16 09:16:12 +00:00
Owen Anderson
7b8a741189
Break local interferences in StrongPHIElimination. One step closer...
...
llvm-svn: 45070
2007-12-16 05:44:27 +00:00
Owen Anderson
ccb3981256
A few more comments.
...
llvm-svn: 45069
2007-12-16 04:07:23 +00:00
Anton Korobeynikov
ce1489e575
Define addString() and lookup() out-of-line to dissuade the C++ compiler from inlining it.
...
llvm-svn: 45068
2007-12-16 01:36:16 +00:00
Anton Korobeynikov
fbb9e418b5
Provide GraphTraits and DOTGraphTraits interface for Trie.
...
Retoss private/public stuff.
Make copy ctor and operator= private.
llvm-svn: 45067
2007-12-16 01:27:04 +00:00
Anton Korobeynikov
06e60b714b
Constify graph arguments
...
llvm-svn: 45066
2007-12-16 00:42:19 +00:00
Anton Korobeynikov
659c3f8dd1
Use references in DF iterators. This eliminates copy-ctor calls on huge objects (graphs)
...
llvm-svn: 45063
2007-12-15 22:23:24 +00:00
Duncan Sands
26d6539e70
These are more correctly called signaling NaNs.
...
llvm-svn: 45059
2007-12-15 17:37:40 +00:00
Evan Cheng
23d2d4dc6c
Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.
...
llvm-svn: 45058
2007-12-15 03:00:47 +00:00
Evan Cheng
cbeec14a6f
__builtin_ia32_movqv4si is now expanded to a shuffle.
...
llvm-svn: 45057
2007-12-15 02:54:12 +00:00
Scott Michel
0aa7133f82
Start committing working test cases for CellSPU.
...
llvm-svn: 45050
2007-12-15 00:38:50 +00:00
Evan Cheng
9556729128
Actually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.
...
llvm-svn: 45041
2007-12-14 20:08:14 +00:00
Evan Cheng
e28372c0d6
Fix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard assembler recognizes movq.
...
llvm-svn: 45040
2007-12-14 19:54:07 +00:00
Duncan Sands
1202d1b1c4
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.
llvm-svn: 45039
2007-12-14 19:38:31 +00:00
Dale Johannesen
f7cefdd5f0
x86-32 long doubles are 4-byte aligned on the stack
...
for parameter passing (only for that, on Darwin).
llvm-svn: 45038
2007-12-14 19:25:34 +00:00
Evan Cheng
a56e6ff9a7
Fix bsf / bsr jit encoding.
...
llvm-svn: 45037
2007-12-14 18:49:43 +00:00
Evan Cheng
f28c810036
Oops. Forgot these.
...
llvm-svn: 45036
2007-12-14 18:25:34 +00:00
Dan Gohman
8a332b235d
Add explicit keywords, and fix a minor typo that they uncovered.
...
llvm-svn: 45034
2007-12-14 15:41:34 +00:00
Dan Gohman
11352df8e4
Don't redirect stderr when it isn't needed.
...
llvm-svn: 45033
2007-12-14 15:15:11 +00:00
Dan Gohman
6869bfc351
Fix a typo in a comment.
...
llvm-svn: 45032
2007-12-14 15:13:08 +00:00
Dan Gohman
4069a593cc
Fix a typo in a comment.
...
llvm-svn: 45031
2007-12-14 15:11:58 +00:00
Dan Gohman
9d2e9e376f
Fix Intel asm syntax for the bsr and bsf instructions.
...
llvm-svn: 45030
2007-12-14 15:10:00 +00:00
Evan Cheng
0e6408124e
Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.
...
llvm-svn: 45029
2007-12-14 08:30:15 +00:00
Evan Cheng
0fcf56f8f5
Bug fix. Must also match ResNo when matching an operand with a user.
...
llvm-svn: 45028
2007-12-14 08:25:15 +00:00
Anders Carlsson
f924f34b6b
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.
...
llvm-svn: 45027
2007-12-14 06:38:54 +00:00
Evan Cheng
e9fbc3f014
Implement ctlz and cttz with bsr and bsf.
...
llvm-svn: 45024
2007-12-14 02:13:44 +00:00
Bill Wendling
cb77f04e1f
Add flags to indicate that there are "never" side effects or that there "may be"
...
side effects for machine instructions.
llvm-svn: 45022
2007-12-14 01:48:59 +00:00
Dan Gohman
d4551fd0a4
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.
llvm-svn: 45013
2007-12-13 20:43:47 +00:00
Wojciech Matyjewicz
86d51b896e
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.
llvm-svn: 44999
2007-12-13 16:22:58 +00:00
Evan Cheng
2011df4e39
Fix typo.
...
llvm-svn: 44997
2007-12-13 07:50:36 +00:00
Owen Anderson
53b677e4e8
Add register pairs to the list to check for local interferences.
...
llvm-svn: 44987
2007-12-13 05:53:03 +00:00
Owen Anderson
1f93edd08a
Remove ugly and horrible code. It's not necessary for correctness, and can be added back later if it causes code quality issues.
...
llvm-svn: 44986
2007-12-13 05:43:37 +00:00
Evan Cheng
37c36ed79a
Be extra careful with extension use optimation. Now turned on by default.
...
llvm-svn: 44981
2007-12-13 03:32:53 +00:00
Nate Begeman
23ffde507f
Apply CBE/MSIL patch to autoconf
...
llvm-svn: 44980
2007-12-13 02:24:45 +00:00
Nate Begeman
938d8cb8d9
Add install-libs target which only installs libraries, not tools
...
llvm-svn: 44979
2007-12-13 02:17:17 +00:00
Zhou Sheng
461d8419a7
Remove this testcase as it will always fail on
...
platform like Darwin.
llvm-svn: 44977
2007-12-13 02:03:57 +00:00
Nate Begeman
272ee458cf
Do not build CBackend and MSIL regardless of configured targets
...
llvm-svn: 44973
2007-12-13 01:18:52 +00:00
Evan Cheng
827d30db19
Fold some and + shift in x86 addressing mode.
...
llvm-svn: 44970
2007-12-13 00:43:27 +00:00
Evan Cheng
687567bca5
Oops. Forgot these.
...
llvm-svn: 44969
2007-12-13 00:42:35 +00:00
Chris Lattner
f0fbf077d2
Fix for edge profiling, patch by 'Marc' for PR1857
...
llvm-svn: 44965
2007-12-13 00:04:46 +00:00
Evan Cheng
7df585d9c4
Cosmetic change.
...
llvm-svn: 44961
2007-12-12 23:15:59 +00:00
Evan Cheng
6e68381e02
Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
...
llvm-svn: 44960
2007-12-12 23:12:09 +00:00
Duncan Sands
fde556745b
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.
llvm-svn: 44959
2007-12-12 23:03:45 +00:00
Dan Gohman
015982aa32
Remove a forward-declaration for a non-existant class.
...
llvm-svn: 44955
2007-12-12 22:25:09 +00:00
Dan Gohman
7a7742c2fe
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.
llvm-svn: 44954
2007-12-12 22:21:26 +00:00
Anton Korobeynikov
7ab71379b6
Use vector for child storage instead of map. This will also make
...
our life during future GraphTraits'ing slightly easier.
llvm-svn: 44952
2007-12-12 19:08:44 +00:00
Duncan Sands
9ab0943b86
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).
llvm-svn: 44937
2007-12-12 16:01:40 +00:00
Wojciech Matyjewicz
309e5a723b
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.
llvm-svn: 44936
2007-12-12 15:21:32 +00:00
Christopher Lamb
17c405d29e
Regenerate.
...
llvm-svn: 44934
2007-12-12 08:45:45 +00:00
Christopher Lamb
25f5076612
Implement part of review feedback for address spaces.
...
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Evan Cheng
0f42730722
Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
...
llvm-svn: 44929
2007-12-12 07:55:34 +00:00
Evan Cheng
0a1254f634
Add a test case for -optimize-ext-uses.
...
llvm-svn: 44928
2007-12-12 07:54:08 +00:00
Evan Cheng
2a98956796
Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.
...
llvm-svn: 44921
2007-12-12 06:45:40 +00:00
Zhou Sheng
3115ba39e8
Add a guard to cxxabi header as other platform may
...
not support it.
llvm-svn: 44914
2007-12-12 06:16:47 +00:00