[all-commits] [llvm/llvm-project] 61a85d: [InferAttributes] Materialize all infered attribut...
Philip Reames via All-commits
all-commits at lists.llvm.org
Wed Apr 14 14:45:55 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61a85da88235983da565bda0160367461fa0f382
https://github.com/llvm/llvm-project/commit/61a85da88235983da565bda0160367461fa0f382
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-04-14 (Wed, 14 Apr 2021)
Changed paths:
M llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
M llvm/test/Other/cgscc-devirt-iteration.ll
M llvm/test/Transforms/InferFunctionAttrs/annotate.ll
M llvm/test/Transforms/LICM/strlen.ll
Log Message:
-----------
[InferAttributes] Materialize all infered attributes for declaration
We have some cases today where attributes can be inferred from another on access, but the result is not explicitly materialized in IR. This change is a step towards changing that.
Why? Two main reasons:
* Human clarity. It's really confusing trying to figure out why a transform is triggering when the IR doesn't appear to have the required attributes.
* This avoids the need to special case declarations in e.g. functionattrs. Since we can assume the attribute is present, we can work directly from attributes (and only attributes) without also needing to query accessors on Function to avoid missing cases due to unannotated (but infered on use) declarations. (This piece will appear must easier to follow once D100226 also lands.)
Differential Revision: https://reviews.llvm.org/D100400
More information about the All-commits
mailing list