Commit Graph

785 Commits

Author SHA1 Message Date
Chris Lattner
074d84c746 Implement xform: (X != 0) -> (bool)X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6506 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 03:35:25 +00:00
Anand Shukla
619754fb18 Added the #(internal functions) to output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6502 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 02:40:49 +00:00
Chris Lattner
c16e631e94 Fix bug: FunctionResolve/2003-05-31-AllInternalDecls.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6486 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 21:57:06 +00:00
Chris Lattner
12ce59d3c5 Fix bug: FuncResolve/2003-05-31-InternalDecl.ll
Count resolutions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6482 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 21:08:45 +00:00
Chris Lattner
40c4959e9f Simplify funcresolve a bit more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6480 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 20:44:46 +00:00
Chris Lattner
567cceea49 Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6479 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 20:33:31 +00:00
Tanya Lattner
658c5bcdb2 Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6476 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 20:01:37 +00:00
Chris Lattner
b37923f9a1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6440 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 19:22:14 +00:00
Chris Lattner
26d2ca1d13 add a check that allows the SRoA pass to avoid breaking programs, even if their
behavior is technically undefined


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6438 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 18:09:57 +00:00
Tanya Lattner
6074d2f37a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 15:50:18 +00:00
Chris Lattner
261d686737 Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 05:26:30 +00:00
Chris Lattner
5e062a1eda Fix bug: ScalarRepl/2003-05-29-ArrayFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6425 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 04:15:41 +00:00
Sumant Kowshik
a78220fe2d Added support for function pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6420 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 22:42:44 +00:00
Chris Lattner
faf4cc2da0 Add comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6415 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 20:26:30 +00:00
Chris Lattner
ab2b328c78 Eliminate unnecessary ->get calls that are now automatically handled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6397 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:12:27 +00:00
Chris Lattner
ca398dc398 * Separate all of the grunt work of inlining out into the Utils library.
* Make the function inliner _significantly_ smarter.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6396 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:11:31 +00:00
Chris Lattner
2a9c847f25 Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6352 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 16:40:51 +00:00
Chris Lattner
d10376bee5 * Actually USE the statistic that we made
* Implement SRoA for arrays


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 16:09:27 +00:00
Chris Lattner
ed7b41ea90 Implementation of the simple "scalar replacement of aggregates" transformation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6346 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 15:45:27 +00:00
Chris Lattner
bd4ecf769d Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6338 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-26 23:41:32 +00:00
Chris Lattner
de579f11ff Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 22:00:07 +00:00
Chris Lattner
88c7c3295d Make the list accept comma separated names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:27:13 +00:00
Chris Lattner
2345d71853 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6289 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:48:00 +00:00
Chris Lattner
c7a2c7f0c9 Add option to internalize to allow it to read a file to determine which symbols
should not be internalized


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:34:49 +00:00
Chris Lattner
c54e2b8f84 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6286 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 19:07:21 +00:00
Chris Lattner
c52b30dcfb Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 20:51:52 +00:00
Misha Brukman
82c89b9f3a Hopefully, the final fix for `[Pp]ropogate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6251 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-20 21:01:22 +00:00
Misha Brukman
f117cc9ee6 s/convertable/convertible/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-20 18:45:36 +00:00
Chris Lattner
6d23d97e90 Fix long standing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6232 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-15 18:25:13 +00:00
Chris Lattner
4c00e53b81 Fix Bug: Linker/2003-05-15-TypeProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6225 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-15 16:30:55 +00:00
Chris Lattner
f41464618f Fix major problem with appending linkage changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6185 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14 12:11:51 +00:00
Chris Lattner
8166e6eef6 Implement linkage of appending global variables!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6178 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-13 21:33:43 +00:00
Chris Lattner
8f6396e80f Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 22:04:34 +00:00
Chris Lattner
1d16ec7381 Handle va_arg instruction correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:50:13 +00:00
Chris Lattner
8d8f20e47a Don't inline functions that take variable numbers of arguments!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6024 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:36:43 +00:00
Chris Lattner
1b27cb7159 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6023 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:34:52 +00:00
Chris Lattner
2d399096cf Attempt to fix sumant's typesafety issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5984 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 19:32:04 +00:00
Chris Lattner
e96fda3002 Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5983 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 19:26:34 +00:00
Chris Lattner
20af3222da Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5979 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 22:21:21 +00:00
Chris Lattner
cdeb81d412 Fix bug: LevelRaise/2003-05-01-CallCast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5975 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 21:02:53 +00:00
Chris Lattner
3f2ec3925f Fix another case where constexprs could cause a crash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5972 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-30 22:34:06 +00:00
Chris Lattner
fe32e0c578 Fix constant folding of constexprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5971 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-30 22:19:10 +00:00
Chris Lattner
95549281ec Create constant expression casts instead of constant instructions if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5968 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 01:25:38 +00:00
Chris Lattner
1fd95afab3 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5967 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 01:23:29 +00:00
Chris Lattner
b53a198613 Avoid naming things exactly the same
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5966 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-27 22:55:56 +00:00
Chris Lattner
619f825640 Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5952 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 22:53:27 +00:00
Chris Lattner
bceb2b0061 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5927 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:35:10 +00:00
Chris Lattner
9de28289f8 Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5920 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:50:03 +00:00
Chris Lattner
c8789cb40b Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5919 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:54:58 +00:00
Chris Lattner
16125fb749 Make the levelraise pass be well behaved w.r.t the TargetData that the current
PassMAnager provides.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5896 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:25:27 +00:00