- Jan 17, 2012
-
-
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
-
David Blaikie authored
llvm-svn: 148284
-
- Jan 16, 2012
-
-
Stepan Dyatkovskiy authored
llvm-svn: 148252
-
- Jan 15, 2012
-
-
Stepan Dyatkovskiy authored
llvm-svn: 148216
-
Stepan Dyatkovskiy authored
Fixup for r148132. Type replacement for LoopsProperties: from DenseMap to std::map, since we need to keep a valid pointer to properties of current loop. Message for r148132: LoopUnswitch: All helper data that is collected during loop-unswitch iterations was moved to separated class (LUAnalysisCache). llvm-svn: 148215
-
- Jan 14, 2012
-
-
Dan Gohman authored
llvm-svn: 148164
-
- Jan 13, 2012
-
-
Eli Friedman authored
llvm-svn: 148149
-
Stepan Dyatkovskiy authored
llvm-svn: 148133
-
Stepan Dyatkovskiy authored
LoopUnswitch: All helper data that is collected during loop-unswitch iterations was moved to separated class (LUAnalysisCache). llvm-svn: 148132
-
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
-
-
Eli Friedman authored
Re-fix the issue Bill fixed in r147899 in a slightly different way, which doesn't abuse the semantics of linker_private. We don't really want to merge any string constant with a weak_odr global. llvm-svn: 147971
-
http://llvm.org/bugs/show_bug.cgi?id=11395Kostya Serebryany authored
[asan] extend the workaround for http://llvm.org/bugs/show_bug.cgi?id=11395: don't instrument the function at all on x86_32 if it has a large asm blob llvm-svn: 147953
-
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
-
Andrew Trick authored
This collects a set of IV uses within the loop whose values can be computed relative to each other in a sequence. Following checkins will make use of this information. llvm-svn: 147797
-
Andrew Trick authored
llvm-svn: 147785
-
Benjamin Kramer authored
llvm-svn: 147779
-
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
This will be more important as we extend the LSR pass in ways that don't rely on the formula solver. In particular, we need it for constructing IV chains. llvm-svn: 147724
-
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: 147711
-
Andrew Trick authored
llvm-svn: 147707
-
- Jan 06, 2012
-
-
Kostya Serebryany authored
llvm-svn: 147667
-
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
-
Nick Lewycky authored
Eliminate the dead test for it on each loop iteration. No functionality change. llvm-svn: 147616
-
- Jan 04, 2012
-
-
Nick Lewycky authored
llvm-svn: 147529
-
Nick Lewycky authored
nsw bits on them. llvm-svn: 147528
-
- Dec 31, 2011
-
-
Nick Lewycky authored
'and' that would zero out the trailing bits, and to produce an exact shift ourselves. llvm-svn: 147391
-
- Dec 29, 2011
-
-
Nick Lewycky authored
captured. This allows the tracker to look at the specific use, which may be especially interesting for function calls. Use this to fix 'nocapture' deduction in FunctionAttrs. The existing one does not iterate until a fixpoint and does not guarantee that it produces the same result regardless of iteration order. The new implementation builds up a graph of how arguments are passed from function to function, and uses a bottom-up walk on the argument-SCCs to assign nocapture. This gets us nocapture more often, and does so rather efficiently and independent of iteration order. llvm-svn: 147327
-
- Dec 28, 2011
-
-
Nick Lewycky authored
llvm-svn: 147307
-
- Dec 27, 2011
-
-
Nick Lewycky authored
llvm-svn: 147292
-
Nick Lewycky authored
llvm-svn: 147291
-
Nick Lewycky authored
to discard weights when appropriate. Still more to do (and a new TODO), but it's a start! llvm-svn: 147286
-
Rafael Espindola authored
llvm-svn: 147284
-