Commit Graph

2992 Commits

Author SHA1 Message Date
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
Chris Lattner
011de07117 Fix bug: test/Regression/Transforms/ADCE/2002-07-29-Segfault.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3129 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 22:31:39 +00:00
Chris Lattner
91b65c0b42 Allow folding of basic blocks that have PHI nodes in them, fixing "bug":
test/Regression/Transforms/SimplifyCFG/2002-06-24-PHINode.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3128 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:26:30 +00:00
Chris Lattner
781e6f5f89 Seperate analysis wrapper stuff to AnalysisWrappers.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3127 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:24:10 +00:00
Chris Lattner
6eea01ed8e Hrm, testcase was checking the wrong pass. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3126 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:12:20 +00:00
Chris Lattner
d472e47b6c * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3125 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:38 +00:00
Chris Lattner
eb702350f7 * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3124 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:33 +00:00
Chris Lattner
44050fb25a * PassInfo is allowed to be missing now (ie, not all passes need be registered)
* getPassName uses PassInfo if it's available
* PassInfo is now cached in the pass so that it is only looked up once, maximum


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3123 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:02:31 +00:00
Chris Lattner
f9b2297380 * Fix comment descriptions
* Remove defaulted argument to ctor that is never used anyway
* Prevent copying and assignment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3122 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:01:19 +00:00
Chris Lattner
e8e258b1a7 * Fix assertion failure caused by command line argument getting removed after
the map was freed.
* Cleanup code a bit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3121 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 20:58:42 +00:00
Chris Lattner
2c04779ba7 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3120 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 19:39:52 +00:00
Chris Lattner
16470ec75b Fix testcase to not print pointer value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3119 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 19:07:48 +00:00
Chris Lattner
6ea2a07271 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3118 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 19:02:49 +00:00
Chris Lattner
99b7c1a9ea Remove needless #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3117 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 05:25:29 +00:00
Chris Lattner
a59cbb2043 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:17 +00:00
Chris Lattner
97f51a3024 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:15 +00:00
Chris Lattner
9a740fdf21 Make analyze use the Pass repository to populate it's command line argument list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3114 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:08:50 +00:00
Chris Lattner
a6275ccdf5 * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:12:46 +00:00
Chris Lattner
1e43516dcf * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:12:44 +00:00
Chris Lattner
5d549083e2 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3111 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:11:42 +00:00
Chris Lattner
631149287e * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3110 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:11:38 +00:00
Chris Lattner
2053a2a272 Factor PassNamePArser out into llvm/Support/PassNameParser.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3109 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:09:32 +00:00
Chris Lattner
7b499f7303 Factor PassNameParser out of opt.cpp so that analyze and eventually llc can use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3108 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:09:10 +00:00
Chris Lattner
00444d0630 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3107 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 19:19:31 +00:00
Chris Lattner
aabff77165 Analysis contructors now no longer take AnalysisID's as their argument,
because there is a one-one mapping between classes and analyses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3106 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 19:19:16 +00:00
Chris Lattner
ce6ef112c4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3105 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 18:40:14 +00:00
Chris Lattner
0cbc6c2fd8 Simplify analyses so that there is only one analysis per class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3104 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 18:40:06 +00:00
Chris Lattner
c1b2718acf Fix typeo that caused bug:
test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3103 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:58:51 +00:00
Chris Lattner
eb6fb84f45 New testcase for bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3102 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:57:21 +00:00
Chris Lattner
a4e251822a Add check to fix bug:
test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3101 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:52:56 +00:00
Chris Lattner
8890f7b913 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3100 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:52:34 +00:00
Chris Lattner
54d10c8715 Fix bug: test/Regression/Assembler/2002-07-25-QuoteInString.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3099 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:32:37 +00:00
Chris Lattner
1874564482 Add testcase for disassembler problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3098 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 20:27:31 +00:00
Chris Lattner
cdcfcf65d9 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3097 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 19:59:41 +00:00
Chris Lattner
4b757f83ab Remove dead options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3096 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 19:59:38 +00:00