Skip to content
  1. Oct 15, 2007
    • Evan Cheng's avatar
      Make CalcLatency() non-recursive. · 04c44712
      Evan Cheng authored
      llvm-svn: 43017
      04c44712
    • Evan Cheng's avatar
      Fix PR1729: watch out for val# with no def. · a5abba65
      Evan Cheng authored
      llvm-svn: 42996
      a5abba65
    • Chris Lattner's avatar
      Move CreateStackTemporary out to SelectionDAG · d6f7d44e
      Chris Lattner authored
      llvm-svn: 42995
      d6f7d44e
    • Chris Lattner's avatar
      add a new CreateStackTemporary helper method. · 9eb7a829
      Chris Lattner authored
      llvm-svn: 42994
      9eb7a829
    • Chris Lattner's avatar
      implement promotion of BR_CC operands, fixing bisort on ppc. · 9d5b131e
      Chris Lattner authored
      llvm-svn: 42992
      9d5b131e
    • Chris Lattner's avatar
      updates from duncan · 8555e69d
      Chris Lattner authored
      llvm-svn: 42991
      8555e69d
    • Duncan Sands's avatar
      Fix some typos. Call getTypeToTransformTo rather than · f6977d98
      Duncan Sands authored
      getTypeToExpandTo.  The difference is that
      getTypeToExpandTo gives the final result of expansion
      (eg: i128 -> i32 on a 32 bit machine) while
      getTypeToTransformTo does just one step (i128 -> i64).
      
      llvm-svn: 42982
      f6977d98
    • Chris Lattner's avatar
      One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* · 3cfb56d4
      Chris Lattner authored
      take a deleted nodes vector, instead of requiring it.
      
      One more significant change:  Implement the start of a legalizer that
      just works on types.  This legalizer is designed to run before the 
      operation legalizer and ensure just that the input dag is transformed
      into an output dag whose operand and result types are all legal, even
      if the operations on those types are not.
      
      This design/impl has the following advantages:
      
      1. When finished, this will *significantly* reduce the amount of code in
         LegalizeDAG.cpp.  It will remove all the code related to promotion and
         expansion as well as splitting and scalarizing vectors.
      2. The new code is very simple, idiomatic, and modular: unlike 
         LegalizeDAG.cpp, it has no 3000 line long functions. :)
      3. The implementation is completely iterative instead of recursive, good
         for hacking on large dags without blowing out your stack.
      4. The implementation updates nodes in place when possible instead of 
         deallocating and reallocating the entire graph that points to some 
         mutated node.
      5. The code nicely separates out handling of operations with invalid 
         results from operations with invalid operands, making some cases
         simpler and easier to understand.
      6. The new -debug-only=legalize-types option is very very handy :), 
         allowing you to easily understand what legalize types is doing.
      
      This is not yet done.  Until the ifdef added to SelectionDAGISel.cpp is
      enabled, this does nothing.  However, this code is sufficient to legalize
      all of the code in 186.crafty, olden and freebench on an x86 machine.  The
      biggest issues are:
      
      1. Vectors aren't implemented at all yet
      2. SoftFP is a mess, I need to talk to Evan about it.
      3. No lowering to libcalls is implemented yet.
      4. Various operations are missing etc.
      5. There are FIXME's for stuff I hax0r'd out, like softfp.
      
      Hey, at least it is a step in the right direction :).  If you'd like to help,
      just enable the #ifdef in SelectionDAGISel.cpp and compile code with it.  If
      this explodes it will tell you what needs to be implemented.  Help is 
      certainly appreciated.
      
      Once this goes in, we can do three things:
      
      1. Add a new pass of dag combine between the "type legalizer" and "operation
         legalizer" passes.  This will let us catch some long-standing isel issues
         that we miss because operation legalization often obfuscates the dag with
         target-specific nodes.
      2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
         making it much smaller and simpler.  When that happens we can then 
         reimplement the core functionality left in it in a much more efficient and
         non-recursive way.
      3. Once the whole legalizer is non-recursive, we can implement whole-function
         selectiondags maybe...
      
      llvm-svn: 42981
      3cfb56d4
    • Chris Lattner's avatar
      One xform performed by LegalizeDAG is transformation of "store of fp" to "store of int". · b193517e
      Chris Lattner authored
      Make two changes:
      1) only xform "store of f32" if i32 is a legal type for the target.
      2) only xform "store of f64" if either i64 or i32 are legal for the target.
      3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a
         later pass of legalize do it.  This is ugly, but helps future changes I'm 
         about to commit.
      
      llvm-svn: 42980
      b193517e
    • Chris Lattner's avatar
      Add a (disabled by default) way to view the ID of a node. · 90e0b271
      Chris Lattner authored
      llvm-svn: 42978
      90e0b271
  2. Oct 14, 2007
  3. Oct 13, 2007
    • Chris Lattner's avatar
      Enhance the truncstore optimization code to handle shifted · f47e3062
      Chris Lattner authored
      values and propagate demanded bits through them in simple cases.
      
      This allows this code:
      void foo(char *P) {
         strcpy(P, "abc");
      }
      to compile to:
      
      _foo:
              ldrb r3, [r1]
              ldrb r2, [r1, #+1]
              ldrb r12, [r1, #+2]!
              ldrb r1, [r1, #+1]
              strb r1, [r0, #+3]
              strb r2, [r0, #+1]
              strb r12, [r0, #+2]
              strb r3, [r0]
              bx lr
      
      instead of:
      
      _foo:
              ldrb r3, [r1, #+3]
              ldrb r2, [r1, #+2]
              orr r3, r2, r3, lsl #8
              ldrb r2, [r1, #+1]
              ldrb r1, [r1]
              orr r2, r1, r2, lsl #8
              orr r3, r2, r3, lsl #16
              strb r3, [r0]
              mov r2, r3, lsr #24
              strb r2, [r0, #+3]
              mov r2, r3, lsr #16
              strb r2, [r0, #+2]
              mov r3, r3, lsr #8
              strb r3, [r0, #+1]
              bx lr
      
      testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll
      
      This also helps occasionally for X86 and other cases not involving 
      unaligned load/stores.
      
      llvm-svn: 42954
      f47e3062
    • Chris Lattner's avatar
      Add a simple optimization to simplify the input to · 5e6fe054
      Chris Lattner authored
      truncate and truncstore instructions, based on the 
      knowledge that they don't demand the top bits.
      
      llvm-svn: 42952
      5e6fe054
    • Evan Cheng's avatar
      Local spiller optimization: · b6307650
      Evan Cheng authored
      Turn this:
      movswl  %ax, %eax
      movl    %eax, -36(%ebp)
      xorl    %edi, -36(%ebp)
      into
      movswl  %ax, %eax
      xorl    %edi, %eax
      movl    %eax, -36(%ebp)
      by unfolding the load / store xorl into an xorl and a store when we know the
      value in the spill slot is available in a register. This doesn't change the
      number of instructions but reduce the number of times memory is accessed.
      
      Also unfold some load folding instructions and reuse the value when similar
      situation presents itself.
      
      llvm-svn: 42947
      b6307650
    • Evan Cheng's avatar
      Optionally create a MachineInstr without default implicit operands. · 9490e0d0
      Evan Cheng authored
      llvm-svn: 42945
      9490e0d0
  4. Oct 12, 2007
  5. Oct 11, 2007
  6. Oct 10, 2007
Loading