Skip to content
  1. Nov 13, 2011
    • Chandler Carruth's avatar
      Enhance the assertion mechanisms in place to make it easier to catch · 8e1d9067
      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
      8e1d9067
    • Jakob Stoklund Olesen's avatar
      Rename SlotIndexes to match how they are used. · 90b5e565
      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
      90b5e565
    • Chandler Carruth's avatar
      Teach MBP to force-merge layout successors for blocks with unanalyzable · 0bb42c0f
      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
      0bb42c0f
    • Chandler Carruth's avatar
      Hoist another gross nested loop into a helper method. · f9213fe7
      Chandler Carruth authored
      llvm-svn: 144498
      f9213fe7
    • Chandler Carruth's avatar
      Add a missing doxygen comment for a helper method. · eb4ec3ae
      Chandler Carruth authored
      llvm-svn: 144497
      eb4ec3ae
    • Chandler Carruth's avatar
      Hoist a nested loop into its own method. · b336172f
      Chandler Carruth authored
      llvm-svn: 144496
      b336172f
    • Chandler Carruth's avatar
      Rewrite #3 of machine block placement. This is based somewhat on the · 8d150789
      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
      8d150789
    • NAKAMURA Takumi's avatar
      Prune more RALinScan. RALinScan was also here! · 4784df71
      NAKAMURA Takumi authored
      llvm-svn: 144487
      4784df71
    • Jakob Stoklund Olesen's avatar
      More dead code elimination in VirtRegMap. · c601d8c7
      Jakob Stoklund Olesen authored
      This thing is looking a lot like a virtual register map now.
      
      llvm-svn: 144486
      c601d8c7
    • Jakob Stoklund Olesen's avatar
      Stop tracking spill slot uses in VirtRegMap. · 28df7ef8
      Jakob Stoklund Olesen authored
      Nobody cared, StackSlotColoring scans the instructions to find used stack
      slots.
      
      llvm-svn: 144485
      28df7ef8
    • Jakob Stoklund Olesen's avatar
      Remove dead code and data from VirtRegMap. · 92255f27
      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
      92255f27
    • Jakob Stoklund Olesen's avatar
      Stop tracking unused registers in VirtRegMap. · 38b3f312
      Jakob Stoklund Olesen authored
      The information was only used by the register allocator in
      StackSlotColoring.
      
      llvm-svn: 144482
      38b3f312
    • Jakob Stoklund Olesen's avatar
      Remove the -color-ss-with-regs option. · 6ddb767f
      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
      6ddb767f
    • Jakob Stoklund Olesen's avatar
      Delete VirtRegRewriter. · 5343da64
      Jakob Stoklund Olesen authored
      And there was much rejoicing.
      
      llvm-svn: 144480
      5343da64
    • Jakob Stoklund Olesen's avatar
      Switch PBQP to VRM's trivial rewriter. · 03f73ab7
      Jakob Stoklund Olesen authored
      The very complicated VirtRegRewriter is going away.
      
      llvm-svn: 144479
      03f73ab7
    • Jakob Stoklund Olesen's avatar
      Delete the old spilling framework from LiveIntervalAnalysis. · f61a6fe2
      Jakob Stoklund Olesen authored
      This is dead code, all register allocators use InlineSpiller.
      
      llvm-svn: 144478
      f61a6fe2
    • Jakob Stoklund Olesen's avatar
      Delete the 'standard' spiller with used the old spilling framework. · 7ef502f6
      Jakob Stoklund Olesen authored
      The current register allocators all use the inline spiller.
      
      llvm-svn: 144477
      7ef502f6
    • Jakob Stoklund Olesen's avatar
      Switch PBQP to the modern InlineSpiller framework. · 11bb63a7
      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
      11bb63a7
  2. Nov 12, 2011
  3. Nov 11, 2011
  4. Nov 10, 2011
  5. Nov 09, 2011
Loading