From 096bd8837fd1e90c10db05af2614c962946a7a8a Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 4 Feb 2011 19:33:11 +0000 Subject: Add LiveIntervals::getLastSplitPoint(). A live range cannot be split everywhere in a basic block. A split must go before the first terminator, and if the variable is live into a landing pad, the split must happen before the call that can throw. llvm-svn: 124894 --- llvm/lib/CodeGen/SplitKit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SplitKit.cpp') diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index e4a82adfb32..68f782d2805 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -826,7 +826,7 @@ SlotIndex SplitEditor::enterIntvAtEnd(MachineBasicBlock &MBB) { } DEBUG(dbgs() << ": valno " << ParentVNI->id); VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Last, MBB, - MBB.getFirstTerminator()); + LIS.getLastSplitPoint(Edit.getParent(), &MBB)); RegAssign.insert(VNI->def, End, OpenIdx); DEBUG(dump()); return VNI->def; -- cgit v1.2.3