PageRenderTime 24ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 1ms

/3rd_party/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h

https://code.google.com/p/softart/
C++ Header | 51 lines | 28 code | 13 blank | 10 comment | 0 complexity | 7101af4212372b4cf4270e0ed9637f0d MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, JSON, MPL-2.0-no-copyleft-exception, GPL-2.0, GPL-3.0, LGPL-3.0, BSD-2-Clause
 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#include "llvm/ADT/SmallSet.h"
16
17namespace llvm {
18
19  class MachineInstr;
20  class TargetInstrInfo;
21  class TargetRegisterInfo;
22  class MachineRegisterInfo;
23  class LiveVariables;
24
25  /// Process IMPLICIT_DEF instructions and make sure there is one implicit_def
26  /// for each use. Add isUndef marker to implicit_def defs and their uses.
27  class ProcessImplicitDefs : public MachineFunctionPass {
28    const TargetInstrInfo *TII;
29    const TargetRegisterInfo *TRI;
30    MachineRegisterInfo *MRI;
31    LiveVariables *LV;
32
33    bool CanTurnIntoImplicitDef(MachineInstr *MI, unsigned Reg,
34                                unsigned OpIdx,
35                                SmallSet<unsigned, 8> &ImpDefRegs);
36
37  public:
38    static char ID;
39
40    ProcessImplicitDefs() : MachineFunctionPass(ID) {
41      initializeProcessImplicitDefsPass(*PassRegistry::getPassRegistry());
42    }
43
44    virtual void getAnalysisUsage(AnalysisUsage &au) const;
45
46    virtual bool runOnMachineFunction(MachineFunction &fn);
47  };
48
49}
50
51#endif // LLVM_CODEGEN_PROCESSIMPLICITDEFS_H