From 9400bfbf4268a0ec53e7b045bceb37909fa8ab31 Mon Sep 17 00:00:00 2001 From: Quentin Colombet Date: Wed, 8 Jun 2016 21:55:29 +0000 Subject: [RegBankSelect] Remove a debug print of a potentially dead instruction. For complex rewrittings, which do not occur currently, the related machine instruction may have been deleted in the process. Therefore, do not try to print it after the mapping is applied. llvm-svn: 272209 --- llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp') diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index f5f4abf77e5..7b96c20542d 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -529,9 +529,9 @@ void RegBankSelect::assignInstr(MachineInstr &MI) { DEBUG(dbgs() << "Mapping: " << BestMapping << '\n'); + // After this call, MI may not be valid anymore. + // Do not use it. applyMapping(MI, BestMapping, RepairPts); - - DEBUG(dbgs() << "Assigned: " << MI); } bool RegBankSelect::runOnMachineFunction(MachineFunction &MF) { -- cgit v1.2.3