From 54ab2e9326993d9db0e393d3285a5c0a72af2c51 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 5 Apr 2010 19:16:38 +0000 Subject: [PATCH] Add an isReachableFromEntry to MachineDominators, following the one in Dominators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100454 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineDominators.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/llvm/CodeGen/MachineDominators.h b/include/llvm/CodeGen/MachineDominators.h index 086528aaf57..48695d500b1 100644 --- a/include/llvm/CodeGen/MachineDominators.h +++ b/include/llvm/CodeGen/MachineDominators.h @@ -156,8 +156,13 @@ public: inline void splitBlock(MachineBasicBlock* NewBB) { DT->splitBlock(NewBB); } - - + + /// isReachableFromEntry - Return true if A is dominated by the entry + /// block of the function containing it. + bool isReachableFromEntry(MachineBasicBlock *A) { + return DT->isReachableFromEntry(A); + } + virtual void releaseMemory(); virtual void print(raw_ostream &OS, const Module*) const; -- 2.34.1