Skip to content
  1. 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
  2. Oct 10, 2011
    • Jakob Stoklund Olesen's avatar
      Give targets a chance to expand even standard pseudos. · add0c43e
      Jakob Stoklund Olesen authored
      Allow targets to expand COPY and other standard pseudo-instructions
      before they are expanded with copyPhysReg().
      
      This allows the target to examine the COPY instruction for extra
      operands indicating it can be widened to a preferable super-register
      copy.  See the ARM -widen-vmovs option.
      
      llvm-svn: 141578
      add0c43e
  3. Sep 25, 2011
    • Jakob Stoklund Olesen's avatar
      Add target hook for pseudo instruction expansion. · df977fed
      Jakob Stoklund Olesen authored
      Many targets use pseudo instructions to help register allocation.  Like
      the COPY instruction, these pseudos can be expanded after register
      allocation.  The early expansion can make life easier for PEI and the
      post-ra scheduler.
      
      This patch adds a hook that is called for all remaining pseudo
      instructions from the ExpandPostRAPseudos pass.
      
      llvm-svn: 140472
      df977fed
    • Jakob Stoklund Olesen's avatar
      Clean up code after renaming LowerSubregs -> ExpandPostRAPseudos. · fd719d18
      Jakob Stoklund Olesen authored
      No functional change intended.
      
      llvm-svn: 140470
      fd719d18
    • Jakob Stoklund Olesen's avatar
      Rename LowerSubregs to ExpandPostRAPseudos. · f152df1e
      Jakob Stoklund Olesen authored
      I'll fix the file contents in the next commit.
      
      This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I
      am going to add a hook so targets can expand more pseudo-instructions
      after register allocation.
      
      Many targets have pseudo-instructions that assist the register
      allocator.  They can be expanded after register allocation, before PEI
      and PostRA scheduling.
      
      llvm-svn: 140469
      f152df1e
  4. Feb 25, 2011
  5. Aug 16, 2010
  6. Aug 06, 2010
  7. Jul 08, 2010
  8. Jul 07, 2010
  9. Jul 03, 2010
  10. Jun 29, 2010
  11. Jun 23, 2010
  12. May 06, 2010
  13. Feb 09, 2010
  14. Jan 05, 2010
    • David Greene's avatar
      · c4878b13
      David Greene authored
      Change errs() to dbgs().
      
      llvm-svn: 92535
      c4878b13
  15. Dec 03, 2009
  16. Oct 25, 2009
  17. Oct 24, 2009
  18. Sep 28, 2009
  19. Sep 22, 2009
    • Evan Cheng's avatar
      Minor bug fix. LowerSubregs should translate · 8c500100
      Evan Cheng authored
      %S0<def> = EXTRACT_SUBREG %Q0<kill>, 1
      to
      %S0<def> = IMPLICIT_DEF %Q0<imp-use,kill>
      
      Implicit_def does not *read* any register so the operand should be marked "implicit". The missing "implicit" marker on the operand is wrong, but it doesn't actually break anything.
      
      llvm-svn: 82503
      8c500100
  20. Aug 22, 2009
  21. Aug 08, 2009
    • Jakob Stoklund Olesen's avatar
      Remove RegisterScavenger::isSuperRegUsed(). This completely reverses the mistaken commit r77904. · 8e96c6ab
      Jakob Stoklund Olesen authored
      Now there is no special treatment of instructions that redefine part of a
      super-register. Instead, the super-register is marked with <imp-use,kill> and
      <imp-def>. For instance, from LowerSubregs on ARM:
      
      subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
      subreg: %D2<def> = FCPYD %D1<kill>, 14, %reg0, %Q1<imp-def>
      
      subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6
      subreg: %D3<def> = FCPYD %D0<kill>, 14, %reg0, %Q1<imp-use,kill>, %Q1<imp-def>
      llvm-svn: 78466
      8e96c6ab
  22. Aug 05, 2009
  23. Aug 04, 2009
    • 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
  24. Aug 03, 2009
    • Jakob Stoklund Olesen's avatar
      Fix Bug 4657: register scavenger asserts with subreg lowering · 5d8ace09
      Jakob Stoklund Olesen authored
      When LowerSubregsInstructionPass::LowerInsert eliminates an INSERT_SUBREG
      instriction because it is an identity copy, make sure that the same registers
      are alive before and after the elimination.
      
      When the super-register is marked <undef> this requires inserting an
      IMPLICIT_DEF instruction to make sure the super register is live.
      
      Fix a related bug where a kill flag on the inserted sub-register was not transferred properly.
      
      Finally, clear the undef flag in MachineInstr::addRegisterKilled. Undef implies dead and kill implies live, so they cant both be valid.
      
      llvm-svn: 77989
      5d8ace09
  25. Aug 01, 2009
  26. Jul 25, 2009
    • Daniel Dunbar's avatar
      More migration to raw_ostream, the water has dried up around the iostream hole. · 0dd5e1ed
      Daniel Dunbar authored
       - Some clients which used DOUT have moved to DEBUG. We are deprecating the
         "magic" DOUT behavior which avoided calling printing functions when the
         statement was disabled. In addition to being unnecessary magic, it had the
         downside of leaving code in -Asserts builds, and of hiding potentially
         unnecessary computations.
      
      llvm-svn: 77019
      0dd5e1ed
  27. Jul 16, 2009
  28. Mar 23, 2009
    • Evan Cheng's avatar
      Do not fold away subreg_to_reg if the source register has a sub-register... · 47c9750f
      Evan Cheng authored
      Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
      %RAX<def> = ...
      %RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
      The first def is defining RAX, not EAX so the top bits were not zero-extended.
      
      llvm-svn: 67511
      47c9750f
Loading