- Nov 11, 2009
-
-
Chris Lattner authored
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
-
Chris Lattner authored
vend value constraint information to the optimizer. llvm-svn: 86767
-
Chris Lattner authored
Analysis/Passes.h llvm-svn: 86765
-
Devang Patel authored
llvm-svn: 86748
-
- Nov 10, 2009
-
-
Chris Lattner authored
into libanalysis and transformutils. llvm-svn: 86735
-
Devang Patel authored
Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic. llvm-svn: 86727
-
Victor Hernandez authored
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size llvm-svn: 86676
-
Victor Hernandez authored
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base llvm-svn: 86675
-
Chris Lattner authored
llvm-svn: 86648
-
Chris Lattner authored
llvm-svn: 86645
-
Chris Lattner authored
except that the result may not be a constant. Switch jump threading to use it so that it gets things like (X & 0) -> 0, which occur when phi preds are deleted and the remaining phi pred was a zero. llvm-svn: 86637
-
Jeffrey Yasskin authored
This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
-
Chris Lattner authored
llvm-svn: 86635
-
Chris Lattner authored
simplification, this handles the foldable fcmp x,x cases among many others. llvm-svn: 86627
-
Dan Gohman authored
and ConstantFoldCompareInstOperands. llvm-svn: 86626
-
Chris Lattner authored
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to determine whether a predicate is fp or int. llvm-svn: 86624
-
Chris Lattner authored
individual operands instead of taking a temporary array llvm-svn: 86619
-
- Nov 09, 2009
-
-
Chris Lattner authored
takes decimated instructions and applies identities to them. This is pretty minimal at this point, but I plan to pull some instcombine logic out into these and similar routines. llvm-svn: 86613
-
Dan Gohman authored
GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me) llvm-svn: 86582
-
Dan Gohman authored
llvm-svn: 86565
-
- Nov 07, 2009
-
-
Victor Hernandez authored
Here is the original commit message: This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments. Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86311
-
- Nov 06, 2009
-
-
Devang Patel authored
llvm-svn: 86269
-
Devang Patel authored
llvm-svn: 86259
-
Chris Lattner authored
from various APIs, addressing PR5325. llvm-svn: 86231
-
Victor Hernandez authored
llvm-svn: 86213
-
- Nov 05, 2009
-
-
Dan Gohman authored
llvm-svn: 86161
-
Dan Gohman authored
a separate helper function. llvm-svn: 86159
-
Victor Hernandez authored
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86077
-
Devang Patel authored
While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately. This improves bitfield support. llvm-svn: 86073
-
- Nov 03, 2009
-
-
Victor Hernandez authored
Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), and avoid redundant isFreeCall cases) in feedback to r85176 llvm-svn: 85936
-
Victor Hernandez authored
Changes (* location in pointer variables, avoiding include, and using APInt::getLimitedValue) based on feedback to r85814 llvm-svn: 85933
-
Chris Lattner authored
llvm-svn: 85866
-
Chris Lattner authored
remove a check of isFreeCall: the argument to free is already nocapture so the generic call code works fine. llvm-svn: 85865
-
- Nov 02, 2009
-
-
Victor Hernandez authored
llvm-svn: 85814
-
Edward O'Callaghan authored
llvm-svn: 85781
-
Edward O'Callaghan authored
llvm-svn: 85779
-
- Nov 01, 2009
-
-
Duncan Sands authored
columns. llvm-svn: 85732
-
Chris Lattner authored
llvm-svn: 85724
-
Douglas Gregor authored
llvm-svn: 85717
-
Dan Gohman authored
of the ScalarEvolution pass without needing to #include ScalarEvolution.h. llvm-svn: 85716
-