[PATCH] D136040: [X86] Support PREFETCHI instructions

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 07:20:20 PDT 2022


pengfei added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:4651
 def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
+def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>;
+def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>;
----------------
LuoYuanke wrote:
> I notice in line 4655 the option name is "prfch", do we need to follow the naming convention?
I don't know the reason why we used `prfchw` before, but we are now using the option the same as feature name so that user can easily guess the right option.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3007
+  def PREFETCHIT0 : I<0x18, MRM7m, (outs), (ins i8mem:$src),
+    "prefetchit0\t$src", [(prefetch addr:$src, (i32 1), (i32 3), (i32 0))]>, TB;
+  def PREFETCHIT1 : I<0x18, MRM6m, (outs), (ins i8mem:$src),
----------------
LuoYuanke wrote:
> Could you add comments to explain the what the constant (1, 3, 0) means?  I guess it is the same to the arguments that llvm.prefetch defines.
Added short introduction. Full description is in https://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136040/new/

https://reviews.llvm.org/D136040



More information about the cfe-commits mailing list