1. Oct 01, 2020
    • David Tenty's avatar
      [AIX][Clang][Driver] Link libm in c++ mode · afc277b0
      David Tenty authored
      since that is the normal behaviour of other compilers on the platform.
      
      Reviewed By: hubert.reinterpretcast
      
      Differential Revision: https://reviews.llvm.org/D88500
      afc277b0
    • Joseph Huber's avatar
      [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def · 90eaedda
      Joseph Huber authored
      Summary:
      Replace the OpenMP Runtime Library functions used in CGOpenMPRuntimeGPU
      for OpenMP device code generation with ones in OMPKinds.def and use
      OMPIRBuilder for generating runtime calls. This allows us to consolidate
      more OpenMP code generation into the OMPIRBuilder. This patch also
      invalidates specifying target architectures with conflicting pointer
      sizes.
      
      Reviewers: jdoerfert
      
      Subscribers: aaron.ballman cfe-commits guansong llvm-commits sstefan1 yaxunl
      
      Tags: #OpenMP #Clang #LLVM
      
      Differential Revision: https://reviews.llvm.org/D88430
      90eaedda
    • Joseph Huber's avatar
      [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload · 9d2378b5
      Joseph Huber authored
      Summary:
      This patch adds an error to Clang that detects if OpenMP offloading is used
      between two architectures with incompatible pointer sizes. This ensures that
      the data mapping can be done correctly and solves an issue in code generation
      generating the wrong size pointer.
      
      Reviewer: jdoerfert
      
      Subscribers:
      
      Tags: #OpenMP #Clang
      
      Differential Revision:
      9d2378b5
    • Richard Smith's avatar
      Fix interaction of `constinit` and `weak`. · 892df30a
      Richard Smith authored
      We previously took a shortcut and said that weak variables never have
      constant initializers (because those initializers are never correct to
      use outside the variable). We now say that weak variables can have
      constant initializers, but are never usable in constant expressions.
      892df30a
    • Alexandre Rames's avatar
      [Sema] Support Comma operator for fp16 vectors. · 700e6329
      Alexandre Rames authored
      The current half vector was enforcing an assert expecting
       "(LHS is half vector) == (RHS is half vector)"
      for comma.
      
      Reviewed By: ahatanak, fhahn
      
      Differential Revision: https://reviews.llvm.org/D88265
      700e6329
    • Sanjay Patel's avatar
      [CodeGen] add test for NAN creation; NFC · 187686be
      Sanjay Patel authored
      This goes with the APFloat change proposed in
      D88238.
      This is copied from the MIPS-specific test in
      builtin-nan-legacy.c to verify that the normal
      behavior is correct on other targets without the
      complication of an inverted quiet bit.
      187686be
    • Congzhe Cao's avatar
      [AArch64] Avoid pairing loads when the base reg is modified · 8d8cb1ad
      Congzhe Cao authored
      When pairing loads, we should check if in between the two loads the
      base register has been modified. If that is the case then avoid pairing
      them because the second load actually loads from a different address.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D86956
      8d8cb1ad
    • Rainer Orth's avatar
      [asan][test] Several Posix/unpoison-alternate-stack.cpp fixes · 73fb9698
      Rainer Orth authored
      `Posix/unpoison-alternate-stack.cpp` currently `FAIL`s on Solaris/i386.
      Some of the problems are generic:
      
      - `clang` warns compiling the testcase:
      
        compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp:83:7: warning: nested designators are a C99 extension [-Wc99-designator]
              .sa_sigaction = signalHandler,
              ^~~~~~~~~~~~~
        compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp:84:7: warning: ISO C++ requires field designators to be specified in declaration order; field '_funcptr' will be initialized after field 'sa_flags' [-Wreorder-init-list]
              .sa_flags = SA_SIGINFO | SA_NODEFER | SA_ONSTACK,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
        and some more instances.  This can all easily be avoided by initializing
        each field separately.
      
      - The test `SEGV`s in `__asan_memcpy`.  The default Solaris/i386 stack size
        is only 4 kB, while `__asan_memcpy` tries to allocate either 5436
        (32-bit) or 10688 bytes (64-bit) on the stack.  This patch avoids this by
        requiring at least 16 kB stack size.
      
      - Even without `-fsanitize=address` I get an assertion failure:
      
        Assertion failed: !isOnSignalStack(), file compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp, line 117
      
        The fundamental problem with this testcase is that `longjmp` from a
        signal handler is highly unportable; XPG7 strongly warns against it and
        it is thus unspecified which stack is used when `longjmp`ing from a
        signal handler running on an alternative stack.
      
        So I'm `XFAIL`ing this testcase on Solaris.
      
      Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
      
      Differential Revision: https://reviews.llvm.org/D88501
      73fb9698
    • Arthur Eubanks's avatar
      2ab87702
    • Peter Collingbourne's avatar
      scudo: Make it thread-safe to set some runtime configuration flags. · 719ab730
      Peter Collingbourne authored
      Move some of the flags previously in Options, as well as the
      UseMemoryTagging flag previously in the primary allocator, into an
      atomic variable so that it can be updated while other threads are
      running. Relaxed accesses are used because we only have the requirement
      that the other threads see the new value eventually.
      
      The code is set up so that the variable is generally loaded once per
      allocation function call with the exception of some rarely used code
      such as error handlers. The flag bits can generally stay in a register
      during the execution of the allocation function which means that they
      can be branched on with minimal overhead (e.g. TBZ on aarch64).
      
      Differential Revision: https://reviews.llvm.org/D88523
      719ab730
    • Vy Nguyen's avatar
      [llvm-exegesis] Add option to check the hardware support for a given feature before benchmarking. · 4fcd1a8e
      Vy Nguyen authored
      This is mostly for the benefit of the LBR latency mode.
      Right now, it performs no checking. If this is run on non-supported hardware, it will produce all zeroes for latency.
      
      Differential Revision: https://reviews.llvm.org/D85254
      4fcd1a8e
    • Valentin Clement's avatar
      [mlir][openacc] Remove -allow-unregistred-dialect from ops and invalid tests · dd4fb7c8
      Valentin Clement authored
      Switch to a dummy op in the test dialect so we can remove the -allow-unregistred-dialect
      on ops.mlir and invalid.mlir. Change after comment on D88272.
      
      Reviewed By: mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D88587
      dd4fb7c8
  2. Sep 30, 2020