Skip to content
  1. Apr 02, 2020
  2. Apr 01, 2020
  3. Mar 31, 2020
    • Wei Mi's avatar
      [SampleFDO] Port MD5 name table support to extbinary format. · ebad6788
      Wei Mi authored
      Compbinary format uses MD5 to represent strings in name table. That gives smaller profile without the need of compression/decompression when writing/reading the profile. The patch adds the support in extbinary format. It is off by default but user can choose to enable it.
      
      Note the feature of using MD5 in name table can bring very small chance of name conflict leading to profile mismatch. Besides, profile using the feature won't have the profile remapping support.
      
      Differential Revision: https://reviews.llvm.org/D76255
      ebad6788
  4. Mar 28, 2020
  5. Mar 24, 2020
  6. Mar 23, 2020
  7. Mar 22, 2020
    • Nikita Popov's avatar
      [InstCombine] Remove ExpensiveCombines option · dc819236
      Nikita Popov authored
      D75801 removed the last and only user of this option, so we can
      drop it now. The original idea behind this was to only run expensive
      transforms under -O3, but apart from the one known bits transform,
      this has never really taken off. I believe nowadays the recommendation
      is to put expensive transforms in AggressiveInstCombine instead,
      though that isn't terribly popular either :)
      
      Differential Revision: https://reviews.llvm.org/D76540
      dc819236
  8. Mar 18, 2020
  9. Mar 13, 2020
  10. Mar 12, 2020
  11. Mar 09, 2020
  12. Mar 07, 2020
  13. Mar 06, 2020
  14. Mar 04, 2020
    • Nikita Popov's avatar
      [ConstantFolding] Always return something from ConstantFoldConstant · 0e890cd4
      Nikita Popov authored
      Spin-off from D75407. As described there, ConstantFoldConstant()
      currently returns null for non-ConstantExpr/ConstantVector inputs,
      but otherwise always returns non-null, independently of whether
      any folding has happened or not.
      
      This is confusing and makes consumer code more complicated.
      I would expect either that ConstantFoldConstant() returns only if
      it actually folded something, or that it always returns non-null.
      I'm going to the latter possibility here, which appears to be more
      useful considering existing usage.
      
      Differential Revision: https://reviews.llvm.org/D75543
      0e890cd4
    • Sanjay Patel's avatar
      [PassManager] adjust VectorCombine placement · 71a31688
      Sanjay Patel authored
      The initial placement of vector-combine in the opt pipeline revealed phase ordering bugs:
      https://bugs.llvm.org/show_bug.cgi?id=45015
      https://bugs.llvm.org/show_bug.cgi?id=42022
      
      This patch contains a few independent changes:
      
      1. Move the pass up in the pipeline, so it happens just after loop-vectorization.
         This is only to keep vectorization passes together in the pipeline at the moment.
         I don't have evidence of interaction between these yet.
      2. Add an -early-cse pass after -vector-combine to clean up redundant ops. This was
         partly proposed as far back as rL219644 (which is why it's effectively being moved
         in the old PM code). This is important because the subsequent -instcombine doesn't
         work as well without EarlyCSE. With the CSE, -instcombine is able to squash
         shuffles together in 1 of the tests (because those are simple "select" shuffles).
      3. Remove the -vector-combine pass that was running after SLP. We may want to do that
         eventually, but I don't have a test case to support it yet.
      
      Differential Revision: https://reviews.llvm.org/D75145
      71a31688
  15. Mar 02, 2020
    • Teresa Johnson's avatar
      Revert "Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP"" · 80bf137f
      Teresa Johnson authored
      This reverts commit 80d0a137, and the
      follow on fix in 873c0d07. It is
      causing test failures after a multi-stage clang bootstrap. See
      discussion on D73242 and D75201.
      80bf137f
    • Teresa Johnson's avatar
      [ThinLTO/LowerTypeTests] Handle unpromoted local type ids · 873c0d07
      Teresa Johnson authored
      Summary:
      Fixes an issue that cropped up after the changes in D73242 to delay
      the lowering of type tests. LTT couldn't handle any type tests with
      non-string type id (which happens for local vtables, which we try to
      promote during the compile step but cannot always when there are no
      exported symbols).
      
      We can simply treat the same as having an Unknown resolution, which
      delays their lowering, still allowing such type tests to be used in
      subsequent optimization (e.g. planned usage during ICP). The final
      lowering which simply removes these handles them fine.
      
      Beefed up an existing ThinLTO test for such unpromoted type ids so that
      the internal vtable isn't removed before lower type tests, which hides
      the problem.
      
      Reviewers: evgeny777, pcc
      
      Subscribers: inglorion, hiraditya, steven_wu, dexonsmith, aganea, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D75201
      873c0d07
  16. Feb 28, 2020
    • Hiroshi Yamauchi's avatar
      Devirtualize a call on alloca without waiting for post inline cleanup and next... · f16d2bec
      Hiroshi Yamauchi authored
      Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.
      
      This aims to fix a missed inlining case.
      
      If there's a virtual call in the callee on an alloca (stack allocated object) in
      the caller, and the callee is inlined into the caller, the post-inline cleanup
      would devirtualize the virtual call, but if the next iteration of
      DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is
      based on a heuristic to determine whether to reiterate, we may miss inlining the
      devirtualized call.
      
      This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp.
      
      This is a second commit after a revert
      https://reviews.llvm.org/rG4569b3a86f8a4b1b8ad28fe2321f936f9d7ffd43 and a fix
      https://reviews.llvm.org/rG41e06ae7ba91.
      
      Differential Revision: https://reviews.llvm.org/D69591
      f16d2bec
    • Teresa Johnson's avatar
      [Inliner] Inlining should honor nobuiltin attributes · f9ca75f1
      Teresa Johnson authored
      Summary:
      Final patch in series to fix inlining between functions with different
      nobuiltin attributes/options, which was specifically an issue in LTO.
      See discussion on D61634 for background.
      
      The prior patch in this series (D67923) enabled per-Function TLI
      construction that identified the nobuiltin attributes.
      
      Here I have allowed inlining to proceed if the callee's nobuiltins are a
      subset of the caller's nobuiltins, but not in the reverse case, which
      should be conservatively correct. This is controlled by a new option,
      -inline-caller-superset-nobuiltin, which is enabled by default.
      
      Reviewers: hfinkel, gchatelet, chandlerc, davidxl
      
      Subscribers: arsenm, jvesely, nhaehnle, mehdi_amini, eraman, hiraditya, haicheng, dexonsmith, kerbowa, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D74162
      f9ca75f1
  17. Feb 27, 2020
  18. Feb 26, 2020
    • Hiroshi Yamauchi's avatar
      Devirtualize a call on alloca without waiting for post inline cleanup and next · 59fb9cde
      Hiroshi Yamauchi authored
      DevirtSCCRepeatedPass iteration.  Needs ReviewPublic
      
      This aims to fix a missed inlining case.
      
      If there's a virtual call in the callee on an alloca (stack allocated object) in
      the caller, and the callee is inlined into the caller, the post-inline cleanup
      would devirtualize the virtual call, but if the next iteration of
      DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is
      based on a heuristic to determine whether to reiterate, we may miss inlining the
      devirtualized call.
      
      This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp.
      59fb9cde
  19. Feb 25, 2020
    • Johannes Doerfert's avatar
      [OpenMP][Opt] Combine `struct ident_t*` during deduplication · 396b7253
      Johannes Doerfert authored
      If we deduplicate OpenMP runtime calls we have multiple `ident_t*` that
      represent information like source location. So far, we simply kept the
      one used by the replacement call. However, as exposed by PR44893, that
      can cause problems if we have stack allocated `ident_t` objects. While
      we need to revisit the use of these as well, it is clear that we
      eventually want to merge source location information in some way. With
      this patch we add the infrastructure to do so but without doing the
      actual merge. Instead we pick a global `ident_t` from the replaced
      calls, if possible, or create a new one with an unknown location
      instead.
      
      Reviewed By: JonChesterfield
      
      Differential Revision: https://reviews.llvm.org/D74925
      396b7253
Loading