[llvm] 63c42b1 - [RISCV][GISel] Remove what I think is an unnecessary insert point adjustment from RISCVCallLowering::lowerCall.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 5 18:30:59 PST 2023
Author: Craig Topper
Date: 2023-11-05T18:17:32-08:00
New Revision: 63c42b1deebe11be44829a72db83e180a4dfb2c9
URL: https://github.com/llvm/llvm-project/commit/63c42b1deebe11be44829a72db83e180a4dfb2c9
DIFF: https://github.com/llvm/llvm-project/commit/63c42b1deebe11be44829a72db83e180a4dfb2c9.diff
LOG: [RISCV][GISel] Remove what I think is an unnecessary insert point adjustment from RISCVCallLowering::lowerCall.
Other targets don't do this and no tests are affected by removing it.
Added:
Modified:
llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
index da26423644140e7..7b1c3712e25253b 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
@@ -478,12 +478,6 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
SmallVector<ArgInfo, 4> SplitRetInfos;
splitToValueTypes(Info.OrigRet, SplitRetInfos, DL, CC);
- // Assignments should be handled *before* the merging of values takes place.
- // To ensure this, the insert point is temporarily adjusted to just after the
- // call instruction.
- MachineBasicBlock::iterator CallInsertPt = Call;
- MIRBuilder.setInsertPt(MIRBuilder.getMBB(), std::next(CallInsertPt));
-
RISCVIncomingValueAssigner RetAssigner(
CC == CallingConv::Fast ? RISCV::CC_RISCV_FastCC : RISCV::CC_RISCV,
/*IsRet=*/true);
@@ -492,8 +486,5 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
MIRBuilder, CC, Info.IsVarArg))
return false;
- // Readjust insert point to end of basic block.
- MIRBuilder.setMBB(MIRBuilder.getMBB());
-
return true;
}
More information about the llvm-commits
mailing list