[PATCH] D104641: Strip undef implying attributes when moving calls
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 14:05:45 PDT 2021
lebedev.ri accepted this revision.
lebedev.ri added a comment.
LGTM, thank you.
Looks like my original design comment was essentially addressed, so i really like this.
It would be best to land this within next ~12 hours or so, before branching happens,
i.e. i'd maybe suggesting landing how.
================
Comment at: llvm/include/llvm/IR/Instruction.h:331-334
/// Drop all unknown metadata except for debug locations.
/// @{
/// Passes are required to drop metadata they don't understand. This is a
/// convenience method for passes to do so.
----------------
`dropUnknownNonDebugMetadata()`'s documentation really needs an update
to point out that `dropUndefImplyingAttrsAndUnknownMetadata()` likely should be used instead.
================
Comment at: llvm/include/llvm/IR/Instruction.h:398-401
+ void dropUndefImplyingAttrsAndUnknownMetadata();
+
+ /// Use this API when we need to preserve some metadata through KnownIDs.
+ void dropUndefImplyingAttrsAndUnknownMetadata(ArrayRef<unsigned> KnownIDs);
----------------
Wouldn't
```
void dropUndefImplyingAttrsAndUnknownMetadata(ArrayRef<unsigned> KnownIDs = {});
```
suffice?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104641/new/
https://reviews.llvm.org/D104641
More information about the llvm-commits
mailing list