[PATCH] D78861: [Attributor] [WIP] Track AA dependency using dependency graph

Luofan Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 02:08:18 PDT 2020


bbn updated this revision to Diff 274362.
bbn added a comment.

1. Rebased patch
2. Replaced the `AllAbstractAttributes` with the syn node of the dependency graph
3. Moved `getName()` function to header file
4. The `classof()` function of the AbstractAttribute class simply returns true, because all nodes except for the syn node are of type `AbstractAttribute` (about classof function <https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html>)

__Heaptrack Benchmark:__

- Before the patch:

  total runtime: 5.67s.
  bytes allocated in total (ignoring deallocations): 24.15MB (4.26MB/s)
  calls to allocation functions: 84761 (14951/s)
  temporary memory allocations: 4004 (706/s)
  peak heap memory consumption: 6.30MB
  peak RSS (including heaptrack overhead): 677.74MB
  total memory leaked: 163.25KB



- After the patch, without replacing the `AllAbstractAttribute` vector and the change of `classof()` functon (change 2, 3)

  total runtime: 6.11s.
  bytes allocated in total (ignoring deallocations): 25.11MB (4.11MB/s)
  calls to allocation functions: 86888 (14227/s)
  temporary memory allocations: 4578 (749/s)
  peak heap memory consumption: 6.49MB
  peak RSS (including heaptrack overhead): 678.57MB
  total memory leaked: 636.28KB



- After the patch, with change 2, without change 3:

  total runtime: 6.26s.
  bytes allocated in total (ignoring deallocations): 24.24MB (3.88MB/s)
  calls to allocation functions: 86680 (13855/s)
  temporary memory allocations: 4578 (731/s)
  peak heap memory consumption: 6.23MB
  peak RSS (including heaptrack overhead): 678.58MB
  total memory leaked: 636.28KB



- After the patch, with all changes above

  total runtime: 5.69s.
  bytes allocated in total (ignoring deallocations): 24.18MB (4.25MB/s)
  calls to allocation functions: 86669 (15223/s)
  temporary memory allocations: 4577 (803/s)
  peak heap memory consumption: 6.19MB
  peak RSS (including heaptrack overhead): 675.89MB
  total memory leaked: 633.87KB


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78861/new/

https://reviews.llvm.org/D78861

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78861.274362.patch
Type: text/x-patch
Size: 36237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200630/264c07dc/attachment.bin>


More information about the llvm-commits mailing list