[llvm] [BOLT] Fix NOP instruction emission on x86 (PR #72186)

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 20:54:21 PST 2023


================
@@ -4366,6 +4367,10 @@ MCInst *BinaryFunction::getInstructionAtOffset(uint64_t Offset) {
   }
 }
 
+bool BinaryFunction::shouldPreserveNops() const {
+  return PreserveNops || opts::KeepNops;
----------------
yota9 wrote:

Small nit: Maybe add option check to RemoveNops::runOnFunctions too/instead? 

https://github.com/llvm/llvm-project/pull/72186


More information about the llvm-commits mailing list