- Nov 10, 2009
-
-
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
-
- Nov 07, 2009
-
-
Victor Hernandez authored
- fix ProcessInternalGlobal() debug output llvm-svn: 86317
-
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
-
-
Chris Lattner authored
from various APIs, addressing PR5325. llvm-svn: 86231
-
Victor Hernandez authored
llvm-svn: 86213
-
- Nov 05, 2009
-
-
Dan Gohman authored
LoopSimplify form may not be available. llvm-svn: 86175
-
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
-
- Nov 03, 2009
-
-
Benjamin Kramer authored
llvm-svn: 85896
-
- Nov 01, 2009
-
-
Chris Lattner authored
llvm-svn: 85730
-
Douglas Gregor authored
llvm-svn: 85717
-
Dan Gohman authored
#include dependency, as frontends commonly pull in PassManager.h. llvm-svn: 85714
-
Chris Lattner authored
in a way that should prevent ip constprop. This allows clang/test/CodeGen/indirect-goto.c to pass with the new indirect goto lowering. llvm-svn: 85709
-
Chris Lattner authored
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
-
- Oct 31, 2009
-
-
Chris Lattner authored
llvm-svn: 85680
-
- Oct 29, 2009
-
-
Chris Lattner authored
static constructors with indirect gotos :) llvm-svn: 85495
-
Chris Lattner authored
crash on any clang tests. llvm-svn: 85465
-
- Oct 28, 2009
-
-
Victor Hernandez authored
ArraySize * ElementSize ElementSize * ArraySize ArraySize << log2(ElementSize) ElementSize << log2(ArraySize) Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic. Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well. llvm-svn: 85421
-
Devang Patel authored
llvm-svn: 85402
-
Chris Lattner authored
In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. llvm-svn: 85375
-
- Oct 27, 2009
-
-
Victor Hernandez authored
llvm-svn: 85286
-
Victor Hernandez authored
llvm-svn: 85181
-
- Oct 25, 2009
-
-
Nick Lewycky authored
VISIBILITY_HIDDEN removal. llvm-svn: 85043
-
Nick Lewycky authored
Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
-
- Oct 24, 2009
-
-
Victor Hernandez authored
Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
-
- Oct 22, 2009
-
-
Devang Patel authored
llvm-svn: 84801
-
- Oct 21, 2009
-
-
Devang Patel authored
llvm-svn: 84731
-
- Oct 19, 2009
-
-
Victor Hernandez authored
Malloc calls are marked NoAlias, so the code below the isMalloc() check makes it redundant. Removing the isMalloc() check. llvm-svn: 84541
-
- Oct 18, 2009
-
-
Chris Lattner authored
instructions. llvm-svn: 84404
-
- Oct 17, 2009
-
-
Victor Hernandez authored
llvm-svn: 84299
-
Victor Hernandez authored
Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. llvm-svn: 84292
-
Victor Hernandez authored
llvm-svn: 84288
-
- Oct 15, 2009
-
-
Victor Hernandez authored
Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper identifying the malloc as a non-array malloc. This broke GlobalOpt's optimization of stores of mallocs to global variables. The fix is to classify malloc's into 3 categories: 1. non-array mallocs 2. array mallocs whose array size can be determined 3. mallocs that cannot be determined to be of type 1 or 2 and cannot be optimized getMallocArraySize() returns NULL for category 3, and all users of this function must avoid their malloc optimization if this function returns NULL. Eventually, currently unexpected codegen for computing the malloc's size argument will be supported in isArrayMalloc() and getMallocArraySize(), extending malloc optimizations to those examples. llvm-svn: 84199
-
- Oct 13, 2009
-
-
Dan Gohman authored
llvm-svn: 83998
-
- Oct 09, 2009
-
-
Dale Johannesen authored
constants used in inlining heuristics (especially those used in more than one file). No functional change. llvm-svn: 83675
-
Dale Johannesen authored
and that will make Caller too big to inline, see if it might be better to inline Caller into its callers instead. This situation is described in PR 2973, although I haven't tried the specific case in SPASS. llvm-svn: 83602
-
- Oct 06, 2009
-
-
Duncan Sands authored
where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
-
- Oct 05, 2009
-
-
Dan Gohman authored
ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
-
- Oct 04, 2009
-
-
Evan Cheng authored
llvm-svn: 83274
-
- Sep 28, 2009
-
-
Dan Gohman authored
llvm-svn: 82990
-
- Sep 27, 2009
-
-
Chris Lattner authored
when the loop inspects the bitcast operand. llvm-svn: 82928
-