Commit Graph

58087 Commits

Author SHA1 Message Date
Tobias Grosser 62892a8680 Add findNearestCommonDominator() for PostDominators.
Add a missing interface to be able to call findNearestCommonDominator
for a PostDominanceTree. The function itself is already implemented in
DominatorTreeBase. The interface however was only added to the
DominatorTree class, but not the PostDominatorClass.

llvm-svn: 97915
2010-03-07 11:15:04 +00:00
Chris Lattner 28dc6c12c3 Use Other as a sentinel instead of iAny.
llvm-svn: 97914
2010-03-07 07:45:08 +00:00
Chris Lattner c95d58d31a turn off debug spew
llvm-svn: 97912
2010-03-07 07:21:24 +00:00
Chris Lattner a160389290 more factoring.
llvm-svn: 97911
2010-03-07 07:20:49 +00:00
Jeffrey Yasskin 7068bdba50 _2_ gcc crashes, ah, ah, ah...
(Rolling back r97906.)

llvm-svn: 97909
2010-03-07 07:16:49 +00:00
Chris Lattner b9071a2d5d teach tblgen to be more aggressive when factoring CheckType nodes.
Now it will factor things like this:

CheckType i32
  ...
CheckOpcode ISD::AND
  CheckType i64
  ...

into:

SwitchType:
  i32: ...
  i64:
    CheckOpcode ISD::AND
    ...

This shrinks hte table by a few bytes, nothing spectacular.

llvm-svn: 97908
2010-03-07 07:01:28 +00:00
Jeffrey Yasskin 413721b050 Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
llvm-svn: 97906
2010-03-07 06:55:35 +00:00
Chris Lattner 9c791d872a add some helper functions and implement isContradictory
for CheckValueTypeMatcher.  The isContradictory implementation
helps us factor better, shrinking x86 table from 79144 -> 78896
bytes.

llvm-svn: 97905
2010-03-07 06:29:26 +00:00
Chris Lattner ef2f8047fa tidy up
llvm-svn: 97895
2010-03-07 04:28:09 +00:00
Wesley Peck 1fb4edc05d Re-committing the failed r97807 commit with changes to eliminate warnings.
llvm-svn: 97891
2010-03-06 23:23:12 +00:00
Nick Lewycky 4b5e95426d Add verification of union types.
llvm-svn: 97889
2010-03-06 20:26:48 +00:00
Anton Korobeynikov c9c8b2713c Describe what's going on with mingw alloca and why do we need separate instruction.
llvm-svn: 97888
2010-03-06 20:07:32 +00:00
Anton Korobeynikov bf16a17fc1 Initial bits of ARMv4-only support.
Patch by John Tytgat!

llvm-svn: 97886
2010-03-06 19:39:36 +00:00
Anton Korobeynikov d5e3fd6dc8 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 4c1e4db3ff make APFloat::toString be const.
llvm-svn: 97883
2010-03-06 19:20:13 +00:00
Chris Lattner 1e93b96117 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 6f5523aa8b 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 1810d77cb4 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 a7fb58f5f5 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 7f1e85f331 Add static methods to handle Linkage Types.
llvm-svn: 97871
2010-03-06 07:22:39 +00:00
Chris Lattner 29146d417e clean this up.
llvm-svn: 97870
2010-03-06 07:02:28 +00:00
Chris Lattner 4279a078a5 revert r97807, it introduced build warnings.
llvm-svn: 97869
2010-03-06 04:32:46 +00:00
Jim Grosbach 24c9b550b2 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 d8b43d0e59 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 066b8ea590 Fix another case where LSR was affected by debug info.
llvm-svn: 97865
2010-03-06 02:45:26 +00:00
Evan Cheng 0f5f54784a Don't update physical register def.
llvm-svn: 97861
2010-03-06 01:14:19 +00:00
Evan Cheng afdc7d3aab 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 381268e629 Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar dc78d16a03 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 b2e144ddff LLVMWriteBitcodeToFileHandle should work on all architectures now.
llvm-svn: 97856
2010-03-06 00:29:58 +00:00
Dale Johannesen 10a77adede 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 14e450f595 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 0a3d71af52 Test case for r97851.
llvm-svn: 97852
2010-03-05 23:35:04 +00:00
Ted Kremenek 65bb311629 Update CMake build.
llvm-svn: 97846
2010-03-05 22:34:16 +00:00
Charles Davis 8545afe0b0 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 87abfc506f 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 27d54d9d3b Add support for an i8* type accessor.
llvm-svn: 97841
2010-03-05 22:21:58 +00:00
Jakob Stoklund Olesen 2664d295cb 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 8c5b8db5cd 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 b0503beff1 Avoid creating bad PHI instructions when BR is being const-folded.
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Dale Johannesen f5cc1cdc65 Fix a case where LSR is sensitive to debug info.
llvm-svn: 97830
2010-03-05 21:12:40 +00:00
Evan Cheng d214ed0e75 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 fffdad58ac 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 27494232d4 Fix typo.
llvm-svn: 97818
2010-03-05 19:55:55 +00:00
Chris Lattner f0692603d5 fix bss section printing for cell, patch by Kalle Raiskila!
llvm-svn: 97814
2010-03-05 18:55:36 +00:00
Chris Lattner f6befffbb2 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 34004170c5 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 b0578bf0c3 Adding MBlaze to cmake target list.
llvm-svn: 97806
2010-03-05 15:15:55 +00:00
Chris Lattner 067459c62b 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 fc13a0343c make these less sensitive to temporary naming.
llvm-svn: 97799
2010-03-05 08:43:33 +00:00