This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Introduce a state wrapper class
ClosedPublic

Authored by jdoerfert on Aug 5 2019, 6:07 PM.

Details

Summary

The wrapper reduces boilerplate code and also provide a nice way to
determine the state type used by an abstract attributes statically via
AAType::StateType.

This was already discussed as part of the review of D65711.

Diff Detail

Repository
rL LLVM

Event Timeline

jdoerfert created this revision.Aug 5 2019, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2019, 6:07 PM

LGTM with one question. Maybe this is an overkill, but do we even need to have isAssumed*AAType* as well as isKnown (eg. isAssumedNoFree())? I'm just thinking out loud.

llvm/include/llvm/Transforms/IPO/Attributor.h
938 ↗(On Diff #213507)

I think this virtual is not needed.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 7 2019, 3:35 PM
This revision was automatically updated to reflect the committed changes.