Skip to content
  1. Mar 15, 2008
  2. Mar 13, 2008
    • Christopher Lamb's avatar
      Get rid of a pseudo instruction and replace it with subreg based operation on... · dd55d3f1
      Christopher Lamb authored
      Get rid of a pseudo instruction and replace it with subreg based operation on real instructions, ridding the asm printers of the hack used to do this previously. In the process, update LowerSubregs to be careful about eliminating copies that have side affects. 
      
      Note: the coalescer will have to be careful about this too, when it starts coalescing insert_subreg nodes.
      llvm-svn: 48329
      dd55d3f1
  3. Mar 11, 2008
  4. Mar 10, 2008
  5. Mar 05, 2008
    • Scott Michel's avatar
      This patch fixes a problem encountered by the CellSPU backend where variants · 94420742
      Scott Michel authored
      were being pruned in patterns where a variable was used more than once, e.g.:
      
        (or (and R32C:$rA, R32C:$rC), (and R32C:$rB, (not R32C:$rC)))
      
      In this example, $rC is used more than once and is actually significant to
      instruction selection pattern matching when commuted variants are produced.
      This patch scans the pattern's clauses and collects the variables, creating
      a set of variables that are used more than once. TreePatternNode::isIsomorphicTo()
      also understands that multiply-used variables are significant.
      
      llvm-svn: 47950
      94420742
  6. Feb 26, 2008
  7. Feb 24, 2008
  8. Feb 20, 2008
  9. Feb 16, 2008
    • Scott Michel's avatar
      Make tblgen a little smarter about constants smaller than i32. Currently, · a3cefeaf
      Scott Michel authored
      tblgen will complain if a sign-extended constant does not fit into a
      data type smaller than i32, e.g., i16. This causes a problem when certain
      hex constants are used, such as 0xff for byte masks or immediate xor
      values.
      
      tblgen will try the sign-extended value first and, if the sign extended
      value would overflow, it tries to see if the unsigned value will fit.
      Consequently, a software developer can now safely incant:
      
      	(XORHIr16 R16C:$rA, 0xffff)
      
      which is somewhat clearer and more informative than incanting:
      
      	(XORHIr16 R16C:$rA, (i16 -1))
      
      even if the two are bitwise equivalent.
      
      Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
      when getTargetConstant() is invoked.
      
      llvm-svn: 47188
      a3cefeaf
  10. Feb 15, 2008
    • Dale Johannesen's avatar
      Rewrite tblgen handling of subtarget features so · 6ca3ccf5
      Dale Johannesen authored
      it follows the order of the enum, not alphabetical.
      The motivation is to make -mattr=+ssse3,+sse41
      select SSE41 as it ought to.  Added "ignored"
      enum values of 0 to PPC and SPU to avoid compiler
      warnings.
      
      llvm-svn: 47143
      6ca3ccf5
  11. Feb 14, 2008
    • Nate Begeman's avatar
      Change how FP immediates are handled. · 53e1b3f9
      Nate Begeman authored
      1) ConstantFP is now expand by default
      2) ConstantFP is not turned into TargetConstantFP during Legalize
         if it is legal.
      
      This allows ConstantFP to be handled like Constant, allowing for 
      targets that can encode FP immediates as MachineOperands.
      
      As a bonus, fix up Itanium FP constants, which now correctly match,
      and match more constants!  Hooray.
      
      llvm-svn: 47121
      53e1b3f9
  12. Feb 10, 2008
  13. Feb 09, 2008
  14. Feb 06, 2008
  15. Feb 05, 2008
  16. Feb 03, 2008
    • Chris Lattner's avatar
      Change the 'global modification' APIs in SelectionDAG to take a new · b2b9d6f0
      Chris Lattner authored
      DAGUpdateListener object pointer instead of just returning a vector 
      of deleted nodes.  This makes the interfaces more efficient (no more
      allocating a vector [at least a malloc], filling it in, then walking
      it) and more clean.  This also allows the client to be notified of
      nodes that are *changed* but not deleted.
      
      llvm-svn: 46677
      b2b9d6f0
  17. Feb 02, 2008
    • Evan Cheng's avatar
      Get rid of the annoying blank lines before labels. · 32e5347e
      Evan Cheng authored
      llvm-svn: 46667
      32e5347e
    • Evan Cheng's avatar
      SDIsel processes llvm.dbg.declare by recording the variable debug information... · efd142a9
      Evan Cheng authored
      SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
      Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
      For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.
      
      llvm-svn: 46659
      efd142a9
  18. Jan 31, 2008
  19. Jan 29, 2008
    • Scott Michel's avatar
      Fix to bug 1951: tblgen gratuitously renames variables when no temporary was · 167502a5
      Scott Michel authored
      generated. This feature would only show up in fairly complex patterns, such
      as this one in CellSPU:
      
        def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
      	    (IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;
      
      which generated the following emit code:
      
      SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
        SDOperand N0 = N.getOperand(0);
        SDOperand N00 = N0.getOperand(0);
        SDOperand N01 = N0.getOperand(1);
        SDOperand N1 = N.getOperand(1);
        SDOperand N10 = N1.getOperand(0);
        SDOperand N11 = N1.getOperand(1);
        SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
        return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
      }
      
      Tested against the test suites without incident.
      
      llvm-svn: 46487
      167502a5
  20. Jan 22, 2008
  21. Jan 21, 2008
  22. Jan 15, 2008
  23. Jan 12, 2008
  24. Jan 11, 2008
    • Chris Lattner's avatar
      Simplify the side effect stuff a bit more and make licm/sinking · c8226f32
      Chris Lattner authored
      both work right according to the new flags.
      
      This removes the TII::isReallySideEffectFree predicate, and adds
      TII::isInvariantLoad. 
      
      It removes NeverHasSideEffects+MayHaveSideEffects and adds
      UnmodeledSideEffects as machine instr flags.  Now the clients
      can decide everything they need.
      
      I think isRematerializable can be implemented in terms of the
      flags we have now, though I will let others tackle that.
      
      llvm-svn: 45843
      c8226f32
  25. Jan 10, 2008
Loading