1. Jul 14, 2015
    • NAKAMURA Takumi's avatar
      bbfa514f
    • NAKAMURA Takumi's avatar
      clang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin. · c5e50734
      NAKAMURA Takumi authored
      Thread local storage is not implemented for targeting cygwin.
      
      llvm-svn: 242115
      c5e50734
    • Dawn Perchik's avatar
      Fix debugserver build breakage on Mavericks after lldb commit svn 240728 · aa80814c
      Dawn Perchik authored
      vm_kernel_page_size appears to not be defined on OSX Mavericks, so the
      build fails.  This patch fixes the build by calculating the pagesize if
      _VM_PAGE_SIZE_H_ is not defined.
      
      llvm-svn: 242114
      aa80814c
    • Chaoren Lin's avatar
      Fix FreeBSD build. · e515a5a6
      Chaoren Lin authored
      llvm-svn: 242113
      e515a5a6
    • Rui Ueyama's avatar
      Revert "Make COFF linker work when it's built by clang again." · 159fb4cd
      Rui Ueyama authored
      This reverts commit r242006. The original issue in Clang was fixed in r242009,
      so we can now safely use std::atomic_flag.
      
      llvm-svn: 242112
      159fb4cd
    • NAKAMURA Takumi's avatar
      Give an explicit triple to llvm/test/CodeGen/X86/pr13577.ll. · 326c2c4c
      NAKAMURA Takumi authored
      llvm-svn: 242111
      326c2c4c
    • Rui Ueyama's avatar
      COFF: Fix entry name inference for x86. · a50387f1
      Rui Ueyama authored
      Entry name selection rule is already complicated on x64, but it's more
      complicated on x86 because of the underscore name mangling scheme.
      
      If one of _main, _main@<number> (a C function) or ?main@@... (a C++ function)
      is defined, entry name is _mainCRTStartup. If _wmain, _wmain@<number or
      ?wmain@@... is defined, entry name is _wmainCRTStartup. And so on.
      
      llvm-svn: 242110
      a50387f1
    • Richard Smith's avatar
      Add file missed from r242105. · 8a53a0dd
      Richard Smith authored
      llvm-svn: 242109
      8a53a0dd
    • Matthias Braun's avatar
      Revert "LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization" · 75e668ea
      Matthias Braun authored
      Accidental commit, needs review first.
      
      This reverts commit r242107.
      
      llvm-svn: 242108
      75e668ea
    • Matthias Braun's avatar
      LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization · 4ac4ecda
      Matthias Braun authored
      - Factor out code to query and modify the sign bit of a floatingpoint
        value as an integer. This also works if none of the targets integer
        types is big enough to hold all bits of the floatingpoint value.
      
      - Legalize FABS(x) as FCOPYSIGN(x, 0.0) if FCOPYSIGN is available,
        otherwise perform bit manipulation on the sign bit. The previous code
        used "x >u 0 ? x : -x" which is incorrect for x being -0.0! It also
        takes 34 instructions on ARM Cortex-M4. With this patch we only
        require 5:
          vldr d0, LCPI0_0
          vmov r2, r3, d0
          lsrs r2, r3, #31
          bfi r1, r2, #31, #1
          bx lr
        (This could be further improved if the compiler would recognize that
         r2, r3 is zero).
      
      - Only lower FCOPYSIGN(x, y) = sign(x) ? -FABS(x) : FABS(x) if FABS is
        available otherwise perform bit manipulation on the sign bit.
      
      - Perform the sign(x) test by masking out the sign bit and comparing
        with 0 rather than shifting the sign bit to the highest position and
        testing for "<s 0". For x86 copysignl (on 80bit values) this gets us:
          testl $32768, %eax
        rather than:
          shlq $48, %rax
          sets %al
          testb %al, %al
      
      llvm-svn: 242107
      4ac4ecda
    • Matthias Braun's avatar
      X86: Check output of x86 copysignl testcase. · b457ed33
      Matthias Braun authored
      This makes the changes in an upcoming patch visible.
      
      llvm-svn: 242106
      b457ed33
    • Richard Smith's avatar
      [modules] When diagnosing errors in module map files found by 'extern module'... · ae6df27e
      Richard Smith authored
      [modules] When diagnosing errors in module map files found by 'extern module' declarations, show how we got to that module map file.
      
      llvm-svn: 242105
      ae6df27e
    • Andrew Wilkins's avatar
      Add capability to get and set the personalitty function from the C API · 3bdfc1cd
      Andrew Wilkins authored
      Summary:
      The capability was lost with D10429 where the personality function was set at function level rather than landing pad level. Now there is no way to get/set the personality function from the C API. That is a problem.
      
      Note that the whole thing could be avoided by improving the C API testing, as started by D10725
      
      Reviewers: chandlerc, bogner, majnemer, andrew.w.kaylor, rafael, rnk, axw
      
      Subscribers: rafael, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D10946
      
      llvm-svn: 242104
      3bdfc1cd
    • Chris Bieneman's avatar
      [CMake] Forgot to quote the first part of STREQUAL. · d36f614e
      Chris Bieneman authored
      llvm-svn: 242103
      d36f614e
    • Chris Bieneman's avatar
      [CMake] We shouldn't be storing values in the cache unless they actually need CMake cache behavior. · 3da1b6e2
      Chris Bieneman authored
      add_llvm_external_project puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache even if it is just the in-tree default path. This causes all sorts of oddness, and makes it so that I can't change the behavior of this variable.
      
      This patch never puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache. It will only end up in the cache if it is specified on the command line, which is the correct behavior.
      
      There is also a temporary change to remove non-default values from the cache if they are already present. This should have the impact of cleaning out unncecissary values from the caches on the buildbots and people's local build directories. This part of the change is marked with a TODO and can be removed in a few days.
      
      llvm-svn: 242102
      3da1b6e2
    • Chaoren Lin's avatar
      Refactor Unix signals. · 98d0a4b3
      Chaoren Lin authored
      Summary:
      - Consolidate Unix signals selection in UnixSignals.
      - Make Unix signals available from platform.
      - Add jSignalsInfo packet to retrieve Unix signals from remote platform.
      - Get a copy of the platform signal for each remote process.
      - Update SB API for signals.
      - Update signal utility in test suite.
      
      Reviewers: ovyalov, clayborg
      
      Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D11094
      
      llvm-svn: 242101
      98d0a4b3
    • Rafael Espindola's avatar
      Add a herper function. NFC. · 2b05416b
      Rafael Espindola authored
      llvm-svn: 242100
      2b05416b
    • Adrian Prantl's avatar
      Remove a completely redundant initialization of llvm::TimePassesIsEnabled, · 5fe5b90b
      Adrian Prantl authored
      which is actually the variable backing up the llvm -time-passes command
      line argument.
      llvm::TimePassesIsEnabled is actually being initialized in CodeGenAction.
      
      llvm-svn: 242099
      5fe5b90b
    • Michael J. Spencer's avatar
      Fix warnings. · 50ed5308
      Michael J. Spencer authored
      llvm-svn: 242098
      50ed5308
    • Evgeniy Stepanov's avatar
      Basic code generation for MSan use-after-dtor. · 7cacbe4d
      Evgeniy Stepanov authored
      Under the -fsanitize-memory-use-after-dtor (disabled by default) insert
      an MSan runtime library call at the end of every destructor.
      
      Patch by Naomi Musgrave.
      
      llvm-svn: 242097
      7cacbe4d
    • Rafael Auler's avatar
      [LinkerScript] Don't create unnecessarily large segments · 2c4af3ea
      Rafael Auler authored
      When using a linker script expression to change the address of a section, even
      if the new address is more than a page of distance from the old address, lld
      may put everything in the same segment, forcing it to be unnecessarily large.
      This patch changes the logic in Segment::assignVirtualAddress() and
      Segment::assignFileOffsets() to allow the segment to be sliced into two or more
      if it detects a linker script expression that changes a section address.
      
      Differential Revision: http://reviews.llvm.org/D10952
      
      llvm-svn: 242096
      2c4af3ea
    • Alex Lorenz's avatar
      MIR Serialization: Serialize the variable sized stack objects. · 418f3ec1
      Alex Lorenz authored
      llvm-svn: 242095
      418f3ec1
    • Richard Smith's avatar
    • Michael J. Spencer's avatar
      Put explicit template instantiations in the correct namespace. · f754b1fe
      Michael J. Spencer authored
      llvm-svn: 242093
      f754b1fe
    • Michael J. Spencer's avatar
      Remove commented out code. · 64661cdb
      Michael J. Spencer authored
      llvm-svn: 242092
      64661cdb
    • Reid Kleckner's avatar
      Update enforceKnownAlignment after the isWeakForLinker semantic change · 486fa397
      Reid Kleckner authored
      Previously we would refrain from attempting to increase the linkage of
      available_externally globals because they were considered weak for the
      linker. Now they are treated more like a declaration instead of a weak
      definition.
      
      This was causing SSE alignment faults in Chromuim, when some code
      assumed it could increase the alignment of a dllimported global that it
      didn't control.  http://crbug.com/509256
      
      llvm-svn: 242091
      486fa397
    • Samuel Antao's avatar
      [OpenMP] Add REQUIRES pragma to threadprivate regression tests. · 3e1ccbe8
      Samuel Antao authored
      llvm-svn: 242090
      3e1ccbe8
    • Rafael Auler's avatar
      [LinkerScript] Fix bug in Segment::assignVirtualAddress() · a4917f74
      Rafael Auler authored
      When calculating the start address and size of a segment, lld mistakenly
      attributed the start address of the last segment slice to the whole segment
      when it should consider the start address of the first slice. In this case, in a
      multi-slice segment, Segment::assignVirtualAddress() will return a wrong
      segment start address to TargetLayout::assignVirtualAddress(). The effect of
      this miscalculation is to allocate some program headers in unnecessarily far
      away addresses. This commit fixes this.
      
      Differential Revision: http://reviews.llvm.org/D10951
      
      llvm-svn: 242089
      a4917f74
    • Michael J. Spencer's avatar
      Initial ELF port. · 8a414541
      Michael J. Spencer authored
      This is a direct port of the new PE/COFF linker to ELF.
      
      It can take a single object file and generate a valid executable that executes at the first byte in the text section.
      
      llvm-svn: 242088
      8a414541
    • David Majnemer's avatar
      [Intrin.h] Use __ATOMIC_SEQ_CST instead of '5' · e0b863f4
      David Majnemer authored
      No functionality change is intended.
      
      llvm-svn: 242087
      e0b863f4
    • David Majnemer's avatar
      [Intrin.h] Make the variable names more consistent · 56e46674
      David Majnemer authored
      No functionality change intended.
      
      llvm-svn: 242086
      56e46674
    • Artem Belevich's avatar
      [cuda] Driver changes to compile and stitch together host and device-side CUDA code. · 0ff05cd1
      Artem Belevich authored
        NOTE: reverts r242077 to reinstate r242058, r242065, 242067
              and includes fix for OS X test failures.
      
        - Changed driver pipeline to compile host and device side of CUDA
          files and incorporate results of device-side compilation into host
          object file.
      
        - Added a test for cuda pipeline creation in clang driver.
      
        New clang options:
        --cuda-host-only   - Do host-side compilation only.
        --cuda-device-only - Do device-side compilation only.
      
        --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side
          compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more
          than once in which case one device-compilation will be done per
          unique specified GPU architecture.
      
        Differential Revision: http://reviews.llvm.org/D9509
      
      llvm-svn: 242085
      0ff05cd1
    • Alex Lorenz's avatar
      MIR Serialization: Serialize the sub register indices. · 2eacca86
      Alex Lorenz authored
      This commit serializes the sub register indices from the register machine
      operands.
      
      Reviewers: Duncan P. N. Exon Smith
      llvm-svn: 242084
      2eacca86
    • Rafael Espindola's avatar
      Add missing file. · 8c1a9102
      Rafael Espindola authored
      Sorry about that.
      
      llvm-svn: 242083
      8c1a9102
    • Rafael Espindola's avatar
      Fix reading archive members with / in the name. · c60d0d2a
      Rafael Espindola authored
      This is important for thin archives.
      
      llvm-svn: 242082
      c60d0d2a
    • Bill Schmidt's avatar
      [PPC64LE] More improvements to VSX swap optimization · 15deb803
      Bill Schmidt authored
      This patch allows VSX swap optimization to succeed more frequently.
      Specifically, it is concerned with common code sequences that occur
      when copying a scalar floating-point value to a vector register.  This
      patch currently handles cases where the floating-point value is
      already in a register, but does not yet handle loads (such as via an
      LXSDX scalar floating-point VSX load).  That will be dealt with later.
      
      A typical case is when a scalar value comes in as a floating-point
      parameter.  The value is copied into a virtual VSFRC register, and
      then a sequence of SUBREG_TO_REG and/or COPY operations will convert
      it to a full vector register of the class required by the context.  If
      this vector register is then used as part of a lane-permuted
      computation, the original scalar value will be in the wrong lane.  We
      can fix this by adding a swap operation following any widening
      SUBREG_TO_REG operation.  Additional COPY operations may be needed
      around the swap operation in order to keep register assignment happy,
      but these are pro forma operations that will be removed by coalescing.
      
      If a scalar value is otherwise directly referenced in a computation
      (such as by one of the many XS* vector-scalar operations), we
      currently disable swap optimization.  These operations are
      lane-sensitive by definition.  A MentionsPartialVR flag is added for
      use in each swap table entry that mentions a scalar floating-point
      register without having special handling defined.
      
      A common idiom for PPC64LE is to convert a double-precision scalar to
      a vector by performing a splat operation.  This ensures that the value
      can be referenced as V[0], as it would be for big endian, whereas just
      converting the scalar to a vector with a SUBREG_TO_REG operation
      leaves this value only in V[1].  A doubleword splat operation is one
      form of an XXPERMDI instruction, which takes one doubleword from a
      first operand and another doubleword from a second operand, with a
      two-bit selector operand indicating which doublewords are chosen.  In
      the general case, an XXPERMDI can be permitted in a lane-swapped
      region provided that it is properly transformed to select the
      corresponding swapped values.  This transformation is to reverse the
      order of the two input operands, and to reverse and complement the
      bits of the selector operand (derivation left as an exercise to the
      reader ;).
      
      A new test case that exercises the scalar-to-vector and generalized
      XXPERMDI transformations is added as CodeGen/PowerPC/swaps-le-5.ll.
      The patch also requires a change to CodeGen/PowerPC/swaps-le-3.ll to
      use CHECK-DAG instead of CHECK for two independent instructions that
      now appear in reverse order.
      
      There are two small unrelated changes that are added with this patch.
      First, the XXSLDWI instruction was incorrectly omitted from the list
      of lane-sensitive instructions; this is now fixed.  Second, I observed
      that the same webs were being rejected over and over again for
      different reasons.  Since it's sufficient to reject a web only once, I
      added a check for this to speed up the compilation time slightly.
      
      llvm-svn: 242081
      15deb803
    • Samuel Antao's avatar
      [OpenMP] Add TLS-based implementation for threadprivate directive. · f8b5012d
      Samuel Antao authored
      llvm-svn: 242080
      f8b5012d
    • Adrian McCarthy's avatar
      Fix Windows build break related to MainLoop. · 6c40c5e0
      Adrian McCarthy authored
      llvm-svn: 242079
      6c40c5e0
    • Rui Ueyama's avatar
      COFF: Fix x86 delay-load helper function name. · 6d24908f
      Rui Ueyama authored
      If /delayload option is given, we have to resolve __delayLoadHelper2
      since the function is the dynamic loader to delay-load DLLs.
      The function name is mangled in x86 as ___delayLoadHelper2@8.
      
      llvm-svn: 242078
      6d24908f
    • Rafael Espindola's avatar
      This reverts commit r242058, r242065, r242067. · abbd6d68
      Rafael Espindola authored
      The tests were failing on OS X.
      
      Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code."
      Revert "Fixed regex to properly match '64' in the test case."
      Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least."
      
      llvm-svn: 242077
      abbd6d68