Skip to content
  1. Nov 08, 2019
  2. Nov 07, 2019
  3. Nov 06, 2019
    • 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] 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
    • Don Hinton's avatar
      [CommandLine] Add inline ArgName printing · 405e8368
      Don Hinton authored
      Summary:
      This patch adds PrintArgInline (after PrintArg) that strips the
      leading spaces from an argument before printing them, for usage
      inline.
      
      Related bug: PR42943 <https://bugs.llvm.org/show_bug.cgi?id=42943>
      
      Patch by Daan Sprenkels!
      
      Reviewers: jhenderson, chandlerc, hintonda
      
      Reviewed By: jhenderson
      
      Subscribers: hiraditya, kristina, llvm-commits, dsprenkels
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69501
      405e8368
    • Thomas Finch's avatar
      YAML parser robustness improvements · 092452d4
      Thomas Finch authored
      Summary: This patch fixes a number of bugs found in the YAML parser
      through fuzzing. In general, this makes the parser more robust against
      malformed inputs.
      
      The fixes are mostly improved null checking and returning errors in
      more cases. In some cases, asserts were changed to regular errors,
      this provides the same robustness but also protects release builds
      from the triggering conditions. This also improves the fuzzability of
      the YAML parser since asserts can act as a roadblock to further
      fuzzing once they're hit.
      
      Each fix has a corresponding test case:
        - TestAnchorMapError - Added proper null pointer handling in
          `Stream::printError` if N is null and `KeyValueNode::getValue` if
          getKey returns null, `Input::createHNodes` `dyn_casts` changed to
          `dyn_cast_or_null` so the null pointer checks are actually able to
          fail
        - TestFlowSequenceTokenErrors - Added case in
          `Document::parseBlockNode` for FlowMappingEnd, FlowSequenceEnd, or
          FlowEntry tokens outside of mappings or sequences
        - TestDirectiveMappingNoValue - Changed assert to regular error
          return in `Scanner::scanValue`
        - TestUnescapeInfiniteLoop - Fixed infinite loop in
          `ScalarNode::unescapeDoubleQuoted` by returning an error for
          unrecognized escape codes
        - TestScannerUnexpectedCharacter - Changed asserts to regular error
          returns in `Scanner::consume`
        - TestUnknownDirective - For both of the inputs the stream doesn't
          fail and correctly returns TK_Error, but there is no valid root
          node for the document. There's no reasonable way to make the
          scanner fail for unknown directives without breaking the YAML spec
          (see spec-07-01.test). I think the assert is unnecessary given
          that an error is still generated for this case.
      
      The `SimpleKeys.clear()` line fixes a bug found by AddressSanitizer
      triggered by multiple test cases - when TokenQueue is cleared
      SimpleKeys is still holding dangling pointers into it, so SimpleKeys
      should be cleared as well.
      
      Patch by Thomas Finch!
      
      Reviewers: chandlerc, Bigcheese, hintonda
      
      Reviewed By: Bigcheese, hintonda
      
      Subscribers: hintonda, kristina, beanz, dexonsmith, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61608
      092452d4
    • Yevgeny Rouban's avatar
      [ADT] Add equality operator for SmallPtrSet · a7716a3c
      Yevgeny Rouban authored
      Reviewed By: tellenbach
      Differential Revision: https://reviews.llvm.org/D69429
      a7716a3c
  4. Nov 05, 2019
  5. Nov 04, 2019
  6. Nov 02, 2019
  7. 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
  8. Oct 31, 2019
  9. 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
  10. 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
  11. Oct 28, 2019
Loading