HomePhabricator

[Attributor] Create abstract attributes on-demand

Description

[Attributor] Create abstract attributes on-demand

Before, we create the set of abstract attributes initially and then
dealt with the fact hat a lookup could fail, e.g., return a nullptr.
This patch will ensure we always return a valid object from a lookup,
allowing us not only to remove the nullptr checks but also to grow the
set of abstract attributes "in-flight" on-demand.

One can now start from those that have the best chance of improving
performance without the need to specify all they might depend on.

While this introduces some boilerplate, the usage of attributes is much
easier and cleaner now.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66276

Details

Committed
jdoerfertAug 19 2019, 11:15 PM
Differential Revision
D66276: [Attributor] Create abstract attributes on-demand
Parents
rL369330: [Attributor][NFC] Cleanup statistics code
Branches
Unknown
Tags
Unknown