summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-05-06 02:36:26 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-05-06 02:36:26 +0000
commit499d703f52c0dd5c11551ab2166e0a77c52a0053 (patch)
tree3b5e04d18b66a374055ee3daaa3067297a2ef26b /llvm/lib/CodeGen
parentc6bf3e9f127589de828434b581d267b8f8c5ac4e (diff)
downloadbcm5719-llvm-499d703f52c0dd5c11551ab2166e0a77c52a0053.tar.gz
bcm5719-llvm-499d703f52c0dd5c11551ab2166e0a77c52a0053.zip
[Statepoint] Clean up Statepoint.h: accessor names.
Use getFoo() as accessors consistently and some other naming changes. llvm-svn: 236564
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp12
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp20
2 files changed, 16 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 35376e162d3..49836254356 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -531,8 +531,8 @@ static void computeBaseDerivedRelocateMap(
for (auto &U : AllRelocateCalls) {
GCRelocateOperands ThisRelocate(U);
IntrinsicInst *I = cast<IntrinsicInst>(U);
- auto K = std::make_pair(ThisRelocate.basePtrIndex(),
- ThisRelocate.derivedPtrIndex());
+ auto K = std::make_pair(ThisRelocate.getBasePtrIndex(),
+ ThisRelocate.getDerivedPtrIndex());
RelocateIdxMap.insert(std::make_pair(K, I));
}
for (auto &Item : RelocateIdxMap) {
@@ -581,15 +581,15 @@ simplifyRelocatesOffABase(IntrinsicInst *RelocatedBase,
GCRelocateOperands MasterRelocate(RelocatedBase);
GCRelocateOperands ThisRelocate(ToReplace);
- assert(ThisRelocate.basePtrIndex() == MasterRelocate.basePtrIndex() &&
+ assert(ThisRelocate.getBasePtrIndex() == MasterRelocate.getBasePtrIndex() &&
"Not relocating a derived object of the original base object");
- if (ThisRelocate.basePtrIndex() == ThisRelocate.derivedPtrIndex()) {
+ if (ThisRelocate.getBasePtrIndex() == ThisRelocate.getDerivedPtrIndex()) {
// A duplicate relocate call. TODO: coalesce duplicates.
continue;
}
- Value *Base = ThisRelocate.basePtr();
- auto Derived = dyn_cast<GetElementPtrInst>(ThisRelocate.derivedPtr());
+ Value *Base = ThisRelocate.getBasePtr();
+ auto Derived = dyn_cast<GetElementPtrInst>(ThisRelocate.getDerivedPtr());
if (!Derived || Derived->getPointerOperand() != Base)
continue;
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
index 9193f316a61..521e27334ff 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -229,7 +229,7 @@ lowerCallFromStatepoint(ImmutableStatepoint ISP, MachineBasicBlock *LandingPad,
ImmutableCallSite CS(ISP.getCallSite());
- SDValue ActualCallee = Builder.getValue(ISP.actualCallee());
+ SDValue ActualCallee = Builder.getValue(ISP.getActualCallee());
// Handle immediate and symbolic callees.
if (auto *ConstCallee = dyn_cast<ConstantSDNode>(ActualCallee.getNode()))
@@ -245,12 +245,12 @@ lowerCallFromStatepoint(ImmutableStatepoint ISP, MachineBasicBlock *LandingPad,
assert(CS.getCallingConv() != CallingConv::AnyReg &&
"anyregcc is not supported on statepoints!");
- Type *DefTy = ISP.actualReturnType();
+ Type *DefTy = ISP.getActualReturnType();
bool HasDef = !DefTy->isVoidTy();
SDValue ReturnValue, CallEndVal;
std::tie(ReturnValue, CallEndVal) = Builder.lowerCallOperands(
- ISP.getCallSite(), ISP.callArgsBeginOffset(), ISP.numCallArgs(),
+ ISP.getCallSite(), ISP.callArgsBeginOffset(), ISP.getNumCallArgs(),
ActualCallee, DefTy, LandingPad, false /* IsPatchPoint */);
SDNode *CallEnd = CallEndVal.getNode();
@@ -286,10 +286,10 @@ lowerCallFromStatepoint(ImmutableStatepoint ISP, MachineBasicBlock *LandingPad,
// register with correct type and save value into it manually.
// TODO: To eliminate this problem we can remove gc.result intrinsics
// completelly and make statepoint call to return a tuple.
- unsigned Reg = Builder.FuncInfo.CreateRegs(ISP.actualReturnType());
+ unsigned Reg = Builder.FuncInfo.CreateRegs(ISP.getActualReturnType());
RegsForValue RFV(*Builder.DAG.getContext(),
Builder.DAG.getTargetLoweringInfo(), Reg,
- ISP.actualReturnType());
+ ISP.getActualReturnType());
SDValue Chain = Builder.DAG.getEntryNode();
RFV.getCopyToRegs(ReturnValue, Builder.DAG, Builder.getCurSDLoc(), Chain,
@@ -325,8 +325,8 @@ static void getIncomingStatepointGCValues(
for (GCRelocateOperands relocateOpers :
StatepointSite.getRelocates(StatepointSite)) {
Relocs.push_back(relocateOpers.getUnderlyingCallSite().getInstruction());
- Bases.push_back(relocateOpers.basePtr());
- Ptrs.push_back(relocateOpers.derivedPtr());
+ Bases.push_back(relocateOpers.getBasePtr());
+ Ptrs.push_back(relocateOpers.getDerivedPtr());
}
// Remove any redundant llvm::Values which map to the same SDValue as another
@@ -482,7 +482,7 @@ static void lowerStatepointMetaArgs(SmallVectorImpl<SDValue> &Ops,
// First, prefix the list with the number of unique values to be
// lowered. Note that this is the number of *Values* not the
// number of SDValues required to lower them.
- const int NumVMSArgs = StatepointSite.numTotalVMSArgs();
+ const int NumVMSArgs = StatepointSite.getNumTotalVMSArgs();
Ops.push_back( Builder.DAG.getTargetConstant(StackMaps::ConstantOp,
Builder.getCurSDLoc(),
MVT::i64));
@@ -675,7 +675,7 @@ void SelectionDAGBuilder::visitGCResult(const CallInst &CI) {
// different, and getValue() will use CopyFromReg of the wrong type,
// which is always i32 in our case.
PointerType *CalleeType =
- cast<PointerType>(ImmutableStatepoint(I).actualCallee()->getType());
+ cast<PointerType>(ImmutableStatepoint(I).getActualCallee()->getType());
Type *RetTy =
cast<FunctionType>(CalleeType->getElementType())->getReturnType();
SDValue CopyFromReg = getCopyFromRegs(I, RetTy);
@@ -694,7 +694,7 @@ void SelectionDAGBuilder::visitGCRelocate(const CallInst &CI) {
#endif
GCRelocateOperands relocateOpers(&CI);
- SDValue SD = getValue(relocateOpers.derivedPtr());
+ SDValue SD = getValue(relocateOpers.getDerivedPtr());
if (isa<ConstantSDNode>(SD) || isa<FrameIndexSDNode>(SD)) {
// We didn't need to spill these special cases (constants and allocas).
OpenPOWER on IntegriCloud