aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SCCP.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* ADd support for the new varargs instructionsChris Lattner2003-10-181-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9225 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling.Misha Brukman2003-10-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
* Update commentChris Lattner2003-10-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8965 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a set to keep track of which edges have been noticed as executable alreadyChris Lattner2003-10-081-15/+27
| | | | | | | | to avoid reprocessing PHI nodes needlessly. This speeds up the big bad PHI testcase 43%: from 104.9826 to 73.5157s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8964 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor fixes here and thereChris Lattner2003-10-081-22/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8963 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid building data structures we don't really need. This improves the runtimeChris Lattner2003-10-081-10/+39
| | | | | | | | | of a test that Bill Wendling sent me from 228.5s to 105s. Obviously there is more improvement to be had, but this is a nice speedup which should be "felt" by many programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8962 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the unwind instructionChris Lattner2003-09-081-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8408 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: SCCP/2003-08-26-InvokeHandling.llChris Lattner2003-08-271-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8152 91177308-0d34-0410-b5e6-96231b3b80d8
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
* DEBUG got moved to Support/Debug.hChris Lattner2003-08-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.llChris Lattner2003-06-241-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6883 91177308-0d34-0410-b5e6-96231b3b80d8
* Hopefully, the final fix for `[Pp]ropogate'.Misha Brukman2003-05-201-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6251 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle va_arg instruction correctlyChris Lattner2003-05-081-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6030 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix major problem with PHI node traversal: rechecking PHIs should go intoChris Lattner2003-04-251-1/+1
| | | | | | | 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
* Minor non-functional changes:Chris Lattner2003-04-251-61/+47
| | | | | | | | | | * 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
* Remove unnecesary &*'sChris Lattner2003-04-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to _delete_ memory allocated by worklistsChris Lattner2002-11-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4523 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling of `propagate'.Misha Brukman2002-10-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4423 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG toChris Lattner2002-10-211-1/+1
| | | | | | | setPreservesCFG to be less confusing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
* Updates to work with recent Statistic's changes:Chris Lattner2002-10-011-3/+3
| | | | | | | | | | | | | * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4002 91177308-0d34-0410-b5e6-96231b3b80d8
* - Implement SCCP of getelementptr instructionsChris Lattner2002-08-301-5/+31
| | | | | | | | - Implement SCCP of globals into ConstantExprs hopefully opening new opportunities for more SCCP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3555 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminated the MemAccessInst class, folding contents into GEP class.Chris Lattner2002-08-221-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3487 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra #includesChris Lattner2002-08-141-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3322 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for unary operatorsChris Lattner2002-08-141-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3318 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add support for different "PassType's"Chris Lattner2002-07-261-1/+1
| | | | | | | | | | | | | | | | * 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
* *** empty log message ***Chris Lattner2002-07-231-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3016 91177308-0d34-0410-b5e6-96231b3b80d8
* MEGAPATCH checkin.Chris Lattner2002-06-251-67/+65
| | | | | | | For details, See: docs/2002-06-25-MegaPatchInfo.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new DEBUG(x) macro to allow debugging code to be enabled on the ↵Chris Lattner2002-05-221-19/+11
| | | | | | commandline git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2713 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.llChris Lattner2002-05-221-12/+12
| | | | | | | Improperly handling edges... by not marking them alive properly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2707 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.llChris Lattner2002-05-201-1/+11
| | | | | | | That was causing a miscompilation of strtol/atoi plus others git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2669 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for printing out statistics information when -stats is added toChris Lattner2002-05-101-0/+4
| | | | | | | the command line git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2601 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge all individual .h files into a single Scalar.h fileChris Lattner2002-05-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2537 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #include no longer included by llvm/Transforms/Scalar/ConstantProp.hChris Lattner2002-05-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2517 91177308-0d34-0410-b5e6-96231b3b80d8
* * Convert InstWorkList to vector instead of set, because on big programs itChris Lattner2002-05-071-5/+5
| | | | | | | | is empirically faster by a noticable margin, even though duplicates can happen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2511 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant propogation of shift instructionsChris Lattner2002-05-061-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2471 91177308-0d34-0410-b5e6-96231b3b80d8
* Ok, really it only takes me 3 times to get this right!Chris Lattner2002-05-021-1/+1
| | | | | | | Now use #if 0 instead of #ifdef 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2448 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, disable debugging code all the way. :)Chris Lattner2002-05-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2447 91177308-0d34-0410-b5e6-96231b3b80d8
* * Finish the implementation of isEdgeFeasible this fixes bug:Chris Lattner2002-05-021-57/+77
| | | | | | | | | | test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll * SCCP now preserves the CFG: It leaves conditional branches the way they are in the program, not simplifying them. A seperate pass should eliminate the potentially dead basic blocks and edges in the CFG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2446 91177308-0d34-0410-b5e6-96231b3b80d8
* * Enable SCCP debugging to be turned on with a simple change of #defineChris Lattner2002-05-021-32/+52
| | | | | | | | | | | | | | * Change worklist to a set so that duplicates cannot happen * Add support for the invoke instruction * Avoid marking store and free instructions as overdefined, since they cannot produce a value anyway. * Inline the OperandChangedState implementation * Add isEdgeFeasible in preparation to fix a bug. Right now it behaves exactly as before. * Remove obsolete comment about constant pools git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2445 91177308-0d34-0410-b5e6-96231b3b80d8
* * Simplify the code by not bothering to name the folded constantChris Lattner2002-05-021-10/+7
| | | | | | | | | * Do not skip the instruction immediately after a folded instruction. This was causing the testcase failure: test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2443 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly clean up SCCP pass. Now the two classes are merged and inChris Lattner2002-04-291-44/+37
| | | | | | | an anonymous namespace where they belong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2415 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate duplicate or unneccesary #include'sChris Lattner2002-04-291-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2397 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new optional getPassName() virtual function that a Pass can overrideChris Lattner2002-04-291-0/+4
| | | | | | | to make debugging output a lot nicer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up the AnalysisUsage of lots of passes, primarily to correctly ↵Chris Lattner2002-04-281-0/+4
| | | | | | indicate whether or not they invalidate the CFGA git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2386 91177308-0d34-0410-b5e6-96231b3b80d8
* Split ConstantVals.h into Constant.h and Constants.hChris Lattner2002-04-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
* * Rename MethodPass class to FunctionPassChris Lattner2002-04-271-11/+9
| | | | | | | | | | | | | | | | - Rename runOnMethod to runOnFunction * Transform getAnalysisUsageInfo into getAnalysisUsage - Method is now const - It now takes one AnalysisUsage object to fill in instead of 3 vectors to fill in - Pass's now specify which other passes they _preserve_ not which ones they modify (be conservative!) - A pass can specify that it preserves all analyses (because it never modifies the underlying program) * s/Method/Function/g in other random places as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes because the Terminator::getSuccessor function now FAILS if successorChris Lattner2002-04-271-2/+2
| | | | | | | IDX is out of range instead of returning null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2332 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert SCCP over to use InstVisitor instead of hand crafted switchChris Lattner2002-04-181-181/+136
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2286 91177308-0d34-0410-b5e6-96231b3b80d8