- Nov 13, 2011
-
-
Jakob Stoklund Olesen authored
This makes no difference for normal defs, but early clobber dead defs now look like: [Slot_EarlyClobber; Slot_Dead) instead of: [Slot_EarlyClobber; Slot_Register). Live ranges for normal dead defs look like: [Slot_Register; Slot_Dead) as before. llvm-svn: 144512
-
Jakob Stoklund Olesen authored
llvm-svn: 144507
-
Chandler Carruth authored
when we fail to place all the blocks of a loop. Currently this is happening for unnatural loops, and this logic helps more immediately point to the problem. llvm-svn: 144504
-
Jakob Stoklund Olesen authored
The old naming scheme (load/use/def/store) can be traced back to an old linear scan article, but the names don't match how slots are actually used. The load and store slots are not needed after the deferred spill code insertion framework was deleted. The use and def slots don't make any sense because we are using half-open intervals as is customary in C code, but the names suggest closed intervals. In reality, these slots were used to distinguish early-clobber defs from normal defs. The new naming scheme also has 4 slots, but the names match how the slots are really used. This is a purely mechanical renaming, but some of the code makes a lot more sense now. llvm-svn: 144503
-
Chandler Carruth authored
branches that also may involve fallthrough. In the case of blocks with no fallthrough, we can still re-order the blocks profitably. For example instruction decoding will in some cases continue past an indirect jump, making laying out its most likely successor there profitable. Note, no test case. I don't know how to write a test case that exercises this logic, but it matches the described desired semantics in discussions with Jakob and others. If anyone has a nice example of IR that will trigger this, that would be lovely. Also note, there are still assertion failures in real world code with this. I'm digging into those next, now that I know this isn't the cause. llvm-svn: 144499
-
Chandler Carruth authored
llvm-svn: 144498
-
Chandler Carruth authored
llvm-svn: 144497
-
Chandler Carruth authored
llvm-svn: 144496
-
Chandler Carruth authored
second algorithm, but only loosely. It is more heavily based on the last discussion I had with Andy. It continues to walk from the inner-most loop outward, but there is a key difference. With this algorithm we ensure that as we visit each loop, the entire loop is merged into a single chain. At the end, the entire function is treated as a "loop", and merged into a single chain. This chain forms the desired sequence of blocks within the function. Switching to a single algorithm removes my biggest problem with the previous approaches -- they had different behavior depending on which system triggered the layout. Now there is exactly one algorithm and one basis for the decision making. The other key difference is how the chain is formed. This is based heavily on the idea Andy mentioned of keeping a worklist of blocks that are viable layout successors based on the CFG. Having this set allows us to consistently select the best layout successor for each block. It is expensive though. The code here remains very rough. There is a lot that needs to be done to clean up the code, and to make the runtime cost of this pass much lower. Very much WIP, but this was a giant chunk of code and I'd rather folks see it sooner than later. Everything remains behind a flag of course. I've added a couple of tests to exercise the issues that this iteration was motivated by: loop structure preservation. I've also fixed one test that was exhibiting the broken behavior of the previous version. llvm-svn: 144495
-
NAKAMURA Takumi authored
llvm-svn: 144487
-
Jakob Stoklund Olesen authored
This thing is looking a lot like a virtual register map now. llvm-svn: 144486
-
Jakob Stoklund Olesen authored
Nobody cared, StackSlotColoring scans the instructions to find used stack slots. llvm-svn: 144485
-
Jakob Stoklund Olesen authored
Most of this stuff was supporting the old deferred spill code insertion mechanism. Modern spillers just edit machine code in place. llvm-svn: 144484
-
Jakob Stoklund Olesen authored
The information was only used by the register allocator in StackSlotColoring. llvm-svn: 144482
-
Jakob Stoklund Olesen authored
It was off by default. The new register allocators don't have the problems that made it necessary to reallocate registers during stack slot coloring. llvm-svn: 144481
-
Jakob Stoklund Olesen authored
And there was much rejoicing. llvm-svn: 144480
-
Jakob Stoklund Olesen authored
The very complicated VirtRegRewriter is going away. llvm-svn: 144479
-
Jakob Stoklund Olesen authored
This is dead code, all register allocators use InlineSpiller. llvm-svn: 144478
-
Jakob Stoklund Olesen authored
The current register allocators all use the inline spiller. llvm-svn: 144477
-
Jakob Stoklund Olesen authored
It is worth noting that the old spiller would split live ranges around basic blocks. The new spiller doesn't do that. PBQP should do its own live range splitting with SplitEditor::splitSingleBlock() if desired. See RAGreedy::tryBlockSplit(). llvm-svn: 144476
-
- Nov 12, 2011
-
-
Jakob Stoklund Olesen authored
RegAllocGreedy has been the default for six months now. Deleting RegAllocLinearScan makes it possible to also delete VirtRegRewriter and clean up the spiller code. llvm-svn: 144475
-
Rafael Espindola authored
instance and a concrete inlined instance are the use of DW_TAG_subprogram instead of DW_TAG_inlined_subroutine and the who owns the tree. We were also omitting DW_AT_inline from the abstract roots. To fix this, make sure we mark abstract instance roots with DW_AT_inline even when we have only out-of-line instances referring to them with DW_AT_abstract_origin. FileCheck is not a very good tool for tests like this, maybe we should add a -verify mode to llvm-dwarfdump. llvm-svn: 144441
-
Eli Friedman authored
llvm-svn: 144438
-
Eli Friedman authored
Some cleanup and bulletproofing for node replacement in LegalizeDAG. To maintain LegalizeDAG invariants, whenever we a node is replaced, we must attempt to delete it, and if it still has uses after it is replaced (which can happen in rare cases due to CSE), we must revisit it. llvm-svn: 144432
-
- Nov 11, 2011
-
-
Nicolas Geoffray authored
Add a custom safepoint method, in order for language implementers to decide which machine instruction gets to be a safepoint. llvm-svn: 144399
-
Eric Christopher authored
llvm-svn: 144360
-
Eric Christopher authored
addr DIE when adding to the dwarf accelerator tables. llvm-svn: 144354
-
- Nov 10, 2011
-
-
Rafael Espindola authored
it first. This is a more general fix to pr11300. llvm-svn: 144324
-
Eric Christopher authored
as well. llvm-svn: 144319
-
Eric Christopher authored
forward decls and have names into the dwarf accelerator types table. llvm-svn: 144306
-
Eric Christopher authored
multiple dies per function and support C++ basenames. llvm-svn: 144304
-
Evan Cheng authored
instruction lower optimization" in the pre-RA scheduler. The optimization, rather the hack, was done before MI use-list was available. Now we should be able to implement it in a better way, perhaps in the two-address pass until a MI scheduler is available. Now that the scheduler has to backtrack to handle call sequences. Adding artificial scheduling constraints is just not safe. Furthermore, the hack is not taking all the other scheduling decisions into consideration so it's just as likely to pessimize code. So I view disabling this optimization goodness regardless of PR11314. llvm-svn: 144267
-
Jakob Stoklund Olesen authored
The TII.foldMemoryOperand hook preserves implicit operands from the original instruction. This is not what we want when those implicit operands refer to the register being spilled. Implicit operands referring to other registers are preserved. This fixes PR11347. llvm-svn: 144247
-
- Nov 09, 2011
-
-
Eli Friedman authored
llvm-svn: 144216
-
Benjamin Kramer authored
llvm-svn: 144194
-
Duncan Sands authored
dragonegg self-host buildbot will recover (it is complaining about object files differing between different build stages). Original commit message: Add a hack to the scheduler to disable pseudo-two-address dependencies in basic blocks containing calls. This works around a problem in which these artificial dependencies can get tied up in calling seqeunce scheduling in a way that makes the graph unschedulable with the current approach of using artificial physical register dependencies for calling sequences. This fixes PR11314. llvm-svn: 144188
-
Benjamin Kramer authored
llvm-svn: 144184
-
Devang Patel authored
llvm-svn: 144172
-
Eric Christopher authored
llvm-svn: 144169
-
Jakob Stoklund Olesen authored
During the initial RPO traversal of the basic blocks, remember the ones that are incomplete because of back-edges from predecessors that haven't been visited yet. After the initial RPO, revisit all those loop headers so the incoming DomainValues on the back-edges can be properly collapsed. This will properly fix execution domains on software pipelined code, like the included test case. llvm-svn: 144151
-