[PATCH] D75931: [PowerPC][Future] Add initial support for PC Relative addressing to get jump table base address

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 09:07:03 PDT 2020


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


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:2554
   bool Global = GSDN && GSDN->getTargetFlags() == PPCII::MO_PCREL_FLAG;
-  if (ConstPool || Global) {
+  JumpTableSDNode *JT = dyn_cast<JumpTableSDNode>(N.getNode());
+  bool JumpTable = JT && JT->getTargetFlags() == PPCII::MO_PCREL_FLAG;
----------------
anil9 wrote:
> The naming of the SDNodes is not consistent
> 
> ConstPoolNode/ GSDN / JT
SDNodes GSDN and JT were following the same name convention in "PPCTargetLowering::LowerGlobalAddress" and "PPCTargetLowering::LowerJumpTable", however "ConstPoolNode" is different from the name in "LowerConstantPool"

As the code design here has been updated based on nemanja's suggestion in https://reviews.llvm.org/D76294, we can either change the naming for  "ConstPoolNode" or apply similar new design here. 



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75931





More information about the llvm-commits mailing list