Skip to content

Remove "__tsan_func_entry()"/"__tsan_func_exit()" if nothing was instrumented in the function. #33

@MorthimerMcMare

Description

@MorthimerMcMare
define dso_local void @func() #0 !dbg !22 {
entry:
  %0 = call ptr @llvm.returnaddress(i32 0), !dbg !25
  call void @__tsan_func_entry(ptr %0), !dbg !25

  %1 = load i32, ptr @a, align 4, !dbg !25
  %inc = add nsw i32 %1, 1, !dbg !25
  store i32 %inc, ptr @a, align 4, !dbg !25

  call void @__tsan_func_exit(), !dbg !27
  ret void, !dbg !27
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions