- Feb 03, 2012
-
-
Dan Gohman authored
PHI nodes which were matched, rather than climbing up the original PHI node's operands to rediscover PHI nodes for recording, since the PHI nodes found that are not necessarily part of the matched set. This fixes rdar://10589171. llvm-svn: 149654
-
Jim Grosbach authored
This reverts commit d0e277d272d517ca1cda368267d199f0da7cad95. llvm-svn: 149647
-
- Feb 01, 2012
-
-
Hal Finkel authored
This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure. Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser). llvm-svn: 149468
-
Jim Grosbach authored
Changing arguments from being passed as fixed to varargs is unsafe, as the ABI may require they be handled differently (stack vs. register, for example). Remove two tests which rely on the bitcast being folded into the direct call, which is exactly the transformation that's unsafe. llvm-svn: 149457
-
- Jan 31, 2012
-
-
Bill Wendling authored
There was always the current EH. -- Ministry of Truth llvm-svn: 149335
-
Bill Wendling authored
llvm-svn: 149333
-
- Jan 28, 2012
-
-
Rafael Espindola authored
width. llvm-svn: 149151
-
- Jan 27, 2012
-
-
Rafael Espindola authored
Unfortunately I also had to disable constant-pool-sharing.ll the code it tests has been updated to use the IL logic. llvm-svn: 149148
-
Chris Lattner authored
ConstantVector's to integer type. llvm-svn: 149110
-
- Jan 25, 2012
-
-
Nick Lewycky authored
savings from a pointer argument becoming an alloca. Sometimes callees will even compare a pointer to null and then branch to an otherwise unreachable block! Detect these cases and compute the number of saved instructions, instead of bailing out and reporting no savings. llvm-svn: 148941
-
- Jan 23, 2012
-
-
Nick Lewycky authored
returns false in the event the computation feeding into the pointer is unreachable, which maybe ought to be true -- but this is at least consistent with undef->isDereferenceablePointer().) Fixes PR11825! llvm-svn: 148671
-
- Jan 20, 2012
-
-
Andrew Trick authored
Fixes PR11783: bad cast to AddRecExpr. llvm-svn: 148572
-
Andrew Trick authored
llvm-svn: 148571
-
Nick Lewycky authored
can't handle. Also don't produce non-zero results for things which won't be transformed by SROA at all just because we saw the loads/stores before we saw the use of the address. llvm-svn: 148536
-
Andrew Trick authored
LSR has gradually been improved to more aggressively reuse existing code, particularly existing phi cycles. This exposed problems with the SCEVExpander's sloppy treatment of its insertion point. I applied some rigor to the insertion point problem that will hopefully avoid an endless bug cycle in this area. Changes: - Always used properlyDominates to check safe code hoisting. - The insertion point provided to SCEV is now considered a lower bound. This is usually a block terminator or the use itself. Under no cirumstance may SCEVExpander insert below this point. - LSR is reponsible for finding a "canonical" insertion point across expansion of different expressions. - Robust logic to determine whether IV increments are in "expanded" form and/or can be safely hoisted above some insertion point. Fixes PR11783: SCEVExpander assert. llvm-svn: 148535
-
- Jan 19, 2012
-
-
Dan Gohman authored
rdar://10531041. llvm-svn: 148490
-
- Jan 18, 2012
-
-
Dan Gohman authored
of recognizing them by name. llvm-svn: 148416
-
- Jan 17, 2012
-
-
Andrew Trick authored
llvm-svn: 148344
-
Dan Gohman authored
autorelease push+pop pairs. llvm-svn: 148330
-
Andrew Trick authored
It's becoming clear that LoopSimplify needs to unconditionally create loop preheaders. But that is a bigger fix. For now, continuing to hack LSR. Fixes rdar://10701050 "Cannot split an edge from an IndirectBrInst" assert. llvm-svn: 148288
-
- Jan 14, 2012
-
-
Andrew Trick authored
Fixes PR11761: bad IR w/ redundant Phi elim llvm-svn: 148177
-
- Jan 13, 2012
-
-
Dan Gohman authored
the optimizer doesn't eliminate objc_retainBlock calls which are needed for their side effect of copying blocks onto the heap. This implements rdar://10361249. llvm-svn: 148076
-
- Jan 11, 2012
-
-
Duncan Sands authored
are invalid). Fixes a crash on array1.C from the GCC testsuite when compiled with dragonegg. llvm-svn: 147946
-
Stepan Dyatkovskiy authored
1. Size heuristics changed. Now we calculate number of unswitching branches only once per loop. 2. Some checks was moved from UnswitchIfProfitable to processCurrentLoop, since it is not changed during processCurrentLoop iteration. It allows decide to skip some loops at an early stage. Extended statistics: - Added total number of instructions analyzed. llvm-svn: 147935
-
Bill Wendling authored
with other symbols. An object in the __cfstring section is suppoed to be filled with CFString objects, which have a pointer to ___CFConstantStringClassReference followed by a pointer to a __cstring. If we allow the object in the __cstring section to be merged with another global, then it could end up in any section. Because the linker is going to remove these symbols in the final executable, we shouldn't bother to merge them. <rdar://problem/10564621> llvm-svn: 147899
-
- Jan 10, 2012
-
-
Andrew Trick authored
These heuristics are sufficient for enabling IV chains by default. Performance analysis has been done for i386, x86_64, and thumbv7. The optimization is rarely important, but can significantly speed up certain cases by eliminating spill code within the loop. Unrolled loops are prime candidates for IV chains. In many cases, the final code could still be improved with more target specific optimization following LSR. The goal of this feature is for LSR to make the best choice of induction variables. Instruction selection may not completely take advantage of this feature yet. As a result, there could be cases of slight code size increase. Code size can be worse on x86 because it doesn't support postincrement addressing. In fact, when chains are formed, you may see redundant address plus stride addition in the addressing mode. GenerateIVChains tries to compensate for the common cases. On ARM, code size increase can be mitigated by using postincrement addressing, but downstream codegen currently misses some opportunities. llvm-svn: 147826
-
- Jan 09, 2012
-
-
Andrew Trick authored
After collecting chains, check if any should be materialized. If so, hide the chained IV users from the LSR solver. LSR will only solve for the head of the chain. GenerateIVChains will then materialize the chained IV users by computing the IV relative to its previous value in the chain. In theory, chained IV users could be exposed to LSR's solver. This would be considerably complicated to implement and I'm not aware of a case where we need it. In practice it's more important to intelligently prune the search space of nontrivial loops before running the solver, otherwise the solver is often forced to prune the most optimal solutions. Hiding the chained users does this well, so that LSR is more likely to find the best IV for the chain as a whole. llvm-svn: 147801
-
Benjamin Kramer authored
This subsumes several other transforms while enabling us to catch more cases. llvm-svn: 147777
-
- Jan 08, 2012
-
-
Benjamin Kramer authored
We still save an instruction when just the "and" part is replaced. Also change the code to match comments more closely. llvm-svn: 147753
-
Benjamin Kramer authored
InstCombine: If we have a bit test and a sign test anded/ored together, merge the sign bit into the bit test. This is common in bit field code, e.g. checking if the first or the last bit of a bit field is set. llvm-svn: 147749
-
- Jan 07, 2012
-
-
Andrew Trick authored
LoopSimplify may not run on some outer loops, e.g. because of indirect branches. SCEVExpander simply cannot handle outer loops with no preheaders. Fixes rdar://10655343 SCEVExpander segfault. llvm-svn: 147718
-
Andrew Trick authored
llvm-svn: 147707
-
Andrew Trick authored
llvm-svn: 147701
-
- Jan 06, 2012
-
-
Dan Gohman authored
present in the bottom of the CFG triangle, as the transformation isn't ever valuable if the branch can't be eliminated. Also, unify some heuristics between SimplifyCFG's multiple if-converters, for consistency. This fixes rdar://10627242. llvm-svn: 147630
-
Eli Friedman authored
PR11705, part 2: globalopt shouldn't put inttoptr/ptrtoint operations into global initializers if there's an implied extension or truncation. llvm-svn: 147625
-
- Jan 05, 2012
-
-
Dan Gohman authored
code can incorrectly move the load across a store. This never happens in practice today, but only because the current heuristics accidentally preclude it. llvm-svn: 147623
-
Benjamin Kramer authored
llvm-svn: 147580
-
- Jan 04, 2012
-
-
Nick Lewycky authored
nsw bits on them. llvm-svn: 147528
-
- Jan 02, 2012
-
-
Andrew Trick authored
"phony" insertion point. Fixes rdar://10619599: "SelectionDAGBuilder shouldn't visit PHI nodes!" assert llvm-svn: 147439
-
- Dec 31, 2011
-
-
Nick Lewycky authored
'and' that would zero out the trailing bits, and to produce an exact shift ourselves. llvm-svn: 147391
-