Skip to content
  1. Jan 23, 2005
  2. Jan 22, 2005
    • Reid Spencer's avatar
      We're working towards LLVM 1.5 now so bump the version number. This change · 12b25a12
      Reid Spencer authored
      won't be propagated to the configure script until there's a need to change
      configure.ac for some larger purpose.
      
      llvm-svn: 19762
      12b25a12
    • Chris Lattner's avatar
      Minor fix. · 97cf8fd4
      Chris Lattner authored
      llvm-svn: 19761
      97cf8fd4
    • Chris Lattner's avatar
      This is the final big of factoring. This shares cases in suboperand · 59a7f5c2
      Chris Lattner authored
      differences, which means that identical instructions (after stripping off
      the first literal string) do not run any different code at all.  On the X86,
      this turns this code:
      
          switch (MI->getOpcode()) {
          case X86::ADC32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::ADC32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::ADC32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::ADD32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::ADD32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::ADD32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::AND32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::AND32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::AND32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::CMP32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::CMP32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::MOV32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::MOV32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::OR32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::OR32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::OR32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::ROL32mi: printOperand(MI, 4, MVT::i8); break;
          case X86::ROR32mi: printOperand(MI, 4, MVT::i8); break;
          case X86::SAR32mi: printOperand(MI, 4, MVT::i8); break;
          case X86::SBB32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::SBB32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::SBB32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::SHL32mi: printOperand(MI, 4, MVT::i8); break;
          case X86::SHLD32mrCL: printOperand(MI, 4, MVT::i32); break;
          case X86::SHR32mi: printOperand(MI, 4, MVT::i8); break;
          case X86::SHRD32mrCL: printOperand(MI, 4, MVT::i32); break;
          case X86::SUB32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::SUB32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::SUB32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::TEST32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::TEST32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::TEST8mi: printOperand(MI, 4, MVT::i8); break;
          case X86::XCHG32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::XOR32mi: printOperand(MI, 4, MVT::i32); break;
          case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
          case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
          }
      
      into this:
      
          switch (MI->getOpcode()) {
          case X86::ADC32mi:
          case X86::ADC32mr:
          case X86::ADD32mi:
          case X86::ADD32mr:
          case X86::AND32mi:
          case X86::AND32mr:
          case X86::CMP32mi:
          case X86::CMP32mr:
          case X86::MOV32mi:
          case X86::MOV32mr:
          case X86::OR32mi:
          case X86::OR32mr:
          case X86::SBB32mi:
          case X86::SBB32mr:
          case X86::SHLD32mrCL:
          case X86::SHRD32mrCL:
          case X86::SUB32mi:
          case X86::SUB32mr:
          case X86::TEST32mi:
          case X86::TEST32mr:
          case X86::XCHG32mr:
          case X86::XOR32mi:
          case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
          case X86::ADC32mi8:
          case X86::ADD32mi8:
          case X86::AND32mi8:
          case X86::OR32mi8:
          case X86::ROL32mi:
          case X86::ROR32mi:
          case X86::SAR32mi:
          case X86::SBB32mi8:
          case X86::SHL32mi:
          case X86::SHR32mi:
          case X86::SUB32mi8:
          case X86::TEST8mi:
          case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
          }
      
      After this, the generated asmwriters look pretty much as though they were
      generated by hand.  This shrinks the X86 asmwriter.inc files from 55101->39669
      and 55429->39551 bytes each, and PPC from 16766->12859 bytes.
      
      llvm-svn: 19760
      59a7f5c2
    • Chris Lattner's avatar
      Implement *even more* factoring. In particular, if all of the instruction · 92275bb6
      Chris Lattner authored
      strings starts out with a constant string, we emit the string first, using
      a table lookup (instead of a switch statement).
      
      Because this is usually the opcode portion of the asm string, the differences
      between the instructions have now been greatly reduced.  This allows many
      more case statements to be grouped together.
      
      This patch also allows instruction cases to be grouped together when the
      instruction patterns are exactly identical (common after the opcode string
      has been ripped off), and when the differing operand is a MachineInstr
      operand that needs to be formatted.
      
      The end result of this is a mean and lean generated AsmPrinter!
      
      llvm-svn: 19759
      92275bb6
    • Chris Lattner's avatar
      Refactor code for numbering instructions into CodeGenTarget. · 945e8655
      Chris Lattner authored
      llvm-svn: 19758
      945e8655
    • Jeff Cohen's avatar
      Fix VC++ compilation error · da636b37
      Jeff Cohen authored
      llvm-svn: 19757
      da636b37
    • Chris Lattner's avatar
      QOI feature implemented. · 64d9d2b8
      Chris Lattner authored
      llvm-svn: 19756
      64d9d2b8
    • Chris Lattner's avatar
      Implement factoring of instruction pattern strings. In particular, instead of · 9ceb7c8f
      Chris Lattner authored
      emitting code like this:
      
        case PPC::ADD: O  << "add ";  printOperand(MI, 0, MVT::i64); O  << ", ";  prin
      tOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '\n
      '; break;
        case PPC::ADDC: O  << "addc ";  printOperand(MI, 0, MVT::i64); O  << ", ";  pr
      intOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '
      \n'; break;
        case PPC::ADDE: O  << "adde ";  printOperand(MI, 0, MVT::i64); O  << ", ";  pr
      intOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '
      \n'; break;
      ...
      
      Emit code like this:
      
        case PPC::ADD:
        case PPC::ADDC:
        case PPC::ADDE:
        ...
          switch (MI->getOpcode()) {
          case PPC::ADD: O << "add "; break;
          case PPC::ADDC: O << "addc "; break;
          case PPC::ADDE: O << "adde "; break;
          ...
          }
          printOperand(MI, 0, MVT::i64);
          O << ", ";
          printOperand(MI, 1, MVT::i64);
          O << ", ";
          printOperand(MI, 2, MVT::i64);
          O << "\n";
          break;
      
      This shrinks the PPC asm writer from 24785->15205 bytes (even though the new
      asmwriter has much more whitespace than the old one), and the X86 printers shrink
      quite a bit too.  The important implication of this is that GCC no longer hits swap
      when building the PPC backend in optimized mode.  Thus this fixes PR448.
      
      -Chris
      
      llvm-svn: 19755
      9ceb7c8f
    • Chris Lattner's avatar
      Fix the ::: problem · b6f5d9a8
      Chris Lattner authored
      llvm-svn: 19754
      b6f5d9a8
    • Chris Lattner's avatar
      Minor refactoring, no functionality change. · 3baf6821
      Chris Lattner authored
      llvm-svn: 19753
      3baf6821
    • Jeff Cohen's avatar
      oops · ff696def
      Jeff Cohen authored
      llvm-svn: 19752
      ff696def
    • Jeff Cohen's avatar
      Use binary mode for reading/writing bytecode files · c8f1f4bc
      Jeff Cohen authored
      llvm-svn: 19751
      c8f1f4bc
    • Jeff Cohen's avatar
      Add (non-working) project bugpoint to Visual Studio · e90b0c54
      Jeff Cohen authored
      llvm-svn: 19750
      e90b0c54
    • Chris Lattner's avatar
      Seperate asmstring parsing from emission. This allows the code to be simpler · 0c23ba5c
      Chris Lattner authored
      and more understandable.  It also allows us to do simple things like fold
      consequtive literal strings together.  For example, instead of emitting this
      for the X86 backend:
      
        O  << "adc" << "l" << " ";
      
      we now generate this:
      
        O << "adcl ";
      
      *whoa* :)
      
      This shrinks the X86 asmwriters from 62729->58267 and 65176->58644 bytes
      for the intel/att asm writers respectively.
      
      llvm-svn: 19749
      0c23ba5c
    • Jeff Cohen's avatar
      Don't exclude FileUtilies and ToolRunner from VC++ build · 0e64c73e
      Jeff Cohen authored
      llvm-svn: 19748
      0e64c73e
    • Jeff Cohen's avatar
      Fix VC++ complaint · 142b4a72
      Jeff Cohen authored
      llvm-svn: 19747
      142b4a72
    • Jeff Cohen's avatar
      Fix destroyDirectory bug · ccbd3f0d
      Jeff Cohen authored
      llvm-svn: 19746
      ccbd3f0d
Loading