| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
merge all zero-sized alloca's into one, fixing c43204g from the Ada ACATS
conformance testsuite. What happened there was that a variable sized object
was being allocated on the stack, "alloca i8, i32 %size". It was then being
passed to another function, which tested that the address was not null (raising
an exception if it was) then manipulated %size bytes in it (load and/or store).
The optimizers cleverly managed to deduce that %size was zero (congratulations
to them, as it isn't at all obvious), which made the alloca zero size, causing
the optimizers to replace it with null, which then caused the check mentioned
above to fail, and the exception to be raised, wrongly. Note that no loads
and stores were actually being done to the alloca (the loop that does them is
executed %size times, i.e. is not executed), only the not-null address check.
llvm-svn: 159202
|
|
|
|
|
|
|
|
|
|
|
|
| |
GEPs, bit casts, and stores reaching it but no other instructions. These
often show up during the iterative processing of the inliner, SROA, and
DCE. Once we hit this point, we can completely remove the alloca. These
were actually showing up in the final, fully optimized code in a bunch
of inliner tests I've been working on, and notably they show up after
LLVM finishes optimizing away all function calls involved in
hash_combine(a, b).
llvm-svn: 154285
|
|
|
|
| |
llvm-svn: 152935
|
|
|
|
|
|
|
|
|
|
| |
alignment. If that's the case, then we want to make sure that we don't increase
the alignment of the store instruction. Because if we increase it to be "more
aligned" than the pointer, code-gen may use instructions which require a greater
alignment than the pointer guarantees.
<rdar://problem/11043589>
llvm-svn: 152907
|
|
|
|
|
|
| |
check for a LandingPadInst.
llvm-svn: 137745
|
|
|
|
| |
llvm-svn: 137712
|
|
|
|
| |
llvm-svn: 137664
|
|
|
|
| |
llvm-svn: 135904
|
|
|
|
|
|
| |
ArrayRef.
llvm-svn: 135761
|
|
|
|
|
|
| |
ConstantExpr::getGetElementPtr to use ArrayRef.
llvm-svn: 135758
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
|
|
| |
InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms.
llvm-svn: 132167
|
|
|
|
| |
llvm-svn: 131604
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
|
|
|
|
|
| |
Early CSE pass so this patch reverts it to original source code.
llvm-svn: 127574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
load and store reference same memory location, the memory location
is represented by getelementptr with two uses (load and store) and
the getelementptr's base is alloca with single use. At this point,
instructions from alloca to store can be removed.
(this pattern is generated when bitfield is accessed.)
For example,
%u = alloca %struct.test, align 4 ; [#uses=1]
%0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2]
%1 = load i8* %0, align 4 ; [#uses=1]
%2 = and i8 %1, -16 ; [#uses=1]
%3 = or i8 %2, 5 ; [#uses=1]
store i8 %3, i8* %0, align 4
llvm-svn: 127565
|
|
|
|
| |
llvm-svn: 127539
|
|
|
|
| |
llvm-svn: 127282
|
|
|
|
| |
llvm-svn: 125563
|
|
|
|
| |
llvm-svn: 122554
|
|
|
|
|
|
| |
from stores when folding in bitcasts.
llvm-svn: 117265
|
|
|
|
|
|
|
|
| |
discovered a miscompilation in it, and it's not easily
fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine.
llvm-svn: 112575
|
|
|
|
| |
llvm-svn: 111665
|
|
|
|
| |
llvm-svn: 111571
|
|
|
|
|
|
|
|
| |
only modifies the low bytes of a value,
we can narrow the store to only over-write the affected bytes.
llvm-svn: 111568
|
|
|
|
|
|
|
| |
instructions with alignment 0, so that subsequent passes don't
need to bother checking the TargetData ABI size manually.
llvm-svn: 110128
|
|
|
|
| |
llvm-svn: 109103
|
|
|
|
| |
llvm-svn: 108150
|
|
|
|
| |
llvm-svn: 107962
|
|
|
|
|
|
|
| |
lib/Transforms/Utils and into lib/Analysis so that Analysis passes
can use them.
llvm-svn: 104949
|
|
|
|
| |
llvm-svn: 104945
|
|
|
|
|
|
|
| |
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
|
|
|
|
|
|
| |
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
|
|
|
|
|
|
|
| |
unconditionally. Besides checking the offset, also check that the underlying
object is aligned as much as the load itself.
llvm-svn: 94875
|
|
|
|
| |
llvm-svn: 94863
|
|
|
|
|
|
|
|
|
|
| |
create a testcase where this matters. The select+load transformation only
occurs when isSafeToLoadUnconditionally is true, and in those situations,
instcombine also changes the underlying objects to be aligned. This seems
like a good idea regardless, and I've verified that it doesn't pessimize
the subsequent realignment.
llvm-svn: 94850
|
|
|
|
|
|
|
| |
indices are safe if the result is known to be within the bounds of the
underlying object.
llvm-svn: 94829
|
|
|
|
| |
llvm-svn: 94194
|
|
|
|
| |
llvm-svn: 94112
|
|
|
|
| |
llvm-svn: 93831
|
|
llvm-svn: 92685
|