From 0db0878ead6ea8ad5616fbd53b4964f71ba87bb1 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 18 Mar 2013 19:19:57 +0000 Subject: [PATCH] ScopHelper: clang-format llvm-svn: 177309 --- polly/include/polly/Support/ScopHelper.h | 97 +++++++++++++++----------------- 1 file changed, 46 insertions(+), 51 deletions(-) diff --git a/polly/include/polly/Support/ScopHelper.h b/polly/include/polly/Support/ScopHelper.h index 175b389..5068c5c 100755 --- a/polly/include/polly/Support/ScopHelper.h +++ b/polly/include/polly/Support/ScopHelper.h @@ -1,4 +1,4 @@ -//===------ Support/ScopHelper.h -- Some Helper Functions for Scop. --------===// +//===------ Support/ScopHelper.h -- Some Helper Functions for Scop. -------===// // // The LLVM Compiler Infrastructure // @@ -15,62 +15,57 @@ #define POLLY_SUPPORT_IRHELPER_H namespace llvm { - class Instruction; - class LoopInfo; - class Loop; - class ScalarEvolution; - class SCEV; - class Value; - class PHINode; - class Region; - class Pass; - class BasicBlock; +class Instruction; +class LoopInfo; +class Loop; +class ScalarEvolution; +class SCEV; +class Value; +class PHINode; +class Region; +class Pass; +class BasicBlock; } namespace polly { - // Helper function for Scop. - //===----------------------------------------------------------------------===// - /// Temporary Hack for extended regiontree. - /// - /// @brief Cast the region to loop. - /// - /// @param R The Region to be casted. - /// @param LI The LoopInfo to help the casting. - /// - /// @return If there is a a loop that has the same entry and exit as the region, - /// return the loop, otherwise, return null. - llvm::Loop *castToLoop(const llvm::Region &R, llvm::LoopInfo &LI); +/// Temporary Hack for extended regiontree. +/// +/// @brief Cast the region to loop. +/// +/// @param R The Region to be casted. +/// @param LI The LoopInfo to help the casting. +/// +/// @return If there is a a loop that has the same entry and exit as the region, +/// return the loop, otherwise, return null. +llvm::Loop *castToLoop(const llvm::Region &R, llvm::LoopInfo &LI); +/// @brief Check if the instruction I is the induction variable of a loop. +/// +/// @param I The instruction to check. +/// @param LI The LoopInfo analysis. +/// +/// @return Return true if I is the induction variable of a loop, false +/// otherwise. +bool isIndVar(const llvm::Instruction *I, const llvm::LoopInfo *LI); - /// @brief Check if the instruction I is the induction variable of a loop. - /// - /// @param I The instruction to check. - /// @param LI The LoopInfo analysis. - /// - /// @return Return true if I is the induction variable of a loop, false - /// otherwise. - bool isIndVar(const llvm::Instruction *I, const llvm::LoopInfo *LI); +/// @brief Check if the PHINode has any incoming Invoke edge. +/// +/// @param PN The PHINode to check. +/// +/// @return If the PHINode has an incoming BB that jumps to the parent BB +/// of the PHINode with an invoke instruction, return true, +/// otherwise, return false. +bool hasInvokeEdge(const llvm::PHINode *PN); - /// @brief Check if the PHINode has any incoming Invoke edge. - /// - /// @param PN The PHINode to check. - /// - /// @return If the PHINode has an incoming BB that jumps to the parent BB - /// of the PHINode with an invoke instruction, return true, - /// otherwise, return false. - bool hasInvokeEdge(const llvm::PHINode *PN); +llvm::Value *getPointerOperand(llvm::Instruction &Inst); +llvm::BasicBlock *createSingleExitEdge(llvm::Region *R, llvm::Pass *P); - llvm::Value *getPointerOperand(llvm::Instruction &Inst); - - // Helper function for LLVM-IR about Scop. - llvm::BasicBlock *createSingleExitEdge(llvm::Region *R, llvm::Pass *P); - - /// @brief Split the entry block of a function to store the newly inserted - /// allocations outside of all Scops. - /// - /// @param EntryBlock The entry block of the current function. - /// @param P The pass that currently running. - /// - void splitEntryBlockForAlloca(llvm::BasicBlock *EntryBlock, llvm::Pass *P); +/// @brief Split the entry block of a function to store the newly inserted +/// allocations outside of all Scops. +/// +/// @param EntryBlock The entry block of the current function. +/// @param P The pass that currently running. +/// +void splitEntryBlockForAlloca(llvm::BasicBlock *EntryBlock, llvm::Pass *P); } #endif -- 2.7.4