xref: /minix3/minix/llvm/passes/include/magic/support/VariableRefs.h (revision 3e457fe321c6af238c180a2b4a0f010f8b4f8c31)
1 #ifndef VARIABLE_REFS_H
2 #define VARIABLE_REFS_H
3 
4 #include <pass.h>
5 
6 using namespace llvm;
7 
8 namespace llvm {
9 
10 class VariableRefs {
11   public:
12       VariableRefs();
13 
14       bool isUnnecessaryInstruction(Instruction* inst) const;
15       Instruction* getInstruction() const;
16       bool isInstructionInEntryBlock() const;
17 
18       void addInstruction(Instruction* inst);
19       void clear();
20 
21   private:
22       Instruction* instruction;
23       bool instructionInEntryBlock;
24 
25       void setFunctionEntryInstruction(Function* function);
26 };
27 
28 }
29 
30 #endif
31