- Jan 30, 2012
-
-
Chad Rosier authored
llvm-svn: 149275
-
- Jan 29, 2012
-
-
Nick Lewycky authored
llvm-svn: 149185
-
- Jan 26, 2012
-
-
Chris Lattner authored
new methods recently added to (sometimes greatly!) simplify code. llvm-svn: 149024
-
- Jan 25, 2012
-
-
Chris Lattner authored
llvm-svn: 148929
-
- Jan 20, 2012
-
-
David Blaikie authored
llvm-svn: 148578
-
Andrew Trick authored
Fixes PR11783: bad cast to AddRecExpr. llvm-svn: 148572
-
Kostya Serebryany authored
Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
-
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
llvm-svn: 148419
-
Dan Gohman authored
of recognizing them by name. llvm-svn: 148416
-
Jakub Staszak authored
llvm-svn: 148415
-
- Jan 17, 2012
-
-
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
-
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
-
-
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
-
- 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
-
- 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
-
- Dec 27, 2011
-
-
Nick Lewycky authored
llvm-svn: 147291
-
Rafael Espindola authored
llvm-svn: 147284
-
- Dec 24, 2011
-
-
Nick Lewycky authored
llvm-svn: 147226
-
- Dec 22, 2011
-
-
Chad Rosier authored
llvm-svn: 147176
-
Chad Rosier authored
performance regressions (both execution-time and compile-time) on our nightly testers. Original commit message: Fix for bug #11429: Wrong behaviour for switches. Small improvement for code size heuristics. llvm-svn: 147131
-
- Dec 21, 2011
-
-
Dan Gohman authored
an invalid iterator aren't reproducible. rdar://10614085. llvm-svn: 147098
-
- Dec 15, 2011
-
-
Dan Gohman authored
into Analysis as a standalone function, since there's no need for it to be in VMCore. Also, update it to use isKnownNonZero and other goodies available in Analysis, making it more precise, enabling more aggressive optimization. llvm-svn: 146610
-
- Dec 14, 2011
-
-
Stepan Dyatkovskiy authored
llvm-svn: 146578
-