Skip to content
  1. Sep 05, 2012
  2. Sep 04, 2012
    • Jakob Stoklund Olesen's avatar
      Typo. · d92e2bc2
      Jakob Stoklund Olesen authored
      llvm-svn: 163154
      d92e2bc2
    • Jakob Stoklund Olesen's avatar
      Actually use the MachineOperand field for isRegTiedToDefOperand(). · 9fceda74
      Jakob Stoklund Olesen authored
      The MachineOperand::TiedTo field was maintained, but not used.
      
      This patch enables it in isRegTiedToDefOperand() and
      isRegTiedToUseOperand() which are the actual functions use by the
      register allocator.
      
      llvm-svn: 163153
      9fceda74
    • Jakob Stoklund Olesen's avatar
      Move tie checks into MachineVerifier::visitMachineOperand. · c7579cdd
      Jakob Stoklund Olesen authored
      llvm-svn: 163152
      c7579cdd
    • Jakob Stoklund Olesen's avatar
      Allow tied uses and defs in different orders. · 0a09da83
      Jakob Stoklund Olesen authored
      After much agonizing, use a full 4 bits of precious MachineOperand space
      to encode this. This uses existing padding, and doesn't grow
      MachineOperand beyond its current 32 bytes.
      
      This allows tied defs among the first 15 operands on a normal
      instruction, just like the current MCInstrDesc constraint encoding.
      Inline assembly needs to be able to tie more than the first 15 operands,
      and gets special treatment.
      
      Tied uses can appear beyond 15 operands, as long as they are tied to a
      def that's in range.
      
      llvm-svn: 163151
      0a09da83
    • Preston Gurd's avatar
      Generic Bypass Slow Div · cdf540d5
      Preston Gurd authored
      - CodeGenPrepare pass for identifying div/rem ops
      - Backend specifies the type mapping using addBypassSlowDivType
      - Enabled only for Intel Atom with O2 32-bit -> 8-bit
      - Replace IDIV with instructions which test its value and use DIVB if the value
      is positive and less than 256.
      - In the case when the quotient and remainder of a divide are used a DIV
      and a REM instruction will be present in the IR. In the non-Atom case
      they are both lowered to IDIVs and CSE removes the redundant IDIV instruction,
      using the quotient and remainder from the first IDIV. However,
      due to this optimization CSE is not able to eliminate redundant
      IDIV instructions because they are located in different basic blocks.
      This is overcome by calculating both the quotient (DIV) and remainder (REM)
      in each basic block that is inserted by the optimization and reusing the result
      values when a subsequent DIV or REM instruction uses the same operands.
      - Test cases check for the presents of the optimization when calculating
      either the quotient, remainder,  or both.
      
      Patch by Tyler Nowicki!
      
      llvm-svn: 163150
      cdf540d5
  3. Sep 03, 2012
  4. Sep 02, 2012
  5. Sep 01, 2012
  6. Aug 31, 2012
  7. Aug 30, 2012
    • Nadav Rotem's avatar
      · ea973bda
      Nadav Rotem authored
      Currently targets that do not support selects with scalar conditions and vector operands - scalarize the code. ARM is such a target
      because it does not support CMOV of vectors. To implement this efficientlyi, we broadcast the condition bit and use a sequence of NAND-OR
      to select between the two operands. This is the same sequence we use for targets that don't have vector BLENDs (like SSE2).
      
      rdar://12201387
      
      llvm-svn: 162926
      ea973bda
    • Jakob Stoklund Olesen's avatar
      Don't use MCInstrDesc flags for implicit operands. · 0eecbbeb
      Jakob Stoklund Olesen authored
      When a MachineInstr is constructed, its implicit operands are added
      first, then the explicit operands are inserted before the implicits.
      
      MCInstrDesc has oprand flags like early clobber and operand ties that
      apply to the explicit operands.
      
      Don't look at those flags when the implicit operands are first added in
      the explicit operands's positions.
      
      llvm-svn: 162910
      0eecbbeb
    • Craig Topper's avatar
      Add FMA to switch statement in VectorLegalizer::LegalizeOp so that it can be... · 2da13f9e
      Craig Topper authored
      Add FMA to switch statement in VectorLegalizer::LegalizeOp so that it can be expanded when it isn't legal.
      
      llvm-svn: 162894
      2da13f9e
    • Craig Topper's avatar
      Add support for FMA to WidenVectorResult. · c8f5d77e
      Craig Topper authored
      llvm-svn: 162893
      c8f5d77e
    • Jakob Stoklund Olesen's avatar
      Verify the order of tied operands in inline asm. · ffba07b9
      Jakob Stoklund Olesen authored
      When there are multiple tied use-def pairs on an inline asm instruction,
      the tied uses must appear in the same order as the defs.
      
      It is possible to write an LLVM IR inline asm instruction that breaks
      this constraint, but there is no reason for a front end to emit the
      operands out of order.
      
      The gnu inline asm syntax specifies tied operands as a single read/write
      constraint "+r", so ouf of order operands are not possible.
      
      llvm-svn: 162878
      ffba07b9
    • Jakob Stoklund Olesen's avatar
      Set the isTied flags when building INLINEASM MachineInstrs. · b2bef482
      Jakob Stoklund Olesen authored
      For normal instructions, isTied() is set automatically by addOperand(),
      based on MCInstrDesc, but inline asm has tied operands outside the
      descriptor.
      
      llvm-svn: 162869
      b2bef482
  8. Aug 29, 2012
  9. Aug 28, 2012
    • Jakob Stoklund Olesen's avatar
      Add a MachineOperand::isTied() flag. · e56c60c5
      Jakob Stoklund Olesen authored
      While in SSA form, a MachineInstr can have pairs of tied defs and uses.
      The tied operands are used to represent read-modify-write operands that
      must be assigned the same physical register.
      
      Previously, tied operand pairs were computed from fixed MCInstrDesc
      fields, or by using black magic on inline assembly instructions.
      
      The isTied flag makes it possible to add tied operands to any
      instruction while getting rid of (some of) the inlineasm magic.
      
      Tied operands on normal instructions are needed to represent predicated
      individual instructions in SSA form. An extra <tied,imp-use> operand is
      required to represent the output value when the instruction predicate is
      false.
      
      Adding a predicate to:
      
        %vreg0<def> = ADD %vreg1, %vreg2
      
      Will look like:
      
        %vreg0<tied,def> = ADD %vreg1, %vreg2, pred:3, %vreg7<tied,imp-use>
      
      The virtual register %vreg7 is the value given to %vreg0 when the
      predicate is false. It will be assigned the same physreg as %vreg0.
      
      This commit adds the isTied flag and sets it based on MCInstrDesc when
      building an instruction. The flag is not used for anything yet.
      
      llvm-svn: 162774
      e56c60c5
    • Jakob Stoklund Olesen's avatar
      Don't allow TargetFlags on MO_Register MachineOperands. · dba99d0d
      Jakob Stoklund Olesen authored
      Register operands are manipulated by a lot of target-independent code,
      and it is not always possible to preserve target flags. That means it is
      not safe to use target flags on register operands.
      
      None of the targets in the tree are using register operand target flags.
      External targets should be using immediate operands to annotate
      instructions with operand modifiers.
      
      llvm-svn: 162770
      dba99d0d
    • Jakob Stoklund Olesen's avatar
      Remove extra MayLoad/MayStore flags from atomic_load/store. · 87cb471e
      Jakob Stoklund Olesen authored
      These extra flags are not required to properly order the atomic
      load/store instructions. SelectionDAGBuilder chains atomics as if they
      were volatile, and SelectionDAG::getAtomic() sets the isVolatile bit on
      the memory operands of all atomic operations.
      
      The volatile bit is enough to order atomic loads and stores during and
      after SelectionDAG.
      
      This means we set mayLoad on atomic_load, mayStore on atomic_store, and
      mayLoad+mayStore on the remaining atomic read-modify-write operations.
      
      llvm-svn: 162733
      87cb471e
    • Akira Hatanaka's avatar
      Fix bug 13532. · adb14f56
      Akira Hatanaka authored
      In SelectionDAGLegalize::ExpandLegalINT_TO_FP, expand INT_TO_FP nodes without
      using any f64 operations if f64 is not a legal type.
      
      Patch by Stefan Kristiansson. 
      
      llvm-svn: 162728
      adb14f56
Loading