From 8426d1342d82b365f4997c3d222c349fe7fba2ac Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 23 Aug 2017 03:17:59 +0000 Subject: Add test case for r311511 This also changes the TailDuplicator to be configured explicitely pre/post regalloc rather than relying on the isSSA() flag. This was necessary to have `llc -run-pass` work reliably. llvm-svn: 311520 --- llvm/lib/CodeGen/TailDuplicator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TailDuplicator.cpp') diff --git a/llvm/lib/CodeGen/TailDuplicator.cpp b/llvm/lib/CodeGen/TailDuplicator.cpp index 0f22040f3ae..bd3a20f936d 100644 --- a/llvm/lib/CodeGen/TailDuplicator.cpp +++ b/llvm/lib/CodeGen/TailDuplicator.cpp @@ -75,7 +75,7 @@ static cl::opt static cl::opt TailDupLimit("tail-dup-limit", cl::init(~0U), cl::Hidden); -void TailDuplicator::initMF(MachineFunction &MFin, +void TailDuplicator::initMF(MachineFunction &MFin, bool PreRegAlloc, const MachineBranchProbabilityInfo *MBPIin, bool LayoutModeIn, unsigned TailDupSizeIn) { MF = &MFin; @@ -89,7 +89,7 @@ void TailDuplicator::initMF(MachineFunction &MFin, assert(MBPI != nullptr && "Machine Branch Probability Info required"); LayoutMode = LayoutModeIn; - PreRegAlloc = MRI->isSSA(); + this->PreRegAlloc = PreRegAlloc; } static void VerifyPHIs(MachineFunction &MF, bool CheckExtra) { -- cgit v1.2.3