[PATCH] D78722: [Attributor][NFC] Encode IRPositions for the bits of a single pointer

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 09:11:23 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: fhahn, lebedev.ri.
Herald added subscribers: uenoku, bollu, hiraditya.
Herald added a reviewer: sstefan1.
Herald added a reviewer: uenoku.
Herald added a project: LLVM.

This reduces memory consumption for IRPositions by eliminating the
vtable pointer and the `KindOrArgNo` interger. 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%

---


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78722

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78722.259591.patch
Type: text/x-patch
Size: 18514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/a062cd68/attachment-0001.bin>


More information about the llvm-commits mailing list