[PATCH] D101141: [SimplifyCFG] Preserve metadata when unconditionalizing branches (constant condition).

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 24 00:19:14 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:175
+
+      // Transfer the metadata to the new branch instruction.
+      for (const auto &MDPair : BranchMetadata) {
----------------
Meinersbur wrote:
> lebedev.ri wrote:
> > What about prof md?
> Edge weights are not in the scope of this patch.
Indeed.
But my question is, this copies *all* metadata.
What happens if the cond br had prof md?
They won't really make sense on uncond br.
Will verifier be ok with that, or should this specify which md to copy?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101141/new/

https://reviews.llvm.org/D101141



More information about the llvm-commits mailing list