From c07a65e35ab86532fb638c3b1c0474a3b97d2d11 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 14 Dec 2015 20:12:24 +0000 Subject: [PATCH] [Packetizer] Make endPacket virtual This will allow custom handling of packet finalization. The current definition of endPacket will still perform the default finalization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255537 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/DFAPacketizer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/llvm/CodeGen/DFAPacketizer.h b/include/llvm/CodeGen/DFAPacketizer.h index 711bf9a7131..9daec9859ed 100644 --- a/include/llvm/CodeGen/DFAPacketizer.h +++ b/include/llvm/CodeGen/DFAPacketizer.h @@ -161,8 +161,10 @@ public: return MII; } - // endPacket - End the current packet. - void endPacket(MachineBasicBlock *MBB, MachineInstr *MI); + // End the current packet and reset the state of the packetizer. + // Overriding this function allows the target-specific packetizer + // to perform custom finalization. + virtual void endPacket(MachineBasicBlock *MBB, MachineInstr *MI); // initPacketizerState - perform initialization before packetizing // an instruction. This function is supposed to be overrided by -- 2.34.1