This is an archive of the discontinued LLVM Phabricator instance.

[AssumeBundles] Refactor asssume builder
ClosedPublic

Authored by Tyker on Apr 13 2020, 4:42 AM.

Details

Summary

refactor assume bulider for the next patch.
the assume builder now generate only one assume per attribute kind and per value they are on. to do this it takes the highest. this is desirable because currently, for all attributes the higest value is the most valuable.

Diff Detail

Event Timeline

Tyker created this revision.Apr 13 2020, 4:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2020, 4:42 AM
jdoerfert accepted this revision.Apr 13 2020, 11:19 AM

Two comments to consider but other than that LGTM.

llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
144

Nit: Can you make local variables with explicit types out of the MapElem so it is easier to follow the code?

193

I guess the above is already reason enough to have a helper to create either the AssumeBuilderState from an instruction or even call the build after as well.

This revision is now accepted and ready to land.Apr 13 2020, 11:19 AM
This revision was automatically updated to reflect the committed changes.