Skip to content
Snippets Groups Projects
Commit f9ce70d0 authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

Changes to DFG2LLVM.h

parent cfff1f52
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/BuildDFG/BuildDFG.h"
#include "llvm/SupportVISC/VISCHint.h"
#include "llvm/SupportVISC/VISCTimer.h"
using namespace llvm;
......@@ -28,6 +29,7 @@ using namespace builddfg;
namespace dfg2llvm {
// Helper Functions
static inline ConstantInt* getTimerID(Module&, enum visc_TimerID);
static inline ConstantInt* getTimerID(Module&, enum visc::Target);
// DFG2LLVM abstract class implementation
class DFG2LLVM : public ModulePass {
......@@ -233,5 +235,9 @@ static inline ConstantInt* getTimerID(Module& M, enum visc_TimerID timer) {
return ConstantInt::get(Type::getInt32Ty(M.getContext()), timer);
}
static inline ConstantInt* getTargetID(Module& M, enum visc::Target T) {
return ConstantInt::get(Type::getInt32Ty(M.getContext()), T);
}
} // End of namespace
......@@ -18,6 +18,7 @@ namespace visc {
None,
CPU_TARGET,
GPU_TARGET,
SPIR_TARGET,
NUM_TARGETS
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment