1. Nov 16, 2018
  2. Nov 15, 2018
    • George Rimar's avatar
      [ELF] - Renamed few more AArch64 specific relocation expressions. NFC. · 8329028b
      George Rimar authored
      They are AArch64 only, so have to have AARCH64_* prefix.
      
      llvm-svn: 346963
      8329028b
    • Simon Pilgrim's avatar
      [X86] Fix MCNullStreamer support for modules with a CodeView flag · 0db8cb01
      Simon Pilgrim authored
      This fixes -filetype=null support when compiling for a Win32 target and the module has a CodeView flag.
      
      The only places changed are the uses of getTargetStreamer function - this patch guards both of them with null checks.
      
      Committed on behalf of @eush (Eugene Sharygin)
      
      Differential Revision: https://reviews.llvm.org/D54008
      
      llvm-svn: 346962
      0db8cb01
    • Sam McCall's avatar
      [clang-tidy] Update checks to play nicely with limited traversal scope added in r346847 · 35f3da19
      Sam McCall authored
      Summary: (See D54204 for original review)
      
      Reviewers: hokein
      
      Subscribers: xazax.hun, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54579
      
      llvm-svn: 346961
      35f3da19
    • Sanjay Patel's avatar
      [InstSimplify] delete shift-of-zero guard ops around funnel shifts · e98ec77a
      Sanjay Patel authored
      This is a problem seen in common rotate idioms as noted in:
      https://bugs.llvm.org/show_bug.cgi?id=34924
      
      Note that we are not canonicalizing standard IR (shifts and logic) to the intrinsics yet. 
      (Although I've written this before...) I think this is the last step before we enable 
      that transform. Ie, we could regress code by doing that transform without this 
      simplification in place.
      
      In PR34924, I questioned whether this is a valid transform for target-independent IR, 
      but I convinced myself this is ok. If we're speculating a funnel shift by turning cmp+br 
      into select, then SimplifyCFG has already determined that the transform is justified. 
      It's possible that SimplifyCFG is not taking into account profile or other metadata, 
      but if that's true, then it's a bug independent of funnel shifts.
      
      Also, we do have CGP code to restore a guard like this around an intrinsic if it can't 
      be lowered cheaply. But that isn't necessary for funnel shift because the default 
      expansion in SelectionDAGBuilder includes this same cmp+select.
      
      Differential Revision: https://reviews.llvm.org/D54552
      
      llvm-svn: 346960
      e98ec77a
    • Alex Bradbury's avatar
      [RISCV] Mark C.EBREAK instruction as having side effects · f809d899
      Alex Bradbury authored
      C.EBREAK was defined with hasSideEffects = 0, which is incorrect and 
      inconsistent with the non-compressed instruction form. This patch corrects 
      this oversight.
      
      This wouldn't cause codegen issues, as compressed instructions are only ever 
      generated by converting the non-compressed form as an MCInst. But having 
      correct flags is still worthwhile.
      
      Differential Revision: https://reviews.llvm.org/D54256
      Patch by Luís Marques.
      
      llvm-svn: 346959
      f809d899
    • Alex Bradbury's avatar
      [RISCV] Mark FREM as Expand · 77272404
      Alex Bradbury authored
      Mark the FREM SelectionDAG node as Expand, which is necessary in order to 
      support the frem IR instruction on RISC-V. This is expanded into a library 
      call. Adds the corresponding test. Previously, this would have triggered an 
      assertion at instruction selection time.
      
      Differential Revision: https://reviews.llvm.org/D54159
      Patch by Luís Marques.
      
      llvm-svn: 346958
      77272404
    • Bruno Ricci's avatar
      d6965174
    • Dan Liew's avatar
      Start adding the supporting code to perform out-of-process allocator · ee6eb9b2
      Dan Liew authored
      enumeration.
      
      Summary:
      
      This patch introduces the local portion (`LocalAddressSpaceView`) of the
      `AddressSpaceView` abstraction and modifies the secondary allocator
      so that the `ForEachChunk()` method (and its callees) would work in the
      out-of-process case when `AddressSpaceView` is `RemoteAddressSpaceView`.
      
      The `AddressSpaceView` abstraction simply maps pointers from a target
      process to a pointer in the local process (via its `Load()` method). For
      the local (in-process) case this is a no-op. For the remote
      (out-of-process) case this is not a no-op. The implementation of the
      out-of-process `RemoteAddressSpaceView` is not included in this patch
      and will be introduced later.
      
      This patch is considerably simpler than the `ObjectView` abstraction
      used in previous patches but lacks the type safety and stricter memory
      management of the `ObjectView` abstraction.
      
      This patch does not introduce any tests because with
      `LocalAddressSpaceView` it should be a non functional change and unit
      tests already cover the secondary allocator.  When
      `RemoteAddressSpaceView` is landed tests will be added to ensure that it
      functions as expected.
      
      rdar://problem/45284065
      
      Reviewers: kcc, kubamracek, dvyukov, vitalybuka, cryptoad,
      george.karpenkov, morehouse
      
      Subscribers: #sanitizers, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53975
      
      llvm-svn: 346956
      ee6eb9b2
    • Haojian Wu's avatar
      [clangd] global-symbol-builder => clangd-indexer · fd4d4551
      Haojian Wu authored
      llvm-svn: 346955
      fd4d4551
    • Bruno Ricci's avatar
      [AST] Pack BinaryOperator · a167b3c3
      Bruno Ricci authored
      Use the newly available space in the bit-fields of Stmt.
      This saves 8 bytes per BinaryOperator.
      
      Differential Revision: https://reviews.llvm.org/D54526
      
      Reviewed By: dblaikie
      
      llvm-svn: 346954
      a167b3c3
    • Bruno Ricci's avatar
      [AST] Pack MemberExpr · 4c74253a
      Bruno Ricci authored
      Use the newly available space in the bit-fields of Stmt
      to store some data from MemberExpr. This saves
      one pointer per MemberExpr.
      
      Differential Revision: https://reviews.llvm.org/D54525
      
      Reviewed By: dblaikie
      
      llvm-svn: 346953
      4c74253a
    • Bruno Ricci's avatar
      [AST][NFC] Move the friend decls to the top of MemberExpr · 59a89a9f
      Bruno Ricci authored
      The norm is to have them at the top, and having them
      at the bottom is painful for the reader.
      
      llvm-svn: 346952
      59a89a9f
    • Bruno Ricci's avatar
      [AST] Pack UnaryOperator · 3354b6ce
      Bruno Ricci authored
      Use the newly available space in the bit-fields of Stmt
      to store some data from UnaryOperator.
      This saves 8 bytes per UnaryOperator.
      
      Differential Revision: https://reviews.llvm.org/D54524
      
      Reviewed By: dblaikie
      
      llvm-svn: 346951
      3354b6ce
    • Mikael Holmen's avatar
      Fix warning about unused variable [NFC] · ee84676a
      Mikael Holmen authored
      llvm-svn: 346950
      ee84676a
    • Anton Korobeynikov's avatar
      Add missed files from prev. commit · f0001f41
      Anton Korobeynikov authored
      llvm-svn: 346949
      f0001f41
    • Anton Korobeynikov's avatar
      [MSP430] Add MC layer · 49045c6a
      Anton Korobeynikov authored
      Reapply r346374 with the fixes for modules build.
      
      Original summary:
      
      This change implements assembler parser, code emitter, ELF object writer
      and disassembler for the MSP430 ISA.  Also, more instruction forms are added
      to the target description.
      
      Patch by Michael Skvortsov!
      
      llvm-svn: 346948
      49045c6a
    • Haojian Wu's avatar
      [clangd] Fix no results returned for global symbols in dexp · 5e7486f5
      Haojian Wu authored
      Summary:
      For symbols in global namespace (without any scope), we need to
      add global scope "" to the fuzzy request.
      
      Reviewers: ioeric
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54519
      
      llvm-svn: 346947
      5e7486f5
    • Xing GUO's avatar
      [llvm-objdump] Use `auto` declaration in typecasting · cc0829f3
      Xing GUO authored
      Summary:
      According to `MaskRay`, use `auto` for type inference, according to coding standards.
      Delete some comments, because these comments can be easily inferred from codes.
      
      Reviewers: jhenderson, MaskRay
      
      Reviewed By: jhenderson
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54573
      
      llvm-svn: 346946
      cc0829f3
    • Kadir Cetinkaya's avatar
      Revert "Introduce shard storage to auto-index." · 5a9b92ca
      Kadir Cetinkaya authored
      This reverts commit 6dd1f24aead10a8d375d0311001987198d26e900.
      
      llvm-svn: 346945
      5a9b92ca
    • Kadir Cetinkaya's avatar
      Revert "clang-format" · bd2441c8
      Kadir Cetinkaya authored
      This reverts commit 0a37e9c3d88a2e21863657df2f7735fb7e5f746e.
      
      llvm-svn: 346944
      bd2441c8
    • Kadir Cetinkaya's avatar
      Revert "Address comments" · ed18e788
      Kadir Cetinkaya authored
      This reverts commit 19a39b14eab2b5339325e276262b177357d6b412.
      
      llvm-svn: 346943
      ed18e788
    • Kadir Cetinkaya's avatar
      Revert "Address comments." · 8b9fed3e
      Kadir Cetinkaya authored
      This reverts commit b43c4d1c731e07172a382567f3146b3c461c5b69.
      
      llvm-svn: 346942
      8b9fed3e
    • Kadir Cetinkaya's avatar
      Address comments. · 2bed2cf7
      Kadir Cetinkaya authored
      llvm-svn: 346941
      2bed2cf7
    • Kadir Cetinkaya's avatar
      Address comments · 89a7691f
      Kadir Cetinkaya authored
      llvm-svn: 346940
      89a7691f
    • Kadir Cetinkaya's avatar
      clang-format · cb8407ca
      Kadir Cetinkaya authored
      llvm-svn: 346939
      cb8407ca
    • Kadir Cetinkaya's avatar
      Introduce shard storage to auto-index. · 3e5a4756
      Kadir Cetinkaya authored
      Reviewers: sammccall, ioeric
      
      Subscribers: ilya-biryukov, jkorous, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54269
      
      llvm-svn: 346938
      3e5a4756
    • Alex Bradbury's avatar
      [RISCV] Introduce the RISCVMatInt::generateInstSeq helper · 22c091fc
      Alex Bradbury authored
      Logic to load 32-bit and 64-bit immediates is currently present in
      RISCVAsmParser::emitLoadImm in order to support the li pseudoinstruction. With
      the introduction of RV64 codegen, there is a greater benefit of sharing
      immediate materialisation logic between the MC layer and codegen. The
      generateInstSeq helper allows this by producing a vector of simple structs
      representing the chosen instructions. This can then be consumed in the MC
      layer to produce MCInsts or at instruction selection time to produce
      appropriate SelectionDAG node. Sharing this logic means that both the li
      pseudoinstruction and codegen can benefit from future optimisations, and
      that this logic can be used for materialising constants during RV64 codegen.
      
      This patch does contain a behaviour change: addi will now be produced on RV64
      when no lui is necessary to materialise the constant. In that case addiw takes
      x0 as the source register, so is semantically identical to addi.
      
      Differential Revision: https://reviews.llvm.org/D52961
      
      llvm-svn: 346937
      22c091fc
    • Craig Topper's avatar
      [X86] Add some custom type legalization rules for truncate with... · 553ac560
      Craig Topper authored
      [X86] Add some custom type legalization rules for truncate with -x86-experimental-vector-widening-legalization.
      
      This avoids some nasty shuffles when we have avx512. It will also prevent using zmm truncate instructions when a ymm instruction that zeroes part of an xmm register will do. Also avoid using avx512 truncate instructions when the input is 128 bits or less. These instructions are 2 uops on skx so we can probably find a better single uop shuffle like pshufb.
      
      llvm-svn: 346936
      553ac560
    • Craig Topper's avatar
    • Martin Storsjo's avatar
      [ELF] Fix compilation with GCC 5 · 0db45d95
      Martin Storsjo authored
      Remove the default initializer for TrapInstr; all subclasses overwrite
      the defaults in their constructors anyway.
      
      This fixes compilation errors like these, with GCC 5.4 on Ubuntu 16.04,
      present since SVN r346893:
      
       In file included from ../tools/lld/ELF/Arch/AArch64.cpp:12:0:
       ../tools/lld/ELF/Target.h:125:49: error: array must be initialized with a brace-enclosed initializer
          std::array<uint8_t, 4> TrapInstr = {0, 0, 0, 0};
                                                        ^
       ../tools/lld/ELF/Target.h:125:49: error: too many initializers for ‘std::array<unsigned char, 4ul>’
      
      Differential Revision: https://reviews.llvm.org/D54569
      
      llvm-svn: 346934
      0db45d95
    • Eric Fiselier's avatar
      propagate __config_site includes when building benchmarks · 0997403a
      Eric Fiselier authored
      llvm-svn: 346933
      0997403a
    • Zachary Turner's avatar
      Fix a use-after-free of the ABI plugin. · 95997f61
      Zachary Turner authored
      This was introduced in r346775.  Previously the ABI shared_ptr
      was declared as a function local static meaning it would live
      forever.  After the change, someone has to create a strong
      reference to it or it will go away.  In this code, we were
      calling ABI::FindPlugin(...).get(), so it was being immediately
      destroyed and we were holding onto a dangling pointer.
      
      llvm-svn: 346932
      95997f61
    • Thomas Lively's avatar
      [WebAssembly] Renumber SIMD bitwise instructions · 77b33c86
      Thomas Lively authored
      Summary: Changed to match https://github.com/WebAssembly/simd/pull/54.
      
      Reviewers: aheejin
      
      Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54561
      
      llvm-svn: 346931
      77b33c86
    • David Blaikie's avatar
      NFC cleanup: Prefer make_unique over reset(new T()) · e0cfc044
      David Blaikie authored
      llvm-svn: 346929
      e0cfc044
    • David Blaikie's avatar
      Fix combining pragma __debug dump & parser_crash with -E · 1013fe74
      David Blaikie authored
      Previously these would be transformed into annotation tokens and the
      preprocessor would then assume they were real tokens with source
      locations and assert/UB.
      
      Other pragmas that produce annotation tokens aren't a problem because
      they aren't handled if the parser isn't hooked up - ParsePragma.cpp
      registers those handlers & isn't run for pure preprocessing. So they're
      treated as unknown pragmas & printed verbatim by the preprocessor.
      
      Perhaps these pragmas should be treated the same way? But they got mixed
      in with other __debug pragmas that do need to be handled during
      preprocessing.
      
      The third __debug pragma that produces an annotation token is 'captured'
      - which had its own fix for this issue - by not inserting the annotation
      token in the first place if it detected that it was in preprocessing
      mode. I've removed that fix (from Lex/Pragma.cpp) in favor of the more
      general one in Frontend/PrintPreprocessedOutput.cpp.
      
      llvm-svn: 346928
      1013fe74
    • David Blaikie's avatar
      Rewrite-imports on crash: Simplify handling · a99b8e4c
      David Blaikie authored
      -frewrite-imports already implies -frewrite-includes (it piggy-backs
      on/extends the implementation) so there's no need to conditionally pass
      -frewrite-includes when already using -frewrite-imports (& especially I
      don't think these would want to be different between crash reporting and
      not crash reporting)
      
      llvm-svn: 346927
      a99b8e4c
    • David Blaikie's avatar
      Stmt bits: Make ExprBits relative to StmtBits · 19d7bbe5
      David Blaikie authored
      Seems like it makes it a bit easier to read/validate/update in the
      future.
      
      llvm-svn: 346926
      19d7bbe5
    • Konstantin Zhuravlyov's avatar
      AMDGPU: Fix check lines in fdot2 test: · 7d1532d3
      Konstantin Zhuravlyov authored
      	GCN900 -> GFX900
      
      llvm-svn: 346925
      7d1532d3