[llvm] 7987c46 - [OpaquePtr][ISel] Use ArgListEntry::IndirectType more
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 21:15:38 PDT 2021
Author: Arthur Eubanks
Date: 2021-07-12T21:14:35-07:00
New Revision: 7987c46273c88a0370f5bfee2e3294a8a4c0f22a
URL: https://github.com/llvm/llvm-project/commit/7987c46273c88a0370f5bfee2e3294a8a4c0f22a
DIFF: https://github.com/llvm/llvm-project/commit/7987c46273c88a0370f5bfee2e3294a8a4c0f22a.diff
LOG: [OpaquePtr][ISel] Use ArgListEntry::IndirectType more
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index ec40ddc1ff75..8e0bc53f2f2b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1033,7 +1033,7 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) {
for (auto &Arg : CLI.getArgs()) {
Type *FinalType = Arg.Ty;
if (Arg.IsByVal)
- FinalType = cast<PointerType>(Arg.Ty)->getElementType();
+ FinalType = Arg.IndirectType;
bool NeedsRegBlock = TLI.functionArgumentNeedsConsecutiveRegisters(
FinalType, CLI.CallConv, CLI.IsVarArg, DL);
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 5827a5f7fd4c..58e691aade9c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -9535,7 +9535,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
// FIXME: Split arguments if CLI.IsPostTypeLegalization
Type *FinalType = Args[i].Ty;
if (Args[i].IsByVal)
- FinalType = cast<PointerType>(Args[i].Ty)->getElementType();
+ FinalType = Args[i].IndirectType;
bool NeedsRegBlock = functionArgumentNeedsConsecutiveRegisters(
FinalType, CLI.CallConv, CLI.IsVarArg, DL);
for (unsigned Value = 0, NumValues = ValueVTs.size(); Value != NumValues;
More information about the llvm-commits
mailing list