Skip to content
  1. May 04, 2008
  2. 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
  3. Apr 28, 2008
  4. Apr 27, 2008
    • Chris Lattner's avatar
      A few inline asm cleanups: · 724539c0
      Chris Lattner authored
        - Make targetlowering.h fit in 80 cols.
        - Make LowerAsmOperandForConstraint const.
        - Make lowerXConstraint -> LowerXConstraint
        - Make LowerXConstraint return a const char* instead of taking a string byref.
      
      llvm-svn: 50312
      724539c0
  5. Apr 25, 2008
  6. Apr 22, 2008
    • Dan Gohman's avatar
      Implement an x86-64 ABI detail of passing structs by hidden first · f166d2d0
      Dan Gohman authored
      argument. The x86-64 ABI requires the incoming value of %rdi to
      be copied to %rax on exit from a function that is returning a
      large C struct.
      
      Also, add a README-X86-64 entry detailing the missed optimization
      opportunity and proposing an alternative approach.
      
      llvm-svn: 50075
      f166d2d0
  7. Apr 20, 2008
  8. Apr 18, 2008
  9. Apr 16, 2008
  10. Apr 14, 2008
  11. Apr 12, 2008
    • Arnold Schwaighofer's avatar
      This patch corrects the handling of byval arguments for tailcall · 634fc9a3
      Arnold Schwaighofer authored
      optimized x86-64 (and x86) calls so that they work (... at least for
      my test cases).
      
      Should fix the following problems:
      
      Problem 1: When i introduced the optimized handling of arguments for
      tail called functions (using a sequence of copyto/copyfrom virtual
      registers instead of always lowering to top of the stack) i did not
      handle byval arguments correctly e.g they did not work at all :).
      
      Problem 2: On x86-64 after the arguments of the tail called function
      are moved to their registers (which include ESI/RSI etc), tail call
      optimization performs byval lowering which causes xSI,xDI, xCX
      registers to be overwritten. This is handled in this patch by moving
      the arguments to virtual registers first and after the byval lowering
      the arguments are moved from those virtual registers back to
      RSI/RDI/RCX.
      
      llvm-svn: 49584
      634fc9a3
    • Dan Gohman's avatar
      Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal · 544ab2c5
      Dan Gohman authored
      on any current target and aren't optimized in DAGCombiner. Instead
      of using intermediate nodes, expand the operations, choosing between
      simple loads/stores, target-specific code, and library calls,
      immediately.
      
      Previously, the code to emit optimized code for these operations
      was only used at initial SelectionDAG construction time; now it is
      used at all times. This fixes some cases where rep;movs was being
      used for small copies where simple loads/stores would be better.
      
      This also cleans up code that checks for alignments less than 4;
      let the targets make that decision instead of doing it in
      target-independent code. This allows x86 to use rep;movs in
      low-alignment cases.
      
      Also, this fixes a bug that resulted in the use of rep;stos for
      memsets of 0 with non-constant memory size when the alignment was
      at least 4. It's better to use the library in this case, which
      can be significantly faster when the size is large.
      
      This also preserves more SourceValue information when memory
      intrinsics are lowered into simple loads/stores.
      
      llvm-svn: 49572
      544ab2c5
    • Dan Gohman's avatar
      Fix a bug that prevented x86-64 from using rep.movsq for · 8c7cf88f
      Dan Gohman authored
      8-byte-aligned data.
      
      llvm-svn: 49571
      8c7cf88f
  12. Apr 09, 2008
  13. Apr 07, 2008
  14. Apr 05, 2008
  15. Apr 03, 2008
  16. Apr 01, 2008
  17. Mar 29, 2008
  18. Mar 26, 2008
    • Roman Levenstein's avatar
      Use a linked data structure for the uses lists of an SDNode, just like · 358e04a1
      Roman Levenstein authored
      LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
      This allows constant time for all uses list maintenance operations.
      
      The idea was suggested by Chris. Reviewed by Evan and Dan.
      Patch is tested and approved by Dan.
      
      On normal use-cases compilation speed is not affected. On very big basic
      blocks there are compilation speedups in the range of 15-20% or even better. 
      
      llvm-svn: 48822
      358e04a1
  19. Mar 24, 2008
  20. Mar 22, 2008
  21. Mar 21, 2008
    • Duncan Sands's avatar
      Introduce a new node for holding call argument · d97eea37
      Duncan Sands authored
      flags.  This is needed by the new legalize types
      infrastructure which wants to expand the 64 bit
      constants previously used to hold the flags on
      32 bit machines.  There are two functional changes:
      (1) in LowerArguments, if a parameter has the zext
      attribute set then that is marked in the flags;
      before it was being ignored; (2) PPC had some bogus
      code for handling two word arguments when using the
      ELF 32 ABI, which was hard to convert because of
      the bogusness.  As suggested by the original author
      (Nicolas Geoffray), I've disabled it for the moment.
      Tested with "make check" and the Ada ACATS testsuite.
      
      llvm-svn: 48640
      d97eea37
    • Chris Lattner's avatar
      remove Evan's "ugly hack" that sorta attempted to get · 68b11e14
      Chris Lattner authored
      x86-64 return conventions correct, but was never enabled.
      We can now do the "right thing" with multiple return values.
      
      llvm-svn: 48635
      68b11e14
  22. Mar 20, 2008
  23. Mar 19, 2008
  24. Mar 12, 2008
    • Chris Lattner's avatar
      Reimplement the parameter attributes support, phase #1. hilights: · 8a923e7c
      Chris Lattner authored
      1. There is now a "PAListPtr" class, which is a smart pointer around
         the underlying uniqued parameter attribute list object, and manages
         its refcount.  It is now impossible to mess up the refcount.
      2. PAListPtr is now the main interface to the underlying object, and
         the underlying object is now completely opaque.
      3. Implementation details like SmallVector and FoldingSet are now no
         longer part of the interface.
      4. You can create a PAListPtr with an arbitrary sequence of
         ParamAttrsWithIndex's, no need to make a SmallVector of a specific 
         size (you can just use an array or scalar or vector if you wish).
      5. All the client code that had to check for a null pointer before
         dereferencing the pointer is simplified to just access the 
         PAListPtr directly.
      6. The interfaces for adding attrs to a list and removing them is a
         bit simpler.
      
      Phase #2 will rename some stuff (e.g. PAListPtr) and do other less 
      invasive changes.
      
      llvm-svn: 48289
      8a923e7c
  25. Mar 11, 2008
Loading