Skip to content
  1. May 20, 2018
  2. May 19, 2018
    • Roman Lebedev's avatar
      [polly] Drop nonexistant LLVM_PLUGIN_EXPORT macro from llvmGetPassPluginInfo() · df4fed6f
      Roman Lebedev authored
      Fixes build:
      /build/polly/lib/Support/RegisterPasses.cpp:709:80: error: expected ';' after top level declarator
      extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK LLVM_PLUGIN_EXPORT
                                                                                     ^
                                                                                    ;
      
      Was missed in rL332796 / D47082
      
      llvm-svn: 332814
      df4fed6f
    • Haicheng Wu's avatar
      [GlobalMerge] Exit early if only one global is to be merged · 69ba0613
      Haicheng Wu authored
      To save some compilation time and prevent some unnecessary changes.
      
      Differential Revision: https://reviews.llvm.org/D46640
      
      llvm-svn: 332813
      69ba0613
    • Brian Gesiak's avatar
      Re-revert "[Option] Fix PR37006 prefix choice in findNearest" · 9968e0dd
      Brian Gesiak authored
      Summary:
      Reverting due to a test failure in an llvm-mt test on some buildbots, namely
      http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/26020/.
      
      llvm-svn: 332812
      9968e0dd
    • Marshall Clow's avatar
      Implement deduction guides for forward_list · e076700b
      Marshall Clow authored
      llvm-svn: 332811
      e076700b
    • Robert Widmann's avatar
      [LLVM-C] Use Length-Providing Value Name Getters and Setters · 025c78f5
      Robert Widmann authored
      Summary:
      - Provide LLVMGetValueName2 and LLVMSetValueName2 that return and take the length of the provided C string respectively
      - Deprecate LLVMGetValueName and LLVMSetValueName
      
      Reviewers: whitequark, deadalnix
      
      Reviewed By: whitequark
      
      Subscribers: llvm-commits, harlanhaskins
      
      Differential Revision: https://reviews.llvm.org/D46890
      
      llvm-svn: 332810
      025c78f5
    • Max Kazantsev's avatar
      [IRCE] Fix miscompile with range checks against negative values · c0b268f9
      Max Kazantsev authored
      In the patch rL329547, we have lifted the over-restrictive limitation on collected range
      checks, allowing to work with range checks with the end of their range not being
      provably non-negative. However it appeared that the non-negativity of this value was
      assumed in the utility function `ClampedSubtract`. In particular, its reasoning is based
      on the fact that `0 <= SINT_MAX - X`, which is not true if `X` is negative.
      
      The function `ClampedSubtract` is only called twice, once with `X = 0` (which is OK)
      and the second time with `X = IRC.getEnd()`, where we may now see the problem if
      the end is actually a negative value. In this case, we may sometimes miscompile.
      
      This patch is the conservative fix of the miscompile problem. Rather than rejecting
      non-provably non-negative `getEnd()` values, we will check it for non-negativity in
      runtime. For this, we use function `smax(smin(X, 0), -1) + 1` that is equal to `1` if `X`
      is non-negative and is equal to 0 if `X` is negative. If we multiply `Begin, End` of safe
      iteration space by this function calculated for `X = IRC.getEnd()`, we will get the original
      `[Begin, End)` if `IRC.getEnd()` was non-negative (and, thus, `ClampedSubtract` worked
      correctly) and the empty range `[0, 0)` in case if ` IRC.getEnd()` was negative.
      
      So we in fact prohibit execution of the main loop if at least one of range checks was
      made against a negative value (and we figured it out in runtime). It is still better than
      what we have before (non-negativity had to be proved in compile time) and prevents
      us from miscompile, however it is sometiles too restrictive for unsigned range checks
      against a negative value (which in fact can be eliminated).
      
      Once we re-implement `ClampedSubtract` in a way that it handles negative `X` correctly,
      this limitation can be lifted, too.
      
      Differential Revision: https://reviews.llvm.org/D46860
      Reviewed By: samparker
      
      llvm-svn: 332809
      c0b268f9
    • Benjamin Kramer's avatar
      [MergeICmps] Don't crash when memcmp is not available · a76b64ff
      Benjamin Kramer authored
      Fixes clang crashing with -fno-builtin, PR37527.
      
      llvm-svn: 332808
      a76b64ff
    • Simon Pilgrim's avatar
      Fix MSVC unused variable warning. NFCI. · ede0e407
      Simon Pilgrim authored
      AMDGPURegisterInfo::getSubRegFromChannel is a static method - we don't need to get the AMDGPURegisterInfo instance.
      
      llvm-svn: 332807
      ede0e407
    • Brian Gesiak's avatar
      [Driver] Temporarily remove test for LLVM findNearest · 0a0a4d77
      Brian Gesiak authored
      Summary:
      This fixes a failure caused by the revert of https://reviews.llvm.org/rL332805.
      
      llvm-svn: 332806
      0a0a4d77
    • Brian Gesiak's avatar
      Un-revert "[Option] Fix PR37006 prefix choice in findNearest" · 8cfb4b6d
      Brian Gesiak authored
      Summary:
      In https://reviews.llvm.org/rL332804 I loosed the assertion in
      the Clang driver test that forced me to revert
      https://reviews.llvm.org/rL332299. Once this lands I should be
      able to narrow down what caused PS4 buildbots to fail, and
      reinstate the check in that test.
      
      Test Plan: check-llvm & check-clang
      
      llvm-svn: 332805
      8cfb4b6d
    • Brian Gesiak's avatar
      [Driver] Loosen test for LLVM findNearest · bc86c980
      Brian Gesiak authored
      Summary:
      When https://reviews.llvm.org/D46776 landed to improve the behavior of
      `llvm::OptTable::findNearest`, a PS4 buildbot began failing due to an
      assertion that a suggestion "-debug-info-macro" should be provided for
      the unrecognized option `clang -cc1as -debug-info-macros`. All other
      buildbots succeeded in this check, and the PS4 buildbot succeeded in the
      other `findNearest` tests.
      
      Temporarily loosen this check in order to reland the `findNearest`
      change.
      
      Test Plan: check-clang
      
      llvm-svn: 332804
      bc86c980
    • JF Bastien's avatar
      CodeGen: block capture shouldn't ICE · 6b23972f
      JF Bastien authored
      When a lambda capture captures a __block in the same statement, the compiler asserts out because isCapturedBy assumes that an Expr can only be a BlockExpr, StmtExpr, or if it's a Stmt then all the statement's children are expressions. That's wrong, we need to visit all sub-statements even if they're not expressions to see if they also capture.
      
      Fix this issue by pulling out the isCapturedBy logic to use RecursiveASTVisitor.
      
      <rdar://problem/39926584>
      
      llvm-svn: 332801
      6b23972f
    • Eric Fiselier's avatar
      Adjust and fix failing CXX tests after r332799 · fcd50538
      Eric Fiselier authored
      llvm-svn: 332800
      fcd50538
    • Eric Fiselier's avatar
      [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. · b87be18d
      Eric Fiselier authored
      Summary:
      There are cases where the same string or select is repeated verbatim in a lot of diagnostics. This can be a pain to maintain and update. Tablegen provides no way stash the common text somewhere and reuse it in the diagnostics, until now!
      
      This patch allows diagnostic texts to contain `%sub{<definition-name>}`, where `<definition-name>` names a Tablegen record of type `TextSubstitution`. These substitutions are done early, before the diagnostic string is otherwise processed. All `%sub` modifiers will be replaced before the diagnostic definitions are emitted.
      
      The substitution must specify all arguments used by the substitution, and modifier indexes in the substitution are re-numbered accordingly. For example:
      
      ```
      def select_ovl_candidate : TextSubstitution<"%select{function|constructor}0%select{| template| %2}1">;
      ```
      when used as
      ```
      "candidate `%sub{select_ovl_candidate}3,2,1 not viable"
      ```
      will act as if we wrote:
      ```
      "candidate %select{function|constructor}3%select{| template| %1}2 not viable"
      ```
      
      Reviewers: rsmith, rjmccall, aaron.ballman, a.sidorin
      
      Reviewed By: rjmccall
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D46740
      
      llvm-svn: 332799
      b87be18d
    • Marshall Clow's avatar
    • Nico Weber's avatar
      Fix build warning compiling TestPlugin on Windows and disable Passes plugin... · 5533357c
      Nico Weber authored
      Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work
      
      Aaron Ballman reported that TestPlugin warned about it using exception handling
      without /EHsc flag, and that llvmGetPassInfo() had conflicting export
      attributes (dllimport in the header, dllexport in the source file).
      
      /EHsc is because TestPlugin didn't use the llvm_ cmake functions, so
      llvm_update_compile_flags didn't get called for the target
      (llvm_update_compile_flags explicitly passes /Ehs-c-, which fixes the warning).
      Use add_llvm_loadable_module instead of add_library(... MODULE) to fix this.
      This also has the side effect of not building the plugin on Windows. That's not
      a big problem, since before the plugin was built on Windows, but the test
      didn't attempt to load it, due to -DLLVM_ENABLE_PLUGIN not being passed to
      PluginsTests.cpp during compilation on Windows. This makes the plugin behavior
      consistent with e.g. lib/Transforms/Hello/CMakeLists.txt. (This also
      automatically sets LTDL_SHLIB_EXT correctly.)
      
      The dllimport/dllexport warning is more serious: Since LLVM doesn't generally
      use export annotations for its code, the only way the plugin could link was by
      linking in some LLVM libraries both into the test and the dll, so the plugin
      would call the llvm code in the dll instead of the copy in the main executable.
      This means globals weren't shared, and things generally can't work. (I think
      there's a build config where you can build a LLVM.dll which might work, but
      that wasn't how the test was configured. If that config is used, the dll should
      still be built, but I haven't checked).
      
      Now that add_llvm_loadable_module is used, LLVM_LINK_COMPONENTS got linked into
      both executable and plugin on posix too, so unset it after the executable so
      that the plugin doesn't end up with a 2nd copy of things on posix.
      
      https://reviews.llvm.org/D47082
      
      llvm-svn: 332796
      5533357c
    • Yaxun Liu's avatar
      Fix evaluator for non-zero alloca addr space · ea988f1f
      Yaxun Liu authored
      The evaluator goes through BB and creates global vars as temporary values to evaluate
      results of LLVM instructions. It creates undef for alloca, however it assumes alloca
      in addr space 0. If the next instruction is addrspace cast to 0, then we get an invalid
      cast instruction.
      
      This patch let the temp global var have an address space matching alloca addr space,
      so that the valuation can be done.
      
      Differential Revision: https://reviews.llvm.org/D47081
      
      llvm-svn: 332794
      ea988f1f
    • Nico Weber's avatar
      Enable colored diagnostics in ninja builds when building with gcc 4.9+. · 429e06e7
      Nico Weber authored
      GCC has supported -fdiagnostics-color since 4.9.
      
      https://reviews.llvm.org/D47083
      
      llvm-svn: 332793
      429e06e7
    • Kamil Rytarowski's avatar
      Align ClearShadowForThreadStackAndTLS for NetBSD/i386 · 434606c8
      Kamil Rytarowski authored
      Summary:
      The static TLS vector for the main thread on NetBSD/i386 can be
      unaligned in terms of the shadow granularity. Align the start of it with
      Round Down and end of it with Round Up operations for the shadow
      granularity shift.
      
      Example static TLS vector ranges on NetBSD/i386:
      tls_begin_=0xfbee7244 tls_end_=0xfbee726c.
      
      ClearShadowForThreadStackAndTLS() is called from the Main Thread
      bootstrap functions.
      
      This change restores the NetBSD x86 32-bit (i386) support.
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: vitalybuka, joerg
      
      Reviewed By: vitalybuka
      
      Subscribers: kubamracek, llvm-commits, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D46585
      
      llvm-svn: 332792
      434606c8
    • Kamil Rytarowski's avatar
      Port msan_test.cc to NetBSD · 51daee08
      Kamil Rytarowski authored
      Summary:
      The changes allows building this file on NetBSD, mostly by
      disabling the unsupported functions and adding OS-specific
      system includes.
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: joerg, kcc, vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: llvm-commits, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D46712
      
      llvm-svn: 332791
      51daee08
    • Kamil Rytarowski's avatar
      Do not link with -ldl in NetBSD/ASan tests · c7fe7457
      Kamil Rytarowski authored
      Summary:
      The dlopen(3) features on NetBSD are in libc.
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: joerg, vitalybuka, kcc
      
      Reviewed By: vitalybuka
      
      Subscribers: kubamracek, llvm-commits, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D46713
      
      llvm-svn: 332790
      c7fe7457
    • Richard Trieu's avatar
      Fix unused variable warning in non-debug builds. · 6ac21166
      Richard Trieu authored
      llvm-svn: 332789
      6ac21166
    • Piotr Padlewski's avatar
      Propagate nonnull and dereferenceable throught launder · 5642a424
      Piotr Padlewski authored
      Summary:
      invariant.group.launder should not stop propagation
      of nonnull and dereferenceable, because e.g. we would not be
      able to hoist loads speculatively.
      
      Reviewers: rsmith, amharc, kuhar, xbolva00, hfinkel
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46972
      
      llvm-svn: 332788
      5642a424
    • Piotr Padlewski's avatar
      Dissallow non-empty metadata for invariant.group · ce358262
      Piotr Padlewski authored
      Summary:
      This feature is not needed, but it might be usefull in the future
      to use metadata to mark what which function should support it
      (and strip it when not).
      
      Reviewers: rsmith, sanjoy, amharc, kuhar
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45419
      
      llvm-svn: 332787
      ce358262
    • Piotr Padlewski's avatar
      Constant fold launder of null and undef · a26a08cb
      Piotr Padlewski authored
      Summary:
      This might be useful because clang will add
      some barriers for pointer comparisons.
      
      Reviewers: majnemer, dberlin, hfinkel, nlewycky, davide, rsmith, amharc,
      kuhar
      
      Subscribers: davide, amharc, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D32423
      
      llvm-svn: 332786
      a26a08cb
    • Marshall Clow's avatar
      Implement deduction guides for <deque> · dbb6f8a8
      Marshall Clow authored
      llvm-svn: 332785
      dbb6f8a8
    • Sunil Srivastava's avatar
      Do not enable RTTI with -fexceptions, for PS4 · 2ada2499
      Sunil Srivastava authored
      NFC for targets other than PS4.
      
      This patch is a change in behavior for PS4, in that PS4 will no longer enable
      RTTI when -fexceptions is specified (RTTI and Exceptions are disabled by default
      on PS4). RTTI will remain disabled except for types being thrown or caught.
      Also, '-fexceptions -fno-rtti' (previously prohibited on PS4) is now accepted,
      as it is for other targets.
      
      This patch removes some PS4 specific code, making the code cleaner.
      
      Also, in the test file rtti-options.cpp, PS4 tests where the behavior is the
      same as the generic x86_64-linux are removed, making the test cleaner.
      
      Differential Revision: https://reviews.llvm.org/D46982
      
      llvm-svn: 332784
      2ada2499
    • Sam Clegg's avatar
      [WebAssembly] Add option to remove LEB padding at relocate sites · fb983cda
      Sam Clegg authored
      This change adds the ability for lld to remove LEB padding from
      code section. This effectively shrinks the size of the resulting
      binary in proportion to the number of code relocations.
      
      Since there will be a performance cost this is currently only active for
      -O1 and above. Some toolchains may instead want to perform this
      compression as a post linker step (for example running a binary through
      binaryen will automatically compress these values).
      
      I imagine we might want to make this the default in the future.
      
      Differential Revision: https://reviews.llvm.org/D46416
      
      llvm-svn: 332783
      fb983cda
    • Piotr Padlewski's avatar
      [MemDep] Fixed handling of invariant.group · 153fe600
      Piotr Padlewski authored
      Summary:
      Memdep had funny bug related to invariant.groups - because it did not
      invalidated cache, in some very rare cases it was possible to show memory
      dependence of the instruction that was deleted, but because other
      instruction took it's place it resulted in call to vtable!
      Thanks @amharc for repro!.
      
      Reviewers: dberlin, kuhar, amharc
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45320
      
      
      
      Co-authored-by: default avatarKrzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
      llvm-svn: 332781
      153fe600
    • Sanjay Patel's avatar
      [x86] add more FP with FMF simplification tests; NFC · b41a5aff
      Sanjay Patel authored
      llvm-svn: 332780
      b41a5aff
    • Marshall Clow's avatar
      Disable 'missing-braces' warning · 929b4ce7
      Marshall Clow authored
      llvm-svn: 332779
      929b4ce7
  3. May 18, 2018
Loading