Skip to content
  1. May 03, 2020
    • Johannes Doerfert's avatar
      [Attributor][NFC] Encode IRPositions in the bits of a single pointer · 8228153f
      Johannes Doerfert authored
      This reduces memory consumption for IRPositions by eliminating the
      vtable pointer and the `KindOrArgNo` integer. Since each abstract
      attribute has an associated IRPosition, the 12-16 bytes we save add up
      quickly.
      
      No functional change is intended.
      
      ---
      
      Single run of the Attributor module and then CGSCC pass (oldPM)
      for SPASS/clause.c (~10k LLVM-IR loc):
      
      Before:
      ```
      calls to allocation functions: 469545 (260135/s)
      temporary memory allocations: 77137 (42735/s)
      peak heap memory consumption: 30.50MB
      peak RSS (including heaptrack overhead): 119.50MB
      total memory leaked: 269.07KB
      ```
      
      After:
      ```
      calls to allocation functions: 468999 (274108/s)
      temporary memory allocations: 77002 (45004/s)
      peak heap memory consumption: 28.83MB
      peak RSS (including heaptrack overhead): 118.05MB
      total memory leaked: 269.07KB
      ```
      
      Difference:
      ```
      calls to allocation functions: -546 (5808/s)
      temporary memory allocations: -135 (1436/s)
      peak heap memory consumption: -1.67MB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: 0B
      ```
      
      ---
      
      CTMark 15 runs
      
      Metric: compile_time
      
      Program                                        lhs    rhs    diff
       test-suite...:: CTMark/sqlite3/sqlite3.test    25.07  24.09 -3.9%
       test-suite...Mark/mafft/pairlocalalign.test    14.58  14.14 -3.0%
       test-suite...-typeset/consumer-typeset.test    21.78  21.58 -0.9%
       test-suite :: CTMark/SPASS/SPASS.test          21.95  22.03  0.4%
       test-suite :: CTMark/lencod/lencod.test        25.43  25.50  0.3%
       test-suite...ark/tramp3d-v4/tramp3d-v4.test    23.88  23.83 -0.2%
       test-suite...TMark/7zip/7zip-benchmark.test    60.24  60.11 -0.2%
       test-suite :: CTMark/kimwitu++/kc.test         15.69  15.69 -0.0%
       test-suite...:: CTMark/ClamAV/clamscan.test    25.43  25.42 -0.0%
       test-suite :: CTMark/Bullet/bullet.test        37.63  37.62 -0.0%
       Geomean difference                                          -0.8%
      
      ---
      
      Reviewed By: lebedev.ri
      
      Differential Revision: https://reviews.llvm.org/D78722
      8228153f
    • Johannes Doerfert's avatar
      [Attributor][NFC] Let AbstractAttribute be an IRPosition · 6bf16ee4
      Johannes Doerfert authored
      Since every AbstractAttribute so far, and for the foreseeable future,
      corresponds to a single IRPosition we can simplify the class structure.
      We already did this for IRAttribute but there is no reason to stop
      there.
      6bf16ee4
    • Mircea Trofin's avatar
  2. May 02, 2020
    • Nikita Popov's avatar
      Remove getNumUses() comparisons (NFC) · b7e23582
      Nikita Popov authored
      getNumUses() scans the full use list. Don't use it is we only want
      to check if there's zero or one uses.
      b7e23582
    • Mircea Trofin's avatar
      [llvm][NFC] Rename variable as per https://reviews.llvm.org/D79215 · 3dbc612c
      Mircea Trofin authored
      Operator error - performed the rename and didn't save.
      3dbc612c
    • Mircea Trofin's avatar
      [llvm][NFC] Inliner: simplify inlining decision logic · e1c4a7cb
      Mircea Trofin authored
      Summary:
      shouldInline makes a decision based on the InlineCost of a call site, as
      well as an evaluation on whether the site should be deferred. This means
      it's possible for the decision to be not to inline, even for an
      InlineCost that would otherwise allow it.
      
      Both uses of shouldInline performed the exact same logic after calling
      it. In addition, the decision on whether to inline or not was
      communicated through two values of the Option<InlineCost> return value:
      None, or an InlineCost evaluating to false.
      
      Simplified by:
      - encapsulating the decision in the return object. The bool it evaluates
      to communicates unambiguously the decision. The InlineCost is also
      available.
      - encapsulated the common post-shouldInline code into shouldInline.
      
      Reviewers: davidxl, echristo, eraman
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79215
      e1c4a7cb
  3. Apr 30, 2020
  4. Apr 29, 2020
  5. Apr 28, 2020
  6. Apr 26, 2020
  7. Apr 25, 2020
  8. Apr 24, 2020
    • Tyker's avatar
      [AssumeBundles] Use assume bundles in isKnownNonZero · 42431da8
      Tyker authored
      Summary: Use nonnull and dereferenceable from an assume bundle in isKnownNonZero
      
      Reviewers: jdoerfert, nikic, lebedev.ri, reames, fhahn, sstefan1
      
      Reviewed By: jdoerfert
      
      Subscribers: fhahn, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D76149
      42431da8
    • Johannes Doerfert's avatar
      Revert "[Attributor][NFC] Encode IRPositions in the bits of a single pointer" · 1dfc4731
      Johannes Doerfert authored
      A dependent patch has been reverted [0]. Until it goes back in this one
      has to stay out.
      
      [0] ebdb8939
      
      This reverts commit d254b50b.
      1dfc4731
    • Johannes Doerfert's avatar
      [Attributor][NFC] Encode IRPositions in the bits of a single pointer · d254b50b
      Johannes Doerfert authored
      This reduces memory consumption for IRPositions by eliminating the
      vtable pointer and the `KindOrArgNo` integer. Since each abstract
      attribute has an associated IRPosition, the 12-16 bytes we save add up
      quickly.
      
      No functional change is intended.
      
      ---
      
      Single run of the Attributor module and then CGSCC pass (oldPM)
      for SPASS/clause.c (~10k LLVM-IR loc):
      
      Before:
      ```
      calls to allocation functions: 469545 (260135/s)
      temporary memory allocations: 77137 (42735/s)
      peak heap memory consumption: 30.50MB
      peak RSS (including heaptrack overhead): 119.50MB
      total memory leaked: 269.07KB
      ```
      
      After:
      ```
      calls to allocation functions: 468999 (274108/s)
      temporary memory allocations: 77002 (45004/s)
      peak heap memory consumption: 28.83MB
      peak RSS (including heaptrack overhead): 118.05MB
      total memory leaked: 269.07KB
      ```
      
      Difference:
      ```
      calls to allocation functions: -546 (5808/s)
      temporary memory allocations: -135 (1436/s)
      peak heap memory consumption: -1.67MB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: 0B
      ```
      
      ---
      
      CTMark 15 runs
      
      Metric: compile_time
      
      Program                                        lhs    rhs    diff
       test-suite...:: CTMark/sqlite3/sqlite3.test    25.07  24.09 -3.9%
       test-suite...Mark/mafft/pairlocalalign.test    14.58  14.14 -3.0%
       test-suite...-typeset/consumer-typeset.test    21.78  21.58 -0.9%
       test-suite :: CTMark/SPASS/SPASS.test          21.95  22.03  0.4%
       test-suite :: CTMark/lencod/lencod.test        25.43  25.50  0.3%
       test-suite...ark/tramp3d-v4/tramp3d-v4.test    23.88  23.83 -0.2%
       test-suite...TMark/7zip/7zip-benchmark.test    60.24  60.11 -0.2%
       test-suite :: CTMark/kimwitu++/kc.test         15.69  15.69 -0.0%
       test-suite...:: CTMark/ClamAV/clamscan.test    25.43  25.42 -0.0%
       test-suite :: CTMark/Bullet/bullet.test        37.63  37.62 -0.0%
       Geomean difference                                          -0.8%
      
      ---
      
      Reviewed By: lebedev.ri
      
      Differential Revision: https://reviews.llvm.org/D78722
      d254b50b
  9. Apr 23, 2020
  10. Apr 22, 2020
  11. Apr 21, 2020
    • Johannes Doerfert's avatar
      [Attributor] Remove dependence edges eagerly · 46b7ed0e
      Johannes Doerfert authored
      If we have a dependence between an abstract attribute A to an abstract
      attribute B such hat changes in A should trigger an update of B, we do
      not need to keep the dependence around once the update was triggered. If
      the dependence is still required the update will reinsert it into the
      dependence map, if it is not we avoid triggering B in the future. This
      replaces the "recompute interval" mechanism we used before to prune
      stale dependences.
      
      Number of required iterations is generally down, compile time for the
      module pass (not really the CGSCC pass) is down quite a bit.
      
      There is one test change which looks like an artifact in the undefined
      behavior AA that needs to be looked at.
      46b7ed0e
    • Johannes Doerfert's avatar
    • Johannes Doerfert's avatar
      [Attributor][PM] Introduce `-attributor-enable={none,cgscc,module,all}` · c5794f77
      Johannes Doerfert authored
      The old command line option `-attributor-disable` was too coarse grained
      as we want to measure the effects of the module or cgscc pass without
      the other as well.
      
      Since `none` is the default there is no real functional change.
      
      Reviewed By: lebedev.ri
      
      Differential Revision: https://reviews.llvm.org/D78571
      c5794f77
    • Benjamin Kramer's avatar
    • Fangrui Song's avatar
      [CallSite] Fix build breakage after D78538 · cca545ce
      Fangrui Song authored
      cca545ce
    • Mircea Trofin's avatar
      [llvm][NFC][CallSite] Remove CallSite from DeadArgumentElimination · d702325a
      Mircea Trofin authored
      Summary: Also capitalized some induction variables, to match coding style.
      
      Reviewers: dblaikie, craig.topper
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D78538
      d702325a
    • Johannes Doerfert's avatar
      [Attributor] Use a pointer value type for the OpcodeInstMap · 177c065e
      Johannes Doerfert authored
      This reduces memory consumption and the need to copy complex data
      structures repeatedly.
      
      No functional change is intended.
      
      ---
      
      Single run of the Attributor module and then CGSCC pass (oldPM)
      for SPASS/clause.c (~10k LLVM-IR loc):
      
      Before:
      ```
      calls to allocation functions: 490390 (320725/s)
      temporary memory allocations: 84601 (55330/s)
      peak heap memory consumption: 41.70MB
      peak RSS (including heaptrack overhead): 131.18MB
      total memory leaked: 269.04KB
      ```
      
      After:
      ```
      calls to allocation functions: 489359 (301144/s)
      temporary memory allocations: 82983 (51066/s)
      peak heap memory consumption: 36.76MB
      peak RSS (including heaptrack overhead): 126.48MB
      total memory leaked: 269.04KB
      ```
      
      Difference:
      ```
      calls to allocation functions: -1031 (-10739/s)
      temporary memory allocations: -1618 (-16854/s)
      peak heap memory consumption: -4.94MB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: 0B
      
      ---
      177c065e
    • Johannes Doerfert's avatar
      [Attributor] Use a pointer value type for the QueryMap · 99662c22
      Johannes Doerfert authored
      This reduces memory consumption and the need to copy complex data
      structures repeatedly.
      
      No functional change is intended.
      
      ---
      
      Single run of the Attributor module and then CGSCC pass (oldPM)
      for SPASS/clause.c (~10k LLVM-IR loc):
      
      Before:
      ```
      calls to allocation functions: 596180 (374484/s)
      temporary memory allocations: 84979 (53378/s)
      peak heap memory consumption: 52.14MB
      peak RSS (including heaptrack overhead): 139.79MB
      total memory leaked: 269.04KB
      ```
      
      After:
      ```
      calls to allocation functions: 489200 (303285/s)
      temporary memory allocations: 83406 (51708/s)
      peak heap memory consumption: 41.70MB
      peak RSS (including heaptrack overhead): 131.76MB
      total memory leaked: 269.04KB
      ```
      
      Difference:
      ```
      calls to allocation functions: -106980 (-5094285/s)
      temporary memory allocations: -1573 (-74904/s)
      peak heap memory consumption: -10.44MB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: 0B
      
      ---
      99662c22
Loading