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
Tanya Lattner
ce23a1f169
Added the CloneTrace function which clones traces. It takes a vector of basic blocks, removes
...
internal phi nodes, and returns a new vector of basic blocks.
llvm-svn: 6431
2003-05-30 15:50:18 +00:00
Chris Lattner
c9d950434b
Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
...
llvm-svn: 6428
2003-05-30 05:26:30 +00:00
Chris Lattner
0d415b2dd3
Fix bug: ScalarRepl/2003-05-29-ArrayFail.ll
...
llvm-svn: 6425
2003-05-30 04:15:41 +00:00
Sumant Kowshik
3186cb2b05
Added support for function pointers
...
llvm-svn: 6420
2003-05-29 22:42:44 +00:00
Chris Lattner
58c7aaa0e5
Add comment
...
llvm-svn: 6415
2003-05-29 20:26:30 +00:00
Chris Lattner
01cbfa9317
Eliminate unnecessary ->get calls that are now automatically handled.
...
llvm-svn: 6397
2003-05-29 15:12:27 +00:00
Chris Lattner
24947af013
* Separate all of the grunt work of inlining out into the Utils library.
...
* Make the function inliner _significantly_ smarter. :)
llvm-svn: 6396
2003-05-29 15:11:31 +00:00
Chris Lattner
416e30b07b
Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll
...
llvm-svn: 6352
2003-05-27 16:40:51 +00:00
Chris Lattner
8a6c3b5cbe
* Actually USE the statistic that we made
...
* Implement SRoA for arrays
llvm-svn: 6349
2003-05-27 16:09:27 +00:00
Chris Lattner
5c093a1a93
Implementation of the simple "scalar replacement of aggregates" transformation
...
llvm-svn: 6346
2003-05-27 15:45:27 +00:00
Chris Lattner
1fde83c9b5
Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
...
llvm-svn: 6338
2003-05-26 23:41:32 +00:00
Chris Lattner
e58f6153f4
Remove using declarations
...
llvm-svn: 6306
2003-05-22 22:00:07 +00:00
Chris Lattner
e1d3dfec23
Make the list accept comma separated names
...
llvm-svn: 6295
2003-05-22 20:27:13 +00:00
Chris Lattner
ab034e55b5
* Revert to old behavior of ignoring a module if it doesn't contain a main
...
function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
list is small, and making a new file is annoying.
llvm-svn: 6289
2003-05-22 19:48:00 +00:00
Chris Lattner
f26f3f74a3
Add option to internalize to allow it to read a file to determine which symbols
...
should not be internalized
llvm-svn: 6288
2003-05-22 19:34:49 +00:00
Chris Lattner
91c5d68261
Minor cleanups.
...
This hunk:
- } else if (Src->getNumOperands() == 2 && Src->use_size() == 1) {
+ } else if (Src->getNumOperands() == 2) {
Allows GEP folding to be more aggressive, which reduces the number of instructions
and can dramatically speed up BasicAA in some cases.
llvm-svn: 6286
2003-05-22 19:07:21 +00:00
Chris Lattner
2fba72b389
Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
...
llvm-svn: 6273
2003-05-21 20:51:52 +00:00
Misha Brukman
825e174bf7
Hopefully, the final fix for `[Pp]ropogate'.
...
llvm-svn: 6251
2003-05-20 21:01:22 +00:00
Misha Brukman
74cf3f5246
s/convertable/convertible/g
...
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner
d8234cfa3a
Fix long standing bug
...
llvm-svn: 6232
2003-05-15 18:25:13 +00:00
Chris Lattner
d0f6311c43
Fix Bug: Linker/2003-05-15-TypeProblem.ll
...
llvm-svn: 6225
2003-05-15 16:30:55 +00:00
Chris Lattner
be0b81a4e9
Fix major problem with appending linkage changes
...
llvm-svn: 6185
2003-05-14 12:11:51 +00:00
Chris Lattner
576323e25e
Implement linkage of appending global variables!
...
llvm-svn: 6178
2003-05-13 21:33:43 +00:00
Chris Lattner
6cb27840a7
Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll
...
llvm-svn: 6153
2003-05-12 22:04:34 +00:00
Chris Lattner
a7ee27e0fd
Handle va_arg instruction correctly
...
llvm-svn: 6030
2003-05-08 02:50:13 +00:00
Chris Lattner
f1f55e385c
Don't inline functions that take variable numbers of arguments!
...
llvm-svn: 6024
2003-05-08 02:36:43 +00:00
Chris Lattner
d381dc9316
Remove using decl
...
llvm-svn: 6023
2003-05-08 02:34:52 +00:00
Chris Lattner
984bb45d4a
Attempt to fix sumant's typesafety issue
...
llvm-svn: 5984
2003-05-02 19:32:04 +00:00
Chris Lattner
e006ca4580
Fix spelling
...
llvm-svn: 5983
2003-05-02 19:26:34 +00:00
Chris Lattner
f13fe891d1
Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll
...
llvm-svn: 5979
2003-05-01 22:21:21 +00:00
Chris Lattner
c2eb77b84f
Fix bug: LevelRaise/2003-05-01-CallCast.ll
...
llvm-svn: 5975
2003-05-01 21:02:53 +00:00
Chris Lattner
5045ab0fac
Fix another case where constexprs could cause a crash
...
llvm-svn: 5972
2003-04-30 22:34:06 +00:00
Chris Lattner
caa766b40f
Fix constant folding of constexprs
...
llvm-svn: 5971
2003-04-30 22:19:10 +00:00
Chris Lattner
a1250081cc
Create constant expression casts instead of constant instructions if possible
...
llvm-svn: 5968
2003-04-28 01:25:38 +00:00
Chris Lattner
b74f4c1462
Fix several bugs:
...
* Warnings were emitted all of the time and were really annoying
* Functions could not be resolved unless they had external linkage. Linkonce
linkage was not allowed
* ConstantPointerRef's were not handled when linking functions
we now actually handle cast (CPR) to X -> cast (NewCPR) to X
llvm-svn: 5967
2003-04-28 01:23:29 +00:00
Chris Lattner
7e9f0ea3fd
Avoid naming things exactly the same
...
llvm-svn: 5966
2003-04-27 22:55:56 +00:00
Chris Lattner
d2960ee802
Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
...
llvm-svn: 5952
2003-04-25 22:53:27 +00:00
Chris Lattner
c78cd5c758
Fix major problem with PHI node traversal: rechecking PHIs should go into
...
the visit function. The worklist is for when their lattice value changes.
llvm-svn: 5927
2003-04-25 03:35:10 +00:00
Chris Lattner
7b67a6e77d
Minor non-functional changes:
...
* Spell propagate right
* Improve performance of phi node handling
* Delete using directive
* Other minor changes
llvm-svn: 5920
2003-04-25 02:50:03 +00:00
Chris Lattner
e1c995e9b6
Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
...
llvm-svn: 5919
2003-04-25 00:54:58 +00:00
Chris Lattner
3dbf3f0ac1
Make the levelraise pass be well behaved w.r.t the TargetData that the current
...
PassMAnager provides.
llvm-svn: 5896
2003-04-24 18:25:27 +00:00
Chris Lattner
043b4a7621
Fix iterator invalidation problem
...
llvm-svn: 5895
2003-04-24 17:52:20 +00:00
Chris Lattner
f0c01a508b
Make sure that the cloned module retains the type symbol table entries!
...
llvm-svn: 5894
2003-04-24 17:15:33 +00:00
Chris Lattner
868b3316c9
Make sure to preserve endiannes and pointer size when cloning modules!
...
llvm-svn: 5892
2003-04-24 15:54:40 +00:00
Chris Lattner
b6050c264d
Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
...
llvm-svn: 5879
2003-04-23 18:38:39 +00:00
Chris Lattner
db6b7ba364
Remove unnecesary &*'s
...
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
a9eaa10358
New pass to lower switch instructions to branch instructions
...
llvm-svn: 5865
2003-04-23 16:23:59 +00:00
Chris Lattner
d609c99c87
Minor cleanups
...
llvm-svn: 5863
2003-04-23 16:18:14 +00:00
Chris Lattner
69b54208f4
Add warning when linking modules with disagreeing target properties
...
llvm-svn: 5845
2003-04-22 19:13:20 +00:00
Chris Lattner
ce0beca3fc
Preserve the new moduleID field
...
llvm-svn: 5835
2003-04-22 18:02:26 +00:00
Chris Lattner
21967df20a
Fix bug: 2003-01-30-LinkerRename.ll
...
llvm-svn: 5828
2003-04-21 21:15:04 +00:00
Chris Lattner
6da72fd92a
Fix linking a function with qualifiers to a external function declaration:
...
Fixed bug: Linker/2003-04-21-Linkage.ll
llvm-svn: 5827
2003-04-21 21:07:05 +00:00
Chris Lattner
a489b529fe
Fix bug where use still existed in dead code
...
llvm-svn: 5824
2003-04-21 19:15:26 +00:00
Chris Lattner
5931df28b7
Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
...
llvm-svn: 5816
2003-04-19 00:15:27 +00:00
Chris Lattner
61d704329e
Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll
...
llvm-svn: 5810
2003-04-18 19:25:22 +00:00
Chris Lattner
08b5392e07
Global constants CAN be external
...
llvm-svn: 5808
2003-04-18 04:34:29 +00:00
Chris Lattner
f171f30deb
Refactor CloneFunction to expose the new CloneBasicBlock function
...
llvm-svn: 5806
2003-04-18 03:50:09 +00:00
Chris Lattner
5403f79db0
New const_cast instead of c style cast
...
llvm-svn: 5805
2003-04-18 03:49:49 +00:00
Chris Lattner
bb00f755ed
Change the interface to constant expressions to allow automatic folding
...
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner
fa4f750f3e
Add new linkage types to support a real frontend
...
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
fc93e77390
Make help message more clear
...
llvm-svn: 5775
2003-04-13 03:50:14 +00:00
Chris Lattner
0ac391e6c8
* Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
...
* Make Mem2Reg assign version numbers now for renamed variables instead of
.mem2reg suffixes. This produces what people think of as SSA.
llvm-svn: 5771
2003-04-10 19:41:13 +00:00
Chris Lattner
731913bab3
Initial checkin of PRE on LLVM. This implementation is still lacking in
...
several ways:
* Load expressions are not PRE'd well. Alias Analysis should be used to
get accurate information when computing anticipatibility.
* The expression collection implementation does not handle PHI nodes properly,
thus the implementation misses many opportunities to PRE.
* This code could be sped up quite a bit
Despite these flaws, the code seems to work well, and handles PR's as one
would expect.
llvm-svn: 5759
2003-03-31 19:55:43 +00:00
Chris Lattner
44370a85d9
* We now preserve the no-critical-edge pass (because we cannot insert critical edges)
...
* Small modification to be more efficient
llvm-svn: 5757
2003-03-31 17:30:25 +00:00
Chris Lattner
b215db890f
Move BreakCriticalEdges pass to lib/Transforms/Utils
...
llvm-svn: 5754
2003-03-21 21:43:19 +00:00
Chris Lattner
c51d7871ee
Add the following instcombine xforms:
...
- Implement simple reassociation: (A|c1)|(B|c2) == (A|B)|(c1|c2)
- (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
- (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
llvm-svn: 5743
2003-03-11 00:12:48 +00:00
Chris Lattner
6eededc41f
Implement: -A*-B == A*B
...
llvm-svn: 5740
2003-03-10 23:23:04 +00:00
Chris Lattner
715b592fc4
Add new transformation: // (~A | ~B) == (~(A & B))
...
llvm-svn: 5738
2003-03-10 23:13:59 +00:00
Chris Lattner
0f5ab645eb
Generalize not and neg comparison testers to allow constant to be considered not'able and neg'able. This
...
allows optimization of this:
int %test4(int %A, int %B) {
%a = xor int %A, -1
%c = and int %a, 5 ; 5 = ~c2
%d = xor int %c, -1
ret int %d
}
into this:
int %test4(int %A, int %B) { ; No predecessors!
%c.demorgan = or int %A, -6 ; <int> [#uses=1]
ret int %c.demorgan
}
llvm-svn: 5736
2003-03-10 23:06:50 +00:00
Chris Lattner
3eca9aaa0a
Generalize (A+c1)+c2 optimization to work with all associative operators
...
llvm-svn: 5733
2003-03-10 21:43:22 +00:00
Chris Lattner
9dec4368c0
Minor change, no functionality diff
...
llvm-svn: 5731
2003-03-10 19:20:30 +00:00
Chris Lattner
5fbfe9b9a8
Fix bug: (x << 100) wasn't folded to 0, but (x >> 100) was (when x is unsigned)
...
Implement new shift optimizations for shifting the result of a shift.
llvm-svn: 5729
2003-03-10 19:16:08 +00:00
Chris Lattner
5e6fb8b8d5
Implement: (A|B)^B == A & (~B)
...
llvm-svn: 5728
2003-03-10 18:24:17 +00:00
Chris Lattner
9f2f48a648
Fix bug: SimplifyCFG/2003-03-07-DominateProblem.ll
...
llvm-svn: 5722
2003-03-07 18:13:41 +00:00
Chris Lattner
bd009a8938
Implement %test7 in InstCombine/getelementptr.ll
...
llvm-svn: 5704
2003-03-05 22:33:14 +00:00
Chris Lattner
4a9f0be9dd
Implement CFGSimplify/PhiBlockMerge*.ll
...
llvm-svn: 5702
2003-03-05 21:36:33 +00:00
Chris Lattner
e025920ff8
Implement testcase CFGSimplify/EqualPHIEdgeBlockMerge.ll
...
llvm-svn: 5699
2003-03-05 21:01:52 +00:00
Chris Lattner
4eaaa99b93
Convert LICM over to use AliasSetTracker. Besides being nicer, this automatically
...
allows LICM to use access sizes to help alias analysis be more precise.
llvm-svn: 5693
2003-03-03 23:32:45 +00:00
Chris Lattner
db94bd1661
Eliminate tons of bogus warnings
...
llvm-svn: 5686
2003-03-03 19:57:46 +00:00
Chris Lattner
a49e96dda5
Change the mem2reg interface to accept a TargetData argument
...
llvm-svn: 5685
2003-03-03 17:25:18 +00:00
Chris Lattner
09c35df4e9
Fix bug: LICM/2003-02-28-PromoteDifferentType.ll
...
llvm-svn: 5675
2003-02-28 19:21:40 +00:00
Chris Lattner
dec7727a9f
Fix bug I introduced yesterday :(
...
llvm-svn: 5669
2003-02-28 16:54:17 +00:00
Chris Lattner
e2aebf5906
Fix bug: LICM/2003-02-27-PreheaderExitNodeUpdate.ll
...
llvm-svn: 5667
2003-02-28 03:07:54 +00:00
Chris Lattner
d64f135965
Fix bug: 2003-02-27-PreheaderExitNodeUpdate.ll by updating exit node info
...
llvm-svn: 5664
2003-02-27 22:48:57 +00:00
Chris Lattner
74b9aaa89c
Add a new assertion to check that stuff is happening right
...
Ironically the exit block modification code wasn't updating the exit block
information itself. Fix this.
llvm-svn: 5659
2003-02-27 22:31:07 +00:00
Chris Lattner
d40fa5ca2f
Fix bug: 2003-02-27-StoreSinkPHIs.ll
...
llvm-svn: 5658
2003-02-27 21:59:36 +00:00
Chris Lattner
e8dda81b22
* Don't forget to update Loop information!
...
* Remove bogus assertion: there may be a single outside predecessor and
still need a new loop-preheader if the predecessor has multiple
successors. See bug: LICM/2003-02-27-PreheaderProblem.ll
llvm-svn: 5655
2003-02-27 21:50:19 +00:00
Chris Lattner
3b3cce733d
Replace assertion with a handler.
...
llvm-svn: 5653
2003-02-27 20:55:48 +00:00
Chris Lattner
b078b28fa5
* Significant changes to the preheader insertion pass:
...
- Now we perform loop exit-block splitting to ensure exit blocks are
always dominated by the loop header.
- We now preserve dominance frontier information
- This fixes bug: LICM/2003-02-26-LoopExitNotDominated.ll
llvm-svn: 5652
2003-02-27 20:27:08 +00:00
Chris Lattner
92a8816086
Convert to work with new AliasAnalysis interface by conservatively assuming all pointers are arbitrarily large accesses
...
llvm-svn: 5636
2003-02-26 19:28:57 +00:00
Chris Lattner
497c0d443c
Rename Instruction::hasSideEffects() -> mayWriteToMemory()
...
llvm-svn: 5620
2003-02-24 20:48:32 +00:00
Chris Lattner
1c1f11bd3f
Initial implementation of Loop invariant memory->scalar promotion
...
llvm-svn: 5613
2003-02-24 03:52:32 +00:00
Chris Lattner
2e4c1c8640
Split mem2reg promotion into two parts: a function which does the work, and
...
a pass which wraps the function. This allows other passes to use the functionality
llvm-svn: 5610
2003-02-22 23:57:48 +00:00
Chris Lattner
283d117dad
Clean up std namespace references
...
llvm-svn: 5608
2003-02-22 22:25:17 +00:00
Chris Lattner
c24ffa9297
4 new transformations:
...
* X*C + X --> X * (C+1)
* X + X*C --> X * (C+1)
* X - X*C --> X * (1-C)
* X*C - X --> X * (C-1)
llvm-svn: 5592
2003-02-18 19:57:07 +00:00
Chris Lattner
8306cc5c5c
Add a variety of new transformations:
...
* A & ~A == 0
* A / (2^c) == A >> c if unsigned
* 0 / A == 0
* 1.0 * A == A
* A * (2^c) == A << c
* A ^ ~A == -1
* A | ~A == -1
* 0 % X = 0
* A % (2^c) == A & (c-1) if unsigned
* A - (A & B) == A & ~B
* -1 - A == ~A
llvm-svn: 5587
2003-02-18 19:28:33 +00:00
Anand Shukla
7aae29d426
Changes to runtime framework
...
llvm-svn: 5572
2003-02-14 20:41:53 +00:00
Chris Lattner
174a241cd5
Fix a bug that cause a crash resolving questionable function calls
...
llvm-svn: 5567
2003-02-14 19:12:29 +00:00
Chris Lattner
8de17c9baf
Fix a misunderstanding of the standard associative containers
...
llvm-svn: 5565
2003-02-14 05:34:36 +00:00
Chris Lattner
e70bdb4355
Fix bug: LevelRaise/2003-02-13-CallRaise.ll
...
llvm-svn: 5562
2003-02-14 03:07:17 +00:00
Chris Lattner
644b87ddb2
Revert Anand's patch which broke the build
...
llvm-svn: 5525
2003-02-10 15:55:50 +00:00
Anand Shukla
a502e67a14
*** empty log message ***
...
llvm-svn: 5522
2003-02-09 21:15:36 +00:00
Chris Lattner
cc7f4a3c65
Fix a problem Sumant was running into
...
llvm-svn: 5499
2003-02-06 22:03:46 +00:00
Chris Lattner
978ff5d0dd
Split public interface out into header file
...
llvm-svn: 5472
2003-02-03 19:08:18 +00:00
Chris Lattner
7aec6c471b
Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
...
This change provides a small (3%) but consistent speedup
llvm-svn: 5460
2003-02-01 04:52:08 +00:00
Chris Lattner
aceb57a289
Fix typo
...
llvm-svn: 5458
2003-02-01 04:50:59 +00:00
Chris Lattner
dcf38586ef
Fix a bug resolving sprintf(...) to sprintf(char*, char*, ...)
...
llvm-svn: 5446
2003-01-30 22:38:44 +00:00
Chris Lattner
0e59c67f69
Actually print the function _name_ if there is a problem
...
llvm-svn: 5443
2003-01-30 21:33:07 +00:00
Chris Lattner
f1f1b83cbe
* Fix linking of opaque types and their non-opaque versions
...
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll
llvm-svn: 5441
2003-01-30 20:53:43 +00:00
Chris Lattner
f9ace7ffb1
Eliminate using decls
...
llvm-svn: 5439
2003-01-30 19:53:34 +00:00
Chris Lattner
70b2c322eb
* Fix function resolution for varargs function to generate incorrect bytecode instead of crashing
...
* remove using decls
CVS: ----------------------------------------------------------------------
llvm-svn: 5437
2003-01-30 18:22:32 +00:00
Chris Lattner
0ee7b79c71
Fix levelraise/2003-01-30-ShiftCrash.ll
...
llvm-svn: 5435
2003-01-30 17:10:41 +00:00
Chris Lattner
3c20e2c6d1
Initial checkin of pool allocation code
...
llvm-svn: 5432
2003-01-29 21:12:13 +00:00
Chris Lattner
19ad3aaf0a
Disable construction of pool allocator
...
llvm-svn: 5422
2003-01-24 20:13:20 +00:00
Chris Lattner
5db30d467a
Fix bug: LevelRaise/2003-01-22-GEPProblem.ll
...
llvm-svn: 5407
2003-01-23 02:39:10 +00:00
Chris Lattner
7af7b1c82c
Fix bug: ADCE/2003-01-22-PredecessorProblem.ll
...
llvm-svn: 5405
2003-01-23 02:12:18 +00:00
Chris Lattner
9cb223ad0d
Rename include/llvm/Transforms/Instrumentation/TraceFunctions.h to Instrumentation.h
...
llvm-svn: 5281
2003-01-14 22:39:29 +00:00
Chris Lattner
1b6292ad6f
Fix typeo
...
llvm-svn: 5278
2003-01-14 22:34:36 +00:00
Chris Lattner
b5580841b3
Remove unused header and function
...
llvm-svn: 5277
2003-01-14 22:34:13 +00:00
Chris Lattner
a61f16fc93
Clean up #includes
...
Move graph.h into local directory
llvm-svn: 5276
2003-01-14 22:33:56 +00:00
Chris Lattner
95583742c4
Fix bug
...
llvm-svn: 5264
2003-01-14 19:04:43 +00:00
Chris Lattner
31a6321785
Add debugging helper
...
llvm-svn: 5235
2003-01-13 00:52:25 +00:00
Chris Lattner
5fb6540457
Make sure to handle %'s in strings correctly so that the names of BB's and functions are actually printed!
...
llvm-svn: 5234
2003-01-13 00:52:14 +00:00
Chris Lattner
23aa2d5bfd
Fix references to functions
...
llvm-svn: 5222
2003-01-13 00:27:23 +00:00
Chris Lattner
61d594690a
Fix a huge performance problem in reassociate by introducing a
...
rank map cache for instruction ranks
llvm-svn: 5030
2002-12-15 03:56:00 +00:00
Chris Lattner
18fe81719d
Minor changes:
...
* Reword comment to make more clear
* Don't print out BB's after modification made
* Don't delete and new an instruction when we need to move something, just move it.
llvm-svn: 5029
2002-12-15 03:49:50 +00:00
Vikram S. Adve
6c46fba526
External routines used to identify Cilk operations inserted by the
...
parallelization pass.
llvm-svn: 4965
2002-12-10 13:08:48 +00:00
Vikram S. Adve
a9966ae8ad
This file implements the function DemoteRegToStack(), which takes a
...
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.
llvm-svn: 4964
2002-12-10 13:07:58 +00:00
Vikram S. Adve
849346ee23
This file implements a pass that automatically parallelizes a program,
...
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.
llvm-svn: 4962
2002-12-10 00:43:34 +00:00
Chris Lattner
fc15b7a661
Fix bug that was bugging bugpoint
...
llvm-svn: 4953
2002-12-07 21:27:16 +00:00
Chris Lattner
be53e88459
Remove dead code
...
llvm-svn: 4952
2002-12-07 18:42:13 +00:00
Chris Lattner
6c9d57c590
Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
...
llvm-svn: 4935
2002-12-05 22:41:53 +00:00
Chris Lattner
dd9d97436d
Fix big bug introduced with symbol table changes
...
llvm-svn: 4885
2002-12-03 18:32:30 +00:00
Chris Lattner
6aa0ec26d5
Initial checkin of Module cloning support stuff
...
llvm-svn: 4788
2002-11-20 20:47:41 +00:00
Chris Lattner
58944216ff
Fix symbol table problem
...
llvm-svn: 4785
2002-11-20 19:32:43 +00:00
Chris Lattner
b5027095e5
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
ec0df74910
Fix minor bugs
...
llvm-svn: 4778
2002-11-20 18:32:31 +00:00
Chris Lattner
62629300d3
Remove unneccesary #include
...
llvm-svn: 4772
2002-11-19 23:12:53 +00:00
Chris Lattner
4053d2dd12
Implement the CloneFunction function
...
llvm-svn: 4771
2002-11-19 23:12:22 +00:00
Chris Lattner
e5a05ec13b
Minor changes to cloning interface
...
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner
aff50cfe1d
Fix two fixmes: integrate with inlining, and document
...
llvm-svn: 4769
2002-11-19 22:04:49 +00:00
Chris Lattner
27bf5916fb
Rework inline pass to use cloning infrastructure to do the dirty work
...
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner
ccb8790bc4
Start using the new function cloning header
...
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner
7e4c65114b
Move MutatStructTypes.h out of IPO
...
llvm-svn: 4762
2002-11-19 20:49:40 +00:00
Chris Lattner
17da38496e
Rename CloneFunction.h to Cloning.h
...
llvm-svn: 4760
2002-11-19 20:08:24 +00:00
Chris Lattner
adea9960ab
Move the function extractor pass from tools/extract into lib/Xform/IPO
...
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner
996bf14a4f
Fix bug: 2002-11-13-PointerFunction.ll
...
This should fix codegen on vortex to work much better
llvm-svn: 4704
2002-11-13 06:54:20 +00:00
Chris Lattner
96d1bfd014
Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
...
llvm-svn: 4668
2002-11-10 03:36:55 +00:00
Chris Lattner
0141841bc4
Fix warning
...
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
f03f32d2e8
Fix spelling error
...
llvm-svn: 4645
2002-11-08 23:18:37 +00:00
Chris Lattner
7252fe359e
Use the new getMainFunction() method to efficiently locate main
...
llvm-svn: 4630
2002-11-08 20:34:21 +00:00
Chris Lattner
d5dc2c1417
Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
...
llvm-svn: 4618
2002-11-08 00:38:20 +00:00
Chris Lattner
aaf2fa34a5
Instcombine this away:
...
%A = getelementptr [4 x int]* %M, long 0, long 0
%B = getelementptr int* %A, long 2
llvm-svn: 4536
2002-11-04 16:43:32 +00:00
Chris Lattner
ecddf3396f
Add a transformation to turn:
...
malloc Ty, C
int
malloc [C x Ty], 1
llvm-svn: 4534
2002-11-04 16:18:53 +00:00
Chris Lattner
e27815a482
Ack: Fix bug in previous checkin.
...
llvm-svn: 4526
2002-11-04 05:50:42 +00:00
Chris Lattner
81135c4c57
Be more generous about level raising constant expressions don't force each
...
constant to one particular type.
llvm-svn: 4525
2002-11-04 05:46:37 +00:00
Chris Lattner
b9fa84c1ed
Make sure to _delete_ memory allocated by worklists
...
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Anand Shukla
bf2fc13a2f
code to lightly instrument at branches
...
llvm-svn: 4511
2002-11-03 01:45:20 +00:00
Chris Lattner
d94208782e
Make sure to include name information if we have it
...
llvm-svn: 4481
2002-11-01 04:49:06 +00:00
Chris Lattner
b913f4e785
Fixes to the reassociate pass to make it respect dominance properties
...
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!
llvm-svn: 4471
2002-10-31 17:12:59 +00:00
Chris Lattner
1ec9725ef8
BreakCriticalEdges should update dominance frontier information as well as
...
other dominance stuff. Patch contributed by Casey Carter
llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Misha Brukman
c9c721edf0
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
b8ffbe6966
Ensure definate initialization
...
llvm-svn: 4263
2002-10-22 23:34:11 +00:00
Chris Lattner
b565d3ac5b
- Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
...
setPreservesCFG to be less confusing.
llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
79cf8950f1
* Apparently string::find doesn't work right on our sun boxes. Work around this.
...
llvm-svn: 4219
2002-10-17 16:22:08 +00:00
Chris Lattner
15d0113fc6
Really disable pool allocator
...
llvm-svn: 4216
2002-10-17 04:57:09 +00:00
Chris Lattner
82f54dca49
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
fdf2ca9468
- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
...
reflect the fact that it's a range being defined.
llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
9d067ad595
Account for global variables resolved more accurately.
...
llvm-svn: 4143
2002-10-13 17:30:30 +00:00
Chris Lattner
721a5fac62
Use methods that are more explanatory
...
llvm-svn: 4142
2002-10-13 17:12:47 +00:00
Anand Shukla
d80a46cb42
Changed to external global var
...
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Chris Lattner
8cd34b84b2
Stop using DataStructureGraph.h
...
llvm-svn: 4106
2002-10-10 20:33:46 +00:00
Chris Lattner
42547124d0
- Dramatically simplify the ConstantMerge code now that
...
Value::replaceAllUsesWith works with constants correctly.
llvm-svn: 4104
2002-10-09 23:16:04 +00:00
Chris Lattner
83d105d986
Almost a complete rewrite of FunctionResolution to now resolve functions
...
and global variables.
This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c
Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced. This
is more of an infrastructure problem than anything.
llvm-svn: 4099
2002-10-09 21:10:06 +00:00
Chris Lattner
51d98b38f2
- Rename MTy to FTy (no methods exist anymore)
...
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll
llvm-svn: 4088
2002-10-09 00:16:00 +00:00
Chris Lattner
e8160b4dd1
- Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
...
llvm-svn: 4083
2002-10-08 22:19:25 +00:00
Chris Lattner
d68e6d1718
- Fix bug: cee/2002-10-07-NoImmediateDominator.ll
...
llvm-svn: 4081
2002-10-08 21:53:51 +00:00
Chris Lattner
c35f54df86
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4080
2002-10-08 21:36:34 +00:00
Chris Lattner
9c236351fd
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4079
2002-10-08 21:36:33 +00:00
Chris Lattner
40df2d9d4c
- Checkin LARGE number of Changes to CEE pass that will make it much more
...
powerful, but that are largely disabled. The basic idea here is that it
is trying to forward branches across basic blocks that have PHI nodes in
it, which are crucial to be able to handle cases like whet.ll.
Unfortunately we are not updating SSA correctly, causing sim.c to die, and I
don't have time to fix the regression now, so I must disable the
functionality.
llvm-svn: 4077
2002-10-08 21:34:15 +00:00
Chris Lattner
3cf20c3f14
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
...
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
b32252aa71
It is illegal for PHI nodes to have zero values, delete the code to handle them
...
llvm-svn: 4071
2002-10-08 17:07:39 +00:00
Chris Lattner
55c7ae3cdc
Fold ashr -1, X into -1
...
llvm-svn: 4070
2002-10-08 16:16:40 +00:00
Chris Lattner
c532e35cce
Non-functionality change just to make it more clear what is going on
...
llvm-svn: 4060
2002-10-07 18:34:32 +00:00
Chris Lattner
88c8ffce8b
Fix bug: 2002-10-02-SignExtensionProblem.ll
...
llvm-svn: 4017
2002-10-02 18:53:14 +00:00
Chris Lattner
3fec0954e8
Changes to work with Statistics rework
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4004
2002-10-01 22:40:31 +00:00
Chris Lattner
7cf9f6f4b1
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
4cc183889f
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4001
2002-10-01 22:38:37 +00:00
Chris Lattner
b5d3e33496
Build subdirs in parallel
...
llvm-svn: 4000
2002-10-01 22:36:35 +00:00
Chris Lattner
61e8de1c61
Fix bug in LICM that caused the previous big win. :(
...
llvm-svn: 3980
2002-09-29 22:26:07 +00:00
Chris Lattner
ef0e95bb42
Hoist the contents of Loops in depth first order in the dominator tree,
...
rather than in random order. This causes LICM to be DRAMATICALLY more
effective. For example, on bzip2.c, it is able to hoist 302 loads and
2380 total instructions, as opposed to 44/338 before. This obviously
makes other transformations much more powerful as well!
llvm-svn: 3978
2002-09-29 21:46:09 +00:00
Chris Lattner
b731880895
Fix major bugs in dominator set & tree information updating
...
llvm-svn: 3975
2002-09-29 21:41:38 +00:00
Vikram S. Adve
69d19cf9a9
Convert DIRS to PARALLEL_DIRS. They can be built independently.
...
llvm-svn: 3972
2002-09-29 11:52:14 +00:00
Chris Lattner
0bbb8f6e06
- Further cleanups of LICM pass, remove extra work from previous implementation
...
- Do not clone instructions then insert clone outside of loop. Just move them.
llvm-svn: 3951
2002-09-26 19:40:25 +00:00
Chris Lattner
0c66734ac5
Improve comments, doxygenize more
...
llvm-svn: 3950
2002-09-26 16:52:07 +00:00
Chris Lattner
21eb78d59d
Clean up LICM significantly now that it is guaranteed to have loop preheaders
...
llvm-svn: 3947
2002-09-26 16:38:03 +00:00
Chris Lattner
9cdbd428b0
Change pass name to something sane
...
llvm-svn: 3946
2002-09-26 16:37:37 +00:00
Chris Lattner
fe9fba6f5b
Loop invariant code motion now depends on the LoopPreheader pass. Dead code
...
has not yet been removed.
llvm-svn: 3945
2002-09-26 16:19:31 +00:00
Chris Lattner
f9676d651d
- Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
...
- break-crit-edges pass does not invalidate loop-preheader pass.
llvm-svn: 3944
2002-09-26 16:18:51 +00:00
Chris Lattner
e5996b4c88
Checkin new loop-preheader insertion pass.
...
llvm-svn: 3942
2002-09-26 16:17:31 +00:00
Chris Lattner
7cdd2e0cb0
Converted SimpleStructMutation to take TargetData as a required pass.
...
llvm-svn: 3932
2002-09-26 00:17:21 +00:00
Chris Lattner
7ab2bba3d3
Change LowerAllocations pass to 'require' TargetData instead of it being
...
passed in.
llvm-svn: 3929
2002-09-25 23:47:47 +00:00
Chris Lattner
2cf19d980a
- Fix bug: Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
llvm-svn: 3917
2002-09-24 21:19:41 +00:00
Chris Lattner
7fafece8e0
Eliminate extraneous #include
...
llvm-svn: 3916
2002-09-24 21:18:40 +00:00
Chris Lattner
54cf78c786
Fix bug: SimplifyCFG/2002-09-24-PHIAssertion.ll
...
llvm-svn: 3913
2002-09-24 16:09:17 +00:00
Chris Lattner
a4f47fb77e
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3911
2002-09-24 15:52:01 +00:00
Chris Lattner
25ba5ac7ce
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3910
2002-09-24 15:51:56 +00:00
Chris Lattner
1014aae962
Correlated Exprs pass now requires BCE pass instead of doing it manually
...
llvm-svn: 3908
2002-09-24 15:43:56 +00:00
Chris Lattner
49588769e0
- Expose passinfo from BreakCriticalEdges pass so that it may be "Required"
...
by other passes. Make BCE pass be in anonymous namespace now.
llvm-svn: 3907
2002-09-24 15:43:12 +00:00
Chris Lattner
4e11d9e5de
Minor cleanups
...
llvm-svn: 3904
2002-09-24 00:09:26 +00:00
Chris Lattner
e62cdff96c
Add new BreakCriticalEdges pass
...
llvm-svn: 3903
2002-09-24 00:08:39 +00:00
Chris Lattner
b6c408778a
Optimize away cases like:
...
%cast109 = cast uint %cast212 to short ; <short> [#uses=1]
%cast214 = cast short %cast109 to uint ; <uint> [#uses=1]
%cast215 = cast uint %cast214 to short ; <short> [#uses=1]
llvm-svn: 3897
2002-09-23 23:39:43 +00:00
Chris Lattner
a4184f9ab6
Fix: ConstantMerge/2002-09-23-CPR-Update.ll
...
Basically, this bug boiled down to calling replaceUsesOfWith on a constant,
which changed it's shape in an illegal way. This pass now goes through all
of the trouble neccesary to do the replacement on constants.
llvm-svn: 3895
2002-09-23 23:00:46 +00:00
Chris Lattner
2a53929c5d
* Fix bug: CorrelatedExprs/2002-09-23-PHIUpdateBug.ll
...
* Make sure "Changed" is updated correctly
llvm-svn: 3891
2002-09-23 20:06:22 +00:00
Chris Lattner
aecb825629
Insert resolved constants into the global map so they are reused correctly.
...
This bug was exposed linking the SPEC benchmark suite.
llvm-svn: 3888
2002-09-23 18:14:15 +00:00
Chris Lattner
5c6d487ee2
Don't insert a PHI node to merge "returns" from an inlined function if there
...
is only a single return from the function!
llvm-svn: 3878
2002-09-22 18:41:25 +00:00
Anand Shukla
b959e8559e
Added checking threshold
...
llvm-svn: 3864
2002-09-20 16:44:35 +00:00
Anand Shukla
cf6e76fbff
split retracing into a separate file
...
llvm-svn: 3809
2002-09-18 03:55:26 +00:00
Misha Brukman
e093f5cb9b
Removed unnecessary #includes.
...
llvm-svn: 3802
2002-09-18 02:07:57 +00:00
Misha Brukman
6a2dc6b0ba
Fixed typo.
...
llvm-svn: 3801
2002-09-18 00:42:45 +00:00
Chris Lattner
4396aee3a2
There is a #define in some header that conflicts with INFINITY, rename it.
...
llvm-svn: 3797
2002-09-17 23:46:33 +00:00
Chris Lattner
5ccb21f41d
Fix bug: test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll
...
Thanks to Casey for finding it!
llvm-svn: 3783
2002-09-17 21:05:42 +00:00
Chris Lattner
99d6a46698
Fix FunctionInlining pass assertion failure:
...
ilist:104: failed assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"'
llvm-svn: 3768
2002-09-16 22:30:20 +00:00
Chris Lattner
5704e40ce0
Fix: test/Regression/LLC/badidx.c problem
...
llvm-svn: 3763
2002-09-16 18:32:33 +00:00
Vikram S. Adve
4bcec53ed7
Extract most of the transformation into an externally accessible
...
function -- DecomposeArrayRef(GetElementPtrInst* GEP) -- that can
be invoked on a single instruction at a time.
llvm-svn: 3755
2002-09-16 16:40:07 +00:00
Anand Shukla
86e49b7621
Incorporated changes in alloca and getElementPointer instruction
...
llvm-svn: 3733
2002-09-16 05:26:51 +00:00
Anand Shukla
0906acb26d
Incorporated changes in alloca instruction
...
llvm-svn: 3732
2002-09-16 05:24:49 +00:00
Chris Lattner
56d9dfd0e0
Fix bug I introduced
...
llvm-svn: 3719
2002-09-14 19:33:16 +00:00
Misha Brukman
2e598f0092
Function.h is unnecessary when Module.h is included.
...
llvm-svn: 3716
2002-09-14 03:04:02 +00:00
Misha Brukman
dbe90c56ec
Following Chris's advice, I'm pruning some unnecessary .h includes that I'm
...
noticing. Since Module includes Function, and eventually, BasicBlock and
GlobalVariable, the last three are unnecessary to be included directly.
llvm-svn: 3713
2002-09-14 02:06:53 +00:00
Chris Lattner
547be87c13
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner
f820cab2ad
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3710
2002-09-13 22:28:45 +00:00
Chris Lattner
d6fed79df6
Fix bug I introduced with one of my previous changes.
...
Thanks fly out to Nick for noticing it! :)
llvm-svn: 3691
2002-09-12 19:00:43 +00:00
Chris Lattner
fb017cb38c
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Chris Lattner
18e3c4ff50
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3681
2002-09-11 01:21:29 +00:00
Chris Lattner
5f4b79edaf
Fix the last of the silly bugs I just introduced. :(
...
llvm-svn: 3674
2002-09-10 23:46:10 +00:00
Chris Lattner
62bd3a248c
Fix bugs in previous checkins
...
llvm-svn: 3673
2002-09-10 23:31:28 +00:00
Chris Lattner
0b81131afc
Fix bug in previous checkin
...
llvm-svn: 3672
2002-09-10 23:31:12 +00:00
Chris Lattner
5143d4a3b3
Add cannonicalization of shl X, 1 -> add X, X
...
llvm-svn: 3671
2002-09-10 23:04:09 +00:00
Chris Lattner
f2fa52fec2
Fix minor problems in previous checkin
...
llvm-svn: 3669
2002-09-10 22:52:51 +00:00
Chris Lattner
3b3e26bb63
Fix minor problems in previous checkin
...
llvm-svn: 3668
2002-09-10 22:52:49 +00:00
Chris Lattner
f2e4e61769
Clean up code due to auto-insert constructors
...
llvm-svn: 3666
2002-09-10 22:38:49 +00:00
Chris Lattner
37c3a1d80c
Clean up code due to auto-insert constructors
...
llvm-svn: 3665
2002-09-10 22:38:47 +00:00
Chris Lattner
38203aa15a
Clean up code
...
llvm-svn: 3664
2002-09-10 22:38:06 +00:00
Chris Lattner
acbd992f9d
Fix bug: test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll
...
llvm-svn: 3658
2002-09-10 19:42:53 +00:00
Chris Lattner
da9702a8a1
Simplify code (somtimes dramatically), by using the new "auto-insert" feature
...
of instruction constructors.
llvm-svn: 3656
2002-09-10 17:04:02 +00:00
Chris Lattner
5758cf6d77
Simplify code (somtimes dramatically), by using the new "auto-insert" feature
...
of instruction constructors.
llvm-svn: 3655
2002-09-10 17:03:06 +00:00
Chris Lattner
7787814c22
* Clean up code a little bit
...
* Fix bug: test/Regression/Transforms/IndVarsSimplify/2002-09-09-PointerIndVar.ll
llvm-svn: 3644
2002-09-10 05:24:05 +00:00
Chris Lattner
4f5abce7f6
Hack unneccesary now that shifts of pointers are no longer legal!
...
llvm-svn: 3640
2002-09-10 03:50:54 +00:00
Chris Lattner
f6a9e54dda
Disallow creation of pointer typed shift instructions
...
llvm-svn: 3637
2002-09-09 20:25:21 +00:00
Chris Lattner
4b8ce3aed2
Factor silly code duplication out
...
llvm-svn: 3627
2002-09-08 21:47:54 +00:00
Chris Lattner
c1de581f8e
Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll
...
llvm-svn: 3626
2002-09-08 21:39:07 +00:00
Chris Lattner
c30029172a
Minor simplification
...
llvm-svn: 3619
2002-09-08 18:55:04 +00:00
Chris Lattner
bd03f18e04
Initial checkin of Correlated Expression Elimination Pass
...
llvm-svn: 3599
2002-09-06 18:41:55 +00:00
Chris Lattner
bf38fcf5ee
Fix file header to be accurate, instead of something I just copied and pasted.
...
llvm-svn: 3591
2002-09-06 03:59:56 +00:00
Chris Lattner
78a3ebaa18
Fix bug with critical edge splitting code where it wouldn't update PHI nodes
...
in the old destination block to indicate that the value flows from the new
edge splitting block, not from the original multi-successor block.
llvm-svn: 3590
2002-09-06 03:51:45 +00:00
Chris Lattner
c3c754062f
Check in the implementation of critical edge detection and splitting
...
llvm-svn: 3588
2002-09-06 02:35:34 +00:00
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Chris Lattner
904f214a13
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3573
2002-09-03 01:07:35 +00:00
Chris Lattner
cd49f0ec5d
Add constant prop & DIE to InstCombine, so it cleans up after itself
...
llvm-svn: 3568
2002-09-02 04:59:56 +00:00
Chris Lattner
bb8f1a072b
- Implement SCCP of getelementptr instructions
...
- Implement SCCP of globals into ConstantExprs hopefully opening new
opportunities for more SCCP.
llvm-svn: 3555
2002-08-30 23:39:00 +00:00
Chris Lattner
838248b35a
- Eliminate the last traces of the 'analysis' namespace
...
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner
a146c9e769
Really minor cleanups
...
llvm-svn: 3549
2002-08-30 22:53:30 +00:00
Chris Lattner
b0cbcfd5e4
- GCSE now no longer counts instructions not removed (due to no common
...
dominator as being removed)
- GCSE now uses new Value #'ing interface, instead of dealing with AA itself
- GCSE worklist implementation much simpler, class cleaned up.
llvm-svn: 3533
2002-08-30 20:22:29 +00:00