1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

54049 Commits

Author SHA1 Message Date
Chris Lattner
01fddcec53 use getPredicateOnEdge to fold comparisons through PHI nodes,
which implements GCC PR18046.  This also gets us 360 more
jump threads on 176.gcc.

llvm-svn: 86953
2009-11-12 05:24:05 +00:00
Chris Lattner
3e63fb7318 various fixes to the lattice transfer functions.
llvm-svn: 86952
2009-11-12 04:57:13 +00:00
Chris Lattner
c1619b4fe9 switch jump threading to use getPredicateOnEdge in one place
making the new LVI stuff smart enough to subsume some special
cases in the old code.  Disable them when LVI is around, the
testcase still passes.

llvm-svn: 86951
2009-11-12 04:37:50 +00:00
Chris Lattner
6d1ca5d976 Add a new getPredicateOnEdge method which returns more rich information for
constant constraints.  Improve the LVI lattice to include inequality 
constraints.

llvm-svn: 86950
2009-11-12 04:36:58 +00:00
Jim Grosbach
f373f8c459 Move the utility function UpdateTerminator() from CodePlacementOpt() into
MachineBasicBlock so other passes can utilize it.

llvm-svn: 86947
2009-11-12 03:55:33 +00:00
Jim Grosbach
66e301e3ca Revert 86857. It's causing consumer-typeset to fail, and there's a better way to do it forthcoming anyway.
llvm-svn: 86945
2009-11-12 03:28:35 +00:00
Eric Christopher
42c58d5ea6 Use stubs when we have them, otherwise use code we already have,
otherwise create a stub.

Add a test to make sure we don't create extraneous stubs.

llvm-svn: 86941
2009-11-12 03:12:18 +00:00
Daniel Dunbar
e01ea92e28 Add the braces gcc suggested.
llvm-svn: 86933
2009-11-12 02:52:56 +00:00
Nick Lewycky
936ae2d76d Add CreateNUWAdd and CreateNUWSub to complement the existing CreateNSWAdd and
CreateNSWSub functions.

llvm-svn: 86930
2009-11-12 02:08:11 +00:00
Chris Lattner
b976027c91 should not commit when distracted.
llvm-svn: 86929
2009-11-12 02:04:17 +00:00
Dan Gohman
b6f852353a Make the BranchFolderPass class local to BranchFolding.cpp.
llvm-svn: 86928
2009-11-12 01:59:26 +00:00
Chris Lattner
32bb09e867 We now thread some impossible condition information with LVI.
llvm-svn: 86927
2009-11-12 01:55:20 +00:00
Dan Gohman
8931850b74 Minor code cleanups.
llvm-svn: 86926
2009-11-12 01:51:28 +00:00
Chris Lattner
68f3b53ddc with the new code we can thread non-instruction values. This
allows us to handle the test10 testcase.

llvm-svn: 86924
2009-11-12 01:41:34 +00:00
Chris Lattner
ea8b237a74 this argument can be an arbitrary value, it doesn't need to be an instruction.
llvm-svn: 86923
2009-11-12 01:37:43 +00:00
Chris Lattner
b5bb115ece expose edge information and switch j-t to use it.
llvm-svn: 86920
2009-11-12 01:29:10 +00:00
Lang Hames
41dcc7ba71 Fixed an iteration condition in PreAllocSplitting. This should fix some miscompilations casued by PreAllocSplitting.
llvm-svn: 86919
2009-11-12 01:24:08 +00:00
Chris Lattner
46056d81aa move some stuff into DEBUG's and turn on lazy-value-info for
the basic.ll testcase.

llvm-svn: 86918
2009-11-12 01:22:16 +00:00
Eric Christopher
1764cc3934 Fix typo, cleanup whitespace.
llvm-svn: 86917
2009-11-12 01:06:08 +00:00
Devang Patel
c70b8eefb7 Do not use StringRef in DebugInfo interface.
This allows StringRef to skip controversial if(str) check in constructor.
Buildbots, wait for corresponding clang and llvm-gcc FE check-ins!

llvm-svn: 86914
2009-11-12 00:50:58 +00:00
Dan Gohman
f8ec4856e4 Tail merge at any size when there are two potentials blocks and one
can be made to fall through into the other.

llvm-svn: 86909
2009-11-12 00:39:10 +00:00
Bill Wendling
cfdaf6609a Don't mark a call as potentially throwing if the function it's calling has the
"nounwind" attribute.

llvm-svn: 86897
2009-11-11 23:17:02 +00:00
Bruno Cardoso Lopes
99e65b8707 A real solution for the first part of PR5445
llvm-svn: 86895
2009-11-11 23:09:33 +00:00
Chris Lattner
4c831006c7 make LazyValueInfo actually to some stuff. This isn't very tested but improves
strswitch.

llvm-svn: 86889
2009-11-11 22:48:44 +00:00
Chris Lattner
73b7ed2d9c pass TD into a SimplifyCmpInst call. Add another case that
uses LVI info when -enable-jump-threading-lvi is passed.

llvm-svn: 86886
2009-11-11 22:31:38 +00:00
Dan Gohman
93c57d5ff0 Promote MergePotentialsElt and SameTailElt to be regular classes
instead of typedefs for std::pair. This simplifies the type of
SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator>

llvm-svn: 86885
2009-11-11 21:57:02 +00:00
Kenneth Uildriks
82bc831061 x86 users can now return arbitrary sized structs. Structs too large to fit in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction.
llvm-svn: 86876
2009-11-11 19:59:24 +00:00
Dan Gohman
9623ba83ce Revert this line of 86871.
llvm-svn: 86875
2009-11-11 19:56:05 +00:00
Devang Patel
e37dd6ef40 If doesSupportDebugInformation() is false then do not try to emit dwarf debug info.
llvm-svn: 86874
2009-11-11 19:55:08 +00:00
Dan Gohman
05a9a66c9e Check in the changes to this file too.
llvm-svn: 86873
2009-11-11 19:49:34 +00:00
Dan Gohman
9f47de10e3 Add support for tail duplication to BranchFolding, and extend
tail merging support to handle more cases.
 - Recognize several cases where tail merging is beneficial even when
   the tail size is smaller than the generic threshold.
 - Make use of MachineInstrDesc::isBarrier to help detect
   non-fallthrough blocks.
 - Check for and avoid disrupting fall-through edges in more cases.

llvm-svn: 86871
2009-11-11 19:48:59 +00:00
Jakob Stoklund Olesen
01582996dd Fix liveness calculation when splitting critical edges during PHI elimination.
- Edges are split before any phis are eliminated, so the code is SSA.

- Create a proper IR BasicBlock for the split edges.

- LiveVariables::addNewBlock now has same syntax as
  MachineDominatorTree::addNewBlock. Algorithm calculates predecessor live-out
  set rather than successor live-in set.

This feature still causes some miscompilations.

llvm-svn: 86867
2009-11-11 19:31:31 +00:00
Devang Patel
630136fb86 Reenable StackTracke.cpp test.
llvm-svn: 86861
2009-11-11 19:08:42 +00:00
Devang Patel
304b516363 Add SetDebugLocation() variant to
add debug info location to an instruction.

llvm-svn: 86859
2009-11-11 19:06:06 +00:00
Evan Cheng
a11308742c Add TargetLowering::isLegalICmpImmediate. It tells LSR what immediate can be folded into target icmp instructions.
llvm-svn: 86858
2009-11-11 19:05:52 +00:00
Jim Grosbach
9ecdde2be4 Do jump table adjustment before constant island allocation
llvm-svn: 86857
2009-11-11 19:04:24 +00:00
Dan Gohman
b0f32c095c Fix indentation level.
llvm-svn: 86856
2009-11-11 18:42:28 +00:00
Dan Gohman
b72c986b78 Whitespace cleanups.
llvm-svn: 86855
2009-11-11 18:38:14 +00:00
Dan Gohman
60b5c20890 Prefix MBB numbers with "BB#" in debug output to make it clear what
the numbers mean.

llvm-svn: 86854
2009-11-11 18:23:17 +00:00
Dan Gohman
281338a3d2 Minor code simplification.
llvm-svn: 86853
2009-11-11 18:18:34 +00:00
Dan Gohman
574137b4c0 Fix a copy+pasto in a comment.
llvm-svn: 86852
2009-11-11 18:14:02 +00:00
Dan Gohman
4631d78a3b Set isBarrier = 1 on return instructions, as they are control barriers.
llvm-svn: 86851
2009-11-11 18:11:07 +00:00
Dan Gohman
3045fc7514 Use a tab in INT3's asm string, for consistency.
llvm-svn: 86850
2009-11-11 18:07:16 +00:00
Chris Lattner
0dd2fe1e1e another const prop failure.
llvm-svn: 86848
2009-11-11 17:54:02 +00:00
Chris Lattner
20da198cb6 add a note
llvm-svn: 86847
2009-11-11 17:51:27 +00:00
Chris Lattner
a3457e6bae Reject duplicate case values in a switch, PR5450.
llvm-svn: 86846
2009-11-11 17:37:02 +00:00
Duncan Sands
f0d9823d0b Don't trivially delete unused calls to llvm.invariant.start. This allows
llvm.invariant.start to be used without necessarily being paired with a call
to llvm.invariant.end.  If you run the entire optimization pipeline then such
calls are in fact deleted (adce does it), but that's actually a good thing since
we probably do want them to be zapped late in the game.  There should really be
an integration test that checks that the llvm.invariant.start call lasts long
enough that all passes that do interesting things with it get to do their stuff
before it is deleted.  But since no passes do anything interesting with it yet
this will have to wait for later.

llvm-svn: 86840
2009-11-11 15:34:13 +00:00
Evan Cheng
913687616e Add nounwind.
llvm-svn: 86814
2009-11-11 07:11:02 +00:00
Chris Lattner
36009e416c remove the now dead condprop pass, PR3906.
llvm-svn: 86810
2009-11-11 05:56:35 +00:00
Jeffrey Yasskin
92dc6cb703 Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo
by default).

llvm-svn: 86807
2009-11-11 05:30:02 +00:00