Skip to content
  1. Mar 11, 2004
  2. Mar 09, 2004
  3. Mar 08, 2004
    • Chris Lattner's avatar
      Implement folding explicit load instructions into binary operations. For a · 653e662a
      Chris Lattner authored
      testcase like this:
      
      int %test(int* %P, int %A) {
              %Pv = load int* %P
              %B = add int %A, %Pv
              ret int %B
      }
      
      We now generate:
      test:
              mov %ECX, DWORD PTR [%ESP + 4]
              mov %EAX, DWORD PTR [%ESP + 8]
              add %EAX, DWORD PTR [%ECX]
              ret
      
      Instead of:
      test:
              mov %EAX, DWORD PTR [%ESP + 4]
              mov %ECX, DWORD PTR [%ESP + 8]
              mov %EAX, DWORD PTR [%EAX]
              add %EAX, %ECX
              ret
      
      ... saving one instruction, and often a register.  Note that there are a lot
      of other instructions that could use this, but they aren't handled.  I'm not
      really interested in adding them, but mul/div and all of the FP instructions
      could be supported as well if someone wanted to add them.
      
      llvm-svn: 12204
      653e662a
    • Chris Lattner's avatar
      Rearrange and refactor some code. No functionality changes. · 1dd6afe6
      Chris Lattner authored
      llvm-svn: 12203
      1dd6afe6
  4. Mar 07, 2004
  5. Mar 04, 2004
  6. Mar 02, 2004
  7. Mar 01, 2004
    • Brian Gaeke's avatar
      TargetCacheInfo has been removed; its only uses were to propagate a constant · 427cec13
      Brian Gaeke authored
      (16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
      dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
      the interest of not breaking things any more than they already are, I'm going
      to leave the constant alone.
      
      llvm-svn: 12043
      427cec13
    • Chris Lattner's avatar
      Handle passing constant integers to functions much more efficiently. Instead · 1f4642c4
      Chris Lattner authored
      of generating this code:
      
              mov %EAX, 4
              mov DWORD PTR [%ESP], %EAX
              mov %AX, 123
              movsx %EAX, %AX
              mov DWORD PTR [%ESP + 4], %EAX
              call Y
      
      we now generate:
              mov DWORD PTR [%ESP], 4
              mov DWORD PTR [%ESP + 4], 123
              call Y
      
      Which hurts the eyes less.  :)
      
      Considering that register pressure around call sites is already high (with all
      of the callee clobber registers n stuff), this may help a lot.
      
      llvm-svn: 12028
      1f4642c4
    • Chris Lattner's avatar
      Fix a minor code-quality issue. When passing 8 and 16-bit integer constants · 5c7d3cda
      Chris Lattner authored
      to function calls, we would emit dead code, like this:
      
      int Y(int, short, double);
      int X() {
        Y(4, 123, 4);
      }
      
      --- Old
      X:
              sub %ESP, 20
              mov %EAX, 4
              mov DWORD PTR [%ESP], %EAX
      ***     mov %AX, 123
              mov %AX, 123
              movsx %EAX, %AX
              mov DWORD PTR [%ESP + 4], %EAX
              fld QWORD PTR [.CPIX_0]
              fstp QWORD PTR [%ESP + 8]
              call Y
              mov %EAX, 0
              # IMPLICIT_USE %EAX %ESP
              add %ESP, 20
              ret
      
      Now we emit:
      X:
              sub %ESP, 20
              mov %EAX, 4
              mov DWORD PTR [%ESP], %EAX
              mov %AX, 123
              movsx %EAX, %AX
              mov DWORD PTR [%ESP + 4], %EAX
              fld QWORD PTR [.CPIX_0]
              fstp QWORD PTR [%ESP + 8]
              call Y
              mov %EAX, 0
              # IMPLICIT_USE %EAX %ESP
              add %ESP, 20
              ret
      
      Next up, eliminate the mov AX and movsx entirely!
      
      llvm-svn: 12026
      5c7d3cda
  8. Feb 29, 2004
  9. Feb 28, 2004
  10. Feb 27, 2004
Loading