[llvm] [RemoveDIs] Read/write DbgRecords directly from/to bitcode (PR #83251)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 07:42:16 PDT 2024
================
@@ -261,33 +269,39 @@ static UseListOrderStack predictUseListOrder(const Module &M) {
// constants in the last Function they're used in. Module-level constants
// have already been visited above.
for (const Function &F : llvm::reverse(M)) {
+ auto PredictValueOrderFromMetadata = [&](Metadata *MD) {
+ if (const auto *VAM = dyn_cast<ValueAsMetadata>(MD)) {
+ predictValueUseListOrder(VAM->getValue(), &F, OM, Stack);
+ } else if (const auto *AL = dyn_cast<DIArgList>(MD)) {
+ for (const auto *VAM : AL->getArgs())
+ predictValueUseListOrder(VAM->getValue(), &F, OM, Stack);
+ }
+ };
----------------
OCHyams wrote:
Nah I don't think so. The MAV/VAM is unwrapped, and predictValueUseListOrder only maps `uses()` of the Value, so the MAV/VAM "use" isn't considered at all.
https://github.com/llvm/llvm-project/pull/83251
More information about the llvm-commits
mailing list