This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Simplify attribute reduction implementation
ClosedPublic

Authored by arsenm on Jan 3 2023, 5:16 AM.

Details

Summary

There's no need to construct a map of attributes to modify throughout
the whole function before applying them all at once. The attribute
classes already have the necessary set behavior.

Diff Detail

Event Timeline

arsenm created this revision.Jan 3 2023, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 5:16 AM
Herald added a subscriber: mgrang. · View Herald Transcript
arsenm requested review of this revision.Jan 3 2023, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 5:16 AM
Herald added a subscriber: wdng. · View Herald Transcript
nickdesaulniers accepted this revision.Jan 9 2023, 3:58 PM
nickdesaulniers added inline comments.
llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
52

isn't explicit only necessary when the constructor has a single argument?

84

I think return {}; works?

This revision is now accepted and ready to land.Jan 9 2023, 3:58 PM