Skip to content
  1. Aug 08, 2009
  2. Aug 07, 2009
  3. Aug 06, 2009
  4. Aug 05, 2009
  5. Aug 04, 2009
    • Jakob Stoklund Olesen's avatar
      Clean up the handling of two-address operands in RegScavenger. · 0e0b5405
      Jakob Stoklund Olesen authored
      This fixes PR4528.
      
      llvm-svn: 78107
      0e0b5405
    • Jakob Stoklund Olesen's avatar
      Don't give implicit machine operands special treatment in the register scavenger. · 86cdcdc3
      Jakob Stoklund Olesen authored
      Imp-def is *not* allowed to redefine a live register.
      Imp-use is *not* allowed to use a dead register.
      
      llvm-svn: 78106
      86cdcdc3
    • Chris Lattner's avatar
      rip out SectionEndDirectiveSuffix support, only uses by · 16dc0cd8
      Chris Lattner authored
      the masm backend.  If anyone cares about masm in the future,
      we'll have semantic sections it can hang off of.
      
      llvm-svn: 78096
      16dc0cd8
    • Jakob Stoklund Olesen's avatar
      Don't tamper with <undef> operands in MachineInstr::addRegisterKilled. · f465f06a
      Jakob Stoklund Olesen authored
      For an undef operand, MO.getReg() is meaningless and we should not use it.
      Undef operands should be skipped entirely.
      
      llvm-svn: 78095
      f465f06a
    • Jakob Stoklund Olesen's avatar
      LowerSubregsInstructionPass::LowerExtract should not extend the live range of registers. · 6304369c
      Jakob Stoklund Olesen authored
      When LowerExtract eliminates an EXTRACT_SUBREG with a kill flag, it moves the
      kill flag to the place where the sub-register is killed. This can accidentally
      overlap with the use of a sibling sub-register, and we have trouble.
      
      In the test case we have this code:
      
      Live Ins: %R0 %R1 %R2
      	%R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
      	%R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
      	%R1L<def> = EXTRACT_SUBREG %R1<kill>, 1
      	%R0L<def> = EXTRACT_SUBREG %R0<kill>, 1
      	%R0H<def> = ADD16 %R2H<kill>, %R2L<kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>
      
      subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
      subreg: eliminated!
      subreg: killed here: %R0H<def> = ADD16 %R2H, %R2L, %R2<imp-use,kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>
      
      The kill flag on %R2 is moved to the last instruction, and the live range overlaps with the definition of %R2H:
      
      *** Bad machine code: Redefining a live physical register ***
      - function:    f
      - basic block:  0x18358c0 (#0)
      - instruction: %R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
      Register R2H was defined but already live.
      
      The fix is to replace EXTRACT_SUBREG with IMPLICIT_DEF instead of eliminating
      it completely:
      
      subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
      subreg: replace by: %R2L<def> = IMPLICIT_DEF %R2<kill>
      
      Note that these IMPLICIT_DEF instructions survive to the asm output. It is
      necessary to fix the stack-color-with-reg test case because of that.
      
      llvm-svn: 78093
      6304369c
    • Jakob Stoklund Olesen's avatar
      Enforce stricter rules in machine code verifier. · 3c2a1dea
      Jakob Stoklund Olesen authored
      Implicit operands no longer get a free pass: Imp-use requires a live register
      and imp-def requires a dead register.
      
      There is also no special rule allowing redefinition of a sub-register when the
      super-register is live. The super register must have imp-kill+imp-def operands
      instead.
      
      llvm-svn: 78090
      3c2a1dea
Loading