[PATCH] D144806: [BOLT] Fix intermittent crash with instrumentation
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 07:04:13 PST 2023
yota9 added inline comments.
================
Comment at: bolt/include/bolt/Core/MCPlusBuilder.h:174
+
+ DstInst.addOperand(MCOperand::createInst(AnnotationInst));
+ SrcInst.erase(std::prev(SrcInst.end()));
----------------
Maybe add assert(!getAnnotationInst(DstInst) just for extra safety
================
Comment at: bolt/include/bolt/Core/MCPlusBuilder.h:175
+ DstInst.addOperand(MCOperand::createInst(AnnotationInst));
+ SrcInst.erase(std::prev(SrcInst.end()));
+ }
----------------
How about to make separate function smth like "getAnnotationOpIndex" and use it also in getAnnotationInst and stripAnnotations? Just to ensure everything is in sync
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144806/new/
https://reviews.llvm.org/D144806
More information about the llvm-commits
mailing list