Skip to content
  1. Nov 22, 2019
    • Amy Kwan's avatar
      [CMake] Fix LLVM build non-determinism on RHEL · c84c62c5
      Amy Kwan authored
      On RHEL, the OS tooling (ar, ranlib) is not deterministic by default.
      Therefore, we cannot get bit-for-bit identical builds.
      
      The goal of this patch is that it adds the flags required to force determinism.
      
      Differential Revision: https://reviews.llvm.org/D64817
      c84c62c5
    • czhengsz's avatar
      [PowerPC] combine rlwinm+rlwinm to rlwinm · 29f6f9b2
      czhengsz authored
      combine
      x3 = rlwinm x3, 27, 5, 31
      x3 = rlwinm x3, 19, 0, 12
      
      to
      x3 = rlwinm x3, 14, 0, 12
      
      Reviewed by: steven.zhang
      
      Differential Revision: https://reviews.llvm.org/D70374
      29f6f9b2
    • Wang, Pengfei's avatar
      [X86] Add option 'disable-strictnode-mutation' for tests that respect · 085d7847
      Wang, Pengfei authored
      strict fp semantics. NFCI.
      085d7847
    • Zakk Chen's avatar
      [RISCV] Support mutilib in baremetal environment · 4fccd383
      Zakk Chen authored
      1. Currently only support the set of multilibs same to riscv-gnu-toolchain.
      2. Fix testcase typo causes fail on Windows.
      3. Fix testcases to set empty sysroot.
      
      Reviewers: espindola, asb, kito-cheng, lenary
      
      Reviewed By: lenary
      
      Differential Revision: https://reviews.llvm.org/D67508
      4fccd383
    • Duncan P. N. Exon Smith's avatar
      clang/Modules: Move Serialization/Module.{h,cpp} to ModuleFile, NFC · f7170d17
      Duncan P. N. Exon Smith authored
      Remove some cognitive load by renaming clang/Serialization/Module.h to
      clang/Serialization/ModuleFile.h, since it declares the ModuleFile
      class.  This also makes editing a bit easier, since the basename of the
      file no long conflicts with clang/Basic/Module.h, which declares the
      Module class.  Also move lib/Serialization/Module.cpp to
      lib/Serialization/ModuleFile.cpp.
      f7170d17
    • Artem Dergachev's avatar
      [analyzer] Fix Objective-C accessor body farms after 2073dd2d. · 0b58b80e
      Artem Dergachev authored
      Fix a canonicalization problem for the newly added property accessor stubs that
      was causing a wrong decl to be used for 'self' in the accessor's body farm.
      
      Fix a crash when constructing a body farm for accessors of a property
      that is declared and @synthesize'd in different (but related) interfaces.
      
      Differential Revision: https://reviews.llvm.org/D70158
      0b58b80e
    • Artem Dergachev's avatar
      [analyzer] NFC: Don't clean up range constraints twice. · bbc8662d
      Artem Dergachev authored
      Slightly improves static analysis speed.
      
      Differential Revision: https://reviews.llvm.org/D70150
      bbc8662d
    • Craig Topper's avatar
      [X86] Add test cases for most of the constrained fp libcalls with fp128. · b29e5cdb
      Craig Topper authored
      Add explicit setOperation actions for some to match their none
      strict counterparts. This isn't required, but makes the code
      self documenting that we didn't forget about strict fp. I've
      used LibCall instead of Expand since that's more explicitly what
      we want.
      
      Only lrint/llrint/lround/llround are missing now.
      b29e5cdb
    • Craig Topper's avatar
      [X86] Mark fp128 FMA as LibCall instead of Expand. Add STRICT_FMA as well. · fc4020db
      Craig Topper authored
      The Expand code would fall back to LibCall, but this makes it
      more explicit.
      fc4020db
    • Artem Dergachev's avatar
      [CFG] Add a test for a flaky crash in CFGBlock::getLastCondition(). · 6bbca341
      Artem Dergachev authored
      Push the test separately ahead of time in order to find out whether
      our Memory Sanitizer bots will be able to find the problem.
      
      If not, I'll add a much more expensive test that repeats the current
      test multiple times in order to show up on normal buildbots.
      I really apologize for the potential temporary inconvenience!
      I'll commit the fix as soon as I get the signal.
      
      Differential Revision: https://reviews.llvm.org/D69962
      6bbca341
    • Pengfei Wang's avatar
      [FPEnv] Add an option to disable strict float node mutating to an normal · 22a0edd0
      Pengfei Wang authored
      float node
      
      This patch add an option 'disable-strictnode-mutation' to prevent strict
      node mutating to an normal node.
      So we can make sure that the patch which sets strict-node as legal works
      correctly.
      
      Patch by Chen Liu(LiuChen3)
      
      Differential Revision: https://reviews.llvm.org/D70226
      22a0edd0
    • Alina Sbirlea's avatar
      [LoopInstSimplify] Move MemorySSA verification under flag. · fa09dddd
      Alina Sbirlea authored
      The verification inside loop passes should be done under the
      VerifyMemorySSA flag (enabled by EXPESIVE_CHECKS or explicitly with
      opt), in order to not add to compile time during regular builds.
      fa09dddd
    • Marco Vanotti's avatar
      [libFuzzer] don't use /dev/null for DiscardOuput in Fuchsia. · e5b603a4
      Marco Vanotti authored
      Summary:
      
      This commit moves the `DiscardOutput` function in FuzzerIO to
      FuzzerUtil, so fuchsia can have its own specialized version.
      
      In fuchsia, accessing `/dev/null` is not supported, and there's nothing
      similar to a file that discards everything that is written to it. The
      way of doing something similar in fuchsia is by using `fdio_null_create`
      and binding that to a file descriptor with `fdio_bind_to_fd`.
      
      This change should fix one of the issues with the `-close_fd_mask` flag
      in libfuzzer, in which closing stdout was not working due to
      `fopen("/dev/null", "w")` returning `NULL`.
      
      Reviewers: kcc, aarongreen
      
      Subscribers: #sanitizers, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D69593
      e5b603a4
    • Nathan Ridge's avatar
    • Craig Topper's avatar
      [LegalizeDAG][X86] Add support for turning STRICT_FADD/SUB/MUL/DIV into... · 7696b992
      Craig Topper authored
      [LegalizeDAG][X86] Add support for turning STRICT_FADD/SUB/MUL/DIV into libcalls. Use it for fp128 on x86-64.
      
      This requires a minor hack for f32/f64 strict fadd/fsub to avoid
      turning those into libcalls.
      7696b992
    • Craig Topper's avatar
      [X86] Mark vector STRICT_FADD/STRICT_FSUB as Legal and add mutation to X86ISelDAGToDAG · 95f44cf4
      Craig Topper authored
      The prevents LegalizeVectorOps from scalarizing them. We'll need
      to remove the X86 mutation code when we add isel patterns.
      95f44cf4
    • Craig Topper's avatar
      [X86] Remove regcall calling convention from fp-strict-scalar.ll. Add 32-bit... · 0cc12b8a
      Craig Topper authored
      [X86] Remove regcall calling convention from fp-strict-scalar.ll. Add 32-bit and 64-bit check prefixes.
      
      The regcall was making 32-bit mode pass things in xmm registers
      which made 32-bit and 64-bit more similar. But I have upcoming
      patches that require them to be separated anyway.
      0cc12b8a
    • Alexander Shaposhnikov's avatar
      [llvm-lipo] Add support for -extract · b6d3774a
      Alexander Shaposhnikov authored
      This diff adds support for -extract.
      
      Test plan: make check-all
      
      Differential revision: https://reviews.llvm.org/D70522
      b6d3774a
    • Petr Hosek's avatar
      [Clang] Enable RISC-V support for Fuchsia · 68a3a3b2
      Petr Hosek authored
      We don't have a full sysroot yet, so for now we only include compiler
      support and compiler-rt builtins, the rest of the runtimes will get
      enabled later.
      
      Differential Revision: https://reviews.llvm.org/D70477
      68a3a3b2
    • Marco Vanotti's avatar
      [libFuzzer] Fix unwinding for Fuchsia · 46c7fc22
      Marco Vanotti authored
      Summary:
      This commit fixes part of the issues with stack unwinding in fuchsia for
      arm64 and x86_64. It consists of multiple fixes:
      
      (1) The cfa_offset calculation was wrong, instead of pointing to the
      previous stack pointer, it was pointing to the current  one. It worked in
      most of the cases because the crashing functions already had a
      prologue and had their cfa information relative to another register. The
      fix consists on adding a constant that can be used to calculate the
      crashing function's stack pointer, and base all the cfi information
      relative to that offset.
      
      (2) (arm64) Due to errors with the syntax for the dwarf information, most
      of the `OP_NUM` macros were not working. The problem was that they were
      referred to as `r##NUM` (like `r14`), when it should have been `x##num`
      (like `x14`), or even without the x.
      
      (3) (arm64) The link register was being considered a part of the main
      registers (`r30`), when in the real struct it has its own field. Given
      that the link register is in the same spot in the struct as r[30] would be,
      and that C++ doesn't care about anything, the calculation was still correct.
      
      (4) (x86_64) The stack doesn't need to be aligned to 16 bytes when we
      jump to the trampoline function, but it needs to be before performing
      call instructions. Encoding that logic in cfi information was tricky, so
      we decided to make the cfa information relative to `rbp` and align `rsp`.
      Note that this could have been done using another register directly,
      but it seems cleaner to make a new fake stack frame.
      
      There are some other minor changes like adding a `brk 1` instruction in
      arm64 to make sure that we never return to the crash trampoline (similar to
      what we do in x86_64).
      
      Sadly this commit does not fix unwinding for all use cases for arm64.
      Crashing functions that do not add information related to the return column in
      their cfi information will fail to unwind due to a bug in libunwinder.
      
      Reviewers: mcgrathr, jakehehrlich, phosek, kcc, aarongreen
      
      Subscribers: aprantl, kristof.beyls, #sanitizers, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D69579
      46c7fc22
    • Philip Reames's avatar
      [LoopPred] Robustly handle partially unswitched loops · dfb7a909
      Philip Reames authored
      We may end up with a case where we have a widenable branch above the loop, but not all widenable branches within the loop have been removed.  Since a widenable branch inhibit SCEVs ability to reason about exit counts (by design), we have a tradeoff between effectiveness of this optimization and allowing future widening of the branches within the loop.  LoopPred is thought to be one of the most important optimizations for range check elimination, so let's pay the cost.
      dfb7a909
    • Adrian Prantl's avatar
    • Luís Marques's avatar
      [Object][RISCV] Resolve R_RISCV_32_PCREL · 7bf721e5
      Luís Marques authored
      Summary: Add support for resolving `R_RISCV_32_PCREL` relocations. Those aren't
      actually resolved AFAIK, but support is still needed to avoid llvm-dwarfdump
      errors. The use of these relocations was introduced in D66419 but the
      corresponding resolving wasn't added then. The test adds a check that should
      catch future unresolved relocations.
      
      Reviewers: asb, lenary
      Reviewed By: asb
      Tags: #llvm
      Differential Revision: https://reviews.llvm.org/D70204
      7bf721e5
    • David Tellenbach's avatar
      [AArch64] [FrameLowering] Allow conditional insertion of CFI instruction · 75434366
      David Tellenbach authored
      Summary:
      The insertion of most CFI instructions during AArch64 frame lowering can
      be disabled (e.g. using the function attribute `nounwind`).
      
      This patch enables conditional insertion for one more CFI instruction.
      
      Reviewers: t.p.northover, ostannard
      
      Reviewed By: ostannard
      
      Subscribers: kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70129
      75434366
    • Marco Vanotti's avatar
      [libFuzzer] Fix fd check in DupAndCloseStderr. · 16d9f44f
      Marco Vanotti authored
      Summary:
      This commit fixes the check in the return value from the `DuplicateFile`
      function, which returns a new file descriptor. `DuplicateFile` can
      return 0 if that file descriptor is available (for example, if stdin has
      already been closed).
      
      In particular, this could cause a bug with the `-close_fd_mask` flag in
      some platforms: just call the fuzzer with stdin closed and the
      `-close_fd_mask=2` flag, and stderr will not be muted.
      
      Example fuzzer:
      
      ```
      
      extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
        fprintf(stderr, "STDERR\n");
        fprintf(stdout, "STDOUT\n");
        return 0;
      }
      ```
      
      Invocation (muting both stderr and stdout):
      ```
      ./test -close_fd_mask=3 -runs=1 0<&-
      INFO: Seed: 1155116940
      INFO: Loaded 1 modules   (1 inline 8-bit counters): 1 [0x48b020, 0x48b021),
      INFO: Loaded 1 PC tables (1 PCs): 1 [0x478dc8,0x478dd8),
      INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
      STDERR
      INFO: A corpus is not provided, starting from an empty corpus
      STDERR
      Done 2 runs in 0 second(s)
      ```
      
      Reviewers: mcgrathr, jakehehrlich, phosek, kcc, aarongreen
      
      Subscribers: #sanitizers, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D68775
      16d9f44f
    • Julian Lettner's avatar
    • Philip Reames's avatar
      Further cleanup manipulation of widenable branches [NFC] · 8293f743
      Philip Reames authored
      This is a follow on to aaea2480.  In post commit discussion, Artur and I realized we could cleanup the code using Uses; this patch does so.
      8293f743
    • Joel E. Denny's avatar
      [FileCheck] Make FILECHECK_OPTS useful for its test suite · f471eb8e
      Joel E. Denny authored
      Without this patch, `FILECHECK_OPTS` isn't propagated to FileCheck's
      test suite so that `FILECHECK_OPTS` doesn't inadvertently affect test
      results by affecting the output of FileCheck calls under test.  As a
      result, `FILECHECK_OPTS` is useless for debugging FileCheck's test
      suite.
      
      In `llvm/test/FileCheck/lit.local.cfg`, this patch provides a new
      subsitution, `%ProtectFileCheckOutput`, to address this problem for
      both `FILECHECK_OPTS` and the deprecated
      `FILECHECK_DUMP_INPUT_ON_FAILURE`.  The rest of the patch uses
      `%ProtectFileCheckOutput` throughout the test suite
      
      Fixes PR40284.
      
      Reviewed By: probinson, thopre
      
      Differential Revision: https://reviews.llvm.org/D65121
      f471eb8e
  2. Nov 21, 2019
Loading