Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sidorov, Dmitry <[email protected]>
  • Loading branch information
MrSidims committed Nov 18, 2024
1 parent 3d24d0d commit 5490f22
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,6 @@ void SYCLToolChain::AddImpliedTargetArgs(const llvm::Triple &Triple,
Triple.isSPIROrSPIRV() && Triple.getSubArch() == llvm::Triple::NoSubArch;
if (IsGen && Args.hasArg(options::OPT_fsycl_fp64_conv_emu))
BeArgs.push_back("-ze-fp64-gen-conv-emu");

if (Arg *A = Args.getLastArg(options::OPT_g_Group, options::OPT__SLASH_Z7))
if (!A->getOption().matches(options::OPT_g0))
BeArgs.push_back("-g");
Expand Down
13 changes: 7 additions & 6 deletions llvm/include/llvm/SYCLLowerIR/SYCLSqrtFDivMaxErrorCleanUp.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// Remove llvm.fpbuiltin.[sqrt/fdiv] intrinsics to ensure backward compatibility
// with the old drivers (that don't support SPV_INTEL_fp_max_error extension)
// in case if they are used with standart for OpenCL max-error (e.g [3.0/2.5]
// ULP and there are no other llvm.fpbuiltin.* intrinsic functions, fdiv
// instructions or @sqrt builtins/intrinsics in the module.
// Remove llvm.fpbuiltin.[sqrt/fdiv] intrinsics to ensure compatibility with the
// old drivers (that don't support SPV_INTEL_fp_max_error extension).
// The intrinsic functions are removed in case if they are used with standard
// for OpenCL max-error (e.g [3.0/2.5] ULP) and there are no:
// - other llvm.fpbuiltin.* intrinsic functions;
// - fdiv instructions
// - @sqrt builtins (both C and C++-styles)/llvm intrinsic in the module.
//===----------------------------------------------------------------------===//
//
#ifndef LLVM_SYCL_SQRT_FDIV_MAX_ERROR_CLEAN_UP_H
#define LLVM_SYCL_SQRT_FDIV_MAX_ERROR_CLEAN_UP_H

Expand Down
14 changes: 8 additions & 6 deletions llvm/lib/SYCLLowerIR/SYCLSqrtFDivMaxErrorCleanUp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// Remove llvm.fpbuiltin.[sqrt/fdiv] intrinsics to ensure backward compatibility
// with the old drivers (that don't support SPV_INTEL_fp_max_error extension)
// in case if they are used with standart for OpenCL max-error (e.g [3.0/2.5]
// ULP and there are no other llvm.fpbuiltin.* intrinsic functions, fdiv
// instructions or @sqrt builtins/intrinsics in the module.
// Remove llvm.fpbuiltin.[sqrt/fdiv] intrinsics to ensure compatibility with the
// old drivers (that don't support SPV_INTEL_fp_max_error extension).
// The intrinsic functions are removed in case if they are used with standard
// for OpenCL max-error (e.g [3.0/2.5] ULP) and there are no:
// - other llvm.fpbuiltin.* intrinsic functions;
// - fdiv instructions
// - @sqrt builtins (both C and C++-styles)/llvm intrinsic in the module.
//===----------------------------------------------------------------------===//

#include "llvm/SYCLLowerIR/SYCLSqrtFDivMaxErrorCleanUp.h"
Expand Down Expand Up @@ -74,7 +76,7 @@ SYCLSqrtFDivMaxErrorCleanUpPass::run(Module &M,
}
}

// No intrinsics at all - do an early exist
// No intrinsics at all - do an early exist.
if (WorkListSqrt.empty() && WorkListFDiv.empty())
return PreservedAnalyses::none();

Expand Down

0 comments on commit 5490f22

Please sign in to comment.