diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-09-01 14:21:58 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-09-01 14:24:47 -0700 |
commit | 39f780b51d7cf450591b20ec9b9c395dab8836fc (patch) | |
tree | 05433f25c2b2d9cc0c7d19f9b3f6ebf4f82c5173 /llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | |
parent | 623bf6c34b4a8040ba0319e5960665d3d0e764e5 (diff) | |
download | llvm-39f780b51d7cf450591b20ec9b9c395dab8836fc.zip llvm-39f780b51d7cf450591b20ec9b9c395dab8836fc.tar.gz llvm-39f780b51d7cf450591b20ec9b9c395dab8836fc.tar.bz2 |
[OpaquePtr] Cleanup some uses of getPointerElementType() in TailRecursionElimination
Diffstat (limited to 'llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index 846a9321..e7cb87a 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -584,8 +584,8 @@ void TailRecursionEliminator::insertAccumulator(Instruction *AccRecInstr) { // call instruction into the newly created temporarily variable. void TailRecursionEliminator::copyByValueOperandIntoLocalTemp(CallInst *CI, int OpndIdx) { - PointerType *ArgTy = cast<PointerType>(CI->getArgOperand(OpndIdx)->getType()); - Type *AggTy = ArgTy->getElementType(); + Type *AggTy = CI->getParamByValType(OpndIdx); + assert(AggTy); const DataLayout &DL = F.getParent()->getDataLayout(); // Get alignment of byVal operand. @@ -611,8 +611,8 @@ void TailRecursionEliminator::copyByValueOperandIntoLocalTemp(CallInst *CI, // into the corresponding function argument location. void TailRecursionEliminator::copyLocalTempOfByValueOperandIntoArguments( CallInst *CI, int OpndIdx) { - PointerType *ArgTy = cast<PointerType>(CI->getArgOperand(OpndIdx)->getType()); - Type *AggTy = ArgTy->getElementType(); + Type *AggTy = CI->getParamByValType(OpndIdx); + assert(AggTy); const DataLayout &DL = F.getParent()->getDataLayout(); // Get alignment of byVal operand. |