[Metarenamer] Introduce option to only change inst names
authorAnna Thomas <anna@azul.com>
Fri, 30 Jun 2023 14:21:16 +0000 (10:21 -0400)
committerAnna Thomas <anna@azul.com>
Fri, 30 Jun 2023 15:13:15 +0000 (11:13 -0400)
commit6f9e743b91ad6ac1f333ce6e3efae44e137b54bb
tree7db8b94e5a2e70971dc2fc103319f1f906ec91cd
parenta5ea6760674762cb597cf328dc467f1296633da0
[Metarenamer] Introduce option to only change inst names

This is useful when needing to modify IR and test some optimizations on
them, while keeping BB names and function names intact. If
the IR uses ordered number naming (%1, %2, %3 etc), then we cannot just
remove or reorder specific instructions since the verifier expects the
numbers to be in order.
llvm/lib/Transforms/Utils/MetaRenamer.cpp
llvm/test/Transforms/MetaRenamer/only-inst.ll [new file with mode: 0644]