aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorHaowei <haowei@google.com>2025-07-23 15:45:43 -0700
committerGitHub <noreply@github.com>2025-07-23 15:45:43 -0700
commit05e08cdb3e576cc0887d1507ebd2f756460c7db7 (patch)
tree8000d19ffbb51f0b730d3e0160293bbdd7357c27 /llvm/lib/CodeGen/MIRPrinter.cpp
parent11d97b3b58687bf4db978d3ba3c15fd6177549fa (diff)
downloadllvm-05e08cdb3e576cc0887d1507ebd2f756460c7db7.zip
llvm-05e08cdb3e576cc0887d1507ebd2f756460c7db7.tar.gz
llvm-05e08cdb3e576cc0887d1507ebd2f756460c7db7.tar.bz2
Revert "[llvm] Add CalleeTypeIds field to CallSiteInfo" (#150335)
Reverts llvm/llvm-project#87574, which breaks LLVM :: CodeGen/MIR/X86/call-site-info-ambiguous-indirect-call-typeid.mir tests on linux-arm64 builders.
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 8d5aa9aa..7710b50 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -525,30 +525,24 @@ static void convertCallSiteObjects(yaml::MachineFunction &YMF,
const MachineFunction &MF,
ModuleSlotTracker &MST) {
const auto *TRI = MF.getSubtarget().getRegisterInfo();
- for (auto [MI, CallSiteInfo] : MF.getCallSitesInfo()) {
+ for (auto CSInfo : MF.getCallSitesInfo()) {
yaml::CallSiteInfo YmlCS;
yaml::MachineInstrLoc CallLocation;
// Prepare instruction position.
- MachineBasicBlock::const_instr_iterator CallI = MI->getIterator();
+ MachineBasicBlock::const_instr_iterator CallI = CSInfo.first->getIterator();
CallLocation.BlockNum = CallI->getParent()->getNumber();
// Get call instruction offset from the beginning of block.
CallLocation.Offset =
std::distance(CallI->getParent()->instr_begin(), CallI);
YmlCS.CallLocation = CallLocation;
-
- auto [ArgRegPairs, CalleeTypeIds] = CallSiteInfo;
// Construct call arguments and theirs forwarding register info.
- for (auto ArgReg : ArgRegPairs) {
+ for (auto ArgReg : CSInfo.second.ArgRegPairs) {
yaml::CallSiteInfo::ArgRegPair YmlArgReg;
YmlArgReg.ArgNo = ArgReg.ArgNo;
printRegMIR(ArgReg.Reg, YmlArgReg.Reg, TRI);
YmlCS.ArgForwardingRegs.emplace_back(YmlArgReg);
}
- // Get type ids.
- for (auto *CalleeTypeId : CalleeTypeIds) {
- YmlCS.CalleeTypeIds.push_back(CalleeTypeId->getZExtValue());
- }
YMF.CallSitesInfo.push_back(std::move(YmlCS));
}