Skip to content

[DeviceSanitizer] Move sanitizer predicates to new SanitizerUtils.h - #22915

Open
wenju-he wants to merge 1 commit into
intel:syclfrom
wenju-he:SanitizerUtils.h
Open

[DeviceSanitizer] Move sanitizer predicates to new SanitizerUtils.h#22915
wenju-he wants to merge 1 commit into
intel:syclfrom
wenju-he:SanitizerUtils.h

Conversation

@wenju-he

Copy link
Copy Markdown
Contributor

This is follow-up of review comment
#22901 (comment)

isModuleUsingAsan/Msan/Tsan are sanitizer-specific, not generic SYCL utilities, so move them out of SYCLLowerIR/SYCLUtils.{h,cpp} into a new SanitizerUtils.{h,cpp}. Also add ASAN/MSAN/TSAN_KERNEL_METADATA_PREFIX constants there so the "__{Asan,Msan,Tsan}KernelMetadata" prefix strings have a single definition instead of being duplicated as literals across SanitizerPostOptimizer.cpp, SanitizerPostSplitProcessing.cpp, and clang's OffloadBundler.cpp.

This is follow-up of review comment
intel#22901 (comment)

isModuleUsingAsan/Msan/Tsan are sanitizer-specific, not generic SYCL
utilities, so move them out of SYCLLowerIR/SYCLUtils.{h,cpp} into a
new SanitizerUtils.{h,cpp}. Also add ASAN/MSAN/TSAN_KERNEL_METADATA_PREFIX
constants there so the "__{Asan,Msan,Tsan}KernelMetadata" prefix strings
have a single definition instead of being duplicated as literals across
SanitizerPostOptimizer.cpp, SanitizerPostSplitProcessing.cpp, and
clang's OffloadBundler.cpp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
#include "llvm/IR/Module.h"

namespace llvm {
namespace sycl {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we change the namespace?

@YuriPlyakhin YuriPlyakhin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants