Skip to content
  1. Dec 04, 2008
    • Scott Michel's avatar
      CellSPU: · 40f54d22
      Scott Michel authored
      - First patch from Nehal Desai, a new contributor at Aerospace. Nehal's patch
        fixes sign/zero/any-extending loads for integers and floating point. Example
        code, compiled w/o debugging or optimization where he first noticed the bug:
      
        int main(void) {
          float a = 99.0;
          printf("%d\n", a);
          return 0;
        }
      
        Verified that this code actually works on a Cell SPU.
      
      Changes by Scott Michel:
      - Fix bug in the value type list constructed by SPUISD::LDRESULT to include
        both the load result's result and chain, not just the chain alone.
      - Simplify LowerLOAD and remove extraneous and unnecessary chains.
      - Remove unused SPUISD pseudo instructions.
      
      llvm-svn: 60526
      40f54d22
  2. Dec 01, 2008
    • Scott Michel's avatar
      CellSPU: · 08a4e204
      Scott Michel authored
      - Fix v2[if]64 vector insertion code before IBM files a bug report.
      - Ensure that zero (0) offsets relative to $sp don't trip an assert
        (add $sp, 0 gets legalized to $sp alone, tripping an assert)
      - Shuffle masks passed to SPUISD::SHUFB are now v16i8 or v4i32
      
      llvm-svn: 60358
      08a4e204
  3. Nov 25, 2008
    • Scott Michel's avatar
      CellSPU: · 910046d1
      Scott Michel authored
      (a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
          best that the A-form and D-form address predicates catch everything before
          the code decides to emit a X-form address.
      (b) Expand vector store test cases to include the usual suspects.
      
      llvm-svn: 60034
      910046d1
    • Scott Michel's avatar
      CellSPU: Relax constraints on when to generate a X-form address, evidently · 8e17d02a
      Scott Michel authored
      they were too tight according to bug 3126.
      
      Fix bug 3126.
      
      llvm-svn: 60006
      8e17d02a
  4. Nov 23, 2008
  5. Nov 21, 2008
    • Scott Michel's avatar
      CellSPU: · c6918c1f
      Scott Michel authored
      (a) Fix bgs 3052, 3057
      (b) Incorporate Duncan's suggestions re: i1 promotion
      (c) Indentation updates.
      
      llvm-svn: 59790
      c6918c1f
  6. Nov 05, 2008
    • Dan Gohman's avatar
      Eliminate the ISel priority queue, which used the topological order for a · f14b77eb
      Dan Gohman authored
      priority function. Instead, just iterate over the AllNodes list, which is
      already in topological order. This eliminates a fair amount of bookkeeping,
      and speeds up the isel phase by about 15% on many testcases.
      
      The impact on most targets is that AddToISelQueue calls can be simply removed.
      
      In the x86 target, there are two additional notable changes.
      
      The rule-bending AND+SHIFT optimization in MatchAddress that creates new
      pre-isel nodes during isel is now a little more verbose, but more robust.
      Instead of either creating an invalid DAG or creating an invalid topological
      sort, as it has historically done, it can now just insert the new nodes into
      the node list at a position where they will be consistent with the topological
      ordering.
      
      Also, the address-matching code has logic that checked to see if a node was
      "already selected". However, when a node is selected, it has all its uses
      taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any
      further visits from MatchAddress. This code is now removed.
      
      llvm-svn: 58748
      f14b77eb
  7. Oct 27, 2008
    • David Greene's avatar
      · ce2a9381
      David Greene authored
      Have TableGen emit setSubgraphColor calls under control of a -gen-debug
      flag.  Then in a debugger developers can set breakpoints at these calls
      to see waht is about to be selected and what the resulting subgraph
      looks like.  This really helps when debugging instruction selection.
      
      llvm-svn: 58278
      ce2a9381
  8. Oct 16, 2008
  9. Sep 26, 2008
  10. Sep 12, 2008
  11. Sep 04, 2008
  12. Aug 28, 2008
  13. Aug 23, 2008
    • Dan Gohman's avatar
      Move the point at which FastISel taps into the SelectionDAGISel · eb0cee91
      Dan Gohman authored
      process up to a higher level. This allows FastISel to leverage
      more of SelectionDAGISel's infastructure, such as updating Machine
      PHI nodes.
      
      Also, implement transitioning from SDISel back to FastISel in
      the middle of a block, so it's now possible to go back and
      forth. This allows FastISel to hand individual CallInsts and other
      complicated things off to SDISel to handle, while handling the rest
      of the block itself.
      
      To help support this, reorganize the SelectionDAG class so that it
      is allocated once and reused throughout a function, instead of
      being completely reallocated for each block.
      
      llvm-svn: 55219
      eb0cee91
  14. Aug 21, 2008
  15. Jul 27, 2008
  16. 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
  17. Jul 07, 2008
  18. Jun 30, 2008
  19. Jun 08, 2008
    • Duncan Sands's avatar
      Remove comparison methods for MVT. The main cause · 11dd4245
      Duncan Sands authored
      of apint codegen failure is the DAG combiner doing
      the wrong thing because it was comparing MVT's using
      < rather than comparing the number of bits.  Removing
      the < method makes this mistake impossible to commit.
      Instead, add helper methods for comparing bits and use
      them.
      
      llvm-svn: 52098
      11dd4245
  20. 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
  21. May 29, 2008
  22. May 13, 2008
  23. Apr 30, 2008
  24. Mar 20, 2008
  25. Mar 10, 2008
  26. Feb 23, 2008
    • Scott Michel's avatar
      Merge current work back to tree to minimize diffs and drift. Major highlights · 7d5eaec6
      Scott Michel authored
      for CellSPU modifications:
      
      - SPUInstrInfo.td refactoring: "multiclass" really is _your_ friend.
      - Other improvements based on refactoring effort in SPUISelLowering.cpp,
        esp. in SPUISelLowering::PerformDAGCombine(), where zero amount shifts and
        rotates are now eliminiated, other scalar-to-vector-to-scalar silliness
        is also eliminated.
      - 64-bit operations are being implemented, _muldi3.c gcc runtime now
        compiles and generates the right code. More work still needs to be done.
      
      llvm-svn: 47532
      7d5eaec6
  27. Feb 05, 2008
  28. Feb 02, 2008
    • 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
  29. Jan 30, 2008
    • Scott Michel's avatar
      More cleanups for CellSPU: · bb713ae0
      Scott Michel authored
      - Expand tabs... (poss 80-col violations, will get them later...)
      - Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
        function, simplifying maintenance. Also reduced custom instruction
        generation for SPUvecinsert/INSERT_MASK.
      
      llvm-svn: 46544
      bb713ae0
  30. Jan 29, 2008
    • Scott Michel's avatar
      Overhaul Cell SPU's addressing mode internals so that there are now · ceae3bbf
      Scott Michel authored
      only two addressing mode nodes, SPUaform and SPUindirect (vice the
      three previous ones, SPUaform, SPUdform and SPUxform). This improves
      code somewhat because we now avoid using reg+reg addressing when
      it can be avoided. It also simplifies the address selection logic,
      which was the main point for doing this.
      
      Also, for various global variables that would be loaded using SPU's
      A-form addressing, prefer D-form offs[reg] addressing, keeping the
      base in a register if the variable is used more than once.
      
      llvm-svn: 46483
      ceae3bbf
  31. Jan 17, 2008
    • Scott Michel's avatar
      Forward progress: crtbegin.c now compiles successfully! · e4d3e3c0
      Scott Michel authored
      Fixed CellSPU's A-form (local store) address mode, so that all globals,
      externals, constant pool and jump table symbols are now wrapped within
      a SPUISD::AFormAddr pseudo-instruction. This now identifies all local
      store memory addresses, although it requires a bit of legerdemain during
      instruction selection to properly select loads to and stores from local
      store, properly generating "LQA" instructions.
      
      Also added mul_ops.ll test harness for exercising integer multiplication.
      
      llvm-svn: 46142
      e4d3e3c0
  32. Jan 11, 2008
    • Scott Michel's avatar
      More CellSPU refinements: · a8f67e04
      Scott Michel authored
      - struct_2.ll: Completely unaligned load/store testing
      
      - call_indirect.ll, struct_1.ll: Add test lines to exercise
         X-form [$reg($reg)] addressing
      
      At this point, loads and stores should be under control (he says
      in an optimistic tone of voice.)
      
      llvm-svn: 45882
      a8f67e04
    • Scott Michel's avatar
      More CellSPU refinement and progress: · 8d5841ae
      Scott Michel authored
      - Cleaned up custom load/store logic, common code is now shared [see note
        below], cleaned up address modes
      
      - More test cases: various intrinsics, structure element access (load/store
        test), updated target data strings, indirect function calls.
      
      Note: This patch contains a refactoring of the LoadSDNode and StoreSDNode
      structures: they now share a common base class, LSBaseSDNode, that
      provides an interface to their common functionality. There is some hackery
      to access the proper operand depending on the derived class; otherwise,
      to do a proper job would require finding and rearranging the SDOperands
      sent to StoreSDNode's constructor. The current refactor errs on the
      side of being conservatively and backwardly compatible while providing
      functionality that reduces redundant code for targets where loads and
      stores are custom-lowered.
      
      llvm-svn: 45851
      8d5841ae
  33. Dec 31, 2007
    • Chris Lattner's avatar
      Rename SSARegMap -> MachineRegisterInfo in keeping with the idea · a10fff51
      Chris Lattner authored
      that "machine" classes are used to represent the current state of
      the code being compiled.  Given this expanded name, we can start 
      moving other stuff into it.  For now, move the UsedPhysRegs and
      LiveIn/LoveOuts vectors from MachineFunction into it.
      
      Update all the clients to match.
      
      This also reduces some needless #includes, such as MachineModuleInfo
      from MachineFunction.
      
      llvm-svn: 45467
      a10fff51
  34. Dec 29, 2007
  35. Dec 22, 2007
  36. Dec 20, 2007
  37. Dec 19, 2007
  38. Dec 17, 2007
Loading