[PATCH] D23506: [RFC] Generate long nop instructions depending on function-specific subtarget info (version 2)

Andrey Turetskiy via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 06:14:01 PDT 2016


aturetsk added inline comments.

================
Comment at: lib/MC/MCELFStreamer.cpp:85
@@ -84,3 +84,3 @@
   }
-  DF->setHasInstructions(true);
+  DF->setHasInstructions(true, &getSubtarget());
   DF->getContents().append(EF->getContents().begin(), EF->getContents().end());
----------------
Since we can end up merging two fragments with different STI (e.g. by using multiple '.arch' directives), we need a more general solution here. Didn't want to spend much time on this without being sure if the whole approach is OK...

================
Comment at: lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:36
@@ +35,3 @@
+  StringRef Name;
+} LongNopFeatures[0] = {};
+
----------------
This is a placeholder for nop-related features I'm planning to add (FeatureLongNop, FeatureFastNop7).


https://reviews.llvm.org/D23506





More information about the llvm-commits mailing list