Skip to content
  1. Nov 28, 2012
    • Jakob Stoklund Olesen's avatar
      Make the LiveRegMatrix analysis available to targets. · 26c9d70d
      Jakob Stoklund Olesen authored
      No functional change, just moved header files.
      
      Targets can inject custom passes between register allocation and
      rewriting. This makes it possible to tweak the register allocation
      before rewriting, using the full global interference checking available
      from LiveRegMatrix.
      
      llvm-svn: 168806
      26c9d70d
  2. Oct 17, 2012
    • Jakob Stoklund Olesen's avatar
      Avoid rematerializing a redef immediately after the old def. · 4df59a9f
      Jakob Stoklund Olesen authored
      PR14098 contains an example where we would rematerialize a MOV8ri
      immediately after the original instruction:
      
        %vreg7:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7
        %vreg22:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7
      
      Besides being pointless, it is also wrong since the original instruction
      only redefines part of the register, and the value read by the new
      instruction is wrong.
      
      The problem was the LiveRangeEdit::allUsesAvailableAt() didn't
      special-case OrigIdx == UseIdx and found the wrong SSA value.
      
      llvm-svn: 166068
      4df59a9f
  3. Oct 16, 2012
  4. Sep 27, 2012
  5. Aug 02, 2012
    • Jakob Stoklund Olesen's avatar
      Avoid creating dangling physreg live ranges during DCE. · 374071dd
      Jakob Stoklund Olesen authored
      LiveRangeEdit::eliminateDeadDefs() can delete a dead instruction that
      reads unreserved physregs. This would leave the corresponding regunit
      live interval dangling because we don't have shrinkToUses() for physical
      registers.
      
      Fix this problem by turning the instruction into a KILL instead of
      deleting it. This happens in a landing pad in
      test/CodeGen/X86/2012-05-19-CoalescerCrash.ll:
      
        %vreg27<def,dead> = COPY %EDX<kill>; GR32:%vreg27
      
      becomes:
      
        KILL %EDX<kill>
      
      An upcoming fix to the machine verifier will catch problems like this by
      verifying regunit live intervals.
      
      This fixes PR13498. I am not including the test case from the PR since
      we already have one exposing the problem once the verifier is fixed.
      
      llvm-svn: 161182
      374071dd
  6. Jul 20, 2012
  7. Jun 22, 2012
  8. May 22, 2012
  9. May 20, 2012
    • Jakob Stoklund Olesen's avatar
      Fix 12892. · a34a69ce
      Jakob Stoklund Olesen authored
      Dead code elimination during coalescing could cause a virtual register
      to be split into connected components. The following rewriting would be
      confused about the already joined copies present in the code, but
      without a corresponding value number in the live range.
      
      Erase all joined copies instantly when joining intervals such that the
      MI and LiveInterval representations are always in sync.
      
      llvm-svn: 157135
      a34a69ce
  10. May 19, 2012
  11. Apr 04, 2012
  12. Apr 03, 2012
  13. Feb 28, 2012
  14. Feb 17, 2012
  15. Dec 20, 2011
  16. Dec 12, 2011
  17. Dec 07, 2011
    • Evan Cheng's avatar
      Add bundle aware API for querying instruction properties and switch the code · 7f8e563a
      Evan Cheng authored
      generator to it. For non-bundle instructions, these behave exactly the same
      as the MC layer API.
      
      For properties like mayLoad / mayStore, look into the bundle and if any of the
      bundled instructions has the property it would return true.
      For properties like isPredicable, only return true if *all* of the bundled
      instructions have the property.
      For properties like canFoldAsLoad, isCompare, conservatively return false for
      bundles.
      
      llvm-svn: 146026
      7f8e563a
  18. Nov 13, 2011
    • 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
  19. Aug 09, 2011
  20. Jul 05, 2011
    • Jakob Stoklund Olesen's avatar
      Fix PR10277. · bbad3bce
      Jakob Stoklund Olesen authored
      Remat during spilling triggers dead code elimination. If a phi-def
      becomes unused, that may also cause live ranges to split into separate
      connected components.
      
      This type of splitting is different from normal live range splitting. In
      particular, there may not be a common original interval.
      
      When the split range is its own original, make sure that the new
      siblings are also their own originals. The range being split cannot be
      used as an original since it doesn't cover the new siblings.
      
      llvm-svn: 134413
      bbad3bce
  21. May 05, 2011
  22. May 02, 2011
    • Jakob Stoklund Olesen's avatar
      Minimize the slot indexes spanned by register ranges created when splitting. · 7d406793
      Jakob Stoklund Olesen authored
      When an interfering live range ends at a dead slot index between two
      instructions, make sure that the inserted copy instruction gets a slot index
      after the dead ones. This makes it possible to avoid the interference.
      
      Ideally, there shouldn't be interference ending at a deleted instruction, but
      physical register coalescing can sometimes do that to sub-registers.
      
      This fixes PR9823.
      
      llvm-svn: 130687
      7d406793
  23. Apr 21, 2011
  24. Apr 15, 2011
  25. Apr 11, 2011
  26. Apr 05, 2011
  27. Mar 30, 2011
    • Jakob Stoklund Olesen's avatar
      Treat clones the same as their origin. · dd9a2ece
      Jakob Stoklund Olesen authored
      When DCE clones a live range because it separates into connected components,
      make sure that the clones enter the same register allocator stage as the
      register they were cloned from.
      
      For instance, clones may be split even when they where created during spilling.
      Other registers created during spilling are not candidates for splitting or even
      (re-)spilling.
      
      llvm-svn: 128524
      dd9a2ece
  28. Mar 29, 2011
  29. Mar 23, 2011
  30. Mar 17, 2011
  31. Mar 16, 2011
  32. Mar 13, 2011
  33. Mar 09, 2011
Loading