Skip to content
  1. Aug 30, 2008
  2. Aug 28, 2008
  3. Aug 25, 2008
  4. Jul 24, 2008
  5. Jul 17, 2008
    • Dan Gohman's avatar
      Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk · 17059681
      Dan Gohman authored
      replacement of multiple values. This is slightly more efficient
      than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
      could be optimized even further. However, an important property of this
      new function is that it handles the case where the source value set and
      destination value set overlap. This makes it feasible for isel to use
      SelectNodeTo in many very common cases, which is advantageous because
      SelectNodeTo avoids a temporary node and it doesn't require CSEMap
      updates for users of values that don't change position.
      
      Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
      handle operand lists more efficiently, and to correctly handle a number
      of corner cases to which its new wider use exposes it.
      
      This commit also includes a change to the encoding of post-isel opcodes
      in SDNodes; now instead of being sandwiched between the target-independent
      pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
      opcodes are now represented as negative values. This makes it possible
      to test if an opcode is pre-isel or post-isel without having to know
      the size of the current target's post-isel instruction set.
      
      These changes speed up llc overall by 3% and reduce memory usage by 10%
      on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
      
      llvm-svn: 53728
      17059681
    • Duncan Sands's avatar
      LegalizeTypes support for what seems to be the · 7e5edf1a
      Duncan Sands authored
      only missing ppc long double operations: FNEG
      and FP_EXTEND.
      
      llvm-svn: 53723
      7e5edf1a
  6. Jul 16, 2008
    • Duncan Sands's avatar
      The atomic.cmp.swap promotion logic is wrong: it · a0b1ab3c
      Duncan Sands authored
      simply does the atomic.cmp.swap on the larger type,
      which means it blows away whatever is sitting in
      the bytes just after the memory location, i.e.
      causes a buffer overflow.  This really requires
      target specific code, which is why LegalizeTypes
      doesn't try to handle this case generically.  The
      existing (wrong) code in LegalizeDAG will go away
      automatically once the type legalization code is
      removed from LegalizeDAG so I'm leaving it there
      for the moment.  Meanwhile, don't test for this
      feature.
      
      llvm-svn: 53669
      a0b1ab3c
  7. Jul 15, 2008
  8. Jul 10, 2008
  9. Jul 07, 2008
    • Dan Gohman's avatar
      Refactor the tablegen DAGISelEmitter code for outputing calls to · d6ec0507
      Dan Gohman authored
      getTargetNode and SelectNodeTo to reduce duplication, and to
      make some of the getTargetNode code available to SelectNodeTo.
      Use SelectNodeTo instead of getTargetNode in several new
      interesting cases, as it mutates nodes in place instead of
      creating new ones.
      
      This triggers some scheduling behavior differences due to nodes
      being presented to the scheduler in a different order. Some of the
      arbitrary scheduling decisions it makes are now arbitrarily made
      differently. This is visible in CodeGen/PowerPC/LargeAbsoluteAddr.ll,
      where a trivial scheduling difference led to a trivial register
      allocation difference.
      
      llvm-svn: 53203
      d6ec0507
  10. Jun 25, 2008
  11. Jun 24, 2008
    • Bill Wendling's avatar
      This situation can occur: · c44659b9
      Bill Wendling authored
          ,------.
          |      |
          |      v
          |   t2 = phi ... t1 ...
          |      |
          |      v
          |   t1 = ...
          |  ... = ... t1 ...
          |      |
          `------'
      
      where there is a use in a PHI node that's a predecessor to the defining
      block. We don't want to mark all predecessors as having the value "alive" in
      this case. Also, the assert was too restrictive and didn't handle this case.
      
      llvm-svn: 52655
      c44659b9
  12. Jun 21, 2008
  13. Jun 20, 2008
  14. May 20, 2008
  15. May 01, 2008
  16. Apr 30, 2008
    • Arnold Schwaighofer's avatar
      Tail call optimization improvements: · be0de34e
      Arnold Schwaighofer authored
      Move platform independent code (lowering of possibly overwritten
      arguments, check for tail call optimization eligibility) from
      target X86ISelectionLowering.cpp to TargetLowering.h and
      SelectionDAGISel.cpp.
      
      Initial PowerPC tail call implementation:
      
      Support ppc32 implemented and tested (passes my tests and
      test-suite llvm-test).  
      Support ppc64 implemented and half tested (passes my tests).
      On ppc tail call optimization is performed if 
        caller and callee are fastcc
        call is a tail call (in tail call position, call followed by ret)
        no variable argument lists or byval arguments
        option -tailcallopt is enabled
      Supported:
       * non pic tail calls on linux/darwin
       * module-local tail calls on linux(PIC/GOT)/darwin(PIC)
       * inter-module tail calls on darwin(PIC)
      If constraints are not met a normal call will be emitted.
      
      A test checking the argument lowering behaviour on x86-64 was added.
      
      llvm-svn: 50477
      be0de34e
  17. Apr 27, 2008
    • Chris Lattner's avatar
      Implement a signficant optimization for inline asm: · 22379734
      Chris Lattner authored
      When choosing between constraints with multiple options,
      like "ir", test to see if we can use the 'i' constraint and
      go with that if possible.  This produces more optimal ASM in
      all cases (sparing a register and an instruction to load it),
      and fixes inline asm like this:
      
      void test () {
        asm volatile (" %c0 %1 " : : "imr" (42), "imr"(14));
      }
      
      Previously we would dump "42" into a memory location (which
      is ok for the 'm' constraint) which would cause a problem
      because the 'c' modifier is not valid on memory operands.
      
      Isn't it great how inline asm turns 'missed optimization'
      into 'compile failed'??
      
      Incidentally, this was the todo in 
      PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
      
      Please do NOT pull this into Tak.
      
      llvm-svn: 50315
      22379734
  18. Apr 24, 2008
  19. Apr 19, 2008
  20. Apr 16, 2008
  21. Apr 14, 2008
  22. Apr 10, 2008
  23. Apr 08, 2008
  24. Apr 01, 2008
  25. Mar 26, 2008
  26. Mar 25, 2008
  27. Mar 22, 2008
  28. Mar 19, 2008
    • Dan Gohman's avatar
      Add support for multiple return values for the PPC target by · b9056838
      Dan Gohman authored
      converting call result lowering to use the CallingConvLowering
      infastructure.
      
      llvm-svn: 48552
      b9056838
    • Evan Cheng's avatar
      Fix live variables issues: · 44c0b4f7
      Evan Cheng authored
      1. If part of a register is re-defined, an implicit kill and an implicit def are added to denote read / mod / write. However, this should only be necessary if the register is actually read later. This is a performance issue.
      2. If a sub-register is being defined, and it doesn't have a previous use, do not add a implicit kill to the last use of a super-register:
         = EAX, AX<imp-use,kill>
      ...
      AX =
      In this case, EAX is live but AX is killed, this is wrong and will cause the coalescer to do bad things.
      
      llvm-svn: 48521
      44c0b4f7
  29. Mar 18, 2008
  30. Mar 13, 2008
Loading