Skip to content
  1. Dec 12, 2017
    • Alex Bradbury's avatar
      [RISCV] Implement assembler pseudo instructions for RV32I and RV64I · 9ed84c8a
      Alex Bradbury authored
      Adds the assembler pseudo instructions of RV32I and RV64I which can
      be mapped to a single canonical instruction. The missing pseudo
      instructions (e.g., call, tail, ...) are marked as TODO. Other
      things, like for example PCREL_LO, have to be implemented first.
      
      Currently, alias emission is disabled by default to keep the patch
      minimal. Alias emission by default will be enabled in a subsequent
      patch which also updates all affected tests. Note that this patch
      should actually break the floating point MC tests. However, the
      used FileCheck configuration is not tight enought to detect the
      breakage.
      
      Differential Revision: https://reviews.llvm.org/D40902
      
      Patch by Mario Werner.
      
      llvm-svn: 320487
      9ed84c8a
    • Haojian Wu's avatar
      [clangd] Introduce a "Symbol" class. · 4c1394d6
      Haojian Wu authored
      Summary:
      * The "Symbol" class represents a C++ symbol in the codebase, containing all the
        information of a C++ symbol needed by clangd. clangd will use it in clangd's
        AST/dynamic index and global/static index (code completion and code
        navigation).
      * The SymbolCollector (another IndexAction) will be used to recollect the
        symbols when the source file is changed (for ASTIndex), or to generate
        all C++ symbols for the whole project.
      
      In the long term (when index-while-building is ready), clangd should share a
      same "Symbol" structure and IndexAction with index-while-building, but
      for now we want to have some stuff working in clangd.
      
      Reviewers: ioeric, sammccall, ilya-biryukov, malaperle
      
      Reviewed By: sammccall
      
      Subscribers: malaperle, klimek, mgorny, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40897
      
      llvm-svn: 320486
      4c1394d6
    • Alexey Bataev's avatar
      Revert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast." · ca2a8cea
      Alexey Bataev authored
      This reverts commit r320483 because of the failed Windows buildbots.
      
      llvm-svn: 320485
      ca2a8cea
    • Alex Bradbury's avatar
      [RISCV] MC layer support for the instructions added in the privileged spec · 8bba6bfe
      Alex Bradbury authored
      Adds support for the instructions added in the RISC-V privileged ISA
      (https://content.riscv.org/wp-content/uploads/2017/05/riscv-privileged-v1.10.pdf):
      uret, sret, mret, wfi, and sfence.vma.
      
      Note from the committer: I made very minor formatting changes prior to commit, 
      which didn't seem worth creating another review round-trip for.
      
      Differential Revision: https://reviews.llvm.org/D40383
      
      Patch by David Craven.
      
      llvm-svn: 320484
      8bba6bfe
    • Alexey Bataev's avatar
      [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast. · 1daef8a6
      Alexey Bataev authored
      If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1,
      &V2)))), bitcast)`, but the load is used in other instructions, it leads
      to looping in InstCombiner. Patch adds additional check that all users
      of the load instructions are stores and then replaces all uses of load
      instruction by the new one with new type.
      
      Reviewers: RKSimon, spatel, majnemer
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41072
      
      llvm-svn: 320483
      1daef8a6
    • Ilya Biryukov's avatar
      [clangd] Removed unused variable. NFC · ef3191fc
      Ilya Biryukov authored
      llvm-svn: 320482
      ef3191fc
    • Ayman Musa's avatar
      [X86] Recognize constant arrays with special values and replace loads from it... · c2eed926
      Ayman Musa authored
      [X86] Recognize constant arrays with special values and replace loads from it with subtract and shift instructions, which then will be replaced by X86 BZHI machine instruction.
      
      Recognize constant arrays with the following values:
        0x0, 0x1, 0x3, 0x7, 0xF, 0x1F, .... , 2^(size - 1) -1
      where //size// is the size of the array.
      
      the result of a load with index //idx// from this array is equivalent to the result of the following:
        (0xFFFFFFFF >> (sub 32, idx))             (assuming the array of type 32-bit integer).
      
      And the result of an 'AND' operation on the returned value of such a load and another input, is exactly equivalent to the X86 BZHI instruction behavior.
      
      See test cases in the LIT test for better understanding.
      
      Differential Revision: https://reviews.llvm.org/D34141
      
      llvm-svn: 320481
      c2eed926
    • Anna Thomas's avatar
      [InstComineLoadStoreAlloca] Optimize stores to GEP off null base · 2dd9835f
      Anna Thomas authored
      Summary:
      Currently, in InstCombineLoadStoreAlloca, we have simplification
      rules for the following cases:
        1. load off a null
        2. load off a GEP with null base
        3. store to a null
      
      This patch adds support for the fourth case which is store into a
      GEP with null base. Since this is UB as well (and directly analogous to
      the load off a GEP with null base), we can substitute the stored val
      with undef in instcombine, so that SimplifyCFG can optimize this code
      into unreachable code.
      
      Note: Right now, simplifyCFG hasn't been taught about optimizing
      this to unreachable and adding an llvm.trap (this is already done for
      the above 3 cases).
      
      Reviewers: majnemer, hfinkel, sanjoy, davide
      
      Reviewed by: sanjoy, davide
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41026
      
      llvm-svn: 320480
      2dd9835f
    • Krasimir Georgiev's avatar
      [clang-format] Improve ObjC headers detection. · 11ef531b
      Krasimir Georgiev authored
      This patch improves detection of ObjC header files.
      Right now many ObjC headers, especially short ones, are categorized as C/C++.
      
      Way of filtering still isn't the best, as most likely it should be token-based.
      
      Contributed by jolesiak!
      
      llvm-svn: 320479
      11ef531b
    • Peter Smith's avatar
      [ELF] Refactor to remove loop copying all Sections in OS->finalize() [NFC] · 2128df7e
      Peter Smith authored
      Moving the SHF_LINK_ORDER processing out of OutputSection::finalize()
      means that we no longer need to copy all InputSections as we now only need
      the first one.
      
      Differential Revision: https://reviews.llvm.org/D40966
      
      llvm-svn: 320478
      2128df7e
    • Peter Smith's avatar
      [ELF] Move SHF_LINK_ORDER processing earlier in Writer.cpp [NFC] · 03cbf468
      Peter Smith authored
      By moving this step before thunk creation and other processing that depends
      on the size of sections, we permit removal of duplicates in the .ARM.exidx
      section.
      
      Differential Revision: https://reviews.llvm.org/D40964
      
      llvm-svn: 320477
      03cbf468
    • Ilya Biryukov's avatar
      [clangd] clang-format the code. NFC · 9b5ffc22
      Ilya Biryukov authored
      llvm-svn: 320476
      9b5ffc22
    • Nemanja Ivanovic's avatar
      [PowerPC] Add branch flag on asm parser-only branch instructions · 6479c72f
      Nemanja Ivanovic authored
      This flag was missing but it wasn't an issue as nothing depended on it
      for these asm parser-only instructions. Now that LLDB support is slowly
      landing, it is important to get this right.
      Committing on behalf of Leonardo Bianconi.
      
      Differential revision: https://reviews.llvm.org/D40846
      
      llvm-svn: 320475
      6479c72f
    • Ilya Biryukov's avatar
      [clangd] Document highlights for clangd · 0e6a51f4
      Ilya Biryukov authored
      Summary: Implementation of Document Highlights Request as described in
      LSP.
      
      Contributed by William Enright (nebiroth).
      
      Reviewers: malaperle, krasimir, bkramer, ilya-biryukov
      
      Reviewed By: malaperle
      
      Subscribers: mgrang, sammccall, klimek, ioeric, rwols, cfe-commits, arphaman, ilya-biryukov
      
      Differential Revision: https://reviews.llvm.org/D38425
      
      llvm-svn: 320474
      0e6a51f4
    • Nemanja Ivanovic's avatar
      [PowerPC] Follow-up to r318436 to get the missed CSE opportunities · b0783ccc
      Nemanja Ivanovic authored
      The last of the three patches that https://reviews.llvm.org/D40348 was
      broken up into.
      Canonicalize the materialization of constants so that they are more likely
      to be CSE'd regardless of the bit-width of the use. If a constant can be
      materialized using PPC::LI, materialize it the same way always.
      For example:
        li 4, -1
        li 4, 255
        li 4, 65535
      are equivalent if the uses only use the low byte. Canonicalize it to the
      first form.
      
      Differential Revision: https://reviews.llvm.org/D40348
      
      llvm-svn: 320473
      b0783ccc
    • James Henderson's avatar
      [ELF] Reset OutputSection size prior to processing linker script commands · 8d0efdd5
      James Henderson authored
      The size of an OutputSection is calculated early, to aid handling of compressed
      debug sections. However, subsequent to this point, unused synthetic sections are
      removed. In the event that an OutputSection, from which such an InputSection is
      removed, is still required (e.g. because it has a symbol assignment), and no longer
      has any InputSections, dot assignments, or BYTE()-family directives, the size
      member is never updated when processing the commands. If the removed InputSection
      had a non-zero size (such as a .got.plt section), the section ends up with the
      wrong size in the output.
      
      The fix is to reset the OutputSection size prior to processing the linker script
      commands relating to that OutputSection. This ensures that the size is correct even
      in the above situation.
      
      Additionally, to reduce the risk of developers misusing OutputSection Size and
      InputSection OutSecOff, they are set to simply the number of InputSections in an
      OutputSection, and the corresponding index respectively. We cannot completely
      stop using them, due to SHF_LINK_ORDER sections requiring them.
      
      Compressed debug sections also require the full size. This is now calculated in
      maybeCompress for these kinds of sections.
      
      Reviewers: ruiu, rafael
      
      Differential Revision: https://reviews.llvm.org/D38361
      
      llvm-svn: 320472
      8d0efdd5
    • Eric Liu's avatar
      [SemaCodeComplete] Allow passing out scope specifiers in qualified-id... · 06d34028
      Eric Liu authored
      [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.
      
      Reviewers: ilya-biryukov, arphaman
      
      Reviewed By: arphaman
      
      Subscribers: nik, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40563
      
      llvm-svn: 320471
      06d34028
    • Simon Pilgrim's avatar
      Revert r320461 - causing ICE in windows buildss · 0f8a5a41
      Simon Pilgrim authored
      [X86] Use regular expressions more aggressively to reduce the number of scheduler entries needed for FMA3 instructions.
      
      When the scheduler tables are generated by tablegen, the instructions are divided up into groups based on their default scheduling information and how they are referenced by groups for each processor. For any set of instructions that are matched by a specific InstRW line, that group of instructions is guaranteed to not be in a group with any other instructions. So in general, the more InstRW class definitions are created, the more groups we end up with in the generated files. Particularly if a lot of the InstRW lines only match to single instructions, which is true of a large number of the Intel scheduler models.
      
      This change alone reduces the number of instructions groups from ~6000 to ~5500. And there's lots more we could do.
      
      llvm-svn: 320470
      0f8a5a41
    • Jonas Devlieghere's avatar
      [dsymutil] Accept line tables up to DWARFv5. · f0945f48
      Jonas Devlieghere authored
      This patch removes the hard-coded check for DWARFv2 line tables. Now
      dsymutil accepts line tables for DWARF versions 2 to 5 (inclusive).
      
      Differential revision: https://reviews.llvm.org/D41084
      
      rdar://35968319
      
      llvm-svn: 320469
      f0945f48
    • Ilya Biryukov's avatar
      [clangd] Introduced a Context that stores implicit data · 657159c2
      Ilya Biryukov authored
      Summary:
      It will be used to pass around things like Logger and Tracer throughout
      clangd classes.
      
      Reviewers: sammccall, ioeric, hokein, bkramer
      
      Reviewed By: sammccall
      
      Subscribers: klimek, bkramer, mgorny, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40485
      
      llvm-svn: 320468
      657159c2
    • Eugene Leviant's avatar
      Revert r320464 as it breaks gold plugin tests · d53f3da7
      Eugene Leviant authored
      llvm-svn: 320467
      d53f3da7
    • Igor Laevsky's avatar
      Revert r320049, r320014 and r319894 · d63560b8
      Igor Laevsky authored
      They were causing failures of the piglit OpenGL tests with AMD GPUs using the
      Mesa radeonsi driver.
      
      llvm-svn: 320466
      d63560b8
    • Serguei Katkov's avatar
      [NFC][SafepointIRVerifier] Add alias for set of available values · f4ceb77c
      Serguei Katkov authored
      Introduces usage of AvailableValueSet alias name instead of
      DenseSet<const Value *> for better reading.
      
      Patch Author: Daniil Suchkov
      Reviewers: mkazantsev, anna, apilipenko
      Reviewed By: anna
      Subscribers: llvm-commits
      Differential Revision: https://reviews.llvm.org/D41002
      
      llvm-svn: 320465
      f4ceb77c
    • Eugene Leviant's avatar
      [ThinLTO] Remove unused code from thinLTOInternalizeModule · 36951833
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D40970
      
      llvm-svn: 320464
      36951833
    • Dorit Nuzman's avatar
      [LV] Ignore the cost of values that will not appear in the vectorized loop · 927b3160
      Dorit Nuzman authored
      VecValuesToIgnore holds values that will not appear in the vectorized loop.
      We should therefore ignore their cost when VF > 1.
      
      Differential Revision: https://reviews.llvm.org/D40883
      
      llvm-svn: 320463
      927b3160
    • Martin Storsjö's avatar
      [COFF] Don't error out on undefined references to __enclave_config · 2b964108
      Martin Storsjö authored
      This is required for linking the CRT from MSVC 2017 15.5.
      
      Differential Revision: https://reviews.llvm.org/D41089
      
      llvm-svn: 320462
      2b964108
    • Craig Topper's avatar
      [X86] Use regular expressions more aggressively to reduce the number of... · c8e64ab5
      Craig Topper authored
      [X86] Use regular expressions more aggressively to reduce the number of scheduler entries needed for FMA3 instructions.
      
      When the scheduler tables are generated by tablegen, the instructions are divided up into groups based on their default scheduling information and how they are referenced by groups for each processor. For any set of instructions that are matched by a specific InstRW line, that group of instructions is guaranteed to not be in a group with any other instructions. So in general, the more InstRW class definitions are created, the more groups we end up with in the generated files. Particularly if a lot of the InstRW lines only match to single instructions, which is true of a large number of the Intel scheduler models.
      
      This change alone reduces the number of instructions groups from ~6000 to ~5500. And there's lots more we could do.
      
      llvm-svn: 320461
      c8e64ab5
    • Mikael Holmen's avatar
      [CallSiteSplitting] Don't let debug intrinsics affect optimizations · 66cf3837
      Mikael Holmen authored
      Summary:
      This solves PR35616.
      
      We don't want the compiler to generate different code when we compile
      with/without -g, so we now ignore debug intrinsics when determining if
      the optimization can trigger or not.
      
      Reviewers: junbuml
      
      Subscribers: davide, JDevlieghere, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41068
      
      llvm-svn: 320460
      66cf3837
    • Craig Topper's avatar
      [X86] Use Ld scheduler classes for instructions with folded loads. · 468a8133
      Craig Topper authored
      llvm-svn: 320459
      468a8133
    • Craig Topper's avatar
      c1e72c01
    • Tony Tye's avatar
      [AMDGPU] Rename Bonaire target to be gfx704; remove gfx800 and make Iceland... · a697880b
      Tony Tye authored
      [AMDGPU] Rename Bonaire target to be gfx704; remove gfx800 and make Iceland and Tonga both use gfx802; update target feature handling
      
      Correct committed version to match intended accepted review D40051 id=123417
      
      - Rename Bonaire target to be gfx704.
      - Eliminate gfx800 and make Iceland and Tonga both use gfx802 as they use the same code.
      - List target features supported by each processor in the processor table together with the default value.
      - Add xnack flag to e_flags.
      - Remove xnack from kernel metadata and kernel descriptor since it is now a whole code object property.
      
      Differential Revision: https://reviews.llvm.org/D40051
      
      llvm-svn: 320457
      a697880b
    • Vedant Kumar's avatar
      Avoid module import in a textual header, NFC · 08ff4043
      Vedant Kumar authored
      This unbreaks the lldb modules build (-DLLVM_ENABLE_MODULES=On).
      
      llvm-svn: 320456
      08ff4043
    • Artem Dergachev's avatar
      [analyzer] StackAddrEscape: For now, disable the new async escape checks. · e67a575d
      Artem Dergachev authored
      The new check introduced in r318705 is useful, but suffers from a particular
      class of false positives, namely, it does not account for
      dispatch_barrier_sync() API which allows one to ensure that the asyncronously
      executed block that captures a pointer to a local variable does not actually
      outlive that variable.
      
      The new check is split into a separate checker, under the name of
      alpha.core.StackAddressAsyncEscape, which is likely to get enabled by default
      again once these positives are fixed. The rest of the StackAddressEscapeChecker
      is still enabled by default.
      
      Differential Revision: https://reviews.llvm.org/D41042
      
      llvm-svn: 320455
      e67a575d
    • Davide Italiano's avatar
      [TestModulesInlineFunctions] This test now passes. · 074f858d
      Davide Italiano authored
      Remove yet another spurious unexpected success.
      Ack'ed by Jim Ingham.
      
      Fixes PR25743.
      
      llvm-svn: 320454
      074f858d
    • Davide Italiano's avatar
      [TestCppScope] This test now passes on Darwin. · 4b13d8bd
      Davide Italiano authored
      I tested on x86-64 and Jason on embedded architectures.
      This cleans up another couple of reported unexpected successes.
      
      <rdar://problem/28623427>
      
      llvm-svn: 320452
      4b13d8bd
    • Artem Dergachev's avatar
      [analyzer] In getSVal() API, disable auto-detection of void type as char type. · 3ef5deb3
      Artem Dergachev authored
      This is a follow-up from r314910. When a checker developer attempts to
      dereference a location in memory through ProgramState::getSVal(Loc) or
      ProgramState::getSVal(const MemRegion *), without specifying the second
      optional QualType parameter for the type of the value he tries to find at this
      location, the type is auto-detected from location type. If the location
      represents a value beyond a void pointer, we thought that auto-detecting the
      type as 'char' is a good idea. However, in most practical cases, the correct
      behavior would be to specify the type explicitly, as it is available from other
      sources, and the few cases where we actually need to take a 'char' are
      workarounds rather than an intended behavior. Therefore, try to fail with an
      easy-to-understand assertion when asked to read from a void pointer location.
      
      Differential Revision: https://reviews.llvm.org/D38801
      
      llvm-svn: 320451
      3ef5deb3
    • Davide Italiano's avatar
      [testsuite] Remove even more testing vestiges. · e8d85eaa
      Davide Italiano authored
      With this one, the number of unexpected successes for the LLDB
      test suite when building with clang ToT goes down to 18.
      
      llvm-svn: 320450
      e8d85eaa
    • Rafael Espindola's avatar
      Compact symbols from 96 to 88 bytes. · 8f619ab8
      Rafael Espindola authored
      By using an index instead of a pointer for verdef we can put the index
      next to the alignment field. This uses the otherwise wasted area and
      reduces the shared symbol size.
      
      By itself the performance change of this is in the noise, but I have a
      followup patch to remove another 8 bytes that improves performance
      when combined with this.
      
      llvm-svn: 320449
      8f619ab8
    • Rafael Espindola's avatar
      Add an option for ICFing data. · 814ece68
      Rafael Espindola authored
      An internal linker has support for merging identical data and in some
      cases it can be a significant win.
      
      This is behind an off by default flag so it has to be requested
      explicitly.
      
      llvm-svn: 320448
      814ece68
    • Davide Italiano's avatar
      Rollback [Testsuite] Rename this file from *m -> *mm. · ee710e1d
      Davide Italiano authored
      After discussing this with Jim and Jason, I think my commit was
      actually sweeping the issue under the carpet rather than fixing it.
      I'll take a closer look between tonight and tomorrow.
      
      llvm-svn: 320447
      ee710e1d
Loading