Skip to content
  1. Dec 13, 2012
  2. Dec 12, 2012
  3. Dec 11, 2012
    • Tom Stellard's avatar
      Add R600 backend · 75aadc28
      Tom Stellard authored
      A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX
      
      llvm-svn: 169915
      75aadc28
    • Bill Schmidt's avatar
      This patch implements the general dynamic TLS model for 64-bit PowerPC. · c56f1d34
      Bill Schmidt authored
      Given a thread-local symbol x with global-dynamic access, the generated
      code to obtain x's address is:
      
           Instruction                            Relocation            Symbol
        addis ra,r2,x@got@tlsgd@ha           R_PPC64_GOT_TLSGD16_HA       x
        addi  r3,ra,x@got@tlsgd@l            R_PPC64_GOT_TLSGD16_L        x
        bl __tls_get_addr(x@tlsgd)           R_PPC64_TLSGD                x
                                             R_PPC64_REL24           __tls_get_addr
        nop
        <use address in r3>
      
      The implementation borrows from the medium code model work for introducing
      special forms of ADDIS and ADDI into the DAG representation.  This is made
      slightly more complicated by having to introduce a call to the external
      function __tls_get_addr.  Using the full call machinery is overkill and,
      more importantly, makes it difficult to add a special relocation.  So I've
      introduced another opcode GET_TLS_ADDR to represent the function call, and
      surrounded it with register copies to set up the parameter and return value.
      
      Most of the code is pretty straightforward.  I ran into one peculiarity
      when I introduced a new PPC opcode BL8_NOP_ELF_TLSGD, which is just like
      BL8_NOP_ELF except that it takes another parameter to represent the symbol
      ("x" above) that requires a relocation on the call.  Something in the 
      TblGen machinery causes BL8_NOP_ELF and BL8_NOP_ELF_TLSGD to be treated
      identically during the emit phase, so this second operand was never
      visited to generate relocations.  This is the reason for the slightly
      messy workaround in PPCMCCodeEmitter.cpp:getDirectBrEncoding().
      
      Two new tests are included to demonstrate correct external assembly and
      correct generation of relocations using the integrated assembler.
      
      Comments welcome!
      
      Thanks,
      Bill
      
      llvm-svn: 169910
      c56f1d34
    • Patrik Hagglund's avatar
      Revert EVT->MVT changes, r169836-169851, due to buildbot failures. · e98b7a03
      Patrik Hagglund authored
      llvm-svn: 169854
      e98b7a03
    • Patrik Hagglund's avatar
      Change TargetLowering::getTypeForExtArgOrReturn to take and return · ad432a8e
      Patrik Hagglund authored
      MVTs, instead of EVTs.
      
      Accordingly, add bitsLT (and similar) to MVT.
      
      llvm-svn: 169850
      ad432a8e
    • Patrik Hagglund's avatar
      Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of · 03e9628c
      Patrik Hagglund authored
      EVTs.
      
      llvm-svn: 169848
      03e9628c
    • Patrik Hagglund's avatar
      Change TargetLowering::findRepresentativeClass to take an MVT, instead · 8d2e7cf5
      Patrik Hagglund authored
      of EVT.
      
      llvm-svn: 169845
      8d2e7cf5
    • Patrik Hagglund's avatar
      Change TargetLowering::getRegClassFor to take an MVT, instead of EVT. · 3708e548
      Patrik Hagglund authored
      Accordingly, add helper funtions getSimpleValueType (in parallel to
      getValueType) in SDValue, SDNode, and TargetLowering.
      
      This is the first, in a series of patches.
      
      llvm-svn: 169837
      3708e548
    • NAKAMURA Takumi's avatar
      99feb75c
    • Jyotsna Verma's avatar
      Use multiclass for new-value store instructions with MEMri operand. · 92e71918
      Jyotsna Verma authored
      llvm-svn: 169814
      92e71918
    • Evan Cheng's avatar
      Stylistic tweak. · c2bd620f
      Evan Cheng authored
      llvm-svn: 169811
      c2bd620f
    • Chad Rosier's avatar
      Fall back to the selection dag isel to select tail calls. · df42cf39
      Chad Rosier authored
      This shouldn't affect codegen for -O0 compiles as tail call markers are not
      emitted in unoptimized compiles.  Testing with the external/internal nightly
      test suite reveals no change in compile time performance.  Testing with -O1,
      -O2 and -O3 with fast-isel enabled did not cause any compile-time or
      execution-time failures.  All tests were performed on my x86 machine.
      I'll monitor our arm testers to ensure no regressions occur there.
      
      In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue
      and objc_retainAutoreleaseReturnValue as tail calls unconditionally.  While
      it's theoretically true that this is just an optimization, it's an
      optimization that we very much want to happen even at -O0, or else ARC
      applications become substantially harder to debug.
      
      Part of rdar://12553082
      
      llvm-svn: 169796
      df42cf39
    • Evan Cheng's avatar
      Some enhancements for memcpy / memset inline expansion. · 79e2ca90
      Evan Cheng authored
      1. Teach it to use overlapping unaligned load / store to copy / set the trailing
         bytes. e.g. On 86, use two pairs of movups / movaps for 17 - 31 byte copies.
      2. Use f64 for memcpy / memset on targets where i64 is not legal but f64 is. e.g.
         x86 and ARM.
      3. When memcpy from a constant string, do *not* replace the load with a constant
         if it's not possible to materialize an integer immediate with a single
         instruction (required a new target hook: TLI.isIntImmLegal()).
      4. Use unaligned load / stores more aggressively if target hooks indicates they
         are "fast".
      5. Update ARM target hooks to use unaligned load / stores. e.g. vld1.8 / vst1.8.
         Also increase the threshold to something reasonable (8 for memset, 4 pairs
         for memcpy).
      
      This significantly improves Dhrystone, up to 50% on ARM iOS devices.
      
      rdar://12760078
      
      llvm-svn: 169791
      79e2ca90
  4. Dec 10, 2012
  5. Dec 09, 2012
Loading