Skip to content
  1. Nov 05, 2019
  2. Nov 04, 2019
  3. Oct 31, 2019
  4. Oct 28, 2019
  5. Oct 20, 2019
  6. Oct 18, 2019
  7. Oct 11, 2019
  8. 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
  9. Oct 05, 2019
  10. Oct 02, 2019
  11. Aug 28, 2019
    • Artur Pilipenko's avatar
      Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after ... · 925afc1c
      Artur Pilipenko authored
      ...cloning a function from a different module
      
      Currently when a function with debug info is cloned from a different module, the 
      cloned function may have hanging DICompileUnits, so that the module with the 
      cloned function fails debug info verification.
      
      The proposed fix inserts all DICompileUnits reachable from the cloned function 
      to "llvm.dbg.cu" metadata operands of the cloned function module. 
      
      Reviewed By: aprantl, efriedma
      
      Differential Revision: https://reviews.llvm.org/D66510
      
      Patch by Oleg Pliss (Oleg.Pliss@azul.com)
      
      llvm-svn: 370265
      925afc1c
  12. Aug 15, 2019
  13. Aug 01, 2019
  14. Jul 08, 2019
  15. Jun 11, 2019
    • Alina Sbirlea's avatar
      Only passes that preserve MemorySSA must mark it as preserved. · 3cef1f7d
      Alina Sbirlea authored
      Summary:
      The method `getLoopPassPreservedAnalyses` should not mark MemorySSA as
      preserved, because it's being called in a lot of passes that do not
      preserve MemorySSA.
      Instead, mark the MemorySSA analysis as preserved by each pass that does
      preserve it.
      These changes only affect the new pass mananger.
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, jlebar, Prazek, george.burgess.iv, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62536
      
      llvm-svn: 363091
      3cef1f7d
  16. May 20, 2019
  17. May 06, 2019
  18. May 01, 2019
    • Alina Sbirlea's avatar
      [AliasAnalysis/NewPassManager] Invalidate AAManager less often. · ba48a2c5
      Alina Sbirlea authored
      Summary:
      This is a redo of D60914.
      
      The objective is to not invalidate AAManager, which is stateless, unless
      there is an explicit invalidate in one of the AAResults.
      
      To achieve this, this patch adds an API to PAC, to check precisely this:
      is this analysis not invalidated explicitly == is this analysis not abandoned == is this analysis stateless, so preserved without explicitly being marked as preserved by everyone
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, jlebar, george.burgess.iv, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61284
      
      llvm-svn: 359622
      ba48a2c5
  19. Apr 24, 2019
  20. Apr 23, 2019
  21. Apr 12, 2019
    • Alina Sbirlea's avatar
      [SCEV] Add option to forget everything in SCEV. · 2312a06c
      Alina Sbirlea authored
      Summary:
      Create a method to forget everything in SCEV.
      Add a cl::opt and PassManagerBuilder option to use this in LoopUnroll.
      
      Motivation: Certain Halide applications spend a very long time compiling in forgetLoop, and prefer to forget everything and rebuild SCEV from scratch.
      Sample difference in compile time reduction: 21.04 to 14.78 using current ToT release build.
      Testcase showcasing this cannot be opensourced and is fairly large.
      
      The option disabled by default, but it may be desirable to enable by
      default. Evidence in favor (two difference runs on different days/ToT state):
      
      File Before (s) After (s)
      clang-9.bc 7267.91 6639.14
      llvm-as.bc 194.12 194.12
      llvm-dis.bc 62.50 62.50
      opt.bc 1855.85 1857.53
      
      File Before (s) After (s)
      clang-9.bc 8588.70 7812.83
      llvm-as.bc 196.20 194.78
      llvm-dis.bc 61.55 61.97
      opt.bc 1739.78 1886.26
      
      Reviewers: sanjoy
      
      Subscribers: mehdi_amini, jlebar, zzheng, javed.absar, dmgreen, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60144
      
      llvm-svn: 358304
      2312a06c
  22. Mar 19, 2019
    • Markus Lavin's avatar
      [DebugInfo] Introduce DW_OP_LLVM_convert · b86ce219
      Markus Lavin authored
      Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows
      for a convenient way to perform type conversions on the Dwarf expression
      stack. As an additional bonus it paves the way for using other Dwarf
      v5 ops that need to reference a base_type.
      
      The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp
      to perform sext/zext on debug values but mainly the patch is about
      preparing terrain for adding other Dwarf v5 ops that need to reference a
      base_type.
      
      For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a
      complex shift & mask pattern is generated to emulate sext/zext.
      
      This is a recommit of r356442 with trivial fixes for the failing tests.
      
      Differential Revision: https://reviews.llvm.org/D56587
      
      llvm-svn: 356451
      b86ce219
    • Markus Lavin's avatar
      Revert "[DebugInfo] Introduce DW_OP_LLVM_convert" · ad78768d
      Markus Lavin authored
      This reverts commit 1cf4b593a7ebd666fc6775f3bd38196e8e65fafe.
      
      Build bots found failing tests not detected locally.
      
      Failing Tests (3):
        LLVM :: DebugInfo/Generic/convert-debugloc.ll
        LLVM :: DebugInfo/Generic/convert-inlined.ll
        LLVM :: DebugInfo/Generic/convert-linked.ll
      
      llvm-svn: 356444
      ad78768d
    • Markus Lavin's avatar
      [DebugInfo] Introduce DW_OP_LLVM_convert · cd8a940b
      Markus Lavin authored
      Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows
      for a convenient way to perform type conversions on the Dwarf expression
      stack. As an additional bonus it paves the way for using other Dwarf
      v5 ops that need to reference a base_type.
      
      The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp
      to perform sext/zext on debug values but mainly the patch is about
      preparing terrain for adding other Dwarf v5 ops that need to reference a
      base_type.
      
      For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a
      complex shift & mask pattern is generated to emulate sext/zext.
      
      Differential Revision: https://reviews.llvm.org/D56587
      
      llvm-svn: 356442
      cd8a940b
  23. Mar 11, 2019
  24. Feb 22, 2019
  25. Feb 13, 2019
  26. Feb 11, 2019
  27. Feb 08, 2019
    • Vedant Kumar's avatar
      [CodeExtractor] Restore outputs after creating exit stubs · 0e5dd512
      Vedant Kumar authored
      When CodeExtractor saves the result of InvokeInst at the first insertion
      point of the 'normal destination' basic block, this block can be omitted
      in the outlined region, so store is placed outside of the function. The
      suggested solution is to process saving outputs after creating exit
      stubs for new function, and stores will be placed in that blocks before
      return in this case.
      
      Patch by Sergei Kachkov!
      
      Fixes llvm.org/PR40455.
      
      Differential Revision: https://reviews.llvm.org/D57919
      
      llvm-svn: 353562
      0e5dd512
  28. Feb 06, 2019
    • Richard Trieu's avatar
      Move DomTreeUpdater from IR to Analysis · 5f436fc5
      Richard Trieu authored
      DomTreeUpdater depends on headers from Analysis, but is in IR.  This is a
      layering violation since Analysis depends on IR.  Relocate this code from IR
      to Analysis to fix the layering violation.
      
      llvm-svn: 353265
      5f436fc5
  29. Feb 01, 2019
  30. Jan 23, 2019
    • Hideki Saito's avatar
      · 4e4ecae0
      Hideki Saito authored
      [LV][VPlan] Change to implement VPlan based predication for
      VPlan-native path
      
      Context: Patch Series #2 for outer loop vectorization support in LV
      using VPlan. (RFC:
      http://lists.llvm.org/pipermail/llvm-dev/2017-December/119523.html).
      
      Patch series #2 checks that inner loops are still trivially lock-step
      among all vector elements. Non-loop branches are blindly assumed as
      divergent.
      
      Changes here implement VPlan based predication algorithm to compute
      predicates for blocks that need predication. Predicates are computed
      for the VPLoop region in reverse post order. A block's predicate is
      computed as OR of the masks of all incoming edges. The mask for an
      incoming edge is computed as AND of predecessor block's predicate and
      either predecessor's Condition bit or NOT(Condition bit) depending on
      whether the edge from predecessor block to the current block is true
      or false edge.
      
      Reviewers: fhahn, rengolin, hsaito, dcaballe
      
      Reviewed By: fhahn
      
      Patch by Satish Guggilla, thanks!
      
      Differential Revision: https://reviews.llvm.org/D53349
      
      llvm-svn: 351990
      4e4ecae0
  31. Jan 19, 2019
    • Chandler Carruth's avatar
      Update the file headers across all of the LLVM projects in the monorepo · 2946cd70
      Chandler Carruth authored
      to reflect the new license.
      
      We understand that people may be surprised that we're moving the header
      entirely to discuss the new license. We checked this carefully with the
      Foundation's lawyer and we believe this is the correct approach.
      
      Essentially, all code in the project is now made available by the LLVM
      project under our new license, so you will see that the license headers
      include that license only. Some of our contributors have contributed
      code under our old license, and accordingly, we have retained a copy of
      our old license notice in the top-level files in each project and
      repository.
      
      llvm-svn: 351636
      2946cd70
  32. Dec 07, 2018
    • Vedant Kumar's avatar
      [CodeExtractor] Store outputs at the first valid insertion point · b2a6f8e5
      Vedant Kumar authored
      When CodeExtractor outlines values which are used by the original
      function, it must store those values in some in-out parameter. This
      store instruction must not be inserted in between a PHI and an EH pad
      instruction, as that results in invalid IR.
      
      This fixes the following verifier failure seen while outlining within
      ObjC methods with live exit values:
      
        The unwind destination does not have an exception handling instruction!
          %call35 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %exn.adjusted, i8* %1)
                  to label %invoke.cont34 unwind label %lpad33, !dbg !4183
        The unwind destination does not have an exception handling instruction!
          invoke void @objc_exception_throw(i8* %call35) #12
                  to label %invoke.cont36 unwind label %lpad33, !dbg !4184
        LandingPadInst not the first non-PHI instruction in the block.
          %3 = landingpad { i8*, i32 }
                  catch i8* null, !dbg !1411
      
      rdar://46540815
      
      llvm-svn: 348562
      b2a6f8e5
  33. Dec 03, 2018
    • Vedant Kumar's avatar
      [CodeExtractor] Split PHI nodes with incoming values from outlined region (PR39433) · d129569e
      Vedant Kumar authored
      If a PHI node out of extracted region has multiple incoming values from it,
      split this PHI on two parts. First PHI has incomings only from region and
      extracts with it (they are placed to the separate basic block that added to the
      list of outlined), and incoming values in original PHI are replaced by first
      PHI. Similar solution is already used in CodeExtractor for PHIs in entry block
      (severSplitPHINodes method). It covers PR39433 bug.
      
      Patch by Sergei Kachkov!
      
      Differential Revision: https://reviews.llvm.org/D55018
      
      llvm-svn: 348205
      d129569e
  34. Nov 19, 2018
  35. Nov 14, 2018
    • 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
Loading