Commit Graph

3076 Commits

Author SHA1 Message Date
Chris Lattner
134c316d2b Verify pass has been run for a long time now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3179 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:39:16 +00:00
Chris Lattner
dadd49bdb8 Add new -only-print-main-ds option that causes mains ds graph to be
printed, but no others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3178 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:15:40 +00:00
Chris Lattner
f9e173e85a Change command line option message on -q to make it more accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3177 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 16:52:49 +00:00
Chris Lattner
d16714b5ed Fix bug that was causing problems for lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3176 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 16:29:43 +00:00
Chris Lattner
01c7f6d1c7 Remove obsolete, confusing, method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3175 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 01:45:02 +00:00
Chris Lattner
aff78984db This testcase is independant of varargsness
Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:24:07 +00:00
Vikram S. Adve
358fc38d3b Add GlobalDSGraph -- a common graph that holds externally visible nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3173 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:08:08 +00:00
Vikram S. Adve
dfd2f32bf7 Print globals graph after either the BU or the TD pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3172 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:07:26 +00:00
Vikram S. Adve
aaeee75af8 This file implements the top-down propagation pass for data structure graphs.
Also, we now use a separate globals graph to hold externally visible nodes.
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3171 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:06:40 +00:00
Vikram S. Adve
355e2ca1f4 Use a separate globals graph to hold externally visible nodes.
This changes both the bottom-up and top-down propagation so that
globals and other external objects do not have to appear in every
function, but only in functions in which they are referenced or
they can be used to access something else that is referenced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:05:22 +00:00
Vikram S. Adve
3b43b772e6 Add GlobalDSGraph -- a common graph that holds externally visible nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:02:04 +00:00
Chris Lattner
d4c7f2766b Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 21:43:25 +00:00
Chris Lattner
50e3a20b54 Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3167 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 21:43:22 +00:00
Chris Lattner
fa03cc7d68 Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3166 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:52:14 +00:00
Chris Lattner
48c1bc7b3a Implement new -debug-pass=Arguments option that causes PassManager to
print out the command line options for the optimizations it is running.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:51:02 +00:00
Chris Lattner
55b45bfae3 Add hooks to get information out of concrete pass manager implementations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3164 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:49:39 +00:00
Chris Lattner
55e41ba3d2 * Indent class into anonymous namespace, filling up the diff with garbage
* Internalize global variables with initializers
* Add new stat to track global variable internalization
* Only count functions that were not internal before in internalized function
  count


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3163 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:48:44 +00:00
Chris Lattner
5e1f7ec927 Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3162 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 19:33:19 +00:00
Chris Lattner
c188eeb08c Cleanup ConstantExpr handling:
* Correctly delete TypeHandles in AsmParser.  In addition to not leaking
   memory, this prevents a bug that could have occurred when a type got
   resolved that the constexpr was using
 * Check for errors in the AsmParser instead of hitting assertion failures
   deep in the code
 * Simplify the interface to the ConstantExpr class, removing unneccesary
   parameters to the ::get* methods.
 * Rename the 'getelementptr' version of ConstantExpr::get to
   ConstantExpr::getGetElementPtr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3161 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 18:54:25 +00:00
Chris Lattner
e8e4605021 Cleanup ConstantExpr handling:
* Correctly delete TypeHandles in AsmParser.  In addition to not leaking
   memory, this prevents a bug that could have occurred when a type got
   resolved that the constexpr was using
 * Check for errors in the AsmParser instead of hitting assertion failures
   deep in the code
 * Simplify the interface to the ConstantExpr class, removing unneccesary
   parameters to the ::get* methods.
 * Rename the 'getelementptr' version of ConstantExpr::get to
   ConstantExpr::getGetElementPtr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3160 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 18:54:22 +00:00
Chris Lattner
53b7f26150 Remove invokation of cleangcc pass which has been renamed, and is unneccesary anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3159 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 18:01:06 +00:00
Chris Lattner
ad772a7188 Remove FIXME's that aren't really needed after all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3158 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:38:54 +00:00
Chris Lattner
17689dfe24 Declare that these passes only depend on the CFG of the function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3157 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:27:52 +00:00
Chris Lattner
6b5fe1962b * Implement stuff so that code can declare that they only depend on the CFG of
a function, not on anything else.  This speeds up GCCAS a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3156 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:27:32 +00:00
Chris Lattner
37d66c4dea * Move some code from Pass.cpp to PassManagerT.h
* Implement stuff so that code can declare that they only depend on the CFG of
  a function, not on anything else.  This speeds up GCCAS a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3155 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:27:02 +00:00
Chris Lattner
5fa829c54a Implement constant propogation of logical (and, or, xor) expressions.
Fixes testcase: test/Regression/Transforms/ConstProp/logicaltest.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3154 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:24:28 +00:00
Chris Lattner
e56096aa41 Implement constant propogation of logical (and, or, xor) expressions.
Fixes testcase: test/Regression/Transforms/ConstProp/logicaltest.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3153 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:24:25 +00:00
Chris Lattner
72de9ae46b Test that logical operators are correctly constant propogated!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3152 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 16:18:38 +00:00
Chris Lattner
731240cc5d Add test of newly checked in Union support!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3151 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 06:47:29 +00:00
Chris Lattner
f40e0c4472 Simplify testcase a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3150 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 06:07:16 +00:00
Chris Lattner
a7e2dd4847 New testcase found when working on union support *sigh*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3149 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 06:05:40 +00:00
Chris Lattner
fd5951c16b New testcase distilled from trying to compile burg with LLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3148 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 05:57:03 +00:00
Chris Lattner
2e1749bbf8 * Move InstructionSelection Pass here instead of living in Sparc.cpp. It
is platform independant afterall.
* Object orientize the functions, cleanup code a bit.  Instead of static
  global functions, the helpers for instruction selection are now part of
  the InstructionSelection Pass class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3147 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 03:57:36 +00:00
Chris Lattner
057430d207 * Move InstructionSelection pass to lib/CodeGen/InstrSelection so it is
shared by backends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3146 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 03:56:16 +00:00
Chris Lattner
b5eb866882 Expose instruction selection as a pass instead of a global function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3145 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 03:55:29 +00:00
Chris Lattner
5d1cf5b4eb Add rough support for LLC passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 03:55:01 +00:00
Chris Lattner
67fcce2b19 Remove unused vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3143 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 02:52:40 +00:00
Chris Lattner
e902bda4ce Fix bug with last patch which would occur when a call returned void and we
attempted to assign it a name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3142 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 02:42:49 +00:00
Chris Lattner
853f9bee44 Pass renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3141 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:53:26 +00:00
Chris Lattner
9cf307fdeb * Make sure the resolved function call instructions get the name from the
old call instruction
* Implement conversion of return values for calls.  This fixes bug:
   test/Regression/Transforms/FunctionResolve/retmismatch3.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3140 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:50:49 +00:00
Chris Lattner
3f6496ab11 Oops, fix testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3139 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:49:42 +00:00
Chris Lattner
9559ac2876 NEw testcase to handle "yet another" return type mismatch possibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3138 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:34:52 +00:00
Chris Lattner
446698b63d * Fix bug: test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll
which was caused by us not running the "drop references of dead
  instructions" code when there were no basic blocks that were dead.

  We still don't want to do some of the stuff we do if there are dead
  basic blocks, but we DO want to drop references of dead instructions,
  so we factor the common code out to a new method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3137 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:22:34 +00:00
Chris Lattner
5922e4734d Trim down testcase, a lot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3136 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 00:10:05 +00:00
Chris Lattner
e4b733f31c Reduce testcase more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3135 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 23:41:21 +00:00
Chris Lattner
a61fab8c6d Add code to ensure that no PHI nodes are left laying around with their
arguments dropped.  This fixes bug:
   test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3134 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 23:40:46 +00:00
Chris Lattner
1ad4436cc2 Use a module analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3133 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 23:02:25 +00:00
Chris Lattner
0b0554596e Reduce the size of the testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3132 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 22:46:55 +00:00
Chris Lattner
b0f0ef8f26 Implement a new RemoveSuccessor function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3131 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 22:32:08 +00:00
Chris Lattner
229a3770f6 Implement a new RemoveSuccessor function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3130 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 22:32:06 +00:00