Skip to content
  1. Jun 27, 2009
    • Chris Lattner's avatar
      Reimplement rip-relative addressing in the X86-64 backend. The new · fea81da4
      Chris Lattner authored
      implementation primarily differs from the former in that the asmprinter
      doesn't make a zillion decisions about whether or not something will be
      RIP relative or not.  Instead, those decisions are made by isel lowering
      and propagated through to the asm printer.  To achieve this, we:
      
      1. Represent RIP relative addresses by setting the base of the X86 addr
         mode to X86::RIP.
      2. When ISel Lowering decides that it is safe to use RIP, it lowers to
         X86ISD::WrapperRIP.  When it is unsafe to use RIP, it lowers to
         X86ISD::Wrapper as before.
      3. This removes isRIPRel from X86ISelAddressMode, representing it with
         a basereg of RIP instead.
      4. The addressing mode matching logic in isel is greatly simplified.
      5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
         passed through various printoperand routines is gone now.
      6. The various symbol printing routines in asmprinter now no longer infer
         when to emit (%rip), they just print the symbol.
      
      I think this is a big improvement over the previous situation.  It does have
      two small caveats though: 1. I implemented a horrible "no-rip" modifier for
      the inline asm "P" constraint modifier.  This is a short term hack, there is
      a much better, but more involved, solution.  2. I had to xfail an 
      -aggressive-remat testcase because it isn't handling the use of RIP in the
      constant-pool reading instruction.  This specific test is easy to fix without
      -aggressive-remat, which I intend to do next.
      
      llvm-svn: 74372
      fea81da4
  2. Jun 26, 2009
  3. Jun 20, 2009
    • Chris Lattner's avatar
      change TLS_ADDR lowering to lower to a real mem operand, instead of matching as · 7d2b0494
      Chris Lattner authored
      a global with that gets printed with the :mem modifier.  All operands to lea's 
      should be handled with the lea32mem operand kind, and this allows the TLS stuff
      to do this.  There are several better ways to do this, but I went for the minimal
      change since I can't really test this (beyond make check).
      
      This also makes the use of EBX explicit in the operand list in the 32-bit, 
      instead of implicit in the instruction.
      
      llvm-svn: 73834
      7d2b0494
  4. Jun 03, 2009
  5. May 11, 2009
  6. May 08, 2009
  7. Apr 30, 2009
  8. Apr 29, 2009
    • Bill Wendling's avatar
      Second attempt: · 084669a1
      Bill Wendling authored
      Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
      use the old behavior, the flag is -O0. This change allows for finer-grained
      control over which optimizations are run at different -O levels.
      
      Most of this work was pretty mechanical. The majority of the fixes came from
      verifying that a "fast" variable wasn't used anymore. The JIT still uses a
      "Fast" flag. I'll change the JIT with a follow-up patch.
      
      llvm-svn: 70343
      084669a1
  9. Apr 28, 2009
  10. Apr 16, 2009
  11. Apr 15, 2009
  12. Apr 13, 2009
    • Dan Gohman's avatar
      Implement x86 h-register extract support. · 57d6bd36
      Dan Gohman authored
       - Add patterns for h-register extract, which avoids a shift and mask,
         and in some cases a temporary register.
       - Add address-mode matching for turning (X>>(8-n))&(255<<n), where
         n is a valid address-mode scale value, into an h-register extract
         and a scaled-offset address.
       - Replace X86's MOV32to32_ and related instructions with the new
         target-independent COPY_TO_SUBREG instruction.
      
      On x86-64 there are complicated constraints on h registers, and
      CodeGen doesn't currently provide a high-level way to express all of them,
      so they are handled with a bunch of special code. This code currently only
      supports extracts where the result is used by a zero-extend or a store,
      though these are fairly common.
      
      These transformations are not always beneficial; since there are only
      4 h registers, they sometimes require extra move instructions, and
      this sometimes increases register pressure because it can force out
      values that would otherwise be in one of those registers. However,
      this appears to be relatively uncommon.
      
      llvm-svn: 68962
      57d6bd36
    • Dan Gohman's avatar
      Remove x86's special-case handling for ISD::TRUNCATE and · f20462c2
      Dan Gohman authored
      ISD::SIGN_EXTEND_INREG. Tablegen-generated code can handle
      these cases, and the scheduling issues observed earlier
      appear to be resolved now.
      
      llvm-svn: 68959
      f20462c2
    • Dan Gohman's avatar
      Use X86::SUBREG_8BIT instead of hard-coding the equivalent constant. · 092b8b6f
      Dan Gohman authored
      llvm-svn: 68951
      092b8b6f
    • Rafael Espindola's avatar
      X86-64 TLS support for local exec and initial exec. · 6d6c6043
      Rafael Espindola authored
      llvm-svn: 68947
      6d6c6043
    • Rafael Espindola's avatar
      In X86DAGToDAGISel::MatchWrapper, if base or index are set, avoid matching · 7186f20a
      Rafael Espindola authored
      only if symbolic addresses are RIP relatives.
      
      llvm-svn: 68924
      7186f20a
  13. Apr 12, 2009
  14. Apr 10, 2009
  15. Apr 08, 2009
    • Rafael Espindola's avatar
      Re-apply 68552. · 3b2df10c
      Rafael Espindola authored
      Tested by bootstrapping llvm-gcc and using that to build llvm.
      
      llvm-svn: 68645
      3b2df10c
    • Bill Wendling's avatar
      Temporarily revert r68552. This was causing a failure in the self-hosting LLVM · 4aa25b79
      Bill Wendling authored
      builds.
      
      --- Reverse-merging (from foreign repository) r68552 into '.':
      U    test/CodeGen/X86/tls8.ll
      U    test/CodeGen/X86/tls10.ll
      U    test/CodeGen/X86/tls2.ll
      U    test/CodeGen/X86/tls6.ll
      U    lib/Target/X86/X86Instr64bit.td
      U    lib/Target/X86/X86InstrSSE.td
      U    lib/Target/X86/X86InstrInfo.td
      U    lib/Target/X86/X86RegisterInfo.cpp
      U    lib/Target/X86/X86ISelLowering.cpp
      U    lib/Target/X86/X86CodeEmitter.cpp
      U    lib/Target/X86/X86FastISel.cpp
      U    lib/Target/X86/X86InstrInfo.h
      U    lib/Target/X86/X86ISelDAGToDAG.cpp
      U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
      U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
      U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
      U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
      U    lib/Target/X86/X86ISelLowering.h
      U    lib/Target/X86/X86InstrInfo.cpp
      U    lib/Target/X86/X86InstrBuilder.h
      U    lib/Target/X86/X86RegisterInfo.td
      
      llvm-svn: 68560
      4aa25b79
  16. Apr 07, 2009
  17. Mar 31, 2009
  18. Mar 30, 2009
  19. Mar 28, 2009
  20. Mar 27, 2009
  21. Mar 14, 2009
    • Dan Gohman's avatar
      Don't forego folding of loads into 64-bit adds when the other · 2293eb60
      Dan Gohman authored
      operand is a signed 32-bit immediate. Unlike with the 8-bit
      signed immediate case, it isn't actually smaller to fold a
      32-bit signed immediate instead of a load. In fact, it's
      larger in the case of 32-bit unsigned immediates, because
      they can be materialized with movl instead of movq.
      
      llvm-svn: 67001
      2293eb60
  22. Mar 13, 2009
    • Dan Gohman's avatar
      Enhance address-mode folding of ISD::ADD to handle cases where the · a1d92423
      Dan Gohman authored
      operands can't both be fully folded at the same time. For example,
      in the included testcase, a global variable is being added with
      an add of two values. The global variable wants RIP-relative
      addressing, so it can't share the address with another base
      register, but it's still possible to fold the initial add.
      
      llvm-svn: 66865
      a1d92423
  23. Feb 13, 2009
  24. Feb 12, 2009
  25. Feb 07, 2009
  26. Feb 06, 2009
  27. Feb 04, 2009
  28. Feb 03, 2009
  29. Jan 27, 2009
Loading