This is an archive of the discontinued LLVM Phabricator instance.

[AssumeBundles] Add API to fill a map from operand bundles of an llvm.assume.
ClosedPublic

Authored by Tyker on Feb 23 2020, 8:15 AM.

Details

Summary

This patch adds a new way to query operand bundles of an llvm.assume that is much better suited to some users like the Attributor that need to do many queries on the operand bundles of llvm.assume. Some modifications of the IR like replaceAllUsesWith can cause information in the map to be outdated, so this API is more suited to analysis passes and passes that don't make modification that could invalidate the map.

Diff Detail

Event Timeline

Tyker created this revision.Feb 23 2020, 8:15 AM
Herald added a project: Restricted Project. · View Herald Transcript
Tyker edited the summary of this revision. (Show Details)Feb 23 2020, 8:27 AM
jdoerfert accepted this revision.Mar 2 2020, 10:05 AM

Sorry for the delay.

Two nits but otherwise LGTM.

if (Bundles.End - Bundles.Begin <compare> SOMETHIG)

Might deserve a helper function or two.

llvm/lib/Transforms/Utils/KnowledgeRetention.cpp
180

static or in the anonymous namespace.

This revision is now accepted and ready to land.Mar 2 2020, 10:05 AM
This revision was automatically updated to reflect the committed changes.