Skip to content
  1. Jul 27, 2003
  2. Jul 25, 2003
    • Vikram S. Adve's avatar
      (1) Major fix to the way unused regs. are marked and found for the FP · 536b1922
      Vikram S. Adve authored
          Single and FP double reg types (which share the same reg class).
          Now all methods marking/finding unused regs consider the regType
          within the reg class, and SparcFloatRegClass specializes this code.
      (2) Remove machine-specific regalloc. methods that are no longer needed.
          In particular, arguments and return value from a call do not need
          machine-specific code for allocation.
      (3) Rename TargetRegInfo::getRegType variants to avoid unintentional
          overloading when an include file is omitted.
      
      llvm-svn: 7334
      536b1922
    • Vikram S. Adve's avatar
      1. Fix a case that was marking the invalid reg. num. (-1) as used, · 9b17ad16
      Vikram S. Adve authored
         causing a nasty array bound error later.
      2. Fix silly typo causing logical shift of unsigned long to use
         SRL instead of SRLX.
      
      llvm-svn: 7330
      9b17ad16
  3. Jul 24, 2003
  4. Jul 23, 2003
    • Brian Gaeke's avatar
      Printer.cpp: Ditch addRequired/getAnalysis, because they leave · a92dce47
      Brian Gaeke authored
        Printer::doFinalization() out in the cold.  Now we pass in a TargetMachine
        to Printer's constructor and get the TargetData from the TargetMachine.
       Don't pass TargetMachine or MRegisterInfo objects around in the Printer.
       Constify TargetData references.
      X86.h: Update comment and prototype of createX86CodePrinterPass().
      X86TargetMachine.cpp: Update callers of createX86CodePrinterPass().
      
      llvm-svn: 7275
      a92dce47
    • Brian Gaeke's avatar
      Add, rewrite, and/or reformat many comments. · c3998cb0
      Brian Gaeke authored
      Stop passing ostreams around: we already have one perfectly good ostream
      and we can all share it.
      
      Stop stashing a pointer to TargetData in the Pass object, because that will
      lead to a crash if there are no functions in the module (ouch!)  Instead,
      use addRequired() and getAnalysis(), like we always should have done.
      
      Move the check for ConstantExpr up before the check for isPrimitiveType,
      because we need to be able to catch e.g. ubyte (cast bool false to ubyte),
      whose type is primitive but which is nevertheless a ConstantExpr, by calling
      our specialized handler instead of the AsmWriter. This would result in
      assembler errors when we would try to output something like ".byte (cast
      bool false to ubyte)".
      
      GC some unused variable declarations.
      
      llvm-svn: 7265
      c3998cb0
    • Chris Lattner's avatar
      Remove redundant const qualifiers from cast<> expressions · f26a8ee5
      Chris Lattner authored
      llvm-svn: 7253
      f26a8ee5
    • Chris Lattner's avatar
      Simplify code by using ConstantInt::getRawValue instead of checking to see · 6077c319
      Chris Lattner authored
      whether the constant is signed or unsigned, then casting
      
      llvm-svn: 7252
      6077c319
  5. Jul 21, 2003
  6. Jul 20, 2003
  7. Jul 18, 2003
    • Brian Gaeke's avatar
      Please, save your applause^H^H^H^H^H^H^H^Hflames for the end... · 26bb3c1d
      Brian Gaeke authored
      Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic
      call which causes llc & lli to core-dump.
      
      Add a sort-of treatment of cast double to ulong. I am not really sure
      what a user should expect to see upon casting a negative FP value to
      unsigned long long. But with what is given here, I was able to write
      a program that could cast -123.456 to ulong and back and get -123.0,
      which seems like a step in the right direction.  GCC seems to give you
      0. I don't know if I'd consider that useful.
      
      These cases were coming up in GNU coreutils-5.0.
      
      llvm-svn: 7205
      26bb3c1d
  8. Jul 17, 2003
  9. Jul 16, 2003
  10. Jul 15, 2003
  11. Jul 14, 2003
  12. Jul 11, 2003
    • Brian Gaeke's avatar
      If we have a constant pointer reference to a function, we were printing · b99d6848
      Brian Gaeke authored
      out the entire llvm disassembly for the function at global constant-output
      time, which caused the assembler to barf in 164.gzip. This fixes that
      particular problem (though 164.gzip has other problems with X86 llc.)
      
      llvm-svn: 7168
      b99d6848
    • Brian Gaeke's avatar
      Fix some serious floating-point bugs (fixes test cases such as Oscar, · 5b04987a
      Brian Gaeke authored
      Fhourstones, McCat-vor, and many others...)
      
      Printer.cpp: Print implicit uses for AddRegFrm instructions.  Break gas
      bug workarounds up into separate stanzas of code for each bug.  Add new
      workarounds for fild and fistp.
      
      X86InstrInfo.def: Add O_ST0 implicit uses for more FP instrs where they
      obviously apply. Also add PrintImplUses flags for FP instrs where they
      are necessary for gas to understand the output.
      
      llvm-svn: 7165
      5b04987a
  13. Jul 10, 2003
    • Vikram S. Adve's avatar
      Several important bug fixes: · 4f420ce3
      Vikram S. Adve authored
      (1) Cannot use ANDN(ot), ORN, and XORN for boolean ops, only bitwise ops.
      
      (2) Conditional move instructions must distinguish signed and unsigned
          condition codes, e.g., MOVLE vs. MOVLEU.
      
      (3) Conditional-move-on-register was using the cond-move-on-cc opcodes,
          which produces a valid-looking instruction with bogus registers!
      
      (4) Here's a really cute one: dividing-by-2^k for negative numbers needs to
          add 2^k-1 before shifting, not add 1 after shifting.  Sadly, these
          are the same when k=0 so our poor test case worked fine.
      
      (5) Casting between signed and unsigned values was not correct:
          completely reimplemented.
      
      (6) Zero-extension on unsigned values was bogus: I was only doing the
          SRL and not the SLLX before it.  Don't know WHAT I was thinking!
      
      (7) And the most important class of changes: Sign-extensions on signed values.
          Signed values are not sign-extended after ordinary operations,
          so they must be sign-extended before the following cases:
      	-- passing to an external or unknown function
      	-- returning from a function
      	-- using as operand 2 of DIV or REM
      	-- using as either operand of condition-code setting operation
                 (currently only SUBCC), with smaller than 32-bit operands
      
      
      Also, a couple of improvements:
      
      (1) Fold cast-to-bool into Not(bool).  Need to do this for And, Or, XOR also.
      
      (2) Convert SetCC-Const into a conditional-move-on-register (case 41)
          if the constant is 0.  This was only being done for branch-on-SetCC-Const
          when the branch is folded with the SetCC-Const.
      
      llvm-svn: 7159
      4f420ce3
    • Vikram S. Adve's avatar
      Bug fix in creating constants: need 1U << 31, not 1 << 31. · 8ea738a9
      Vikram S. Adve authored
      llvm-svn: 7158
      8ea738a9
    • Vikram S. Adve's avatar
      Fold cast-to-bool into not. Later, this should also be folded into other · 2f90c823
      Vikram S. Adve authored
      boolean operations: AND, OR, XOR.
      
      llvm-svn: 7157
      2f90c823
    • Vikram S. Adve's avatar
      Several fixes to handling of int CC register: · 65280676
      Vikram S. Adve authored
      (1) An int CC live range must be spilled if there are any interferences,
          even if no other "neighbour" in the interf. graph has been allocated
          that reg. yet.  This is actually true of any class with only one reg!
      
      (2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
          be spilled so that the machine-independent spill code doesn't have to
          make the machine-dependent decision of which CC name to use based on
          operand type: %xcc or %icc.  (These are two halves of the same register.)
      
      (3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
          These should never have been the same, and this is necessary now for #2.
      
      (4) All RDCCR and WRCCR instructions are directly generated with the
          phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
          deal with this.
      
      llvm-svn: 7151
      65280676
  14. Jul 08, 2003
  15. Jul 07, 2003
  16. Jul 06, 2003
  17. Jul 03, 2003
    • Misha Brukman's avatar
      Apparently, the "regType" and "regClass" used in the Sparc backend are not both · bb956054
      Misha Brukman authored
      correct: empirically, "regType" is wrong for a number of registers. Thus, one
      can only rely on the "regClass" to figure out what kind of register one is
      dealing with.
      
      This change switches to using only "regClass" and adds a few extra DEBUG() print
      statements and a few clean-ups in comments and code, mostly minor.
      
      llvm-svn: 7103
      bb956054
  18. Jul 02, 2003
Loading