aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-10-31 03:30:14 +0000
committerOwen Anderson <resistor@mac.com>2007-10-31 03:30:14 +0000
commit444710d3e044f06eea20ce1206dc096b095c3efd (patch)
treeebca322bece8d476925a3af6749f09ccc2f988c1 /include/llvm/CodeGen
parent2ff963d7b805464bb77a600a7dc3a8fc24d2836d (diff)
downloadexternal_llvm-444710d3e044f06eea20ce1206dc096b095c3efd.zip
external_llvm-444710d3e044f06eea20ce1206dc096b095c3efd.tar.gz
external_llvm-444710d3e044f06eea20ce1206dc096b095c3efd.tar.bz2
Some fixes to get MachineDomTree working better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineDominators.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineDominators.h b/include/llvm/CodeGen/MachineDominators.h
index 621ba2f..353c0e4 100644
--- a/include/llvm/CodeGen/MachineDominators.h
+++ b/include/llvm/CodeGen/MachineDominators.h
@@ -24,7 +24,17 @@
namespace llvm {
-void WriteAsOperand(std::ostream &, const MachineBasicBlock*, bool t) { }
+inline void WriteAsOperand(std::ostream &, const MachineBasicBlock*, bool t) { }
+
+template<>
+inline void DominatorTreeBase<MachineBasicBlock>::addRoot(MachineBasicBlock* MBB) {
+ this->Roots.push_back(MBB);
+}
+
+EXTERN_TEMPLATE_INSTANTIATION(class DomTreeNodeBase<MachineBasicBlock>);
+EXTERN_TEMPLATE_INSTANTIATION(class DominatorTreeBase<MachineBasicBlock>);
+
+typedef DomTreeNodeBase<MachineBasicBlock> MachineDomTreeNode;
//===-------------------------------------
/// DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to
@@ -60,7 +70,11 @@ public:
return DT->getRootNode();
}
- virtual bool runOnFunction(Function &F);
+ virtual bool runOnMachineFunction(MachineFunction &F) {
+ DT->recalculate(F);
+
+ return false;
+ }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();