[PATCH] D93158: [X86] Avoid %fs:(%eax) references in x32 mode

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 15:16:36 PST 2020


hvdijk added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1618
+bool X86DAGToDAGISel::matchLoadInAddress(LoadSDNode *N, X86ISelAddressMode &AM,
+                                         bool NoRegisters) {
   SDValue Address = N->getOperand(1);
----------------
RKSimon wrote:
> Is there a better name that we can use than NoRegisters?
I was thinking of something like `AllowSegmentReg` initially, but that would be a poor name, since except for X32, segment registers are always allowed. I picked `NoRegisters` to reflect that when `NoRegisters` is true, it is known that `AM` does not and will not refer to any registers other than what `matchLoadInAddress` does. I now see that that is not entirely true either, as `AM` may in theory already reference another segment register. `NoBaseReg` would be slightly more accurate, but still not very clear. Perhaps I should go back to what I originally had and change it to the slightly verbose but pretty clear `AllowSegmentRegForX32`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93158



More information about the llvm-commits mailing list