Skip to content

Commit 99267cb

Browse files
committed
adding subroutine name to dr_hook name
1 parent 8cbccfe commit 99267cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

transformations/transformations/parallel_routine_dispatch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ def process_parallel_region(self, routine, region):
3434
return
3535

3636
dr_hook_calls = self.create_dr_hook_calls(
37-
routine, pragma_attrs['name'],
37+
routine, routine.name+":"+pragma_attrs['name'],
3838
sym.Variable(name='ZHOOK_HANDLE_FIELD_API', scope=routine)
3939
)
4040

4141
region.prepend(dr_hook_calls[0])
4242
region.append(dr_hook_calls[1])
4343

4444
@staticmethod
45-
def create_dr_hook_calls(scope, cdname, pkey):
45+
def create_dr_hook_calls(scope, cdname, handle):
4646
dr_hook_calls = []
4747
for kswitch in (0, 1):
4848
call_stmt = ir.CallStatement(
4949
name=sym.Variable(name='DR_HOOK', scope=scope),
50-
arguments=(sym.StringLiteral(cdname), sym.IntLiteral(kswitch), pkey)
50+
arguments=(sym.StringLiteral(cdname), sym.IntLiteral(kswitch), handle)
5151
)
5252
dr_hook_calls += [
5353
ir.Conditional(

0 commit comments

Comments
 (0)