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

826 Commits

Author SHA1 Message Date
Anand Shukla
d02a20b947 Added check for inlinable function
llvm-svn: 7206
2003-07-18 20:55:26 +00:00
Anand Shukla
bb730173d6 A pass to combine multiple backedges that go to same target
llvm-svn: 7201
2003-07-18 16:08:32 +00:00
John Criswell
dbaf5f719c Dinakar and I fixed a bug where we were trying to get the initializer of
an external constant.  Since external constants don't have initializers, we
were failing on an assert() call in llvm/GlobalVariable.h.

llvm-svn: 7193
2003-07-17 19:06:55 +00:00
Vikram S. Adve
f5914c9bca Trace loads and stores as they happen (stores were being
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.

llvm-svn: 7169
2003-07-11 21:57:43 +00:00
Anand Shukla
cb78ec5ada Added functionality to instrmentation pass
llvm-svn: 7161
2003-07-10 21:55:57 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
a824a1ab66 Eliminate using declarations, adjust for new DSGraph API
llvm-svn: 6992
2003-06-30 03:14:44 +00:00
Chris Lattner
17ea08b804 Allow the inlining limit to be controlled from the command line!
llvm-svn: 6929
2003-06-28 15:57:04 +00:00
Chris Lattner
6b54665aa9 Add support to globaldce for deleting dead function prototypes
llvm-svn: 6918
2003-06-26 05:41:18 +00:00
Chris Lattner
3dc8d444ff When internalizing global ctor/dtor list, also mark it constant. This is gross, but
until DSA is working all of the time and is totally reliable, we do this.

llvm-svn: 6917
2003-06-26 05:30:40 +00:00
Chris Lattner
0cc143577c Add support for elimination of load instruction from global constants
llvm-svn: 6912
2003-06-26 05:06:25 +00:00
Chris Lattner
ebbc28f553 Instcombine: X * -1 -> -X
llvm-svn: 6904
2003-06-25 17:09:20 +00:00
Chris Lattner
0903331006 Fix bug: Mem2Reg/2003-06-26-IterativePromote.ll
llvm-svn: 6901
2003-06-25 14:58:56 +00:00
Chris Lattner
e3d0b99978 Add argument to DAE to allow operation on non-internal functions
llvm-svn: 6895
2003-06-25 04:12:49 +00:00
Chris Lattner
2cd94ee470 Fix bug: ADCE/2003-06-24-BadSuccessor.ll
llvm-svn: 6891
2003-06-24 23:02:45 +00:00
Chris Lattner
aac87d1e58 Do not mark ALL terminators live if any instruciton in the block is live. We only
want to mark it live if it is an unconditional branch.  This fixes bug:
ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful.

llvm-svn: 6887
2003-06-24 21:49:45 +00:00
Chris Lattner
867b7661cb Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll
llvm-svn: 6883
2003-06-24 20:29:52 +00:00
Chris Lattner
e1051d9fcf Fix bug: TailDup/2003-06-24-Simpleloop.ll
llvm-svn: 6881
2003-06-24 19:48:06 +00:00
Chris Lattner
e1f9e715c6 Implement new transforms:
Replace (cast (sub A, B) to bool) -> (setne A, B)
  Replace (cast (add A, B) to bool) -> (setne A, -B)

llvm-svn: 6873
2003-06-23 21:59:52 +00:00
Chris Lattner
1586e054a6 avoid dividing by zero when dealing with zero sized types (like [0 x double])
llvm-svn: 6862
2003-06-23 17:36:49 +00:00
Chris Lattner
a98d464fd6 Add paranoia checking
llvm-svn: 6856
2003-06-22 20:46:00 +00:00
Chris Lattner
99633d8cd2 Test change
llvm-svn: 6852
2003-06-22 20:25:27 +00:00
Chris Lattner
6d372c7450 Initial checkin of Tail duplication pass.
llvm-svn: 6846
2003-06-22 20:10:28 +00:00
Chris Lattner
9a0da3e531 Instcombine cast (getelementptr Ptr, 0, 0, 0) to ... into: cast Ptr to ...
This fixes type safety problems in a variety of benchmarks that were confusing
DSA.

llvm-svn: 6837
2003-06-21 23:12:02 +00:00
Chris Lattner
95bf937b5a Fix the build. :(
llvm-svn: 6797
2003-06-20 14:36:52 +00:00
Chris Lattner
3a8e92a30b Changes to privatize NodeType
llvm-svn: 6795
2003-06-19 21:15:26 +00:00
Chris Lattner
29e8adc038 Implement the functionality of InstCombine/call.ll
llvm-svn: 6783
2003-06-19 17:00:31 +00:00
Chris Lattner
cee19b1ace Remove a bunch of complicated code. The functionality is implemented in instcombine instead
llvm-svn: 6782
2003-06-19 16:59:19 +00:00
Chris Lattner
d176218b2d Handle arguments passed in through the va_arg area
llvm-svn: 6769
2003-06-18 16:25:51 +00:00
Chris Lattner
911e2c331c Initial checkin of DAE pass
llvm-svn: 6759
2003-06-17 22:21:05 +00:00
Chris Lattner
2b01ee820e Don't corrupt memory when removing an instruction from the program, but
not the worklist

llvm-svn: 6733
2003-06-17 03:57:18 +00:00
Chris Lattner
64ec8f36aa Fix bug: ADCE/2003-06-11-InvalidCFG.ll
This was because we were deleting large chunks of functions without an exit block, because the post-dominance
information was not useful.  This broke crafty and twolf.

llvm-svn: 6698
2003-06-16 12:10:45 +00:00
Chris Lattner
326e1fb77d Fix bug: LevelRaise/2003-06-07-EmptyArrayTest.ll
llvm-svn: 6669
2003-06-07 21:45:42 +00:00
Chris Lattner
26c238c746 Fix compilation problem on GCC 2.9x
llvm-svn: 6667
2003-06-07 20:29:58 +00:00
Chris Lattner
1bbfcd901c Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll
llvm-svn: 6630
2003-06-05 20:12:51 +00:00
Anand Shukla
80e3f54082 Fixed a bug so initialization code is always inserted in main
llvm-svn: 6622
2003-06-05 06:02:46 +00:00
Chris Lattner
b7423ab729 Use a constant expr GEP instead of an actual instruction
llvm-svn: 6620
2003-06-05 04:48:18 +00:00
Chris Lattner
3c98c8953a Make this work with counter > 127
llvm-svn: 6613
2003-06-04 20:08:47 +00:00
Sumant Kowshik
a961b3c083 Made changes suggested by Chris
llvm-svn: 6606
2003-06-04 08:03:57 +00:00
Chris Lattner
95d21756aa Clean up previous code.
Add new combination to turn seteq X, 0 -> not(cast X to bool)

llvm-svn: 6604
2003-06-04 05:10:11 +00:00
Chris Lattner
b2ea03d03a Implement combination of boolean not with branch
llvm-svn: 6599
2003-06-04 04:46:00 +00:00
Chris Lattner
eaafbfd2df Implement xform: (X != 0) -> (bool)X
llvm-svn: 6506
2003-06-01 03:35:25 +00:00
Anand Shukla
6939133e23 Added the #(internal functions) to output
llvm-svn: 6502
2003-06-01 02:40:49 +00:00
Chris Lattner
0897583c5c Fix bug: FunctionResolve/2003-05-31-AllInternalDecls.ll
llvm-svn: 6486
2003-05-31 21:57:06 +00:00
Chris Lattner
00751219b0 Fix bug: FuncResolve/2003-05-31-InternalDecl.ll
Count resolutions correctly.

llvm-svn: 6482
2003-05-31 21:08:45 +00:00
Chris Lattner
d825cf5ee3 Simplify funcresolve a bit more
llvm-svn: 6480
2003-05-31 20:44:46 +00:00
Chris Lattner
a7b50146af Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll
llvm-svn: 6479
2003-05-31 20:33:31 +00:00
Tanya Lattner
eaa01f0821 Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
llvm-svn: 6476
2003-05-31 20:01:37 +00:00
Chris Lattner
1c10a30949 Okay totally give up on trying to optimize aggregates that cannot be completely
broken up into their elements.  Too many programs break because of this.

llvm-svn: 6440
2003-05-30 19:22:14 +00:00
Chris Lattner
bf8c1cb6a3 add a check that allows the SRoA pass to avoid breaking programs, even if their
behavior is technically undefined

llvm-svn: 6438
2003-05-30 18:09:57 +00:00