summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Change the other half of aliasGEP (which handles GEP differencing) to use ↵Chris Lattner2009-11-261-466/+108
| | | | | | DecomposeGEPExpression. This dramatically simplifies and shrinks the code by eliminating the horrible CheckGEPInstructions method, fixes a miscompilation (@test3) and makes the code more aggressive. In particular, we now handle the @test4 case, which is reduced from the SmallPtrSet constructor. Missing this caused us to emit a variable length memset instead of a fixed size one. llvm-svn: 89922
* Generalize DecomposeGEPExpression to exactly handle what ↵Chris Lattner2009-11-261-30/+62
| | | | | | Value::getUnderlyingObject does (when TD is around). This allows us to avoid calling DecomposeGEPExpression unless the ultimate alias check we care about passes, speedup up BasicAA a bit. llvm-svn: 89920
* Implement a new DecomposeGEPExpression method, which decomposes a GEP into a ↵Chris Lattner2009-11-261-40/+121
| | | | | | list of scaled offsets. Use this to eliminate some previous ad-hoc code which was subtly broken (it assumed all Constant*'s were non-zero, but strange constant express could be zero). llvm-svn: 89915
* Use GEPOperator more pervasively to simplify code.Chris Lattner2009-11-261-29/+27
| | | | llvm-svn: 89914
* remove some redundant bracesChris Lattner2009-11-261-4/+2
| | | | llvm-svn: 89912
* Use StringRef (again) in DebugInfo interface.Devang Patel2009-11-251-45/+51
| | | | llvm-svn: 89866
* Emit pubtypes.Devang Patel2009-11-241-0/+32
| | | | llvm-svn: 89725
* enable iv-users simplification by defaultJim Grosbach2009-11-231-7/+1
| | | | llvm-svn: 89713
* Add CreateLocation varinat that accepts MDNode (with a default value).Devang Patel2009-11-231-0/+11
| | | | llvm-svn: 89689
* fix comment, thanks all :)Chris Lattner2009-11-231-1/+3
| | | | llvm-svn: 89666
* use the new isNoAlias method to simplify some code, only do an escaping ↵Chris Lattner2009-11-232-13/+17
| | | | | | | | check if we have a non-constant pointer. Constant pointers can't be local. llvm-svn: 89665
* whitespace cleanup, tidyingChris Lattner2009-11-231-16/+17
| | | | llvm-svn: 89664
* speed up BasicAA a bit by implementing a long-standing TODO.Chris Lattner2009-11-231-9/+20
| | | | llvm-svn: 89663
* Make ConstantFoldConstantExpression recursively visit the entireDan Gohman2009-11-231-2/+11
| | | | | | | | | | ConstantExpr, not just the top-level operator. This allows it to fold many more constants. Also, make GlobalOpt call ConstantFoldConstantExpression on GlobalVariable initializers. llvm-svn: 89659
* Remove unused LLVMContext.Nick Lewycky2009-11-231-19/+15
| | | | llvm-svn: 89642
* Remove dead LLVMContext argument.Nick Lewycky2009-11-231-2/+2
| | | | llvm-svn: 89641
* add fixme for dubious code. Duncan, what do you think?Chris Lattner2009-11-221-0/+1
| | | | llvm-svn: 89602
* remove a silly condition that doesn't make a lot of sense anymore.Chris Lattner2009-11-221-5/+0
| | | | llvm-svn: 89601
* reduce indentation, no functionality change.Chris Lattner2009-11-221-85/+91
| | | | llvm-svn: 89600
* Remove the AliasAnalysis::getMustAliases method, which is dead.Chris Lattner2009-11-226-55/+0
| | | | | | | | The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599
* Remove dead code. While there, also turn a few 'T* ' into 'T *' to match theNick Lewycky2009-11-221-8/+4
| | | | | | rest of the file. llvm-svn: 89577
* Use stripPointerCasts(). Thanks Duncan!Dan Gohman2009-11-201-1/+1
| | | | llvm-svn: 89472
* Revert the rule that considers comparisons between two pointers in theDan Gohman2009-11-201-9/+4
| | | | | | | | | | | | same object to be a non-capture; Duncan pointed out a way that such a comparison could be a capture. Make the rule that considers a comparison against null more specific, and only consider noalias return values compared against null. This still supports test/Transforms/GVN/nonescaping-malloc.ll, and is not susceptible to the problem Duncan pointed out with noalias arguments. llvm-svn: 89468
* Simplify this code; it's not necessary to check isIdentifiedObject hereDan Gohman2009-11-201-7/+5
| | | | | | | | because if the results from getUnderlyingObject match, the values must be from the same underlying object, even if we don't know what that object is. llvm-svn: 89434
* Teach getSmallConstantTripMultiple about Shl operators.Dan Gohman2009-11-201-0/+5
| | | | llvm-svn: 89426
* Refine the capture tracking rules for comparisons to be moreDan Gohman2009-11-201-6/+19
| | | | | | | | | careful about crazy methods of capturing pointers using comparisons. Comparisons of identified objects with null in the default address space are not captures. And, comparisons of two pointers within the same identified object are not captures. llvm-svn: 89421
* Use isVoidTy().Dan Gohman2009-11-201-2/+1
| | | | llvm-svn: 89419
* Refine this to only apply to null in the default address space.Dan Gohman2009-11-191-2/+4
| | | | llvm-svn: 89411
* Extend CaptureTracking to indicate when a value is never stored, evenDan Gohman2009-11-192-12/+28
| | | | | | | | if it is not ultimately captured. Teach BasicAliasAnalysis that a local object address which does not escape and is never stored does not alias with a value resulting from a load. llvm-svn: 89398
* Comparing a pointer with null is not a capture.Dan Gohman2009-11-191-0/+5
| | | | llvm-svn: 89389
* Teach IVUsers to keep things simpler and track loop-invariant strides onlyJim Grosbach2009-11-191-0/+10
| | | | | | | for uses inside the loop. This works better with LSR. Disabled behind -simplify-iv-users while benchmarking. llvm-svn: 89299
* Simplify ComputeMultiple so that it doesn't depend on TargetData.Dan Gohman2009-11-182-25/+11
| | | | llvm-svn: 89175
* Remove dead code.Devang Patel2009-11-171-55/+1
| | | | llvm-svn: 89156
* typo spotted by duncan.Chris Lattner2009-11-161-1/+1
| | | | llvm-svn: 88884
* teach LVI to infer edge information from switch instructions.Chris Lattner2009-11-151-6/+24
| | | | | | | This allows JT to eliminate a ton of infeasible edges when handling code like the templates in PatternMatch.h llvm-svn: 88869
* fix a logic error that would cause LVI-JT to miscompileChris Lattner2009-11-151-1/+1
| | | | | | some conditionals llvm-svn: 88868
* implement the first stab at caching queries. This isn't correctChris Lattner2009-11-151-13/+97
| | | | | | | (because the invalidation logic is missing) but LVI isn't enabled by default anyway. llvm-svn: 88867
* refactor a bunch of code forming the new LazyValueInfoCacheChris Lattner2009-11-151-94/+172
| | | | | | and LVIQuery classes, no functionality change. llvm-svn: 88866
* Teach BasicAA that a constant expression can't alias memory provably notNick Lewycky2009-11-141-1/+6
| | | | | | allocated until runtime (such as an alloca). Patch by Hans Wennborg! llvm-svn: 88760
* Revert r87059 for now. It is failing clang tests.Devang Patel2009-11-131-3/+11
| | | | llvm-svn: 87070
* Remove unnecessary llvm.dbg.declare bitcastVictor Hernandez2009-11-131-11/+3
| | | | llvm-svn: 87059
* "Attach debug info with llvm instructions" mode was enabled a month ago. Now ↵Devang Patel2009-11-121-37/+2
| | | | | | make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes. llvm-svn: 87014
* - Teach LSR to avoid changing cmp iv stride if it will create an immediate thatEvan Cheng2009-11-121-0/+12
| | | | | | | | | | | | | | cannot be folded into target cmp instruction. - Avoid a phase ordering issue where early cmp optimization would prevent the later count-to-zero optimization. - Add missing checks which could cause LSR to reuse stride that does not have users. - Fix a bug in count-to-zero optimization code which failed to find the pre-inc iv's phi node. - Remove, tighten, loosen some incorrect checks disable valid transformations. - Quite a bit of code clean up. llvm-svn: 86969
* various fixes to the lattice transfer functions.Chris Lattner2009-11-121-6/+27
| | | | llvm-svn: 86952
* Add a new getPredicateOnEdge method which returns more rich information forChris Lattner2009-11-121-17/+85
| | | | | | | constant constraints. Improve the LVI lattice to include inequality constraints. llvm-svn: 86950
* expose edge information and switch j-t to use it.Chris Lattner2009-11-121-0/+21
| | | | llvm-svn: 86920
* move some stuff into DEBUG's and turn on lazy-value-info forChris Lattner2009-11-121-3/+5
| | | | | | the basic.ll testcase. llvm-svn: 86918
* Do not use StringRef in DebugInfo interface. Devang Patel2009-11-121-17/+17
| | | | | | | This allows StringRef to skip controversial if(str) check in constructor. Buildbots, wait for corresponding clang and llvm-gcc FE check-ins! llvm-svn: 86914
* make LazyValueInfo actually to some stuff. This isn't very tested but improvesChris Lattner2009-11-111-8/+152
| | | | | | strswitch. llvm-svn: 86889
* stub out some LazyValueInfo interfaces, and have JumpThreadingChris Lattner2009-11-111-1/+116
| | | | | | | | start using them in a trivial way when -enable-jump-threading-lvi is passed. enable-jump-threading-lvi will be my playground for awhile. llvm-svn: 86789
OpenPOWER on IntegriCloud