Skip to content
  1. Jun 02, 2009
    • Dale Johannesen's avatar
      Make the implicit inputs and outputs of target-independent · 0b8ca792
      Dale Johannesen authored
      ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
      instead of MVT::Flag.  Remove CARRY_FALSE in favor of 0; adjust
      all target-independent code to use this format.
      
      Most targets will still produce a Flag-setting target-dependent
      version when selection is done.  X86 is converted to use i32
      instead, which means TableGen needs to produce different code
      in xxxGenDAGISel.inc.  This keys off the new supportsHasI1 bit
      in xxxInstrInfo, currently set only for X86; in principle this
      is temporary and should go away when all other targets have
      been converted.  All relevant X86 instruction patterns are
      modified to represent setting and using EFLAGS explicitly.  The
      same can be done on other targets.
      
      The immediate behavior change is that an ADC/ADD pair are no
      longer tightly coupled in the X86 scheduler; they can be
      separated by instructions that don't clobber the flags (MOV).
      I will soon add some peephole optimizations based on using
      other instructions that set the flags to feed into ADC.
      
      llvm-svn: 72707
      0b8ca792
  2. Apr 27, 2009
    • Nate Begeman's avatar
      2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan. · 8d6d4b92
      Nate Begeman authored
      PR2957
      
      ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
      mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
      as the shuffle mask.  A value of -1 represents UNDEF.
      
      In addition to eliminating the creation of illegal BUILD_VECTORS just to 
      represent shuffle masks, we are better about canonicalizing the shuffle mask,
      resulting in substantially better code for some classes of shuffles.
      
      llvm-svn: 70225
      8d6d4b92
  3. Apr 24, 2009
    • Rafael Espindola's avatar
      Revert 69952. Causes testsuite failures on linux x86-64. · b93db668
      Rafael Espindola authored
      llvm-svn: 69967
      b93db668
    • Nate Begeman's avatar
      PR2957 · bb881d66
      Nate Begeman authored
      ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
      mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
      as the shuffle mask.  A value of -1 represents UNDEF.
      
      In addition to eliminating the creation of illegal BUILD_VECTORS just to 
      represent shuffle masks, we are better about canonicalizing the shuffle mask,
      resulting in substantially better code for some classes of shuffles.
      
      A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.
      
      llvm-svn: 69952
      bb881d66
  4. Apr 13, 2009
    • Dan Gohman's avatar
      Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize · 6c142630
      Dan Gohman authored
      it accordingly. Thanks to Jakob Stoklund Olesen for pointing
      out how this might be useful.
      
      llvm-svn: 68986
      6c142630
    • Dan Gohman's avatar
      Add a new TargetInstrInfo MachineInstr opcode, COPY_TO_SUBCLASS. · 60a446ab
      Dan Gohman authored
      This will be used to replace things like X86's MOV32to32_.
      
      Enhance ScheduleDAGSDNodesEmit to be more flexible and robust
      in the presense of subregister superclasses and subclasses. It
      can now cope with the definition of a virtual register being in
      a subclass of a use.
      
      Re-introduce the code for recording register superreg classes and
      subreg classes. This is needed because when subreg extracts and
      inserts get coalesced away, the virtual registers are left in
      the correct subclass.
      
      llvm-svn: 68961
      60a446ab
  5. Mar 31, 2009
  6. Mar 26, 2009
  7. Mar 19, 2009
  8. Mar 13, 2009
    • Chris Lattner's avatar
      add a new TGError class and use it to propagate location info with · ba42e49c
      Chris Lattner authored
      errors when thrown.  This gets us nice errors like this from tblgen:
      
      CMOVL32rr: 	(set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
      /Users/sabre/llvm/Debug/bin/tblgen: error:
      Included from X86.td:116:
      Parsing X86InstrInfo.td:922: In CMOVL32rr: X86cmov node requires exactly 4 operands!
      def CMOVL32rr : I<0x4C, MRMSrcReg,       // if <s, GR32 = GR32
      ^
      
      instead of just:
      
      CMOVL32rr: 	(set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
      /Users/sabre/llvm/Debug/bin/tblgen: In CMOVL32rr: X86cmov node requires exactly 4 operands!
      
      This is all I plan to do with this, but it should be easy enough to improve if anyone 
      cares (e.g. keeping more loc info in "dag" expr records in tblgen.
      
      llvm-svn: 66898
      ba42e49c
  9. Feb 05, 2009
  10. Feb 04, 2009
  11. Feb 01, 2009
    • Duncan Sands's avatar
      Fix PR3453 and probably a bunch of other potential · 3ed76886
      Duncan Sands authored
      crashes or wrong code with codegen of large integers:
      eliminate the legacy getIntegerVTBitMask and
      getIntegerVTSignBit methods, which returned their
      value as a uint64_t, so couldn't handle huge types.
      
      llvm-svn: 63494
      3ed76886
  12. Jan 05, 2009
  13. Dec 03, 2008
    • Dan Gohman's avatar
      Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86's · cc78cdf2
      Dan Gohman authored
      foldMemoryOperand how to "fold" them, by converting them into constant-pool
      loads. When they aren't folded, they use xorps/cmpeqd, but for example when
      register pressure is high, they may now be folded as memory operands, which
      reduces register pressure.
      
      Also, mark V_SET0 isAsCheapAsAMove so that two-address-elimination will
      remat it instead of copying zeros around (V_SETALLONES was already marked).
      
      llvm-svn: 60461
      cc78cdf2
    • Dan Gohman's avatar
      Add a sanity-check to tablegen to catch the case where isSimpleLoad · ae3ba45e
      Dan Gohman authored
      is set but mayLoad is not set. Fix all the problems this turned up.
      
      Change code to not use isSimpleLoad instead of mayLoad unless it
      really wants isSimpleLoad.
      
      llvm-svn: 60459
      ae3ba45e
  14. Nov 13, 2008
  15. Oct 15, 2008
  16. Aug 22, 2008
  17. Jul 30, 2008
  18. Jun 30, 2008
  19. Jun 25, 2008
  20. Jun 16, 2008
  21. Jun 06, 2008
    • Duncan Sands's avatar
      Wrap MVT::ValueType in a struct to get type safety · 13237ac3
      Duncan Sands authored
      and better control the abstraction.  Rename the type
      to MVT.  To update out-of-tree patches, the main
      thing to do is to rename MVT::ValueType to MVT, and
      rewrite expressions like MVT::getSizeInBits(VT) in
      the form VT.getSizeInBits().  Use VT.getSimpleVT()
      to extract a MVT::SimpleValueType for use in switch
      statements (you will get an assert failure if VT is
      an extended value type - these shouldn't exist after
      type legalization).
      This results in a small speedup of codegen and no
      new testsuite failures (x86-64 linux).
      
      llvm-svn: 52044
      13237ac3
  22. May 31, 2008
    • Dan Gohman's avatar
      Teach the DAGISelEmitter to not compute the variable_ops operand · bd3390c7
      Dan Gohman authored
      index for the input pattern in terms of the output pattern. Instead
      keep track of how many fixed operands the input pattern actually
      has, and have the input matching code pass the output-emitting
      function that index value. This simplifies the code, disentangles
      variables_ops from the support for predication operations, and
      makes variable_ops more robust.
      
      llvm-svn: 51808
      bd3390c7
  23. May 29, 2008
    • Dan Gohman's avatar
      Fix a tblgen problem handling variable_ops in tblgen instruction · 6e582c44
      Dan Gohman authored
      definitions. This adds a new construct, "discard", for indicating
      that a named node in the input matching pattern is to be discarded,
      instead of corresponding to a node in the output pattern. This
      allows tblgen to know where the arguments for the varaible_ops are
      supposed to begin.
      
      This fixes "rdar://5791600", whatever that is ;-).
      
      llvm-svn: 51699
      6e582c44
  24. Apr 03, 2008
    • Dan Gohman's avatar
      Move instruction flag inference out of InstrInfoEmitter and into · fc4ad7de
      Dan Gohman authored
      CodeGenDAGPatterns, where it can be used in other tablegen backends.
      This allows the inference to be done for DAGISelEmitter so that it
      gets accurate mayLoad/mayStore/isSimpleLoad flags. 
      
      This brings MemOperand functionality back to where it was before
      48329. However, it doesn't solve the problem of anonymous patterns
      which expand to code that does loads or stores.
      
      llvm-svn: 49123
      fc4ad7de
  25. Mar 20, 2008
  26. Mar 11, 2008
  27. Mar 10, 2008
  28. 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
  29. Feb 26, 2008
  30. Feb 20, 2008
  31. 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
  32. Feb 09, 2008
  33. Jan 15, 2008
Loading