Skip to content
  1. Oct 11, 2019
  2. Oct 10, 2019
    • Marcello Maggioni's avatar
      [GISel] Allow getConstantVRegVal() to return G_FCONSTANT values. · 0112123e
      Marcello Maggioni authored
      In GISel we have both G_CONSTANT and G_FCONSTANT, but because
      in GISel we don't really have a concept of Float vs Int value
      the only difference between the two is where the data originates
      from.
      
      What both G_CONSTANT and G_FCONSTANT return is just a bag of bits
      with the constant representation in it.
      
      By making getConstantVRegVal() return G_FCONSTANTs bit representation
      as well we allow ConstantFold and other things to operate with
      G_FCONSTANT.
      
      Adding tests that show ConstantFolding to work on mixed G_CONSTANT
      and G_FCONSTANT sources.
      
      Differential Revision: https://reviews.llvm.org/D68739
      
      llvm-svn: 374458
      0112123e
    • Reid Kleckner's avatar
      Print quoted backslashes in LLVM IR as \\ instead of \5C · 67d440b9
      Reid Kleckner authored
      This improves readability of Windows path string literals in LLVM IR.
      The LLVM assembler has supported \\ in IR strings for a long time, but
      the lexer doesn't tolerate escaped quotes, so they have to be printed as
      \22 for now.
      
      llvm-svn: 374415
      67d440b9
    • Greg Clayton's avatar
      Add GsymCreator and GsymReader. · 4b6c9de8
      Greg Clayton authored
      This patch adds the ability to create GSYM files with GsymCreator, and read them with GsymReader. Full testing has been added for both new classes.
      
      This patch differs from the original patch https://reviews.llvm.org/D53379 in that is uses a StringTableBuilder class from llvm instead of a custom version. Support for big and little endian files has been added. If the endianness matches the current host, we use efficient extraction for the header, address table and address info offset tables.
      
      Differential Revision: https://reviews.llvm.org/D68744
      
      llvm-svn: 374381
      4b6c9de8
    • Dmitri Gribenko's avatar
      eaf6dd48
    • Roman Lebedev's avatar
      [ADR] ArrayRefTest: disable SizeTSizedOperations test - it's UB. · abb34df4
      Roman Lebedev authored
      This test is not defined.
      
      FAIL: LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations (178 of 33926)
      ******************** TEST 'LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations' FAILED ********************
      Note: Google Test filter = ArrayRefTest.SizeTSizedOperations
      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from ArrayRefTest
      [ RUN      ] ArrayRefTest.SizeTSizedOperations
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32: runtime error: applying non-zero offset 9223372036854775806 to null pointer
          #0 0x5ae8dc in llvm::ArrayRef<char>::slice(unsigned long, unsigned long) const /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32
          #1 0x5ae44c in (anonymous namespace)::ArrayRefTest_SizeTSizedOperations_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:85:3
          #2 0x928a96 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2474:5
          #3 0x929793 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2656:11
          #4 0x92a152 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2774:28
          #5 0x9319d2 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4649:43
          #6 0x931416 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4257:10
          #7 0x920ac3 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46
          #8 0x920ac3 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
          #9 0x7f66135b72e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
          #10 0x472c19 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/ADT/ADTTests+0x472c19)
      
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32 in
      llvm-svn: 374327
      abb34df4
    • Cyndy Ishida's avatar
      Reland "[TextAPI] Introduce TBDv4" · f9d8162b
      Cyndy Ishida authored
      Original Patch broke for compilations w/ gcc and exposed asan fail.
      This reland repairs those bugs.
      
      Differential Revision: https://reviews.llvm.org/D67529
      
      llvm-svn: 374277
      f9d8162b
    • Thomas Lively's avatar
      [WebAssembly] Fix tests missed in rL374235 · 3414bce0
      Thomas Lively authored
      llvm-svn: 374259
      3414bce0
    • Marcello Maggioni's avatar
      [GISel] Refactor and split PatternMatchTest. NFC · ff384481
      Marcello Maggioni authored
      Split the ConstantFold part into a separate file and
      make it use the fixture GISelMITest.
      
      llvm-svn: 374245
      ff384481
  3. Oct 09, 2019
    • Cameron McInally's avatar
      [IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator · 47363a14
      Cameron McInally authored
      Also update Clang to call Builder.CreateFNeg(...) for UnaryMinus.
      
      Differential Revision: https://reviews.llvm.org/D61675
      
      llvm-svn: 374240
      47363a14
    • Wei Mi's avatar
      [SampleFDO] Add indexing for function profiles so they can be loaded on demand · 09dcfe68
      Wei Mi authored
      in ExtBinary format
      
      Currently for Text, Binary and ExtBinary format profiles, when we compile a
      module with samplefdo, even if there is no function showing up in the profile,
      we have to load all the function profiles from the profile input. That is a
      waste of compile time.
      
      CompactBinary format profile has already had the support of loading function
      profiles on demand. In this patch, we add the support to load profile on
      demand for ExtBinary format. It will work no matter the sections in ExtBinary
      format profile are compressed or not. Experiment shows it reduces the time to
      compile a server benchmark by 30%.
      
      When profile remapping and loading function profiles on demand are both used,
      extra work needs to be done so that the loading on demand process will take
      the name remapping into consideration. It will be addressed in a follow-up
      patch.
      
      Differential Revision: https://reviews.llvm.org/D68601
      
      llvm-svn: 374233
      09dcfe68
    • Clement Courbet's avatar
      [llvm-exegesis][NFC] Remove extra `llvm::` qualifications. · d422d3a7
      Clement Courbet authored
      Summary: First patch: in unit tests.
      
      Subscribers: nemanjai, tschuett, MaskRay, jsji, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68687
      
      llvm-svn: 374157
      d422d3a7
    • Hans Wennborg's avatar
      Unify the two CRC implementations · 1e1e3ba2
      Hans Wennborg authored
      David added the JamCRC implementation in r246590. More recently, Eugene
      added a CRC-32 implementation in r357901, which falls back to zlib's
      crc32 function if present.
      
      These checksums are essentially the same, so having multiple
      implementations seems unnecessary. This replaces the CRC-32
      implementation with the simpler one from JamCRC, and implements the
      JamCRC interface in terms of CRC-32 since this means it can use zlib's
      implementation when available, saving a few bytes and potentially making
      it faster.
      
      JamCRC took an ArrayRef<char> argument, and CRC-32 took a StringRef.
      This patch changes it to ArrayRef<uint8_t> which I think is the best
      choice, and simplifies a few of the callers nicely.
      
      Differential revision: https://reviews.llvm.org/D68570
      
      llvm-svn: 374148
      1e1e3ba2
    • Clement Courbet's avatar
      [llvm-exegesis][NFC] Remove unecessary `using llvm::` directives. · 2caa3a26
      Clement Courbet authored
      We've been in namespace llvm for at least a year.
      
      llvm-svn: 374143
      2caa3a26
  4. Oct 08, 2019
    • Vedant Kumar's avatar
      [CodeExtractor] Factor out and reuse shrinkwrap analysis · 9852699d
      Vedant Kumar authored
      Factor out CodeExtractor's analysis of allocas (for shrinkwrapping
      purposes), and allow the analysis to be reused.
      
      This resolves a quadratic compile-time bug observed when compiling
      AMDGPUDisassembler.cpp.o.
      
      Pre-patch (Release + LTO clang):
      
      ```
         ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
        176.5278 ( 57.8%)   0.4915 ( 18.5%)  177.0192 ( 57.4%)  177.4112 ( 57.3%)  Hot Cold Splitting
      ```
      
      Post-patch (ReleaseAsserts clang):
      
      ```
         ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
        1.4051 (  3.3%)   0.0079 (  0.3%)   1.4129 (  3.2%)   1.4129 (  3.2%)  Hot Cold Splitting
      ```
      
      Testing: check-llvm, and comparing the AMDGPUDisassembler.cpp.o binary
      pre- vs. post-patch.
      
      An alternate approach is to hide CodeExtractorAnalysisCache from clients
      of CodeExtractor, and to recompute the analysis from scratch inside of
      CodeExtractor::extractCodeRegion(). This eliminates some redundant work
      in the shrinkwrapping legality check. However, some clients continue to
      exhibit O(n^2) compile time behavior as computing the analysis is O(n).
      
      rdar://55912966
      
      Differential Revision: https://reviews.llvm.org/D68616
      
      llvm-svn: 374089
      9852699d
    • Cyndy Ishida's avatar
      Revert [TextAPI] Introduce TBDv4 · fb92ef1e
      Cyndy Ishida authored
      This reverts r374058 (git commit 5d566c5a)
      
      llvm-svn: 374062
      fb92ef1e
    • Cyndy Ishida's avatar
      [TextAPI] Introduce TBDv4 · 5d566c5a
      Cyndy Ishida authored
      Summary:
      This format introduces new features and platforms
      The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform,
      for example ios + ios-simulator and macCatalyst.
      
      Reviewers: ributzka, steven_wu
      
      Reviewed By: ributzka
      
      Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67529
      
      llvm-svn: 374058
      5d566c5a
    • Clement Courbet's avatar
      [llvm-exegesis] Add options to SnippetGenerator. · 2cd0f289
      Clement Courbet authored
      Summary:
      This adds a `-max-configs-per-opcode` option to limit the number of
      configs per opcode.
      
      Reviewers: gchatelet
      
      Subscribers: tschuett, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68642
      
      llvm-svn: 374054
      2cd0f289
    • Pavel Labath's avatar
      Object/minidump: Add support for the MemoryInfoList stream · 6e0b1ce4
      Pavel Labath authored
      Summary:
      This patch adds the definitions of the constants and structures
      necessary to interpret the MemoryInfoList minidump stream, as well as
      the object::MinidumpFile interface to access the stream.
      
      While the code is fairly simple, there is one important deviation from
      the other minidump streams, which is worth calling out explicitly.
      Unlike other "List" streams, the size of the records inside
      MemoryInfoList stream is not known statically. Instead it is described
      in the stream header. This makes it impossible to return
      ArrayRef<MemoryInfo> from the accessor method, as it is done with other
      streams. Instead, I create an iterator class, which can be parameterized
      by the runtime size of the structure, and return
      iterator_range<iterator> instead.
      
      Reviewers: amccarth, jhenderson, clayborg
      
      Subscribers: JosephTremoulet, zturner, markmentovai, lldb-commits, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68210
      
      llvm-svn: 374051
      6e0b1ce4
    • Graham Hunter's avatar
      [SVE][IR] Scalable Vector size queries and IR instruction support · b302561b
      Graham Hunter authored
      * Adds a TypeSize struct to represent the known minimum size of a type
        along with a flag to indicate that the runtime size is a integer multiple
        of that size
      * Converts existing size query functions from Type.h and DataLayout.h to
        return a TypeSize result
      * Adds convenience methods (including a transparent conversion operator
        to uint64_t) so that most existing code 'just works' as if the return
        values were still scalars.
      * Uses the new size queries along with ElementCount to ensure that all
        supported instructions used with scalable vectors can be constructed
        in IR.
      
      Reviewers: hfinkel, lattner, rkruppe, greened, rovka, rengolin, sdesmalen
      
      Reviewed By: rovka, sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D53137
      
      llvm-svn: 374042
      b302561b
    • Clement Courbet's avatar
      [llvm-exegesis] Finish plumbing the `Config` field. · 4919534a
      Clement Courbet authored
      Summary:
      Right now there are no snippet generators that emit the `Config` Field,
      but I plan to add it to investigate LEA operands for PR32326.
      
      What was broken was:
       - `Config` Was not propagated up until the BenchmarkResult::Key.
       - Clustering should really consider different configs as measuring
       different things, so we should stabilize on (Opcode, Config) instead of
       just Opcode.
      
      Reviewers: gchatelet
      
      Subscribers: tschuett, llvm-commits, lebedev.ri
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68629
      
      llvm-svn: 374031
      4919534a
    • Chen Zheng's avatar
      [ConstantRange] [NFC] replace addWithNoSignedWrap with addWithNoWrap. · 9806a1d5
      Chen Zheng authored
      llvm-svn: 374016
      9806a1d5
  5. Oct 06, 2019
  6. Oct 05, 2019
  7. Oct 04, 2019
    • Thomas Preud'homme's avatar
      [NFC] [FileCheck] Reapply fix init of objects in unit tests · e37bc5e4
      Thomas Preud'homme authored
      Summary:
      Fix initialization style of objects allocated on the stack and member
      objects in unit test to use the "Type Var(init list)" and
      "Type Member{init list}" convention. The latter fixes the buildbot
      breakage.
      
      Reviewers: jhenderson, probinson, arichardson, grimar, jdenny
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68425
      
      llvm-svn: 373755
      e37bc5e4
    • Dmitri Gribenko's avatar
      Revert "[NFC] [FileCheck] Fix init of stack objects in unit tests" · b0e997bb
      Dmitri Gribenko authored
      This reverts commit r373717. It broke the build:
      http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18721.
      
      llvm-svn: 373722
      b0e997bb
    • James Molloy's avatar
      [TableGen] Introduce a generic automaton (DFA) backend · e6674010
      James Molloy authored
      Summary:
      This patch introduces -gen-automata, a backend for generating deterministic finite-state automata.
      
      DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will
      hopefully be used to implement the DFA generation (and determinization) for the packetizer in the
      future.
      
      This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state
      automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to
      be analyzed, and the equivalent set of all possible NFA transitions extracted.
      
      This allows a user to not just answer "can my problem be solved?" but also "what is the
      solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is
      opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic
      representation.
      
      Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example
      is a stripped-down version of the original target problem I set out to solve, where we pack values
      (actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric
      constraints.
      
      Reviewers: t.p.northover
      
      Subscribers: mgorny, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D67968
      
      llvm-svn: 373718
      e6674010
    • Thomas Preud'homme's avatar
      [NFC] [FileCheck] Fix init of stack objects in unit tests · edfb8696
      Thomas Preud'homme authored
      Summary:
      Fix initialization style of objects allocated on the stack in unit test
      to use the "Type Var(init list)" convention.
      
      Reviewers: jhenderson, probinson, arichardson, grimar, jdenny
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68425
      
      llvm-svn: 373717
      edfb8696
    • Lang Hames's avatar
      [JITLink] Switch from an atom-based model to a "blocks and symbols" model. · 4e920e58
      Lang Hames authored
      In the Atom model the symbols, content and relocations of a relocatable object
      file are represented as a graph of atoms, where each Atom represents a
      contiguous block of content with a single name (or no name at all if the
      content is anonymous), and where edges between Atoms represent relocations.
      If more than one symbol is associated with a contiguous block of content then
      the content is broken into multiple atoms and layout constraints (represented by
      edges) are introduced to ensure that the content remains effectively contiguous.
      These layout constraints must be kept in mind when examining the content
      associated with a symbol (it may be spread over multiple atoms) or when applying
      certain relocation types (e.g. MachO subtractors).
      
      This patch replaces the Atom model in JITLink with a blocks-and-symbols model.
      The blocks-and-symbols model represents relocatable object files as bipartite
      graphs, with one set of nodes representing contiguous content (Blocks) and
      another representing named or anonymous locations (Symbols) within a Block.
      Relocations are represented as edges from Blocks to Symbols. This scheme
      removes layout constraints (simplifying handling of MachO alt-entry symbols,
      and hopefully ELF sections at some point in the future) and simplifies some
      relocation logic.
      
      llvm-svn: 373689
      4e920e58
  8. Oct 03, 2019
Loading