@@ -7429,16 +7429,6 @@ static SDValue getLargeExternalSymbol(ExternalSymbolSDNode *N, SDLoc DL, EVT Ty,
7429
7429
MachinePointerInfo::getConstantPool(DAG.getMachineFunction()));
7430
7430
}
7431
7431
7432
- template <class NodeTy>
7433
- static SDValue getLargeAddr(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG) {
7434
- if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N))
7435
- return getLargeGlobalAddress(G, DL, Ty, DAG);
7436
-
7437
- // Using pc-relative mode for other node type.
7438
- SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0);
7439
- return DAG.getNode(RISCVISD::LLA, DL, Ty, Addr);
7440
- }
7441
-
7442
7432
template <class NodeTy>
7443
7433
SDValue RISCVTargetLowering::getAddr(NodeTy *N, SelectionDAG &DAG,
7444
7434
bool IsLocal, bool IsExternWeak) const {
@@ -7508,7 +7498,12 @@ SDValue RISCVTargetLowering::getAddr(NodeTy *N, SelectionDAG &DAG,
7508
7498
return DAG.getNode(RISCVISD::LLA, DL, Ty, Addr);
7509
7499
}
7510
7500
case CodeModel::Large: {
7511
- return getLargeAddr(N, DL, Ty, DAG);
7501
+ if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N))
7502
+ return getLargeGlobalAddress(G, DL, Ty, DAG);
7503
+
7504
+ // Using pc-relative mode for other node type.
7505
+ SDValue Addr = getTargetNode(N, DL, Ty, DAG, 0);
7506
+ return DAG.getNode(RISCVISD::LLA, DL, Ty, Addr);
7512
7507
}
7513
7508
}
7514
7509
}
0 commit comments