1. Nov 15, 2018
  2. Nov 14, 2018
    • Florian Hahn's avatar
      [VPlan, SLP] Use SmallPtrSet for Candidates. · 6df11868
      Florian Hahn authored
      This slightly improves the candidate handling in getBest().
      
      llvm-svn: 346870
      6df11868
    • John Brawn's avatar
      [SimplifyCFG] Regenerate preserve-branchweights.ll test. NFC · 9fd8c20c
      John Brawn authored
      Regenerate this test using update_test_checks.py in preparation for an
      upcomming commit, to make it not depend on the names of instructions.
      
      llvm-svn: 346869
      9fd8c20c
    • Simon Pilgrim's avatar
      2b166c50
    • Pavel Labath's avatar
      Move DataExtractorTest to unittests/Utility · 07e93c57
      Pavel Labath authored
      The DataExtractor class itself was moved to Utility some time ago, but
      it seems this was not reflected in the location of the test code. Fix
      that.
      
      llvm-svn: 346867
      07e93c57
    • David Bolvansky's avatar
      Reverted D52835 to fix review comments · 3cc2ef80
      David Bolvansky authored
      llvm-svn: 346866
      3cc2ef80
    • David Bolvansky's avatar
      [Diagnostics] Check integer to floating point number implicit conversions · a208bbd5
      David Bolvansky authored
      Summary:
      GCC already catches these situations so we should handle it too.
      
      GCC warns in C++ mode only (does anybody know why?). I think it is useful in C mode too.
      
      Reviewers: rsmith, erichkeane, aaron.ballman, efriedma, xbolva00
      
      Reviewed By: xbolva00
      
      Subscribers: efriedma, craig.topper, scanon, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D52835
      
      llvm-svn: 346865
      a208bbd5
    • Bruno Ricci's avatar
      [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td · 2257cbb8
      Bruno Ricci authored
      Reorder the bit-field classes and the members of the anonymous union
      so that they both match the order in StmtNodes.td.
      
      There is already a fair amount of them, and this is not going to
      improve. Therefore lets try to keep some order here.
      
      Strictly NFC.
      
      llvm-svn: 346864
      2257cbb8
    • Peter Smith's avatar
      [AArch64] Fix resolution of R_PLT_PAGE RelExpr · ad51cee8
      Peter Smith authored
      The R_AARCH64_ADR_PREL_PG_HI21 relocation type is given the R_PAGE_PC
      RelExpr. This can be transformed to R_PLT_PAGE_PC via toPlt().
      Unfortunately the resolution is identical to R_PAGE_PC so instead of
      getting the address of the PLT entry we get the address of the symbol
      which may not be correct in the case of static ifuncs. The fix is to
      handle the cases separately and use getPltVA() + A with R_PLT_PAGE_PC.
      
      Differential Revision: https://reviews.llvm.org/D54474
      
      llvm-svn: 346863
      ad51cee8
    • Andrey Churbanov's avatar
      Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39137. · 82318c6f
      Andrey Churbanov authored
      Do not write to internal structure if it keeps same value.
      
      Differential Revision: https://reviews.llvm.org/D54305
      
      llvm-svn: 346862
      82318c6f
    • Paul Robinson's avatar
      Document how to comment an actual parameter. · a6a19c00
      Paul Robinson authored
      Differential Revision: https://reviews.llvm.org/D54446
      
      llvm-svn: 346861
      a6a19c00
    • Florian Hahn's avatar
      [VPlan] Remove LLVM_DEBUG from VPlanSlp::dumpBundle. · 02cb67de
      Florian Hahn authored
      The caller should take care of only calling it with debug enabled.
      
      llvm-svn: 346860
      02cb67de
    • Simon Pilgrim's avatar
      [TTI] Pull out repeated 'ConcreteTTI' static_casts. NFCI. · e414b038
      Simon Pilgrim authored
      llvm-svn: 346859
      e414b038
    • Florian Hahn's avatar
      [VPlan] Update ifdef. · 2eca3728
      Florian Hahn authored
      llvm-svn: 346858
      2eca3728
    • Florian Hahn's avatar
      [VPlan, SLP] Add simple SLP analysis on top of VPlan. · 09e516c5
      Florian Hahn authored
      This patch adds an initial implementation of the look-ahead SLP tree
      construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence
      of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha,
      Luís F. W. Góes'.
      
      It returns an SLP tree represented as VPInstructions, with combined
      instructions represented as a single, wider VPInstruction.
      
      This initial version does not support instructions with multiple
      different users (either inside or outside the SLP tree) or
      non-instruction operands; it won't generate any shuffles or
      insertelement instructions.
      
      It also just adds the analysis that builds an SLP tree rooted in a set
      of stores. It does not include any cost modeling or memory legality
      checks. The plan is to integrate it with VPlan based cost modeling, once
      available and to only apply it to operations that can be widened.
      
      A follow-up patch will add a support for replacing instructions in a
      VPlan with their SLP counter parts.
      
      Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev
      
      Reviewed By: rengolin
      
      Differential Revision: https://reviews.llvm.org/D4949
      
      llvm-svn: 346857
      09e516c5
    • Aaron Ballman's avatar
    • George Rimar's avatar
      [LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.". · 004bcb78
      George Rimar authored
      Test cases were updated to not use the local compilation dir which
      is different between development pc and build bots.
      
      Original commit message:
      
      [LLDB] - Support the single file split DWARF.
      
      DWARF5 spec describes a single file split dwarf case
      (when .dwo sections are in the .o files).
      
      Problem is that LLDB does not work correctly in that case.
      The issue is that, for example, both .debug_info and .debug_info.dwo
      has the same type: eSectionTypeDWARFDebugInfo. And when code searches
      section by type it might find the regular debug section
      and not the .dwo one.
      
      The patch fixes that. With it, LLDB is able to work with
      output compiled with -gsplit-dwarf=single flag correctly.
      
      Differential revision: https://reviews.llvm.org/D52403
      
      llvm-svn: 346855
      004bcb78
    • Simon Pilgrim's avatar
      [CostModel] Add generic expansion funnel shift cost support · cdb17079
      Simon Pilgrim authored
      Add support for the expansion of funnelshift/rotates to getIntrinsicInstrCost.
      
      This also required us to move the X86 fshl/fshr costs to the same place as the rotates to avoid expansion and get correct scalarization vs vectorization costs.
      
      llvm-svn: 346854
      cdb17079
    • George Rimar's avatar
    • Haojian Wu's avatar
      [clangd] Replace StringRef in SymbolLocation with a char pointer. · ee54a2b5
      Haojian Wu authored
      Summary:
      This would save us 8 bytes per ref, and buy us ~40MB in total
      for llvm index (from ~300MB to ~260 MB).
      
      The char pointer must be null-terminated, and llvm::StringSaver
      guarantees it.
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D53427
      
      llvm-svn: 346852
      ee54a2b5
    • Xing GUO's avatar
      [llvm-objdump] Improve ELF file type checking statements (D54509) · ee78ae6b
      Xing GUO authored
      llvm-svn: 346851
      ee78ae6b
    • Simon Pilgrim's avatar
      [X86][AVX512] Remove constant pool shuffle decoding from SelectionDAG · 7501780e
      Simon Pilgrim authored
      This patch removes the last use of the constant pool shuffle decode helper and consistently uses the 'getTargetShuffleMaskIndices' versions instead. The constant pool versions are now purely used for assembly comments.
      
      The avx512vbmi intrinsic upgrades had to be altered as they were being decoded as broadcasts, similar to what I fixed in rL346032. I don't think the change is critical - although its annoying that we lose the {k}{z} instruction test coverage as they are tricky to generate....
      
      Differential Revision: https://reviews.llvm.org/D54083
      
      llvm-svn: 346850
      7501780e
    • Pavel Labath's avatar
      Fix a crash when parsing incorrect DWARF · 18e98645
      Pavel Labath authored
      Summary:
      While parsing a childless compile unit DIE we could crash if the DIE was
      followed by any extra data (such as a superfluous end-of-children
      marker). This happened because the break-on-depth=0 check was performed
      only when parsing the null DIE, which was not correct because with a
      childless root DIE, we could reach the end of the unit without ever
      encountering the null DIE.
      
      If the compile unit contribution ended directly after the CU DIE,
      everything would be fine as we would terminate parsing due to reaching
      EOF. However, if the contribution contained extra data (perhaps a
      superfluous end-of-children marker), we would crash because we would
      treat that data as the begging of another compile unit.
      
      This fixes the crash by moving the depth=0 check to a more generic
      place, and also adds a regression test.
      
      Reviewers: clayborg, jankratochvil, JDevlieghere
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D54417
      
      llvm-svn: 346849
      18e98645
    • George Rimar's avatar
      [LLDB] - Support the single file split DWARF. · 98963db5
      George Rimar authored
      DWARF5 spec describes a single file split dwarf case
      (when .dwo sections are in the .o files).
      
      Problem is that LLDB does not work correctly in that case.
      The issue is that, for example, both .debug_info and .debug_info.dwo
      has the same type: eSectionTypeDWARFDebugInfo. And when code searches
      section by type it might find the regular debug section
      and not the .dwo one.
      
      The patch fixes that. With it, LLDB is able to work with
      output compiled with -gsplit-dwarf=single flag correctly.
      
      Differential revision: https://reviews.llvm.org/D52296
      
      llvm-svn: 346848
      98963db5
    • Sam McCall's avatar
      [AST] Allow limiting the scope of common AST traversals (getParents, RAV). · 814e7974
      Sam McCall authored
      Summary:
      The goal is to allow analyses such as clang-tidy checks to run on a
      subset of the AST, e.g. "only on main-file decls" for interactive tools.
      
      Today, these become "problematically global" by running RecursiveASTVisitors
      rooted at the TUDecl, or by navigating up via ASTContext::getParent().
      
      The scope is restricted using a set of top-level-decls that RecursiveASTVisitors
      should be rooted at. This also applies to the visitor that populates the
      parent map, and so the top-level-decls are considered to have no parents.
      
      This patch makes the traversal scope a mutable property of ASTContext.
      The more obvious way to do this is to pass the top-level decls to
      relevant functions directly, but this has some problems:
       - it's error-prone: accidentally mixing restricted and unrestricted
         scopes is a performance trap. Interleaving multiple analyses is
         common (many clang-tidy checks run matchers or RAVs from matcher callbacks)
       - it doesn't map well to the actual use cases, where we really do want
         *all* traversals to be restricted.
       - it involves a lot of plumbing in parts of the code that don't care
         about traversals.
      This approach was tried out in D54259 and D54261, I wanted to like it
      but it feels pretty awful in practice.
      
      Caveats: to get scope-limiting behavior of RecursiveASTVisitors, callers
      have to call the new TraverseAST(Ctx) function instead of TraverseDecl(TU).
      I think this is an improvement to the API regardless.
      
      Reviewers: klimek, ioeric
      
      Subscribers: mgorny, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54309
      
      llvm-svn: 346847
      814e7974
    • Martin Storsjo's avatar
      [COFF] Fix a longstanding typo in a variable name. NFC. · 49037d2b
      Martin Storsjo authored
      llvm-svn: 346846
      49037d2b
    • Heejin Ahn's avatar
      [WebAssembly] Make sure event-section XFAILs for build options · f51cbc1d
      Heejin Ahn authored
      rL346840 temporarily marked event-section.ll as XFAIL because it was
      failing for builds with LLVM_ENABLE_EXPENSIVE_CHECKS turned on, but
      to make sure it XFAILs even without LLVM_ENABLE_EXPENSIVE_CHECKS on we
      need this `-verify-machineinstrs` flag, which was missing in the
      previous commit.
      
      llvm-svn: 346845
      f51cbc1d
    • Sven van Haastregt's avatar
      Print newline after banner for ModulePass · 00111144
      Sven van Haastregt authored
      Before this commit, `llc -print-after-all` would print something like:
      
        *** IR Dump After Pre-ISel Intrinsic Lowering ***; ModuleID = ...
      
      Emit a newline such that ModuleID appears on a line by its own.
      
      llvm-svn: 346844
      00111144
    • Florian Hahn's avatar
      Recommit r346483: [CallSiteSplitting] Only record conditions up to the IDom(call site). · 505091a8
      Florian Hahn authored
      The underlying problem causing the expensive-check failure was fixed in
      rL346769.
      
      llvm-svn: 346843
      505091a8
    • Diana Picus's avatar
      Fix r346747 and r346796 · 8b56ab45
      Diana Picus authored
      Require x86 for the tests in order to fix non-x86 bots. This seems to be
      the case for all other tests in that directory.
      
      llvm-svn: 346842
      8b56ab45
    • Haojian Wu's avatar
      Suppress a "-Wliteral-conversion" compiler warning. · 59fa37da
      Haojian Wu authored
      error: implicit conversion from 'double' to 'uint64_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion]
      llvm-svn: 346841
      59fa37da
    • Heejin Ahn's avatar
      [WebAssembly] Temporarily disable event-section.ll · 07b0e356
      Heejin Ahn authored
      This test is failing in builds with LLVM_ENABLE_EXPENSIVE_CHECKS after
      rL346825 not because of the patch but due to a pre-existing codegen
      problem. Marking this as XFAIL temporarily until the bug is fixed.
      
      llvm-svn: 346840
      07b0e356
    • Haojian Wu's avatar
      Fix the "make_unique is ambiguous" compiler error. · 01b09884
      Haojian Wu authored
      llvm-svn: 346839
      01b09884
    • Alexey Sotkin's avatar
      [OpenCL] Fix invalid address space generation for clk_event_t · 692f12b3
      Alexey Sotkin authored
      Summary:
      Addrspace(32) was generated when putting 0 in clk_event_t * event_ret
      parameter for enqueue_kernel function.
      
      Patch by Viktoria Maksimova
      
      Reviewers: Anastasia, yaxunl, AlexeySotkin
      
      Reviewed By:  Anastasia, AlexeySotkin
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D53809
      
      llvm-svn: 346838
      692f12b3
    • George Rimar's avatar
      [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' option. · 91829eef
      George Rimar authored
      The DWARF5 specification says(Appendix F.1):
      
      "The sections that do not require relocation, however, can be
      written to the relocatable object (.o) file but ignored by the
      linker or they can be written to a separate DWARF object (.dwo)
      file that need not be accessed by the linker."
      
      The first part describes a single file split DWARF feature and there
      is no way to trigger this behavior atm. 
      Fortunately, no many changes are required to keep *.dwo sections
      in a .o, the patch does that.
      
      Differential revision: https://reviews.llvm.org/D52296
      
      llvm-svn: 346837
      91829eef
    • Sam McCall's avatar
      [clangd] Improve code completion for ObjC methods · 39e86fa5
      Sam McCall authored
      Summary:
      Previously code completion did not work well for Objective-C methods
      which contained multiple arguments as clangd did not expect to see
      multiple typed-text chunks when handling code completion.
      
      Note that even with this change, we do not consider selector fragments
      from previous arguments to be part of the signature (although we
      could in the future).
      
      Reviewers: sammccall
      
      Reviewed By: sammccall
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D53934
      
      llvm-svn: 346836
      39e86fa5