summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-11 13:57:08 -0400
committerMengchi Zhang <[email protected]>2019-07-11 13:57:08 -0400
commit33d064f5a38b60fb0ed4b4ad78212c6e5d9bfc0f (patch)
tree2beaf4433e56bf708c22fd3a28444bf1bc3eb4b3 /src
parentdb406fd188f389f3050879e8cd76c3817b1630f8 (diff)
g_sym_name_to_symbol_table
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/cuda-sim/cuda-sim.cc4
-rw-r--r--src/cuda-sim/ptx_parser.cc2
-rw-r--r--src/cuda-sim/ptx_parser.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index d098f2b..e4ff0f9 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1995,8 +1995,8 @@ void cuda_sim::gpgpu_ptx_sim_memcpy_symbol(const char *hostVar, const void *src,
const char *mem_name = NULL;
memory_space *mem = NULL;
- std::map<std::string,symbol_table*>::iterator st = g_sym_name_to_symbol_table.find(sym_name.c_str());
- assert( st != g_sym_name_to_symbol_table.end() );
+ std::map<std::string,symbol_table*>::iterator st = gpgpu_ctx->ptx_parser->g_sym_name_to_symbol_table.find(sym_name.c_str());
+ assert( st != gpgpu_ctx->ptx_parser->g_sym_name_to_symbol_table.end() );
symbol_table *symtab = st->second;
symbol *sym = symtab->lookup(sym_name.c_str());
diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc
index 8b2b72e..1d38edf 100644
--- a/src/cuda-sim/ptx_parser.cc
+++ b/src/cuda-sim/ptx_parser.cc
@@ -47,8 +47,6 @@ void ptx_recognizer::set_ptx_warp_size(const struct core_config * warp_size)
g_shader_core_config=warp_size;
}
-// the program intermediate representation...
-std::map<std::string,symbol_table*> g_sym_name_to_symbol_table;
#define PTX_PARSE_DPRINTF(...) \
if( g_debug_ir_generation ) { \
diff --git a/src/cuda-sim/ptx_parser.h b/src/cuda-sim/ptx_parser.h
index 7e87ec8..1e559a2 100644
--- a/src/cuda-sim/ptx_parser.h
+++ b/src/cuda-sim/ptx_parser.h
@@ -104,6 +104,8 @@ class ptx_recognizer {
int g_entry_point;
const struct core_config *g_shader_core_config;
std::map<std::string,std::map<unsigned,const ptx_instruction*> > g_inst_lookup;
+ // the program intermediate representation...
+ std::map<std::string,symbol_table*> g_sym_name_to_symbol_table;
// backward pointer
class gpgpu_context* gpgpu_ctx;