Use std::vector rather than SmallVector here because SmallVector
[oota-llvm.git] / include / llvm / CodeGen / ProcessImplicitDefs.h
1 //===-------------- llvm/CodeGen/ProcessImplicitDefs.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
11 #ifndef LLVM_CODEGEN_PROCESSIMPLICITDEFS_H
12 #define LLVM_CODEGEN_PROCESSIMPLICITDEFS_H
13
14 #include "llvm/CodeGen/MachineFunctionPass.h"
15
16 namespace llvm {
17
18   class MachineInstr;
19   class TargetInstrInfo;
20
21   /// Process IMPLICIT_DEF instructions and make sure there is one implicit_def
22   /// for each use. Add isUndef marker to implicit_def defs and their uses.
23   class ProcessImplicitDefs : public MachineFunctionPass {
24   private:
25
26     bool CanTurnIntoImplicitDef(MachineInstr *MI, unsigned Reg,
27                                 unsigned OpIdx, const TargetInstrInfo *tii_);
28
29   public:
30     static char ID;
31
32     ProcessImplicitDefs() : MachineFunctionPass(&ID) {}
33
34     virtual void getAnalysisUsage(AnalysisUsage &au) const;
35
36     virtual bool runOnMachineFunction(MachineFunction &fn);
37   };
38
39 }
40
41 #endif // LLVM_CODEGEN_PROCESSIMPLICITDEFS_H