[PATCH] D71205: [NFC] Add a SDValue overload for SelectionDAG::getMemBasePlusOffset()

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 03:12:38 PST 2019


arichardson marked an inline comment as done.
arichardson added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5734
   EVT VT = Base.getValueType();
   return getNode(ISD::ADD, DL, VT, Base, getConstant(Offset, DL, VT));
 }
----------------
craig.topper wrote:
> Should we rewrite this in terms of the new function? Perhaps by moving to the header file.
Yes, will do.
I'm not sure if I adding it to the header is beneficial compared to having it in the .cpp.

In our fork we depend on TargetLowering, so we need to have the function in the .cpp rather than the .h, but I can obviously keep that change downstream.

For context here is our implementation that handles CHERI capabilities: https://github.com/CTSRD-CHERI/llvm-project/blob/8cad6d336ad9e91657db9999fcd25adceae3be83/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L6297 



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71205





More information about the llvm-commits mailing list