Index: src/IceCfgNode.cpp |
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp |
index 4de2f577db3c4cbaedbf0939947b8d20fb08e3e1..57aba6b29ee9e14fb7abe9054ada7c7202c68f0d 100644 |
--- a/src/IceCfgNode.cpp |
+++ b/src/IceCfgNode.cpp |
@@ -457,6 +457,19 @@ void CfgNode::livenessPostprocess(LivenessMode Mode, Liveness *Liveness) { |
} |
} |
+void CfgNode::doBranchOpt(const CfgNode *NextNode) { |
+ TargetLowering *Target = Func->getTarget(); |
+ // Check every instruction for a branch optimization opportunity. |
+ // It may be more efficient to iterate in reverse and stop after the |
+ // first opportunity, unless there is some target lowering where we |
+ // have the possibility of multiple such optimizations per block |
+ // (currently not the case for x86 lowering). |
+ for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; |
+ ++I) { |
+ Target->doBranchOpt(*I, NextNode); |
+ } |
+} |
+ |
// ======================== Dump routines ======================== // |
void CfgNode::emit(Cfg *Func) const { |