[PATCH] D119594: [sancov] Don't instrument calls to bitcast funcs: they're not indirect.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 16:44:49 PST 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

Sorry for the belated response. LGTM.



================
Comment at: llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll:65
+; CHECK-LABEL: define void @DirectBitcastCall
+; CHECK-NOT:     call void @__sanitizer_cov_trace_pc_indir
+; CHECK:         call void bitcast (i32 ()* @direct_callee to void ()*)()
----------------



================
Comment at: llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll:66
+; CHECK-NOT:     call void @__sanitizer_cov_trace_pc_indir
+; CHECK:         call void bitcast (i32 ()* @direct_callee to void ()*)()
+; CHECK:         ret void
----------------
Delete `-NOT`. Consecutive `-NEXT` patterns can ensure there is only one `__sanitizer_cov_trace_*` call.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119594/new/

https://reviews.llvm.org/D119594



More information about the llvm-commits mailing list