[PATCH] D82826: [X86] support .nops directive
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 15:19:38 PDT 2020
aganea added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:1072
+unsigned X86AsmBackend::getMaximumNopSize() const {
+ if (!STI.getFeatureBits()[X86::FeatureNOPL] &&
----------------
reames wrote:
> Rename this function to getMaximumProfitableNop()
>
> There's a difference between legality and profit here. As commented earlier, if that matters you'll have a harder task implementation wise.
Any reason for not reusing `maxLongNopLength()` rather than rewriting the same thing here? https://github.com/llvm/llvm-project/blob/b2eb1c5793d78d70c1223b098aefc87050f69a8c/llvm/lib/Target/X86/X86MCInstLower.cpp#L1085
That function could perhaps be moved to `llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82826/new/
https://reviews.llvm.org/D82826
More information about the llvm-commits
mailing list