This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Force simplication callback updates
AbandonedPublic

Authored by ggeorgakoudis on Jul 20 2021, 10:56 PM.

Details

Summary

A simplification callback communicates to the Attributor a user-provided value simplification of an IR position based on an AbstractAttribute. This patch constraints callback simplification based on the assumption that there should be a single simplification callback per IRP and forces the Attributor to use the callback-returned simplification value, when there is one.

Diff Detail

Event Timeline

ggeorgakoudis created this revision.Jul 20 2021, 10:56 PM
ggeorgakoudis requested review of this revision.Jul 20 2021, 10:56 PM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ggeorgakoudis edited the summary of this revision. (Show Details)Jul 20 2021, 11:07 PM
ggeorgakoudis edited the summary of this revision. (Show Details)

The force update stuff does only work for one level but not more. So an AA depending on one that was forcefully updated is still going to see inconsistent values.
To really solve the issue we need to clear the state in aavaluesimplify (and friends) at the beginning of the update.

llvm/lib/Transforms/IPO/Attributor.cpp
662

Same as below you have to give up and not fallback to aavaluesimplify.

703

I think we just have to return SimplifiedV and be done with it. Fallback to AAValueSimplify is what can cause problems and inconsistencies.

ggeorgakoudis abandoned this revision.Sep 15 2021, 6:18 AM