[PATCH] D154119: Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 16:15:41 PDT 2023
smeenai added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:856
+
+ if (auto *MDL = dyn_cast<MetadataAsValue>(OpL)) {
+ auto *MDR = cast<MetadataAsValue>(OpR);
----------------
Should this be inside `cmpValues` instead, since that has a bunch of other callers too?
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:858
+ auto *MDR = cast<MetadataAsValue>(OpR);
+ if (MDL->getMetadata() != MDR->getMetadata())
+ return -1;
----------------
Is it correct to just check for pointer equality here? https://llvm.org/docs/LangRef.html#metadata mentions `!unique` for avoiding content-baed metadata merging, but it wasn't clear if that merging would otherwise always take place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154119/new/
https://reviews.llvm.org/D154119
More information about the llvm-commits
mailing list