Home | History | Annotate | Download | only in NVPTX
      1 //===-- llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.h ---------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // This file contains the declaration of the NVIDIA specific declarations
     11 // for splitting basic blocks at barrier instructions.
     12 //
     13 //===----------------------------------------------------------------------===//
     14 
     15 #ifndef NVPTX_SPLIT_BB_AT_BAR_H
     16 #define NVPTX_SPLIT_BB_AT_BAR_H
     17 
     18 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
     19 #include "llvm/Pass.h"
     20 
     21 namespace llvm {
     22 
     23 // actual analysis class, which is a functionpass
     24 struct NVPTXSplitBBatBar : public FunctionPass {
     25   static char ID;
     26 
     27   NVPTXSplitBBatBar() : FunctionPass(ID) {}
     28   void getAnalysisUsage(AnalysisUsage &AU) const {
     29     AU.addPreserved<MachineFunctionAnalysis>();
     30   }
     31   virtual bool runOnFunction(Function &F);
     32 
     33   virtual const char *getPassName() const {
     34     return "Split basic blocks at barrier";
     35   }
     36 };
     37 
     38 extern FunctionPass *createSplitBBatBarPass();
     39 }
     40 
     41 #endif //NVPTX_SPLIT_BB_AT_BAR_H
     42