This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Merge the query set into AbstractAttribute
ClosedPublic

Authored by jdoerfert on Apr 23 2020, 10:02 AM.

Details

Summary

The old QuerriedAAs contained two vectors, one for required one for
optional dependences (=queries). We now use a single vector and encode
the kind directly in the pointer.

This reduces memory consumption and makes the connection between
abstract attributes and their dependences clearer.

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: 468401 (315846/s)
temporary memory allocations: 76415 (51527/s)
peak heap memory consumption: 28.80MB
peak RSS (including heaptrack overhead): 118.41MB
total memory leaked: 269.07KB

After:

calls to allocation functions: 425372 (257801/s)
temporary memory allocations: 77301 (46849/s)
peak heap memory consumption: 17.76MB
peak RSS (including heaptrack overhead): 102.17MB
total memory leaked: 269.07KB

Difference:

calls to allocation functions: -43029 (-257658/s)
temporary memory allocations: 886 (5305/s)
peak heap memory consumption: -11.04MB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 23 2020, 10:02 AM
Herald added a reviewer: uenoku. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

Any thoughts?

Seems reasonable to me but i'm not really familiar with attributor internals..

uenoku requested changes to this revision.May 10 2020, 10:12 AM

Looks good to me.

This revision now requires changes to proceed.May 10 2020, 10:12 AM
uenoku accepted this revision.May 10 2020, 10:12 AM
This revision is now accepted and ready to land.May 10 2020, 10:12 AM
This revision was automatically updated to reflect the committed changes.