summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-01 16:23:33 -0400
committerMengchi Zhang <[email protected]>2019-07-01 16:23:33 -0400
commitcb678c3670de4a435a3260ed80dc476da3860082 (patch)
tree99b062689fec2edc94c4af9e10efae9686b24c40 /src/cuda-sim
parent3ced1e68b56c8dfae3bd98e0ede6241e31cefaa2 (diff)
Move g_debug_ir_generation and GPGPUSim_Init
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/ptx_parser.cc3
-rw-r--r--src/cuda-sim/ptx_parser.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc
index 2872b84..9094ec3 100644
--- a/src/cuda-sim/ptx_parser.cc
+++ b/src/cuda-sim/ptx_parser.cc
@@ -48,7 +48,6 @@ void set_ptx_warp_size(const struct core_config * warp_size)
g_shader_core_config=warp_size;
}
-static bool g_debug_ir_generation=false;
const char *g_filename;
// the program intermediate representation...
@@ -70,7 +69,7 @@ const char *decode_token( int type )
return g_ptx_token_decode[type].c_str();
}
-void read_parser_environment_variables()
+void ptx_recognizer::read_parser_environment_variables()
{
g_filename = getenv("PTX_SIM_KERNELFILE");
char *dbg_level = getenv("PTX_SIM_DEBUG");
diff --git a/src/cuda-sim/ptx_parser.h b/src/cuda-sim/ptx_parser.h
index 25c01fe..bc9a872 100644
--- a/src/cuda-sim/ptx_parser.h
+++ b/src/cuda-sim/ptx_parser.h
@@ -62,6 +62,7 @@ class ptx_recognizer {
g_error_detected = 0;
g_entry_func_param_index=0;
g_func_info = NULL;
+ g_debug_ir_generation=false;
}
// global list
yyscan_t scanner;
@@ -103,6 +104,7 @@ class ptx_recognizer {
unsigned g_entry_func_param_index;
function_info *g_func_info;
operand_info g_return_var;
+ bool g_debug_ir_generation;
// member function list
void init_directive_state();
@@ -169,6 +171,7 @@ class ptx_recognizer {
void start_inst_group();
void end_inst_group();
bool check_for_duplicates( const char *identifier );
+ void read_parser_environment_variables();
};