Anton Korobeynikov
e0e616a74d
Initial bits of ARMv4-only support.
...
Patch by John Tytgat!
llvm-svn: 97886
2010-03-06 19:39:36 +00:00
Anton Korobeynikov
74dea2d5cb
Lower dynamic stack allocation on mingw32 to separate instruction.
...
We cannot use a normal call here since it has extra unmodelled side
effects (it changes stack pointer). This should fix PR5292.
llvm-svn: 97884
2010-03-06 19:32:29 +00:00
Chris Lattner
a446775fd5
make APFloat::toString be const.
...
llvm-svn: 97883
2010-03-06 19:20:13 +00:00
Chris Lattner
eb142908d7
disable this for mingw as well, we really need a 'has no dynamic linking' predicate.
...
llvm-svn: 97882
2010-03-06 18:54:37 +00:00
Anton Korobeynikov
6c841e6a44
Do not use '&' prefix for globals when register base field is non-zero, otherwise msp430-as will silently miscompile the code (TI's assembler report an error though).
...
This fixes PR6349
llvm-svn: 97877
2010-03-06 11:41:12 +00:00
Eric Christopher
b7e9bf6e57
Let the fallthrough handle whether or not we've changed anything
...
before we try to optimize.
llvm-svn: 97876
2010-03-06 10:59:25 +00:00
Eric Christopher
a671e4f7aa
Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
...
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.
llvm-svn: 97875
2010-03-06 10:50:38 +00:00
Rafael Espindola
59d5d39e8d
Add static methods to handle Linkage Types.
...
llvm-svn: 97871
2010-03-06 07:22:39 +00:00
Chris Lattner
8e294fcf0a
clean this up.
...
llvm-svn: 97870
2010-03-06 07:02:28 +00:00
Chris Lattner
b2ed5cb501
revert r97807, it introduced build warnings.
...
llvm-svn: 97869
2010-03-06 04:32:46 +00:00
Jim Grosbach
7d1602fb3b
Thumb1 epilogue code generation needs to take into account that callee-saved
...
registers may be restored via a pop instruction, not just a tRestore.
This fixes nightly test 471.omnetep for Thumb1.
llvm-svn: 97867
2010-03-06 03:28:39 +00:00
Eric Christopher
b3f0926f84
Temporarily revert:
...
Log:
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/test/Transforms/InstCombine/objsize.ll
It appears to be causing swb and nightly test failures.
llvm-svn: 97866
2010-03-06 03:11:35 +00:00
Dale Johannesen
6489147b8e
Fix another case where LSR was affected by debug info.
...
llvm-svn: 97865
2010-03-06 02:45:26 +00:00
Evan Cheng
d8e0138666
Don't update physical register def.
...
llvm-svn: 97861
2010-03-06 01:14:19 +00:00
Evan Cheng
071e007ce6
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
...
llvm-svn: 97860
2010-03-06 01:01:42 +00:00
Erick Tryzelaar
a71d3b252d
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
6e35683720
Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.
...
Luckily this never was released.
llvm-svn: 97857
2010-03-06 00:30:01 +00:00
Erick Tryzelaar
7c33f3d1f3
LLVMWriteBitcodeToFileHandle should work on all architectures now.
...
llvm-svn: 97856
2010-03-06 00:29:58 +00:00
Dale Johannesen
f0c8e76a85
Add some new bits of debug info handling. No
...
functional change yet.
llvm-svn: 97855
2010-03-06 00:03:23 +00:00
Dan Gohman
00a652eea0
Reapply r97778 and r97779, enabled only for unsigned i64 to f64
...
conversions.
llvm-svn: 97854
2010-03-06 00:00:55 +00:00
Devang Patel
b241f6796a
Test case for r97851.
...
llvm-svn: 97852
2010-03-05 23:35:04 +00:00
Ted Kremenek
24e16cd322
Update CMake build.
...
llvm-svn: 97846
2010-03-05 22:34:16 +00:00
Charles Davis
faa2f44081
Don't emit global symbols into the (__TEXT,__ustring) section on Darwin. This
...
is a workaround for <rdar://problem/7672401/> (which I filed).
This let's us build Wine on Darwin, and it gets the Qt build there a little bit
further (so Doug says).
llvm-svn: 97845
2010-03-05 22:28:45 +00:00
Eric Christopher
dfb465a816
Move SimplifyLibCalls's LibCall builders to a separate file so they
...
can be used in more places. Add an argument for the TargetData that
most of them need. Update for the getInt8PtrTy() change. Should be
no functionality change.
llvm-svn: 97844
2010-03-05 22:25:30 +00:00
Eric Christopher
1e4aafa273
Add support for an i8* type accessor.
...
llvm-svn: 97841
2010-03-05 22:21:58 +00:00
Jakob Stoklund Olesen
4e033d2070
Better handling of dead super registers in LiveVariables. We used to do this:
...
CALL ... %RAX<imp-def>
... [not using %RAX]
%EAX = ..., %RAX<imp-use, kill>
RET %EAX<imp-use,kill>
Now we do this:
CALL ... %RAX<imp-def, dead>
... [not using %RAX]
%EAX = ...
RET %EAX<imp-use,kill>
By not artificially keeping %RAX alive, we lower register pressure a bit.
The correct number of instructions for 2008-08-05-SpillerBug.ll is obviously
55, anybody can see that. Sheesh.
llvm-svn: 97838
2010-03-05 21:49:17 +00:00
Jakob Stoklund Olesen
1fce28720a
We don't really care about correct register liveness information after the
...
post-ra scheduler has run. Disable the verifier checks that late in the game.
llvm-svn: 97837
2010-03-05 21:49:13 +00:00
Jakob Stoklund Olesen
67476519d7
Avoid creating bad PHI instructions when BR is being const-folded.
...
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Dale Johannesen
5c83d9b9b8
Fix a case where LSR is sensitive to debug info.
...
llvm-svn: 97830
2010-03-05 21:12:40 +00:00
Evan Cheng
3346ea1d4e
Safely turn memset_chk etc. to non-chk variant if the known object size is >= memset / memcpy / memmove size.
...
llvm-svn: 97828
2010-03-05 20:59:47 +00:00
Evan Cheng
782183fe4a
Instcombine should turn llvm.objectsize of a alloca with static size to an integer.
...
llvm-svn: 97827
2010-03-05 20:47:23 +00:00
Evan Cheng
ee117a9429
Fix typo.
...
llvm-svn: 97818
2010-03-05 19:55:55 +00:00
Chris Lattner
e1452aba94
fix bss section printing for cell, patch by Kalle Raiskila!
...
llvm-svn: 97814
2010-03-05 18:55:36 +00:00
Chris Lattner
789121d6e2
fix PR6512, a case where instcombine would incorrectly merge loads
...
from different addr spaces.
llvm-svn: 97813
2010-03-05 18:53:28 +00:00
Wesley Peck
79c2f7afcc
Reworking the stack layout that the MicroBlaze backend generates.
...
The MicroBlaze backend was generating stack layouts that did not
conform correctly to the ABI. This update generates stack layouts
which are closer to what GCC does.
Variable arguments support was added as well but the stack layout
for varargs has not been finalized.
llvm-svn: 97807
2010-03-05 15:26:02 +00:00
Wesley Peck
299e815510
Adding MBlaze to cmake target list.
...
llvm-svn: 97806
2010-03-05 15:15:55 +00:00
Chris Lattner
617f774b4e
Fix PR6503. This turned into a much more interesting and nasty bug. Various
...
parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors
(unrelated to the bug but noticed while in the code) and the code was
*definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic
that I added in r95855. Fix all this up by changing the various routines
to more consistently use IRBuilder and not pass in the I which had the wrong
type.
llvm-svn: 97801
2010-03-05 08:46:26 +00:00
Chris Lattner
f44ffcbc2c
make these less sensitive to temporary naming.
...
llvm-svn: 97799
2010-03-05 08:43:33 +00:00
Chris Lattner
3d5ab3df06
remove this testcase, it isn't clear what it was testing and it is subsumed by or.ll
...
llvm-svn: 97798
2010-03-05 08:43:06 +00:00
Evan Cheng
eb43cbfc75
Fix an oops in x86 sibcall optimization. If the ByVal callee argument is itself passed as a pointer, then it's obviously not safe to do a tail call.
...
llvm-svn: 97797
2010-03-05 08:38:04 +00:00
Duncan Sands
d18aa07fde
If LD_LIBRARY_PATH is set in the system environment, use it.
...
llvm-svn: 97796
2010-03-05 08:21:02 +00:00
Chris Lattner
bb443e70aa
simplify some functions and make them work with vector
...
compares, noticed by inspection.
llvm-svn: 97795
2010-03-05 07:47:57 +00:00
Chris Lattner
e457488032
fix a nice subtle reassociate bug which would only occur
...
in a very specific use pattern embodied in the carefully
reduced testcase.
llvm-svn: 97794
2010-03-05 07:18:54 +00:00
Eric Christopher
3e3c445c81
Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
...
No functionality change.
llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Jeffrey Yasskin
ec7d47ec83
Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.
...
llvm-svn: 97792
2010-03-05 06:43:49 +00:00
Chris Lattner
80aaccb987
Fix PR6497, a bug where we'd fold a load into an addc
...
node which has a flag. That flag in turn was used by an
already-selected adde which turned into an ADC32ri8 which
used a selected load which was chained to the load we
folded. This flag use caused us to form a cycle. Fix
this by not ignoring chains in IsLegalToFold even in
cases where the isel thinks it can.
llvm-svn: 97791
2010-03-05 06:19:13 +00:00
Chris Lattner
5804690a45
cleanup
...
llvm-svn: 97790
2010-03-05 06:17:43 +00:00
Chris Lattner
d7353d219f
inline a small function with one call site.
...
llvm-svn: 97789
2010-03-05 05:49:45 +00:00
Jeffrey Yasskin
a526081ebf
Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.
...
llvm-svn: 97788
2010-03-05 05:47:09 +00:00
Mikhail Glushenkov
67cac93b81
Make it not an error to specify -O* options several times.
...
As in 'llvmc -O2 -O2 test.c'.
llvm-svn: 97787
2010-03-05 04:46:39 +00:00