Commit Graph

3035 Commits

Author SHA1 Message Date
Vikram S. Adve
1e60669d3b Add a missing case: converting float/double to unsigned integer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3188 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 21:01:34 +00:00
Chris Lattner
8633a487c7 Changes to be GCC3.1 friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3187 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:32:14 +00:00
Chris Lattner
7541b89092 Changes to be GCC3.1 friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:32:12 +00:00
Chris Lattner
1b0a63fa64 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3185 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:32:01 +00:00
Chris Lattner
49af5e4131 Changes to be GCC 3.1 friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3184 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:31:59 +00:00
Chris Lattner
7a40d6db08 We need iostream in PassManagerT.h to use cerr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3183 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 18:04:17 +00:00
Chris Lattner
e540dda536 Fix testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3182 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:54:24 +00:00
Chris Lattner
3fb21e5bb5 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3181 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:52:36 +00:00
Chris Lattner
8aaee324c9 Testcase that was triggering an incorrect assertion failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 17:39:38 +00:00
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