diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineLoopInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp index 0c1439d..67916fb 100644 --- a/llvm/lib/CodeGen/MachineLoopInfo.cpp +++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp @@ -111,6 +111,13 @@ DebugLoc MachineLoop::getStartLoc() const { return DebugLoc(); } +bool MachineLoop::hasStaticProfInfo() const { + return llvm::any_of(blocks(), [](const MachineBasicBlock *MBB){ + const BasicBlock *BB = MBB->getBasicBlock(); + return BB && BB->getTerminator()->hasMetadata(LLVMContext::MD_prof); + }); +} + MachineBasicBlock * MachineLoopInfo::findLoopPreheader(MachineLoop *L, bool SpeculativePreheader) const { |