summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Keep track of inherited analysis (e.g. dominator tree).Devang Patel2008-07-031-0/+3
| | | | llvm-svn: 53088
* A better fix for PR2503 that doesn't pessimize GVN in the presence of ↵Owen Anderson2008-07-021-13/+0
| | | | | | unreachable blocks. llvm-svn: 53032
* Fix typos in comments. Devang Patel2008-07-011-1/+1
| | | | | | Thanks for the feedback! llvm-svn: 52978
* Add dom info verifier.Devang Patel2008-07-011-0/+3
| | | | llvm-svn: 52967
* Properly handle cases where a predecessor of the block being queried on is ↵Owen Anderson2008-07-011-0/+13
| | | | | | | | unreachable. This fixes PR2503, though we should also fix other passes not to emit this kind of code. llvm-svn: 52946
* - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an ↵Evan Cheng2008-06-301-0/+100
| | | | | | | | empty string for ConstantAggregateZero case which surprises selectiondag. - Correctly handle memcpy from constant string which is zero-initialized. llvm-svn: 52891
* Add a value range analysis that lazily computes ranges using ScalarEvolutions.Nick Lewycky2008-06-301-0/+289
| | | | llvm-svn: 52885
* Revert (52748 and friends):Anton Korobeynikov2008-06-291-100/+0
| | | | | | | | | | | | Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
* Add back the capability to include nul characters in strings with Chris Lattner2008-06-281-5/+7
| | | | | | | GetConstantStringInfo. This will hopefully restore llvm-gcc to happy bootstrap land. llvm-svn: 52851
* Tighten up checking.Chris Lattner2008-06-281-4/+10
| | | | llvm-svn: 52850
* fix the regressions from Eric's patch by making GetConstantStringInfoChris Lattner2008-06-271-29/+34
| | | | | | | tolerate a non-nul-terminated string, and handling a direct global reference. llvm-svn: 52813
* Reserve the size we'll need in advance.Owen Anderson2008-06-261-0/+1
| | | | llvm-svn: 52763
* Move GetConstantStringInfo to lib/Analysis. RemoveEric Christopher2008-06-261-0/+86
| | | | | | | | | string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. llvm-svn: 52748
* Generalize createSCEV to be able to form SCEV expressions fromDan Gohman2008-06-221-110/+117
| | | | | | ConstantExprs. llvm-svn: 52615
* Use SCEVAddRecExpr::isAffine.Dan Gohman2008-06-221-2/+2
| | | | llvm-svn: 52614
* Move a few more SCEVExpander methods out-of-line.Dan Gohman2008-06-221-0/+21
| | | | llvm-svn: 52612
* fix warning when assertions disabled.Chris Lattner2008-06-211-2/+1
| | | | llvm-svn: 52589
* Fix some warnings reported by gcc-4.3. HopefullyDuncan Sands2008-06-191-1/+2
| | | | | | this still compiles on windows - I can't test! llvm-svn: 52488
* Move SCEVExpander::visitAddExpr out-of-line.Dan Gohman2008-06-181-0/+10
| | | | llvm-svn: 52464
* Move LSR's private isZero function to a public SCEV memberDan Gohman2008-06-182-10/+13
| | | | | | function, and make use of it in several places. llvm-svn: 52463
* Use a SmallVector instead of an array, since auto_ptr doesn't handle arraysMatthijs Kooijman2008-06-171-11/+8
| | | | | | properly. llvm-svn: 52390
* Make BuildSubAggregate use FindInsertedElement again to prevent it fromMatthijs Kooijman2008-06-161-20/+48
| | | | | | | | inserting extractvalues. In particular, this prevents the insertion of extractvalues that can't be folded away later. Also add an example of when this stuff is needed. llvm-svn: 52328
* Make the InsertBefore argument to FindInsertedValue optional, so you can ↵Matthijs Kooijman2008-06-161-3/+8
| | | | | | find an inserted value without modifying the code. llvm-svn: 52319
* Pass around Instruction* instead of Instruction& in FindInsertedValue and ↵Matthijs Kooijman2008-06-161-5/+5
| | | | | | friends. llvm-svn: 52318
* 80 column fixes.Matthijs Kooijman2008-06-161-15/+31
| | | | llvm-svn: 52316
* Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. WhileMatthijs Kooijman2008-06-161-0/+128
| | | | | | | | | | I'm at it, rename it to FindInsertedValue. The only functional change is that newly created instructions are no longer added to instcombine's worklist, but that is not really necessary anyway (and I'll commit some improvements next that will completely remove the need). llvm-svn: 52315
* simplify some code by using a helper function. This really reallyChris Lattner2008-06-161-22/+16
| | | | | | wants a 'nocapture' predicate. llvm-svn: 52304
* move a bunch of predicates up into their own sectionChris Lattner2008-06-161-157/+171
| | | | | | in this file, no other changes. llvm-svn: 52303
* Other parts of this code treat noalias arguments as objects forChris Lattner2008-06-161-4/+8
| | | | | | the purposes of escape analysis. llvm-svn: 52302
* If we are checking to see if the result of a call aliases aChris Lattner2008-06-161-1/+21
| | | | | | | pointer derived from a local allocation, if the local allocation never escapes, the pointers can't alias. This implements PR2436 llvm-svn: 52301
* Refactor basicaa's main alias function somethin' fierce. Chris Lattner2008-06-161-104/+94
| | | | | | | | This fixes several minor bugs (such as returning noalias for comparisons between external weak functions an null) but is mostly a cleanup. llvm-svn: 52299
* Fix PR2434. When scanning for exising binary operator to reuse don't Wojciech Matyjewicz2008-06-151-15/+15
| | | | | | | | | | | take into account the instrucion pointed by InsertPt. Thanks to it, returning the new value of InsertPt to the InsertBinop() caller can be avoided. The bug was, actually, in visitAddRecExpr() method which wasn't correctly handling changes of InsertPt. There shouldn't be any performance regression, as -gvn pass (run after -indvars) removes any redundant binops. llvm-svn: 52291
* Change 'while' loop to 'do' loop.Wojciech Matyjewicz2008-06-141-4/+11
| | | | | | | | | Add a safety measure. It isn't safe to assume in ScalarEvolutionExpander that all loops are in canonical form (but it should be safe for loops that have AddRecs). xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx llvm-svn: 52275
* Crash less. The i64 restriction in BinomialCoefficient caused some problemsNick Lewycky2008-06-131-24/+30
| | | | | | | | with code that was expecting different bit widths for different values. Make getTruncateOrZeroExtend a method on ScalarEvolution, and use it. llvm-svn: 52248
* Expose a public interface to this pass.Chris Lattner2008-06-051-40/+12
| | | | llvm-svn: 52029
* Let libcall semantics decide whether it knows about functions Chris Lattner2008-06-051-2/+2
| | | | | | with definitions or not. llvm-svn: 52028
* Update comments and documentation to reflect that GCSE and ValueNumbering areMatthijs Kooijman2008-06-051-0/+4
| | | | | | deprecated by the GVN and GVNPRE passes. llvm-svn: 51983
* Replace two manual loops with calls to CallSite::hasArguments (no functional ↵Matthijs Kooijman2008-06-041-3/+1
| | | | | | changes). llvm-svn: 51947
* Add #includes required by GCC 4.3, thanks for Zhongxing XuChris Lattner2008-06-041-0/+1
| | | | | | for reporting this. llvm-svn: 51926
* Remove unneeded code I added.Chris Lattner2008-06-021-6/+3
| | | | llvm-svn: 51878
* Fixes PR2395. Looking for a constant in a GEP tail (when the first GEP Wojciech Matyjewicz2008-06-021-1/+7
| | | | | | | | is longer than the second one) should stop after finding one. Added break instruction guarantees it. It also changes difference between offsets to absolute value of this difference in the condition. llvm-svn: 51875
* move CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.Chris Lattner2008-06-021-0/+50
| | | | llvm-svn: 51864
* move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBitsChris Lattner2008-06-021-0/+709
| | | | | | | out of instcombine into a new file in libanalysis. This also teaches ComputeNumSignBits about the number of sign bits in a constantint. llvm-svn: 51863
* Remember to update the reverse non-local cache when cleaning up dirty ↵Owen Anderson2008-06-011-0/+5
| | | | | | entries. This fixes PR2397. llvm-svn: 51846
* Make ping more aggressive in finding nonlocal caching errors.Owen Anderson2008-06-011-0/+3
| | | | llvm-svn: 51845
* Fix a typo in a comment.Dan Gohman2008-05-301-1/+1
| | | | llvm-svn: 51718
* Fix a copy+paste error in a comment.Dan Gohman2008-05-301-1/+1
| | | | llvm-svn: 51717
* Add newline at end of file.Owen Anderson2008-05-291-1/+1
| | | | llvm-svn: 51701
* Force postdom to be linked into opt and bugpoint, even though it is no ↵Owen Anderson2008-05-291-0/+8
| | | | | | longer used by any passes. llvm-svn: 51686
* convert another operand loop to iterator formulationGabor Greif2008-05-291-3/+3
| | | | llvm-svn: 51661
OpenPOWER on IntegriCloud