From 5edc1f287b30a1f7760ed6bbb90530d33b33557a Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 23 Feb 2011 18:26:31 +0000 Subject: [PATCH] It is safe to ignore LastSplitPoint when the variable is not live out. No code will be inserted after the split point anyway. llvm-svn: 126319 --- lib/CodeGen/SplitKit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index a97d890c25b..fd5d50b7ecb 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -961,10 +961,10 @@ void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) { openIntv(); SlotIndex SegStart = enterIntvBefore(BI.FirstUse); - if (BI.LastUse < BI.LastSplitPoint) { + if (!BI.LiveOut || BI.LastUse < BI.LastSplitPoint) { useIntv(SegStart, leaveIntvAfter(BI.LastUse)); } else { - // THe last use os after tha last valid split point. + // The last use is after the last valid split point. SlotIndex SegStop = leaveIntvBefore(BI.LastSplitPoint); useIntv(SegStart, SegStop); overlapIntv(SegStop, BI.LastUse);