Skip to content

[Offload] Remove old references to isCtor #91766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions offload/plugins-nextgen/common/include/PluginInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,6 @@ struct GenericKernelTy {
/// Get the kernel name.
const char *getName() const { return Name; }

/// Return true if this kernel is a constructor or destructor.
bool isCtorOrDtor() const {
// TODO: This is not a great solution and should be revisited.
return StringRef(Name).ends_with("tor");
}

/// Get the kernel image.
DeviceImageTy &getImage() const {
assert(ImagePtr && "Kernel is not initialized!");
Expand Down
5 changes: 1 addition & 4 deletions offload/plugins-nextgen/common/src/PluginInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ GenericKernelTy::getKernelLaunchEnvironment(
// Ctor/Dtor have no arguments, replaying uses the original kernel launch
// environment. Older versions of the compiler do not generate a kernel
// launch environment.
if (isCtorOrDtor() || RecordReplay.isReplaying() ||
if (RecordReplay.isReplaying() ||
Version < OMP_KERNEL_ARG_MIN_VERSION_WITH_DYN_PTR)
return nullptr;

Expand Down Expand Up @@ -579,9 +579,6 @@ void *GenericKernelTy::prepareArgs(
uint32_t &NumArgs, llvm::SmallVectorImpl<void *> &Args,
llvm::SmallVectorImpl<void *> &Ptrs,
KernelLaunchEnvironmentTy *KernelLaunchEnvironment) const {
if (isCtorOrDtor())
return nullptr;

uint32_t KLEOffset = !!KernelLaunchEnvironment;
NumArgs += KLEOffset;

Expand Down
Loading