- Apr 16, 2012
-
-
Chandler Carruth authored
This is a complex change that resulted from a great deal of experimentation with several different benchmarks. The one which proved the most useful is included as a test case, but I don't know that it captures all of the relevant changes, as I didn't have specific regression tests for each, they were more the result of reasoning about what the old algorithm would possibly do wrong. I'm also failing at the moment to craft more targeted regression tests for these changes, if anyone has ideas, it would be welcome. The first big thing broken with the old algorithm is the idea that we can take a basic block which has a loop-exiting successor and a looping successor and use the looping successor as the layout top in order to get that particular block to be the bottom of the loop after layout. This happens to work in many cases, but not in all. The second big thing broken was that we didn't try to select the exit which fell into the nearest enclosing loop (to which we exit at all). As a consequence, even if the rotation worked perfectly, it would result in one of two bad layouts. Either the bottom of the loop would get fallthrough, skipping across a nearer enclosing loop and thereby making it discontiguous, or it would be forced to take an explicit jump over the nearest enclosing loop to earch its successor. The point of the rotation is to get fallthrough, so we need it to fallthrough to the nearest loop it can. The fix to the first issue is to actually layout the loop from the loop header, and then rotate the loop such that the correct exiting edge can be a fallthrough edge. This is actually much easier than I anticipated because we can handle all the hard parts of finding a viable rotation before we do the layout. We just store that, and then rotate after layout is finished. No inner loops get split across the post-rotation backedge because we check for them when selecting the rotation. That fix exposed a latent problem with our exitting block selection -- we should allow the backedge to point into the middle of some inner-loop chain as there is no real penalty to it, the whole point is that it *won't* be a fallthrough edge. This may have blocked the rotation at all in some cases, I have no idea and no test case as I've never seen it in practice, it was just noticed by inspection. Finally, all of these fixes, and studying the loops they produce, highlighted another problem: in rotating loops like this, we sometimes fail to align the destination of these backwards jumping edges. Fix this by actually walking the backwards edges rather than relying on loopinfo. This fixes regressions on heapsort if block placement is enabled as well as lots of other cases where the previous logic would introduce an abundance of unnecessary branches into the execution. llvm-svn: 154783
-
Craig Topper authored
llvm-svn: 154782
-
Craig Topper authored
llvm-svn: 154781
-
Craig Topper authored
Spacing fixes and 80 column fixes. Use 0 instead of 0x80 for undef indices in vpermps/vpermd. Hardware only looks at lower 3-bits. llvm-svn: 154780
-
Craig Topper authored
llvm-svn: 154778
-
- Apr 15, 2012
-
-
Nadav Rotem authored
Use non-vex instructions for SSE4. llvm-svn: 154770
-
Benjamin Kramer authored
As an example, attach range info to the "invalid instruction" message: $ clang -arch arm -c asm.c asm.c:2:11: error: invalid instruction __asm__("foo r0"); ^ <inline asm>:1:2: note: instantiated into assembly here foo r0 ^~~ llvm-svn: 154765
-
Nadav Rotem authored
llvm-svn: 154764
-
Elena Demikhovsky authored
llvm-svn: 154761
-
NAKAMURA Takumi authored
llvm-svn: 154759
-
NAKAMURA Takumi authored
llvm-svn: 154758
-
- Apr 14, 2012
-
-
Duncan Sands authored
thinking of generalizing it to be able to specify other freedoms beyond accuracy (such as that NaN's don't have to be respected). I'd like the 3.1 release (the first one with this metadata) to have the more generic name already rather than having to auto-upgrade it in 3.2. llvm-svn: 154744
-
Hal Finkel authored
When vectorizing pointer types it is important to realize that potential pairs cannot be connected via the address pointer argument of a load or store. This is because even after vectorization, the address is still a scalar because the address of the higher half of the pair is implicit from the address of the lower half (it need not be, and should not be, explicitly computed). llvm-svn: 154735
-
Hal Finkel authored
llvm-svn: 154734
-
Andrew Trick authored
This is a special flag for targets that really want their block terminators in the DAG. The default scheduler cannot handle this correctly, so it becomes the specialized scheduler's responsibility to schedule terminators. llvm-svn: 154712
-
Richard Smith authored
llvm-svn: 154705
-
- Apr 13, 2012
-
-
Sirish Pande authored
llvm-svn: 154703
-
Hal Finkel authored
llvm-svn: 154700
-
Sirish Pande authored
llvm-svn: 154696
-
Sirish Pande authored
llvm-svn: 154695
-
Benjamin Kramer authored
- Don't copy offsets into HashData, the underlying vector won't change once the table is finalized. - Allocate HashData and HashDataContents in a BumpPtrAllocator. - Allocate string map entries in the same allocator. - Random cleanups. llvm-svn: 154694
-
Evan Cheng authored
llvm-svn: 154689
-
Dan Gohman authored
llvm-svn: 154687
-
Kevin Enderby authored
targets so if the branch target has the high bit set it does not get printed as: beq 0xffffffff8008c404 llvm-svn: 154685
-
Dan Gohman authored
their argument as "escape" points for objc_retainBlock optimization. This fixes rdar://11229925. llvm-svn: 154682
-
Hal Finkel authored
As has been suggested by Duncan and others, Early-CSE and GVN should do similar redundancy elimination, but Early-CSE is much less expensive. Most of my autovectorization benchmarks show a performance regresion, but all of these are < 0.1%, and so I think that it is still worth using the less expensive pass. llvm-svn: 154673
-
Benjamin Kramer authored
llvm-svn: 154661
-
Craig Topper authored
Silence various build warnings from Hexagon backend that show up in release builds. Mostly converting 'assert(0)' to 'llvm_unreachable' to silence warnings about missing returns. Also fold some variable declarations into asserts to prevent the variables from being unused in release builds. llvm-svn: 154660
-
Dan Gohman authored
library return value optimization for phi uses. Even when the phi itself is not dominated, the specific use may be dominated. llvm-svn: 154647
-
Bill Wendling authored
obviously cannot know that this code is present, let alone used. So prevent the internalize pass from internalizing those global values which code-gen may insert. llvm-svn: 154645
-
Dan Gohman authored
optimizing autorelease calls on phi nodes with null operands. This fixes rdar://11207070. llvm-svn: 154642
-
Dan Gohman authored
as Eli noticed. llvm-svn: 154641
-
Dan Gohman authored
directly instead of a user Instruction. This allows them to test whether a def dominates a particular operand if the user instruction is a PHI. llvm-svn: 154631
-
Kevin Enderby authored
symbolic operands added when using the C disassembler API. llvm-svn: 154628
-
Ted Kremenek authored
llvm-svn: 154622
-
- Apr 12, 2012
-
-
Evandro Menezes authored
llvm-svn: 154620
-
Sirish Pande authored
llvm-svn: 154616
-
Preston Gurd authored
of zero-initialized sections, virtual sections and common symbols and preventing the loading of sections which are not required for execution such as debug information. Patch by Andy Kaylor! llvm-svn: 154610
-
Evan Cheng authored
Generalize r153635 to deal with TokenFactor chains; also clean up the logic and fix the tests. rdar://11069732, rdar://11236106 llvm-svn: 154604
-
Evandro Menezes authored
llvm-svn: 154597
-