Skip to content
  1. Nov 05, 2019
  2. Nov 04, 2019
  3. Nov 02, 2019
  4. Nov 01, 2019
    • Fangrui Song's avatar
      [X86] Fix -DBUILD_SHARED_LIBS=on builds after D69568/llvmorg-10-init-8877-g3a399c09878 · add76dd3
      Fangrui Song authored
      In -DBUILD_SHARED_LIBS=on builds, a component must specify its direct dependencies to satisfy -Wl,-z,defs (added by llvm/modules/HandleLLVMOptions.cmake).
      
      Core is a direct dependency via transitive header inclusion:
      
        ld.lld: error: undefined symbol: llvm::LLVMContext::LLVMContext()
        >>> referenced by MachineSizeOptsTest.cpp
        >>>               unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:(testing::internal::TestFactoryImpl<(anonymous namespace)::MachineSizeOptsTest_Test_Test>::CreateTest())
      
      MC is a direct dependency via transitive header inclusion:
      
        ld.lld: error: undefined symbol: llvm::MCTargetOptions::MCTargetOptions()
        >>> referenced by MachineSizeOptsTest.cpp
        >>>               unittests/Target/X86/CMakeFiles/X86Tests.dir/MachineSizeOptsTest.cpp.o:((anonymous namespace)::MachineSizeOptsTest::SetUp())
      add76dd3
    • Hiroshi Yamauchi's avatar
      Remove unnecessary unit test dependencies. · 3a399c09
      Hiroshi Yamauchi authored
      Summary: This is to address comment on D69409.
      
      Reviewers: davidxl, thakis
      
      Subscribers: mgorny, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69568
      3a399c09
  5. Oct 31, 2019
  6. Oct 30, 2019
    • Lang Hames's avatar
      [JITLink] Remove relocation unit tests. · cd24a00b
      Lang Hames authored
      These tests were written before llvm-jitlink supported regression testing of
      relocation support. They are now redundant.
      cd24a00b
    • Lang Hames's avatar
      [JITLink] Add missing include, explicitly qualify STLExtras functions. · 4ceca8fa
      Lang Hames authored
      This should fix the failures on some bots due to commit
      b9d8e23b.
      4ceca8fa
    • Evandro Menezes's avatar
      [clang][llvm] Obsolete Exynos M1 and M2 · 215da660
      Evandro Menezes authored
      215da660
    • Lang Hames's avatar
      [JITLink] Add a utility for splitting blocks at a given index. · b9d8e23b
      Lang Hames authored
      LinkGraph::splitBlock will split a block at a given index, returning a new
      block covering the range [ 0, index ) and modifying the original block to
      cover the range [ index, original-block-size ). Block addresses, content,
      edges and symbols will be updated as necessary. This utility will be used
      in upcoming improvements to JITLink's eh-frame support.
      b9d8e23b
    • Alina Sbirlea's avatar
      [LegacyPassManager] Delete BasicBlockPass/Manager. · 9f0ff0b2
      Alina Sbirlea authored
      Summary:
      Delete the BasicBlockPass and BasicBlockManager, all its dependencies and update documentation.
      The BasicBlockManager was improperly tested and found to be potentially broken, and was deprecated as of rL373254.
      
      In light of the switch to the new pass manager coming before the next release, this patch is a first cleanup of the LegacyPassManager.
      
      Reviewers: chandlerc, echristo
      
      Subscribers: mehdi_amini, sanjoy.google, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69121
      9f0ff0b2
    • Georgii Rymar's avatar
      [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex*) as... · 6e779e95
      Georgii Rymar authored
      [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex*) as LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR.
      
      I am using it in https://reviews.llvm.org/D69399.
      
      This change changes how obj2yaml dumps arrays of `llvm::yaml::Hex8/llvm::yaml::Hex16/llvm::yaml::Hex32`
      from:
      
      ```
      PayloadBytes:
      - 0x01
      - 0x02
      ...
      ```
      
      To
      
      ```
      PayloadBytes:    [ 0x01, 0x02, ... ]
      ```
      
      The latter way is shorter and looks better for arrays.
      
      Differential revision: https://reviews.llvm.org/D69558
      6e779e95
    • Jay Foad's avatar
      [IR] Allow fast math flags on calls with floating point array type. · 2da4b6e5
      Jay Foad authored
      Summary:
      This extends the rules for when a call instruction is deemed to be an
      FPMathOperator, which is based on the type of the call (i.e. the return
      type of the function being called). Previously we only allowed
      floating-point and vector-of-floating-point types. Now we also allow
      arrays (nested to any depth) of floating-point and
      vector-of-floating-point types.
      
      This was motivated by llpc, the pipeline compiler for AMD GPUs
      (https://github.com/GPUOpen-Drivers/llpc). llpc has many math library
      functions that operate on vectors, typically represented as <4 x float>,
      and some that operate on matrices, typically represented as
      [4 x <4 x float>], and it's useful to be able to decorate calls to all
      of them with fast math flags.
      
      Reviewers: spatel, wristow, arsenm, hfinkel, aemerson, efriedma, cameron.mcinally, mcberg2017, jmolloy
      
      Subscribers: wdng, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69161
      2da4b6e5
    • Pavel Labath's avatar
      minidump: Rename some architecture constants · 83a55c6a
      Pavel Labath authored
      The architecture enum contains two kinds of contstants: the "official" ones
      defined by Microsoft, and unofficial constants added by breakpad to cover the
      architectures not described by the first ones.
      
      Up until now, there was no big need to differentiate between the two. However,
      now that Microsoft has defined
      https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
      a constant for ARM64, we have a name clash.
      
      This patch renames all breakpad-defined constants with to include the prefix
      "BP_". This frees up the name "ARM64", which I'll re-introduce with the new
      "official" value in a follow-up patch.
      
      Reviewers: amccarth, clayborg
      
      Subscribers: lldb-commits, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D69285
      83a55c6a
    • Fangrui Song's avatar
      358c2918
    • Fedor Sergeev's avatar
      [ADT] add equality operator for SmallSet · 4aee4c99
      Fedor Sergeev authored
      Makes it easier to migrate existing code that uses std::set.
      
      Reviewed By: fhahn
      Differential Revision: https://reviews.llvm.org/D69417
      4aee4c99
    • Chris Bieneman's avatar
      Break out OrcError and RPC · a34680a3
      Chris Bieneman authored
      Summary:
      When createing an ORC remote JIT target the current library split forces the target process to link large portions of LLVM (Core, Execution Engine, JITLink, Object, MC, Passes, RuntimeDyld, Support, Target, and TransformUtils). This occurs because the ORC RPC interfaces rely on the static globals the ORC Error types require, which starts a cycle of pulling in more and more.
      
      This patch breaks the ORC RPC Error implementations out into an "OrcError" library which only depends on LLVM Support. It also pulls the ORC RPC headers into their own subdirectory.
      
      With this patch code can include the Orc/RPC/*.h headers and will only incur link dependencies on LLVMOrcError and LLVMSupport.
      
      Reviewers: lhames
      
      Reviewed By: lhames
      
      Subscribers: mgorny, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68732
      a34680a3
  7. Oct 29, 2019
    • Nick Terrell's avatar
      [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmap · 68142324
      Nick Terrell authored
      Summary:
      Add a flag `F_no_mmap` to `FileOutputBuffer` to support
      `--[no-]mmap-output-file` in ELF LLD. LLD currently explicitly ignores
      this flag for compatibility with GNU ld and gold.
      
      We need this flag to speed up link time for large binaries in certain
      scenarios. When we link some of our larger binaries we find that LLD
      takes 50+ GB of memory, which causes memory pressure. The memory
      pressure causes the VM to flush dirty pages of the output file to disk.
      This is normally okay, since we should be flushing cold pages. However,
      when using BtrFS with compression we need to write 128KB at a time when
      we flush a page. If any page in that 128KB block is written again, then
      it must be flushed a second time, and so on. Since LLD doesn't write
      sequentially this causes write amplification. The same 128KB block will
      end up being flushed multiple times, causing the linker to many times
      more IO than necessary. We've observed 3-5x faster builds with
      -no-mmap-output-file when we hit this scenario.
      
      The bad scenario only applies to compressed filesystems, which group
      together multiple pages into a single compressed block. I've tested
      BtrFS, but the problem will be present for any compressed filesystem
      on Linux, since it is caused by the VM.
      
      Silently ignoring --no-mmap-output-file caused a silent regression when
      we switched from gold to lld. We pass --no-mmap-output-file to fix this
      edge case, but since lld silently ignored the flag we didn't realize it
      wasn't being respected.
      
      Benchmark building a 9 GB binary that exposes this edge case. I linked 3
      times with --mmap-output-file and 3 times with --no-mmap-output-file and
      took the average. The machine has 24 cores @ 2.4 GHz, 112 GB of RAM,
      BtrFS mounted with -compress-force=zstd, and an 80% full disk.
      
      | Mode    | Time  |
      |---------|-------|
      | mmap    | 894 s |
      | no mmap | 126 s |
      
      When compression is disabled, BtrFS performs just as well with and
      without mmap on this benchmark.
      
      I was unable to reproduce the regression with any binaries in
      lld-speed-test.
      
      Reviewed By: ruiu, MaskRay
      
      Differential Revision: https://reviews.llvm.org/D69294
      68142324
    • Amy Huang's avatar
      Recommit "Add a heap alloc site marker field to the ExtraInfo in MachineInstrs" · 74204304
      Amy Huang authored
      Summary:
      Fixes some things from original commit at https://reviews.llvm.org/D69136. The main
      change is that the heap alloc marker is always stored as ExtraInfo in the machine
      instruction instead of in the PointerSumType because it cannot hold more than
      4 pointer types.
      
      Add instruction marker to MachineInstr ExtraInfo. This does almost the
      same thing as Pre/PostInstrSymbols, except that it doesn't create a label until
      printing instructions. This allows for labels to be put around instructions that
      are deleted/duplicated somewhere.
      Use this marker to track heap alloc site call instructions.
      
      Reviewers: rnk
      
      Subscribers: MatzeB, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69536
      74204304
  8. Oct 28, 2019
  9. Oct 26, 2019
  10. Oct 25, 2019
  11. Oct 24, 2019
  12. Oct 23, 2019
    • Sam McCall's avatar
      Reland "[Support] Add a way to run a function on a detached thread"" · a9c3c176
      Sam McCall authored
      This reverts commit 7bc7fe6b.
      The immediate callers have been fixed to pass nullopt where appropriate.
      a9c3c176
    • Sam McCall's avatar
      Revert "[Support] Add a way to run a function on a detached thread" · 7bc7fe6b
      Sam McCall authored
      This reverts commit 40668abc.
      This causes clang tests to fail, as stacksize=0 is being explicitly passed and
      is no longer a no-op.
      7bc7fe6b
    • Sam McCall's avatar
      [Support] Add a way to run a function on a detached thread · 40668abc
      Sam McCall authored
      This roughly mimics `std::thread(...).detach()` except it allows to
      customize the stack size. Required for https://reviews.llvm.org/D50993.
      
      I've decided against reusing the existing `llvm_execute_on_thread` because
      it's not obvious what to do with the ownership of the passed
      function/arguments:
      
      1. If we pass possibly owning functions data to `llvm_execute_on_thread`,
         we'll lose the ability to pass small non-owning non-allocating functions
         for the joining case (as it's used now). Is it important enough?
      2. If we use the non-owning interface in the new use case, we'll force
         clients to transfer ownership to the spawned thread manually, but
         similar code would still have to exist inside
         `llvm_execute_on_thread(_async)` anyway (as we can't just pass the same
         non-owning pointer to pthreads and Windows implementations, and would be
         forced to wrap it in some structure, and deal with its ownership.
      
      Patch by Dmitry Kozhevnikov!
      
      Differential Revision: https://reviews.llvm.org/D51103
      40668abc
Loading