]>
git.proxmox.com Git - rustc.git/blob - src/llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.h
1 //===-- llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.h ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declaration of the NVIDIA specific declarations
11 // for splitting basic blocks at barrier instructions.
13 //===----------------------------------------------------------------------===//
15 #ifndef NVPTX_SPLIT_BB_AT_BAR_H
16 #define NVPTX_SPLIT_BB_AT_BAR_H
18 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
19 #include "llvm/Pass.h"
23 // actual analysis class, which is a functionpass
24 struct NVPTXSplitBBatBar
: public FunctionPass
{
27 NVPTXSplitBBatBar() : FunctionPass(ID
) {}
28 void getAnalysisUsage(AnalysisUsage
&AU
) const {
29 AU
.addPreserved
<MachineFunctionAnalysis
>();
31 virtual bool runOnFunction(Function
&F
);
33 virtual const char *getPassName() const {
34 return "Split basic blocks at barrier";
38 extern FunctionPass
*createSplitBBatBarPass();
41 #endif //NVPTX_SPLIT_BB_AT_BAR_H