From ebf2750a70df4261d3e66144ea6bcb49d41f6efb Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 10 Feb 2012 01:23:55 +0000 Subject: Optimize LiveIntervals::intervalIsInOneMBB(). No looping and binary searches necessary. Return a pointer to the containing block instead of just a bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150218 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/LiveIntervalAnalysis.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/llvm/CodeGen/LiveIntervalAnalysis.h') diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 5610ed63c5..ee407cd8d8 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -255,9 +255,10 @@ namespace llvm { const SmallVectorImpl *SpillIs, bool &isLoad); - /// intervalIsInOneMBB - Returns true if the specified interval is entirely - /// within a single basic block. - bool intervalIsInOneMBB(const LiveInterval &li) const; + /// intervalIsInOneMBB - If LI is confined to a single basic block, return + /// a pointer to that block. If LI is live in to or out of any block, + /// return NULL. + MachineBasicBlock *intervalIsInOneMBB(const LiveInterval &LI) const; /// addKillFlags - Add kill flags to any instruction that kills a virtual /// register. -- cgit v1.2.3