Skip to content
  1. Feb 03, 2012
  2. Jan 26, 2012
  3. Jan 16, 2012
    • Jakob Stoklund Olesen's avatar
      Add a new kind of MachineOperand: MO_RegisterMask. · 374ed322
      Jakob Stoklund Olesen authored
      Register masks will be used as a compact representation of large clobber
      lists.  Currently, an x86 call instruction has some 40 operands
      representing call-clobbered registers.  That's more than 1kB of useless
      operands per call site.
      
      A register mask operand references a bit mask of call-preserved
      registers, everything else is clobbered.  The bit mask will typically
      come from TargetRegisterInfo::getCallPreservedMask().
      
      By abandoning ImplicitDefs for call-clobbered registers, it also becomes
      possible to share call instruction descriptions between calling
      conventions, and we can get rid of the WINCALL* instructions.
      
      This patch introduces the new operand kind.  Future patches will add
      RegMask support to target-independent passes before finally the fixed
      clobber lists can be removed from call instruction descriptions.
      
      llvm-svn: 148250
      374ed322
  4. Jan 10, 2012
  5. Dec 14, 2011
    • Evan Cheng's avatar
      - Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function · 7fae11b2
      Evan Cheng authored
        to finalize MI bundles (i.e. add BUNDLE instruction and computing register def
        and use lists of the BUNDLE instruction) and a pass to unpack bundles.
      - Teach more of MachineBasic and MachineInstr methods to be bundle aware.
      - Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to
        prevent IT blocks from being broken apart.
      
      llvm-svn: 146542
      7fae11b2
  6. Dec 08, 2011
  7. 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
    • Jakob Stoklund Olesen's avatar
      Add missing check. · 6ad68485
      Jakob Stoklund Olesen authored
      llvm-svn: 146004
      6ad68485
    • Jakob Stoklund Olesen's avatar
      Add MachineOperand IsInternalRead flag. · b0d91abe
      Jakob Stoklund Olesen authored
      This flag is used when bundling machine instructions.  It indicates
      whether the operand reads a value defined inside or outside its bundle.
      
      llvm-svn: 145997
      b0d91abe
  8. Dec 06, 2011
    • Evan Cheng's avatar
      First chunk of MachineInstr bundle support. · 2a81dd4a
      Evan Cheng authored
      1. Added opcode BUNDLE
      2. Taught MachineInstr class to deal with bundled MIs
      3. Changed MachineBasicBlock iterator to skip over bundled MIs; added an iterator to walk all the MIs
      4. Taught MachineBasicBlock methods about bundled MIs
      
      llvm-svn: 145975
      2a81dd4a
  9. Nov 08, 2011
  10. Nov 03, 2011
  11. Oct 13, 2011
  12. Sep 29, 2011
    • Jakob Stoklund Olesen's avatar
      Remove NumImplicitOps which is now unused. · 463b05a2
      Jakob Stoklund Olesen authored
      llvm-svn: 140767
      463b05a2
    • Jakob Stoklund Olesen's avatar
      Rewrite MachineInstr::addOperand() to avoid NumImplicitOps. · 2318d1e0
      Jakob Stoklund Olesen authored
      The function needs to scan the implicit operands anyway, so no
      performance is won by caching the number of implicit operands added to
      an instruction.
      
      This also fixes a bug when adding operands after an implicit operand has
      been added manually.  The NumImplicitOps count wasn't kept up to date.
      
      MachineInstr::addOperand() will now consistently place all explicit
      operands before all the implicit operands, regardless of the order they
      are added.  It is possible to change an MI opcode and add additional
      explicit operands.  They will be inserted before any existing implicit
      operands.
      
      The only exception is inline asm instructions where operands are never
      reordered.  This is because of a hack that marks explicit clobber regs
      on inline asm as <implicit-def> to please the fast register allocator.
      This hack can go away when InstrEmitter and FastIsel can add exact
      <dead> flags to physreg defs.
      
      llvm-svn: 140744
      2318d1e0
  13. Aug 30, 2011
  14. Aug 24, 2011
  15. Aug 19, 2011
    • Jakob Stoklund Olesen's avatar
      Don't treat a partial <def,undef> operand as a read. · 9eb77bf6
      Jakob Stoklund Olesen authored
      Normally, a partial register def is treated as reading the
      super-register unless it also defines the full register like this:
      
        %vreg110:sub_32bit<def> = COPY %vreg77:sub_32bit, %vreg110<imp-def>
      
      This patch also uses the <undef> flag on partial defs to recognize
      non-reading operands:
      
        %vreg110:sub_32bit<def,undef> = COPY %vreg77:sub_32bit
      
      This fixes a subtle bug in RegisterCoalescer where LIS->shrinkToUses
      would treat a coalesced copy as still reading the register, extending
      the live range artificially.
      
      My test case only works when I disable DCE so a dead copy is left for
      RegisterCoalescer, so I am not including it.
      
      <rdar://problem/9967101>
      
      llvm-svn: 138018
      9eb77bf6
  16. Aug 04, 2011
  17. Jul 07, 2011
    • Devang Patel's avatar
      If known DebugLocs do not match then two DBG_VALUE machine instructions are... · bf8cc60d
      Devang Patel authored
      If known DebugLocs do not match then two DBG_VALUE machine instructions are not identical. For example,
      
              DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:32:10 ]
              DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:31:10 ]
      
      These two MIs represent identical value, 3.31...,  for one variable, ds, but they are not identical because the represent two separate instances of inlined variable "ds". 
      
      llvm-svn: 134620
      bf8cc60d
  18. Jul 02, 2011
  19. Jun 28, 2011
  20. Jun 27, 2011
    • Jakob Stoklund Olesen's avatar
      Distinguish early clobber output operands from clobbered registers. · 537a302d
      Jakob Stoklund Olesen authored
      Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we
      now use two different asm operand kinds.
      
      The new Kind_Clobber is treated identically to the old
      Kind_RegDefEarlyClobber for now, but x87 floating point stack inline
      assembly does care about the difference.
      
      This will pop a register off the stack:
      
        asm("fstp %st" : : "t"(x) : "st");
      
      While this will pop the input and push an output:
      
        asm("fst %st" : "=&t"(r) : "t"(x));
      
      We need to know if ST0 was a clobber or an output operand, and we can't
      depend on <dead> flags for that.
      
      llvm-svn: 133902
      537a302d
    • Jakob Stoklund Olesen's avatar
      Decode and pretty print inline asm operand descriptors. · 6b356b18
      Jakob Stoklund Olesen authored
      The INLINEASM MachineInstrs have an immediate operand describing each
      original inline asm operand. Decode the bits in MachineInstr::print() so
      it is easier to read:
      
        INLINEASM <es:rorq $1,$0>, $0:[regdef], %vreg0<def>, %vreg1<def>, $1:[imm], 1, $2:[reguse] [tiedto:$0], %vreg2, %vreg3, $3:[regdef-ec], %EFLAGS<earlyclobber,imp-def>
      
      llvm-svn: 133901
      6b356b18
  21. Jun 24, 2011
  22. May 12, 2011
  23. May 08, 2011
    • Jakob Stoklund Olesen's avatar
      Remove an assertion to fix PR9872. · 89bd2ae5
      Jakob Stoklund Olesen authored
      It can happen that a live debug variable is the last use of a sub-register, and
      the register allocator will pick a larger register class for the virtual
      register.  If the allocated register doesn't support the sub-register index,
      just use %noreg for the debug variables instead of asserting.
      
      In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
      register. The register is split and one part is inflated to GR32 and assigned
      %ESI because there are no more normal uses of sub_8bit_hi.
      
      Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
      simply insert a %noreg instead, and the debug variable will be marked
      unavailable in that range.
      
      We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
      don't know if DWARF even supports that.
      
      llvm-svn: 131073
      89bd2ae5
  24. Apr 30, 2011
  25. Apr 05, 2011
  26. Mar 05, 2011
  27. Jan 10, 2011
Loading