summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-10 01:23:55 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-10 01:23:55 +0000
commitebf2750a70df4261d3e66144ea6bcb49d41f6efb (patch)
treea2606b3d7daa2497a208ccdb02e101ee37a82680 /include/llvm/CodeGen/LiveIntervalAnalysis.h
parentf378f5fae3b7c35fc0f8996accf121ffe59093e2 (diff)
downloadllvm-ebf2750a70df4261d3e66144ea6bcb49d41f6efb.tar.gz
llvm-ebf2750a70df4261d3e66144ea6bcb49d41f6efb.tar.bz2
llvm-ebf2750a70df4261d3e66144ea6bcb49d41f6efb.tar.xz
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
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h7
1 files changed, 4 insertions, 3 deletions
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<LiveInterval*> *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.