Skip to content
  1. Oct 06, 2017
    • Dehao Chen's avatar
      Directly return promoted direct call instead of rely on stripPointerCast. · 9bd60429
      Dehao Chen authored
      Summary: stripPointerCast is not reliably returning the value that's being type-casted. Instead it may look further at function attributes to further propagate the value. Instead of relying on stripPOintercast, the more reliable solution is to directly use the pointer to the promoted direct call.
      
      Reviewers: tejohnson, davidxl
      
      Reviewed By: tejohnson
      
      Subscribers: llvm-commits, sanjoy
      
      Differential Revision: https://reviews.llvm.org/D38603
      
      llvm-svn: 315077
      9bd60429
    • Davide Italiano's avatar
      [PM] Retire disable unit-at-a-time switch. · c74ea93b
      Davide Italiano authored
      This is a vestige from the GCC-3 days, which disables IPO passes
      when set. I don't think anybody actually uses it as there are
      several IPO passes which still run with this flag set and
      nobody complained/noticed. This reduces the delta between
      current and new pass manager and allows us to easily review
      the difference when we decide to flip the switch (or audit
      which passes should run, FWIW).
      
      llvm-svn: 315043
      c74ea93b
  2. Oct 05, 2017
  3. Oct 03, 2017
  4. Oct 02, 2017
  5. Oct 01, 2017
    • Dehao Chen's avatar
      Separate the logic when handling indirect calls in SamplePGO ThinLTO compile... · d26dae0d
      Dehao Chen authored
      Separate the logic when handling indirect calls in SamplePGO ThinLTO compile phase and other phases.
      
      Summary: In SamplePGO ThinLTO compile phase, we will not invoke ICP as it may introduce confusion to the 2nd annotation. This patch extracted that logic and makes it clearer before profile annotation. In the mean time, we need to make function importing process both inlined callsites as well as not promoted indirect callsites.
      
      Reviewers: tejohnson
      
      Reviewed By: tejohnson
      
      Subscribers: sanjoy, mehdi_amini, llvm-commits, inglorion
      
      Differential Revision: https://reviews.llvm.org/D38094
      
      llvm-svn: 314619
      d26dae0d
  6. Sep 30, 2017
  7. Sep 28, 2017
    • Sanjoy Das's avatar
      Use a BumpPtrAllocator for Loop objects · def1729d
      Sanjoy Das authored
      Summary:
      And now that we no longer have to explicitly free() the Loop instances, we can
      (with more ease) use the destructor of LoopBase to do what LoopBase::clear() was
      doing.
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, mcrosier, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38201
      
      llvm-svn: 314375
      def1729d
  8. Sep 22, 2017
  9. Sep 21, 2017
    • Strahinja Petrovic's avatar
      Fixed reverted commit rL312318 · 29202f6d
      Strahinja Petrovic authored
      This patch contains fix for reverted commit
      rL312318 which was causing failure due to use
      of unchecked dyn_cast to CIInit.
      
      Patch by: Nikola Prica.
      
      llvm-svn: 313870
      29202f6d
  10. Sep 20, 2017
    • Teresa Johnson's avatar
      [ThinLTO] Fix dead stripping analysis for SamplePGO · f625118e
      Teresa Johnson authored
      Summary:
      The fix for dead stripping analysis in the case of SamplePGO indirect
      calls to local functions (r313151) introduced the possibility of an
      infinite loop.
      
      Make sure we check for the value being already live after we update it
      for SamplePGO indirect call handling.
      
      Reviewers: danielcdh
      
      Subscribers: mehdi_amini, inglorion, llvm-commits, eraman
      
      Differential Revision: https://reviews.llvm.org/D38086
      
      llvm-svn: 313766
      f625118e
    • Sanjoy Das's avatar
      [LoopInfo] Make LoopBase and Loop destructors non-public · 76ab2323
      Sanjoy Das authored
      Summary:
      See comment for why I think this is a good idea.
      
      This change also:
      
       - Removes an SCEV test case.  The SCEV test was not testing anything useful (most of it was `#if 0` ed out) and it would need to be updated to deal with a private ~Loop::Loop.
       - Updates the loop pass manager test case to deal with a private ~Loop::Loop.
       - Renames markAsRemoved to markAsErased to contrast with removeLoop, via the usual remove vs. erase idiom we already have for instructions and basic blocks.
      
      Reviewers: chandlerc
      
      Subscribers: mehdi_amini, mcrosier, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D37996
      
      llvm-svn: 313695
      76ab2323
    • Adam Nemet's avatar
      Allow ORE.emit to take a closure to delay building the remark object · 15fccf00
      Adam Nemet authored
      In the lambda we are now returning the remark by value so we need to preserve
      its type in the insertion operator.  This requires making the insertion
      operator generic.
      
      I've also converted a few cases to use the new API.  It seems to work pretty
      well.  See the LoopUnroller for a slightly more interesting case.
      
      llvm-svn: 313691
      15fccf00
  11. Sep 19, 2017
    • Dehao Chen's avatar
      Import all inlined indirect call targets for SamplePGO. · 62b9c33e
      Dehao Chen authored
      Summary: In the ThinLTO compilation, if a function is inlined in the profiling binary, we need to inline it before annotation. If the callee is not available in the primary module, a first step is needed to import that callee function. For the current implementation, if the call is an indirect call, which has been promoted to >1 targets and inlined, SamplePGO will only import one target with the largest sample count. This patch fixed the bug to import all targets instead.
      
      Reviewers: tejohnson, davidxl
      
      Reviewed By: tejohnson
      
      Subscribers: sanjoy, llvm-commits, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D36637
      
      llvm-svn: 313678
      62b9c33e
    • Dehao Chen's avatar
      Handle profile mismatch correctly for SamplePGO. · b6e60c8b
      Dehao Chen authored
      Summary: Fix the bug when promoted call return type mismatches with the promoted function, we should not try to inline it. Otherwise it may lead to compiler crash.
      
      Reviewers: davidxl, tejohnson, eraman
      
      Reviewed By: tejohnson
      
      Subscribers: llvm-commits, sanjoy
      
      Differential Revision: https://reviews.llvm.org/D38018
      
      llvm-svn: 313658
      b6e60c8b
  12. Sep 14, 2017
  13. Sep 13, 2017
    • Dehao Chen's avatar
      Invoke GetInlineCost for legality check before inline functions in SampleProfileLoader. · 15c86ef9
      Dehao Chen authored
      Summary: SampleProfileLoader inlines hot functions if it is inlined in the profiled binary. However, the inline needs to be guarded by legality check, otherwise it could lead to correctness issues.
      
      Reviewers: eraman, davidxl
      
      Reviewed By: eraman
      
      Subscribers: sanjoy, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D37779
      
      llvm-svn: 313195
      15c86ef9
    • Peter Collingbourne's avatar
      ThinLTO: Correctly follow aliasee references when dead stripping. · d067c8ed
      Peter Collingbourne authored
      We were previously handling aliases during dead stripping by adding
      the aliased global's "original name" GUID to the worklist. This will
      lead to incorrect behaviour if the global has local linkage because
      the original name GUID will not correspond to the global's GUID in
      the summary.
      
      Because an alias is just another name for the global that it
      references, there is no need to mark the referenced global as used,
      or to follow references from any other copies of the global. So all
      we need to do is to follow references from the aliasee's summary
      instead of the alias.
      
      Differential Revision: https://reviews.llvm.org/D37789
      
      llvm-svn: 313157
      d067c8ed
    • Teresa Johnson's avatar
      [ThinLTO] For SamplePGO, need to handle ICP targets consistently in thin link · 1958083d
      Teresa Johnson authored
      Summary:
      SamplePGO indirect call profiles record the target as the original GUID
      for statics. The importer had special handling to map to the normal GUID
      in that case. The dead global analysis needs the same treatment or
      inconsistencies arise, resulting in linker unsats due to some dead
      symbols being exported and kept, leaving in references to other dead
      symbols that are removed.
      
      This can happen when a SamplePGO profile collected by one binary is used
      for a different binary, so the indirect call profiles may not accurately
      reflect live targets.
      
      Reviewers: danielcdh
      
      Subscribers: mehdi_amini, inglorion, llvm-commits, eraman
      
      Differential Revision: https://reviews.llvm.org/D37783
      
      llvm-svn: 313151
      1958083d
  14. Sep 12, 2017
  15. Sep 09, 2017
    • Nuno Lopes's avatar
      Merge isKnownNonNull into isKnownNonZero · 404f106d
      Nuno Lopes authored
      It now knows the tricks of both functions.
      Also, fix a bug that considered allocas of non-zero address space to be always non null
      
      Differential Revision: https://reviews.llvm.org/D37628
      
      llvm-svn: 312869
      404f106d
    • Sanjay Patel's avatar
      [DivRempairs] add a pass to optimize div/rem pairs (PR31028) · 6fd4391d
      Sanjay Patel authored
      This is intended to be a superset of the functionality from D31037 (EarlyCSE) but implemented 
      as an independent pass, so there's no stretching of scope and feature creep for an existing pass. 
      I also proposed a weaker version of this for SimplifyCFG in D30910. And I initially had almost 
      this same functionality as an addition to CGP in the motivating example of PR31028:
      https://bugs.llvm.org/show_bug.cgi?id=31028
      
      The advantage of positioning this ahead of SimplifyCFG in the pass pipeline is that it can allow 
      more flattening. But it needs to be after passes (InstCombine) that could sink a div/rem and
      undo the hoisting that is done here.
      
      Decomposing remainder may allow removing some code from the backend (PPC and possibly others).
      
      Differential Revision: https://reviews.llvm.org/D37121 
      
      llvm-svn: 312862
      6fd4391d
  16. Sep 08, 2017
  17. Sep 01, 2017
  18. Aug 31, 2017
  19. Aug 30, 2017
  20. Aug 29, 2017
Loading