summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Fix pointer heuristic. Check whether predicator is ICMP_NE instead of if it isJakub Staszak2011-07-151-2/+2
| | | | | | not isEquality(). llvm-svn: 135296
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-5/+5
| | | | llvm-svn: 135265
* Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.Jay Foad2011-07-133-38/+32
| | | | llvm-svn: 135040
* stop using WriteTypeSymbolic.Chris Lattner2011-07-091-3/+1
| | | | llvm-svn: 134833
* Preserve debug loc.Devang Patel2011-07-051-1/+1
| | | | llvm-svn: 134441
* Teach IVUsers to stop at non-affine expressions unless they are bothDan Gohman2011-07-011-7/+10
| | | | | | | | | | | | | | | | | outside the loop and reducible. This more completely hides them from LSR, which isn't usually able to do anything meaningful with non-affine expressions anyway, and this consequently hides them from SCEVExpander, which is acutely unprepared for non-affine expressions. Replace test/CodeGen/X86/lsr-nonaffine.ll with a new test that tests the new behavior. This works around the bug in PR10117 / rdar://problem/9633149, and is generally an improvement besides. llvm-svn: 134268
* Improve constant folding of undef for cmp and select operators.Dan Gohman2011-07-011-4/+4
| | | | llvm-svn: 134223
* Cleanup. Fix a stupid variable name.Andrew Trick2011-06-281-3/+3
| | | | llvm-svn: 133995
* SCEVExpander: give new insts a name that identifies the reponsible pass.Andrew Trick2011-06-281-3/+4
| | | | llvm-svn: 133992
* indvars --disable-iv-rewrite: sever ties with IVUsers.Andrew Trick2011-06-281-15/+0
| | | | llvm-svn: 133988
* Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by otherNick Lewycky2011-06-271-0/+16
| | | | | | passes as well. llvm-svn: 133904
* Fix struct member's scope. Patch by Xi Wang.Devang Patel2011-06-241-2/+2
| | | | llvm-svn: 133828
* Calculate backedge probability correctly.Jakub Staszak2011-06-231-24/+0
| | | | llvm-svn: 133776
* Missing files for the BlockFrequency analysis added.Jakub Staszak2011-06-231-0/+59
| | | | llvm-svn: 133767
* Introduce BlockFrequency analysis for BasicBlocks.Jakub Staszak2011-06-233-0/+26
| | | | llvm-svn: 133766
* Revert "revert 133714"Rafael Espindola2011-06-232-58/+1
| | | | | | | | This reverts commit e8e00f5efb4a22238f2407bf813de4606f30c5aa. The cmake build on OS X is still broken. llvm-svn: 133718
* revert 133714Dylan Noblesmith2011-06-232-1/+58
| | | | | | It broke the build worse. llvm-svn: 133716
* 133713 broke the build, revert it.Rafael Espindola2011-06-232-58/+1
| | | | llvm-svn: 133714
* Support: make floating-exception header privateDylan Noblesmith2011-06-232-1/+58
| | | | | | | | It has only one user. This eliminates the last include of config.h from the public headers -- ideally, config.h shouldn't even be installed by `make install` anymore. llvm-svn: 133713
* New binops need debug loc.Devang Patel2011-06-221-1/+3
| | | | llvm-svn: 133642
* IVUsers no longer needs to record the phis.Andrew Trick2011-06-211-8/+7
| | | | llvm-svn: 133518
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-201-1/+1
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* simplify some code.Chris Lattner2011-06-181-8/+3
| | | | llvm-svn: 133362
* Simplify code. No functionality change.Benjamin Kramer2011-06-181-18/+18
| | | | llvm-svn: 133351
* Introduce MachineBranchProbabilityInfo class, which has similar API toJakub Staszak2011-06-161-1/+1
| | | | | | | | BranchProbabilityInfo (expect setEdgeWeight which is not available here). Branch Weights are kept in MachineBasicBlocks. To turn off this analysis set -use-mbpi=false. llvm-svn: 133184
* Add a limit to the number of instructions memdep will scan in a single ↵Eli Friedman2011-06-151-1/+22
| | | | | | | | | | block. This prevents (at least in some cases) O(N^2) runtime in passes like DSE. The limit in this patch is probably too high, but it is enough to stop DSE from going completely insane on a testcase I have (which has a single block with around 50,000 non-aliasing stores in it). rdar://9471075 llvm-svn: 133111
* Add "unknown" results for memdep, which mean "I don't know whether a ↵Eli Friedman2011-06-152-32/+37
| | | | | | dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions. llvm-svn: 133031
* Move class into an anonymous namespace.Benjamin Kramer2011-06-131-1/+2
| | | | llvm-svn: 132925
* Branch profiling: floating-point avoidance.Andrew Trick2011-06-111-54/+63
| | | | | | | | | Patch by: Jakub Staszak! Introduces BranchProbability. Changes unsigned to uint32_t all over and uint64_t only when overflow is expected. llvm-svn: 132867
* Initialize BasicAA's AliasCache to set it to use fewer buckets byDan Gohman2011-06-101-1/+7
| | | | | | | | default, since it usually has very few elements. This speeds up alias queries in many cases, because AliasCache.clear() doesn't have to visit as many buckets. llvm-svn: 132862
* Teach the CallGraph to ignore calls to intrinsics.John McCall2011-06-092-3/+3
| | | | llvm-svn: 132797
* Reapply r131781, now that the GVN bug with partially-aliasing loadsDan Gohman2011-06-041-1/+11
| | | | | | is disabled. llvm-svn: 132632
* Disable the main feature of 130180, the elimination of loads that areDan Gohman2011-06-041-0/+6
| | | | | | | | | | redundant with partially-aliasing loads. When computing what portion of a clobbering load value is needed, it doesn't consider phi-translation which may have occurred between the clobbing load and the redundant load. llvm-svn: 132631
* Revert r131781 again. Apparently there is more going on here.Dan Gohman2011-06-041-11/+1
| | | | llvm-svn: 132625
* Fold assert-only-used variable into the assert.Nick Lewycky2011-06-041-2/+1
| | | | llvm-svn: 132620
* Missing include of climits in the new BranchProbability pass.Andrew Trick2011-06-041-0/+1
| | | | llvm-svn: 132616
* New BranchProbabilityInfo analysis. Patch by Jakub Staszak!Andrew Trick2011-06-043-0/+350
| | | | | | | | | | | BranchProbabilityInfo provides an interface for IR passes to query the likelihood that control follows a CFG edge. This patch provides an initial implementation of static branch predication that will populate BranchProbabilityInfo for branches with no external profile information using very simple heuristics. It currently isn't hooked up to any external profile data, so static prediction does all the work. llvm-svn: 132613
* Reapply r131781 (revert r131809), now that some BasicAA shortcomingsDan Gohman2011-06-041-1/+11
| | | | | | it exposed are fixed. llvm-svn: 132611
* Fix BasicAA's recursion detection so that it doesn't pessimizeDan Gohman2011-06-041-37/+27
| | | | | | | | | queries in the case of a DAG, where a query reaches a node visited earlier, but it's not on a cycle. This avoids MayAlias results in cases where BasicAA is expected to return MustAlias or PartialAlias in order to protect TBAA. llvm-svn: 132609
* When merging MustAlias and PartialAlias, chose PartialAlias insteadDan Gohman2011-06-031-10/+21
| | | | | | of conservatively choosing MayAlias. llvm-svn: 132579
* Test commit.Hans Wennborg2011-06-031-2/+2
| | | | llvm-svn: 132558
* A typedef's context is not the same as type's context. It is the context of ↵Devang Patel2011-06-031-2/+2
| | | | | | typedef decl itself. Use extra parameter to communicate this to DIBuilder. llvm-svn: 132556
* When marking a block as being unanalyzable, use "Clobber" on the terminator ↵Eli Friedman2011-06-021-2/+2
| | | | | | | | | | | | instead of the first instruction in the block. This is a bit of a hack; "Clobber" isn't really the right marking in the first place. memdep doesn't really have any way of properly expressing "unanalyzable" at the moment. Using it on the terminator is much less ambiguous than using it on an arbitrary instruction, though. In the given testcase, the "Clobber" was pointing to a load, and GVN was incorrectly assuming that meant that the "Clobber" load overlapped the load being analyzed (when they are actually unrelated). The included testcase tests both this commit and r132434. Part two of rdar://9429882. (r132434 was mislabeled.) llvm-svn: 132442
* In MemoryDependenceAnalysis::getNonLocalPointerDepFromBB, if a given block ↵Eli Friedman2011-06-011-20/+58
| | | | | | | | is is deemed unanalyzable (and we execute one of the "goto PredTranslationFailure" statements), make sure we don't put information about the predecessors of that block into the returned data structures; this can lead to, among other things, extraneous results (which will confuse passes using memdep). Fixes an assert in GVN compiling ruby. Part of rdar://problem/9521954 . Testcase coming up soon. llvm-svn: 132434
* SCEV: missing null check fix for r132360, dragonegg crash.Andrew Trick2011-06-011-3/+3
| | | | llvm-svn: 132416
* scev: Better sign-extend removal. Normalize postincrement recurrencesAndrew Trick2011-05-311-31/+102
| | | | | | so that their sign extended forms are congruent when no overflow occurs. llvm-svn: 132360
* llvm.memcpy.* has two distinct associated address spaces; the source address ↵Eli Friedman2011-05-311-4/+6
| | | | | | space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly. llvm-svn: 132356
* Update this comment.Dan Gohman2011-05-271-1/+3
| | | | llvm-svn: 132202
* Renamed llvm.x86.sse42.crc32 intrinsics; crc64 doesn't exist. Chad Rosier2011-05-261-2/+2
| | | | | | | crc32.[8|16|32] have been renamed to .crc32.32.[8|16|32] and crc64.[8|16|32] have been renamed to .crc32.64.[8|64]. llvm-svn: 132163
* Change condition for determining whether a function is small for inlining ↵Eli Friedman2011-05-241-1/+1
| | | | | | | | metrics so that very long functions with few basic blocks are not re-analyzed. llvm-svn: 131994
OpenPOWER on IntegriCloud