diff options
| author | Amruth <[email protected]> | 2018-04-03 11:43:46 -0700 |
|---|---|---|
| committer | Amruth <[email protected]> | 2018-04-03 11:43:46 -0700 |
| commit | 26476592e3650e796b51c94dd1a25c162eb1aa64 (patch) | |
| tree | a12f4f25ba9d6a554c3e95cb189f1f4264ed8db0 /src/cuda-sim/instructions.cc | |
| parent | deee9038d3d67e60f106776be3dd0a846dd11df9 (diff) | |
crash when print() is sent to pdom analysis
Diffstat (limited to 'src/cuda-sim/instructions.cc')
| -rw-r--r-- | src/cuda-sim/instructions.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 5d97287..0025c52 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -1471,7 +1471,12 @@ void call_impl( const ptx_instruction *pI, ptx_thread_info *thread ) printf("GPGPU-Sim PTX: PDOM analysis already done for %s \n", target_func->get_name().c_str() ); } else { printf("GPGPU-Sim PTX: finding reconvergence points for \'%s\'...\n", target_func->get_name().c_str() ); - target_func->do_pdom(); + /* + * Some of the instructions like printf() gives the gpgpusim the wrong impression that it is a function call. + * As printf() doesnt have a body like functions do, doing pdom analysis for printf() causes a crash. + */ + if (target_func->get_function_size() >0) + target_func->do_pdom(); target_func->set_pdom(); } |
