From 656838bb7178d51544ff85e9b925e2b43433a6df Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 13 May 2021 13:19:13 +0100 Subject: [PATCH] [X86] VZeroUpperInserter::insertVZeroUpper - avoid DebugLoc creation by embedding in the BuildMI calls. NFCI. Try to pass DebugLoc by const-ref to avoid costly TrackingMDNodeRef copies. --- lib/Target/X86/X86VZeroUpper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Target/X86/X86VZeroUpper.cpp b/lib/Target/X86/X86VZeroUpper.cpp index c188c744362..c3031b69855 100644 --- a/lib/Target/X86/X86VZeroUpper.cpp +++ b/lib/Target/X86/X86VZeroUpper.cpp @@ -182,8 +182,7 @@ static bool callHasRegMask(MachineInstr &MI) { /// Insert a vzeroupper instruction before I. void VZeroUpperInserter::insertVZeroUpper(MachineBasicBlock::iterator I, MachineBasicBlock &MBB) { - DebugLoc dl = I->getDebugLoc(); - BuildMI(MBB, I, dl, TII->get(X86::VZEROUPPER)); + BuildMI(MBB, I, I->getDebugLoc(), TII->get(X86::VZEROUPPER)); ++NumVZU; EverMadeChange = true; }