Skip to content
  1. Nov 07, 2019
  2. Nov 06, 2019
    • Lang Hames's avatar
      [docs] Fix references to a renamed flag. · baaa0973
      Lang Hames authored
      The -use-mcjit option was replaced with -jit-kind=mcjit a while back. This patch
      updates the docs to reflect that.
      
      Patch by Yu Jian. Thanks Jian!
      baaa0973
    • Roman Lebedev's avatar
      [ConstantRange] Add `subWithNoWrap()` method · 7fbe5d4b
      Roman Lebedev authored
      Summary:
      Much like D67339, adds ConstantRange handling for
      when we know no-wrap behavior of the `sub`.
      
      Unlike addWithNoWrap(), we only get lucky re returning empty set
      for signed wrap. For unsigned, we must perform overflow check manually.
      
      A patch that makes use of this in LVI (CVP) to be posted later.
      
      Reviewers: nikic, shchenz, efriedma
      
      Reviewed By: nikic
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69918
      7fbe5d4b
    • Roman Lebedev's avatar
      [ConstantRange] Cleanup addWithNoWrap() by just piggybacking on sadd_sat()/uadd_sat() · 365d729e
      Roman Lebedev authored
      As discussed in https://reviews.llvm.org/D69918
      that happens to work as intended, and returns empty set if
      there is always an overflow because we get lucky with intersection.
      Since there's now an explicit test for that, let's prefer cleaner code.
      365d729e
    • Roman Lebedev's avatar
      [ConstantRange] TestAddWithNo*WrapExhaustive: check that all overflow means empty set · b5ddcb9f
      Roman Lebedev authored
      As disscussed in https://reviews.llvm.org/D69918 / https://reviews.llvm.org/D67339
      that is an implied postcondition, but it's not really fully tested.
      b5ddcb9f
    • Lang Hames's avatar
      [JITLink] Refactor EH-frame handling to support eh-frames with existing relocs. · 76aee8a3
      Lang Hames authored
      Some targets (E.g. MachO/arm64) use relocations to fix some CFI record fields
      in the eh-frame section. When relocations are used the initial (pre-relocation)
      content of the eh-frame section can no longer be interpreted by following the
      eh-frame specification. This causes errors in the existing eh-frame parser.
      
      This patch moves eh-frame handling into two LinkGraph passes that are run after
      relocations have been parsed (but before they are applied). The first] pass
      breaks up blocks in the eh-frame section into per-CFI-record blocks, and the
      second parses blocks of (potentially multiple) CFI records and adds the
      appropriate edges to any CFI fields that do not have existing relocations.
      These passes can be run independently of one another. By handling eh-frame
      splitting/fixing with LinkGraph passes we can both re-use existing relocations
      for CFI record fields and avoid applying eh-frame fixups before parsing the
      section (which would complicate the linker and require extra temporary
      allocations of working memory).
      76aee8a3
    • Fred Riss's avatar
      Testuite: Support Asan test with remote testing · 8243918f
      Fred Riss authored
      To do so, we need to register the sanitizer libraries with the target
      so that they get uploaded before running. This patch adds a helper to
      the test class to this effect.
      8243918f
    • shafik's avatar
      [LLDB] Fix handling for the clang name mangling extension for block invocations · 83393d27
      shafik authored
      Add support for clangs  mangling extension for block invocations.
      
      Differential Revision: https://reviews.llvm.org/D69738
      83393d27
    • Alexandre Ganea's avatar
      [Orc] Fix iterator usage after remove · 007d173e
      Alexandre Ganea authored
      Differential Revision: https://reviews.llvm.org/D69805
      007d173e
    • Kazu Hirata's avatar
      [JumpThreading] Factor out code to clone instructions (NFC) · f0f73ed8
      Kazu Hirata authored
      Summary:
      This patch factors out code to clone instructions -- partly for
      readability and partly to facilitate an upcoming patch of my own.
      
      Reviewers: wmi
      
      Subscribers: hiraditya, jfb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69861
      f0f73ed8
    • Philip Reames's avatar
      [WC] Fix a subtle bug in our definition of widenable branch · 686f449e
      Philip Reames authored
      We had a subtle, but nasty bug in our definition of a widenable branch, and thus in the transforms which used that utility. Specifically, we returned true for any branch which included a widenable condition within it's condition, regardless of whether that widenable condition also had other uses.
      
      The problem is that the result of the WC() call is defined to be one particular value. As such, all users must agree as to what that value is. If we widen a branch without also updating *all other users* of the WC in the same way, we have broken the required semantics.
      
      Most of the textual diff is updating existing transforms not to leave dead uses hanging around. They're largely NFC as the dead instructions would be immediately deleted by other passes. The reason to make these changes is so that the transforms preserve the widenable branch form.
      
      In practice, we don't get bitten by this only because it isn't profitable to CSE WC() calls and the lowering pass from guards uses distinct WC calls per branch.
      
      Differential Revision: https://reviews.llvm.org/D69916
      686f449e
    • Dávid Bolvanský's avatar
    • Haibo Huang's avatar
      [lldb] Record framework build path and use it everywhere · 77a60f0d
      Haibo Huang authored
      This avoids config time dependencies on liblldb. And enables other refactoring.
      77a60f0d
    • Philip Reames's avatar
      [LoopPred] Fix two subtle issues found by inspection · 9bfa5ab3
      Philip Reames authored
      This patch fixes two issues noticed by inspection when going to enable the loop predication code in IndVarSimplify.
      
      Issue 1 - Both the LoopPredication transform, and the already on by default optimizeLoopExits transform, modify the exit count of the exits they modify. (either to 0 or Infinity) Looking at the code more closely, this was not reflected into SCEV and we were instead running later transforms with incorrect SCEVs. Fixing this requires forgetting the loop, weakening a too strong assert, and updating SCEV to not pessimize results when a loop is provable untaken. I haven't been able to find a test case to demonstrate the miscompile.
      
      Issue 2 - For modules without a data layout, we can end up with unsized pointer typed exit counts. Just bail out of this case.
      
      I think these are the last two issues which need addressed before we enable this by default. The code has already survived a decent amount of fuzzing without revealing either of the above.
      
      Differential Revision: https://reviews.llvm.org/D69695
      9bfa5ab3
    • Joel E. Denny's avatar
      [lit] Protect full test suite from FILECHECK_OPTS · 6cecd3c3
      Joel E. Denny authored
      lit's test suite calls lit multiple times for various sample test
      suites.  `FILECHECK_OPTS` is safe for FileCheck calls in lit's test
      suite.  It's not safe for FileCheck calls in the sample test suites,
      whose output affects the results of lit's test suite.
      
      Without this patch, only one such sample test suite is protected from
      `FILECHECK_OPTS`, and currently `shtest-shell.py` breaks with
      `FILECHECK_OPTS=-vv`.  Moreover, it's hard to predict the future,
      especially false passes.  Thus, this patch protects all existing and
      future sample test suites from `FILECHECK_OPTS` (and the deprecated
      `FILECHECK_DUMP_INPUT_ON_FAILURE`).
      
      Reviewed By: probinson
      
      Differential Revision: https://reviews.llvm.org/D65156
      6cecd3c3
    • Craig Topper's avatar
      [X86] Clamp large constant shift amounts for MMX shift intrinsics to 8-bits. · 641d2e52
      Craig Topper authored
      The MMX intrinsics for shift by immediate take a 32-bit shift
      amount but the hardware for shifting by immediate only encodes
      8-bits. For the intrinsic we don't require the shift amount to
      fit in 8-bits in the frontend because we don't check that its an
      immediate in the frontend. If its is not an immediate we move it
      to an MMX register and use the shift by register.
      
      But if it is an immediate we'll use the shift by immediate
      instruction. But we need to change the shift amount to 8-bits.
      We were previously doing this accidentally by masking it in the
      encoder. But this can make a large shift amount into a small
      in bounds shift amount. Instead we should clamp larger shift
      amounts to 255 so that the they don't become in bounds.
      
      Fixes PR43922
      641d2e52
    • Eli Friedman's avatar
      [AArch64] Re-add patterns for (s/u)mull2. · 35cf9a1f
      Eli Friedman authored
      These patterns were added in D46009, but removed in D54276 due to
      missing test coverage.
      
      Differential Revision: https://reviews.llvm.org/D69831
      35cf9a1f
    • paulhoad's avatar
      [clang-format] [NFC] update the documentation in Format.h to allow... · eadb65f2
      paulhoad authored
      [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)
      
      Summary:
      a change {D67541} cause LanguageStandard to now be subtly different from all other clang-format options, in that the Enum value (less the prefix) is not always allowed as valid as the configuration option.
      
      This caused the ClangFormatStyleOptions.rst and the Format.h to diverge so that the ClangFormatStyleOptions.rst could no longer be generated from the Format.h using dump_format_stlye.py
      
      This fix tried to remedy that:
      
      1) by allowing an additional comment (in Format.h) after the enum to be used as the `in configuration ( XXXX )`  text, and changing the dump_format_style.py to support that.
      
      This makes the following code:
      
      ```
      enum {
      ...
      LS_Cpp03, // c++03
      LS_Cpp11, // c++11
      ...
      };
      ```
      
      would render as:
      
      ```* ``LS_Cpp03`` (in configuration: ``c++03``)
      * ``LS_Cpp11`` (in configuration: ``c++11``)
      ```
      
      And we also  move the deprecated alias into the text of the enum (otherwise it won't be added at the end as an option)
      
      This patch includes a couple of other whitespace changes which help bring Format.h and ClangFormatStyleOptions.rst almost back into line and regeneratable...  (there is still one more)
      
      Reviewers: klimek, mitchell-stellar, sammccall
      
      Reviewed By: mitchell-stellar, sammccall
      
      Subscribers: mrexodia, cfe-commits
      
      Tags: #clang, #clang-format
      
      Differential Revision: https://reviews.llvm.org/D69433
      eadb65f2
    • Alexander Shaposhnikov's avatar
      Introduce llvm-install-name-tool · b5913e6d
      Alexander Shaposhnikov authored
      This diff adds a new "driver" for llvm-objcopy
      which is supposed to emulate the behavior of install-name-tool.
      
      Differential revision: https://reviews.llvm.org/D69146
      
      Test plan: make check-all
      b5913e6d
    • Steven Wu's avatar
      Fix a typo in my previous commit · 2293b3f1
      Steven Wu authored
      2293b3f1
    • David Tenty's avatar
      [NFC] Add SUPPORT_PLUGINS to add_llvm_executable() · 6740a88d
      David Tenty authored
      Summary:
      this allows us to move logic about when it is appropriate set
      LLVM_NO_DEAD_STRIP out of each tool and into add_llvm_executable,
      which will enable future platform specific handling.
      
      This is a follow on to the reverted D69356
      
      Reviewers: hubert.reinterpretcast, beanz, lhames
      
      Reviewed By: beanz
      
      Subscribers: mgorny, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D69638
      6740a88d
Loading