summaryrefslogtreecommitdiff
path: root/minix/llvm/passes/include/magic/support/VariableRefs.h
blob: 0574d5a5ac6a34878795d1320b344681a1472b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef VARIABLE_REFS_H
#define VARIABLE_REFS_H

#include <pass.h>

using namespace llvm;

namespace llvm {

class VariableRefs {
  public:
      VariableRefs();

      bool isUnnecessaryInstruction(Instruction* inst) const;
      Instruction* getInstruction() const;
      bool isInstructionInEntryBlock() const;

      void addInstruction(Instruction* inst);
      void clear();

  private:
      Instruction* instruction;
      bool instructionInEntryBlock;

      void setFunctionEntryInstruction(Function* function);
};

}

#endif