Skip to content
  1. Jan 11, 2012
  2. Jan 07, 2012
  3. Jan 03, 2012
  4. 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
  5. Nov 14, 2011
  6. Nov 13, 2011
    • Jakob Stoklund Olesen's avatar
      Terminate all dead defs at the dead slot instead of the 'next' slot. · d8f2405e
      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
      d8f2405e
    • Jakob Stoklund Olesen's avatar
      Simplify early clobber slots a bit. · ce7cc08f
      Jakob Stoklund Olesen authored
      llvm-svn: 144507
      ce7cc08f
    • 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
    • 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
  7. Oct 05, 2011
    • Jakob Stoklund Olesen's avatar
      Add a FIXME. · ccdfbfb5
      Jakob Stoklund Olesen authored
      TwoAddressInstructionPass should annotate instructions with <undef>
      flags when it lower REG_SEQUENCE instructions.  LiveIntervals should not
      be in the business of modifying code (except for kill flags, perhaps).
      
      llvm-svn: 141187
      ccdfbfb5
  8. Oct 04, 2011
    • Jakob Stoklund Olesen's avatar
      Allow <undef> flags on def operands as well as uses. · 10f2de32
      Jakob Stoklund Olesen authored
      The <undef> flag says that a MachineOperand doesn't read its register,
      or doesn't depend on the previous value of its register.
      
      A full register def never depends on the previous register value.  A
      partial register def may depend on the previous value if it is intended
      to update part of a register.
      
      For example:
      
        %vreg10:dsub_0<def,undef> = COPY %vreg1
        %vreg10:dsub_1<def> = COPY %vreg2
      
      The first copy instruction defines the full %vreg10 register with the
      bits not covered by dsub_0 defined as <undef>.  It is not considered a
      read of %vreg10.
      
      The second copy modifies part of %vreg10 while preserving the rest.  It
      has an implicit read of %vreg10.
      
      This patch adds a MachineOperand::readsReg() method to determine if an
      operand reads its register.
      
      Previously, this was modelled by adding a full-register <imp-def>
      operand to the instruction.  This approach makes it possible to
      determine directly from a MachineOperand if it reads its register.  No
      scanning of MI operands is required.
      
      llvm-svn: 141124
      10f2de32
  9. Sep 15, 2011
    • Jakob Stoklund Olesen's avatar
      Speed up LiveIntervals::shrinkToUse with some caching. · b8b1d4c4
      Jakob Stoklund Olesen authored
      Blocks with multiple PHI successors only need to go on the worklist
      once.  Use a SmallPtrSet to track the live-out blocks that have already
      been handled.  This is a lot faster than the two live range check we
      would otherwise do.
      
      Also stop recomputing hasPHIKill flags.  Like RenumberValues(), it is
      conservatively correct to leave them in, and they are not used for
      anything important.
      
      llvm-svn: 139792
      b8b1d4c4
  10. Sep 13, 2011
  11. Apr 30, 2011
  12. Apr 15, 2011
  13. Apr 11, 2011
  14. Apr 07, 2011
  15. Apr 04, 2011
    • Jakob Stoklund Olesen's avatar
      Allow coalescing with reserved physregs in certain cases: · 2e853965
      Jakob Stoklund Olesen authored
      When a virtual register has a single value that is defined as a copy of a
      reserved register, permit that copy to be joined. These virtual register are
      usually copies of the stack pointer:
      
        %vreg75<def> = COPY %ESP; GR32:%vreg75
        MOV32mr %vreg75, 1, %noreg, 0, %noreg, %vreg74<kill>
        MOV32mi %vreg75, 1, %noreg, 8, %noreg, 0
        MOV32mi %vreg75<kill>, 1, %noreg, 4, %noreg, 0
        CALLpcrel32 ...
      
      Coalescing these virtual registers early decreases register pressure.
      Previously, they were coalesced by RALinScan::attemptTrivialCoalescing after
      register allocation was completed.
      
      The lower register pressure causes the mcinst-lowering-cmp0.ll test case to fail
      because it depends on linear scan spilling a particular register.
      
      I am deleting 2008-08-05-SpillerBug.ll because it is counting the number of
      instructions emitted, and its revision history shows the 'correct' count being
      edited many times.
      
      llvm-svn: 128845
      2e853965
  16. Mar 31, 2011
  17. Mar 18, 2011
  18. Mar 17, 2011
  19. Mar 16, 2011
  20. Mar 10, 2011
  21. Mar 08, 2011
  22. Mar 07, 2011
  23. Mar 03, 2011
  24. Mar 02, 2011
  25. Feb 15, 2011
    • Jakob Stoklund Olesen's avatar
      Move more fragments of spill weight calculation into CalcSpillWeights.h · 1dd377d8
      Jakob Stoklund Olesen authored
      Simplify the spill weight calculation a bit by bypassing
      getApproximateInstructionCount() and using LiveInterval::getSize() directly.
      This changes the computed spill weights, but only by a constant factor in each
      function. It should not affect how spill weights compare against each other, and
      so it shouldn't affect code generation.
      
      llvm-svn: 125530
      1dd377d8
  26. Feb 09, 2011
  27. Feb 08, 2011
  28. Feb 05, 2011
  29. Feb 04, 2011
    • Jakob Stoklund Olesen's avatar
      Add LiveIntervals::getLastSplitPoint(). · 096bd883
      Jakob Stoklund Olesen authored
      A live range cannot be split everywhere in a basic block. A split must go before
      the first terminator, and if the variable is live into a landing pad, the split
      must happen before the call that can throw.
      
      llvm-svn: 124894
      096bd883
  30. Jan 10, 2011
  31. Jan 09, 2011
  32. Nov 16, 2010
    • Jakob Stoklund Olesen's avatar
      Fix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses. · 9beef41f
      Jakob Stoklund Olesen authored
      Always spill the full representative register at any point where any subregister
      is live.
      
      This fixes PR8620 which caused the old logic to get confused and not spill
      anything at all.
      
      The fundamental problem here is that the coalescer is too aggressive about
      physical register coalescing. It sometimes makes it impossible to allocate
      registers without these emergency spills.
      
      llvm-svn: 119375
      9beef41f
    • Jakob Stoklund Olesen's avatar
      Fix PR8612 in the standard spiller, take two. · e2b88586
      Jakob Stoklund Olesen authored
      The live range of a register defined by an early clobber starts at the use slot,
      not the def slot.
      
      Except when it is an early clobber tied to a use operand. Then it starts at the
      def slot like a standard def.
      
      llvm-svn: 119305
      e2b88586
Loading