- Oct 25, 2011
-
-
Jim Grosbach authored
PR11217. llvm-svn: 142956
-
Duncan Sands authored
down to this commit. Original commit message: An MBB which branches to an EH landing pad shouldn't be considered for tail merging. In SjLj EH, the jump to the landing pad is not done explicitly through a branch statement. The EH landing pad is added as a successor to the throwing BB. Because of that however, the branch folding pass could mistakenly think that it could merge the throwing BB with another BB. This isn't safe to do. <rdar://problem/10334833> llvm-svn: 142920
-
Nick Lewycky authored
llvm-svn: 142912
-
Eric Christopher authored
llvm-svn: 142892
-
Bill Wendling authored
In SjLj EH, the jump to the landing pad is not done explicitly through a branch statement. The EH landing pad is added as a successor to the throwing BB. Because of that however, the branch folding pass could mistakenly think that it could merge the throwing BB with another BB. This isn't safe to do. <rdar://problem/10334833> llvm-svn: 142891
-
Bill Wendling authored
table. A hidden variable could potentially end up in both lists. <rdar://problem/10336715> llvm-svn: 142869
-
- Oct 24, 2011
-
-
Douglas Gregor authored
llvm-svn: 142822
-
Douglas Gregor authored
llvm-svn: 142821
-
Dan Gohman authored
physreg dependencies, and upcoming codegen changes will require proper physreg dependence handling. llvm-svn: 142816
-
Dan Gohman authored
llvm-svn: 142815
-
Dan Gohman authored
use of Sched::ILP instead, as Sched::Latency is going away. llvm-svn: 142813
-
Dan Gohman authored
is going away. llvm-svn: 142810
-
Bill Wendling authored
llvm-svn: 142800
-
Chandler Carruth authored
used it. Fixes an unused variable warning from GCC on release builds. llvm-svn: 142799
-
- Oct 23, 2011
-
-
Chandler Carruth authored
to get important constant branch probabilities and use them for finding the best branch out of a set of possibilities. llvm-svn: 142762
-
Chandler Carruth authored
llvm-svn: 142761
-
Chandler Carruth authored
discussions with Andy. Fundamentally, the previous algorithm is both counter productive on several fronts and prioritizing things which aren't necessarily the most important: static branch prediction. The new algorithm uses the existing loop CFG structure information to walk through the CFG itself to layout blocks. It coalesces adjacent blocks within the loop where the CFG allows based on the most likely path taken. Finally, it topologically orders the block chains that have been formed. This allows it to choose a (mostly) topologically valid ordering which still priorizes fallthrough within the structural constraints. As a final twist in the algorithm, it does violate the CFG when it discovers a "hot" edge, that is an edge that is more than 4x hotter than the competing edges in the CFG. These are forcibly merged into a fallthrough chain. Future transformations that need te be added are rotation of loop exit conditions to be fallthrough, and better isolation of cold block chains. I'm also planning on adding statistics to model how well the algorithm does at laying out blocks based on the probabilities it receives. The old tests mostly still pass, and I have some new tests to add, but the nested loops are still behaving very strangely. This almost seems like working-as-intended as it rotated the exit branch to be fallthrough, but I'm not convinced this is actually the best layout. It is well supported by the probabilities for loops we currently get, but those are pretty broken for nested loops, so this may change later. llvm-svn: 142743
-
- Oct 22, 2011
-
-
Bill Wendling authored
The assumption in the back-end is that PHIs are not allowed at the start of the landing pad block for SjLj exceptions. <rdar://problem/10313708> llvm-svn: 142689
-
- Oct 21, 2011
-
-
Nadav Rotem authored
ZExtPromotedInteger and SExtPromotedInteger based on the operation we legalize. SetCC return type needs to be legalized via PromoteTargetBoolean. llvm-svn: 142660
-
Nadav Rotem authored
2. Fix a typo in CONCAT_VECTORS which exposed the bug in #1. llvm-svn: 142648
-
Chandler Carruth authored
it's a bit more plausible to use this instead of CodePlacementOpt. The code for this was shamelessly stolen from CodePlacementOpt, and then trimmed down a bit. There doesn't seem to be much utility in returning true/false from this pass as we may or may not have rewritten all of the blocks. Also, the statistic of counting how many loops were aligned doesn't seem terribly important so I removed it. If folks would like it to be included, I'm happy to add it back. This was probably the most egregious of the missing features, and now I'm going to start gathering some performance numbers and looking at specific loop structures that have different layout between the two. Test is updated to include both basic loop alignment and nested loop alignment. llvm-svn: 142645
-
Chandler Carruth authored
block frequency analyses. This differs substantially from the existing block-placement pass in LLVM: 1) It operates on the Machine-IR in the CodeGen layer. This exposes much more (and more precise) information and opportunities. Also, the results are more stable due to fewer transforms ocurring after the pass runs. 2) It uses the generalized probability and frequency analyses. These can model static heuristics, code annotation derived heuristics as well as eventual profile loading. By basing the optimization on the analysis interface it can work from any (or a combination) of these inputs. 3) It uses a more aggressive algorithm, both building chains from tho bottom up to maximize benefit, and using an SCC-based walk to layout chains of blocks in a profitable ordering without O(N^2) iterations which the old pass involves. The pass is currently gated behind a flag, and not enabled by default because it still needs to grow some important features. Most notably, it needs to support loop aligning and careful layout of loop structures much as done by hand currently in CodePlacementOpt. Once it supports these, and has sufficient testing and quality tuning, it should replace both of these passes. Thanks to Nick Lewycky and Richard Smith for help authoring & debugging this, and to Jakob, Andy, Eric, Jim, and probably a few others I'm forgetting for reviewing and answering all my questions. Writing a backend pass is *sooo* much better now than it used to be. =D llvm-svn: 142641
-
Chandler Carruth authored
Clang. llvm-svn: 142631
-
- Oct 20, 2011
-
-
Dan Gohman authored
because they don't support physical register dependencies. llvm-svn: 142620
-
Chad Rosier authored
causing one of the unit tests to infinitely loop, which resulted in the buildbots stalling. llvm-svn: 142604
-
Devang Patel authored
llvm-svn: 142593
-
Devang Patel authored
llvm-svn: 142592
-
Nadav Rotem authored
llvm-svn: 142579
-
- Oct 19, 2011
-
-
Nadav Rotem authored
When checking the availability of instructions using the TLI, a 'promoted' instruction IS available. It means that the value is bitcasted to another type for which there is an operation. The correct check for the availablity of an instruction is to check if it should be expanded. llvm-svn: 142542
-
Nadav Rotem authored
llvm-svn: 142488
-
Nick Lewycky authored
llvm-svn: 142436
-
Nick Lewycky authored
llvm-svn: 142435
-
Nadav Rotem authored
llvm-svn: 142434
-
- Oct 18, 2011
-
-
Bob Wilson authored
svn r139159 caused SelectionDAG::getConstant() to promote BUILD_VECTOR operands with illegal types, even before type legalization. For this testcase, that led to one BUILD_VECTOR with i16 operands and another with promoted i32 operands, which triggered the assertion. llvm-svn: 142370
-
Duncan Sands authored
build with gcc-4.6. llvm-svn: 142350
-
Hal Finkel authored
llvm-svn: 142334
-
Nick Lewycky authored
llvm-svn: 142307
-
Nick Lewycky authored
.file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. llvm-svn: 142300
-
Bill Wendling authored
Use the custom inserter for the ARM setjmp intrinsics. Instead of creating the SjLj dispatch table in IR, where it frequently violates serveral assumptions -- in particular assumptions made by the landingpad instruction about what can branch to a landing pad and what cannot. Performing this in the back-end allows us to violate these assumptions without the IR getting angry at us. It also allows us to perform a small optimization. We can shove the address of the dispatch's basic block into the function context and not have to add code around the setjmp to check for the return value and jump to the dispatch. Neat, huh? <rdar://problem/10116753> llvm-svn: 142294
-
- Oct 17, 2011
-
-
Cameron Zwarich authored
to match its final use. With this change, all of test-suite compiles for Thumb2 with -verify-coalescing enabled. llvm-svn: 142287
-