Skip to content

Commit 8e6e373

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents a4eefe4 + e31b94e commit 8e6e373

File tree

68 files changed

+1507
-1958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1507
-1958
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ is strongly encouraged that you submit the patch to https://llvm.org/ directly.
2020
See [LLVM contribution guidelines](https://llvm.org/docs/Contributing.html)
2121
for more information.
2222

23+
**Note (October, 2020)**: DPC++ runtime and compiler ABI is currently in frozen
24+
state. This means that no ABI-breaking changes will be accepted by default.
25+
Project maintainers may still approve breaking changes in some cases. Please,
26+
see [ABI Policy Guide](sycl/doc/ABIPolicyGuide.md) for more information.
27+
2328
- Create a personal fork of the project on GitHub
2429
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
2530
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).

buildbot/dependency.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ ocl_cpu_rt_ver=2020.11.10.0.05
44
# https://github.com/intel/llvm/releases/download/2020-WW41/win-oclcpuexp-2020.11.10.0.05_rel.zip
55
ocl_cpu_rt_ver_win=2020.11.10.0.05
66
# Same GPU driver supports Level Zero and OpenCL:
7-
# https://github.com/intel/compute-runtime/releases/tag/20.41.18123
8-
ocl_gpu_rt_ver=20.41.18123
7+
# https://github.com/intel/compute-runtime/releases/tag/20.42.18209
8+
ocl_gpu_rt_ver=20.42.18209
99
# Same GPU driver supports Level Zero and OpenCL:
1010
# https://downloadmirror.intel.com/29879/a08/igfx_win10_100.8778.zip
1111
ocl_gpu_rt_ver_win=27.20.100.8778
@@ -24,7 +24,7 @@ fpga_ver_win=20200913_000017
2424
[DRIVER VERSIONS]
2525
cpu_driver_lin=2020.11.10.0.05
2626
cpu_driver_win=2020.11.10.0.05
27-
gpu_driver_lin=20.41.18123
27+
gpu_driver_lin=20.42.18209
2828
gpu_driver_win=27.20.100.8778
2929
fpga_driver_lin=2020.11.10.0.05
3030
fpga_driver_win=2020.11.10.0.05

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3610,7 +3610,7 @@ defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
36103610
defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
36113611

36123612
// C++ SYCL options
3613-
def reuse_exe_EQ : Joined<["-"], "reuse-exe=">,
3613+
def reuse_exe_EQ : Joined<["-"], "reuse-exe=">, Flags<[CoreOption]>,
36143614
HelpText<"Speed up FPGA aoc compile if the device code in <exe> is unchanged.">,
36153615
MetaVarName<"<exe>">;
36163616
def fsycl : Flag<["-"], "fsycl">, Group<sycl_Group>, Flags<[CC1Option, CoreOption]>,

clang/include/clang/Sema/Sema.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -388,26 +388,6 @@ class SYCLIntegrationHeader {
388388
: nullptr;
389389
}
390390

391-
/// Emits a forward declaration for given declaration.
392-
void emitFwdDecl(raw_ostream &O, const Decl *D,
393-
SourceLocation KernelLocation);
394-
395-
/// Emits forward declarations of classes and template classes on which
396-
/// declaration of given type depends. See example in the comments for the
397-
/// implementation.
398-
/// \param O
399-
/// stream to emit to
400-
/// \param T
401-
/// type to emit forward declarations for
402-
/// \param KernelLocation
403-
/// source location of the SYCL kernel function, used to emit nicer
404-
/// diagnostic messages if kernel name is missing
405-
/// \param Emitted
406-
/// a set of declarations forward declrations has been emitted for already
407-
void emitForwardClassDecls(raw_ostream &O, QualType T,
408-
SourceLocation KernelLocation,
409-
llvm::SmallPtrSetImpl<const void *> &Emitted);
410-
411391
private:
412392
/// Keeps invocation descriptors for each kernel invocation started by
413393
/// SYCLIntegrationHeader::startKernel

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4058,6 +4058,17 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
40584058
RenderDebugInfoCompressionArgs(Args, CmdArgs, D, TC);
40594059
}
40604060

4061+
/// Check whether the given input tree contains any wrapper actions
4062+
static bool ContainsWrapperAction(const Action *A) {
4063+
if (isa<OffloadWrapperJobAction>(A))
4064+
return true;
4065+
for (const auto &AI : A->inputs())
4066+
if (ContainsWrapperAction(AI))
4067+
return true;
4068+
4069+
return false;
4070+
}
4071+
40614072
void Clang::ConstructJob(Compilation &C, const JobAction &JA,
40624073
const InputInfo &Output, const InputInfoList &Inputs,
40634074
const ArgList &Args, const char *LinkingOutput) const {
@@ -5227,13 +5238,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
52275238
// preprocessed inputs and configure concludes that -fPIC is not supported.
52285239
Args.ClaimAllArgs(options::OPT_D);
52295240

5241+
bool SkipO =
5242+
Args.hasArg(options::OPT_fsycl_link_EQ) && ContainsWrapperAction(&JA);
5243+
const Arg *OArg = Args.getLastArg(options::OPT_O_Group);
52305244
// Manually translate -O4 to -O3; let clang reject others.
5231-
if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
5232-
if (A->getOption().matches(options::OPT_O4)) {
5245+
// When compiling a wrapped binary, do not optimize.
5246+
if (!SkipO && OArg) {
5247+
if (OArg->getOption().matches(options::OPT_O4)) {
52335248
CmdArgs.push_back("-O3");
52345249
D.Diag(diag::warn_O4_is_O3);
52355250
} else {
5236-
A->render(Args, CmdArgs);
5251+
OArg->render(Args, CmdArgs);
52375252
}
52385253
}
52395254

@@ -6379,24 +6394,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
63796394
// Host-side SYCL compilation receives the integration header file as
63806395
// Inputs[1]. Include the header with -include
63816396
if (!IsSYCLOffloadDevice && SYCLDeviceInput) {
6382-
SmallString<128> RealPath;
6383-
#if defined(_WIN32)
6384-
// Fixup the header path name in case there are discrepancies in the
6385-
// string used for the temporary directory environment variable and
6386-
// actual path expectations.
6387-
//
6388-
// While generating the driver commands, we're most often working
6389-
// with non-existing files. The Unix implementation of LLVM's real_path
6390-
// returns an empty path for a non-existing file if it's expected to be
6391-
// placed in the current directory. This becomes a problem when we're
6392-
// saving intermediate compilation results via -save-temps.
6393-
// Since the header file path fix-up is Windows-specific, the real_path
6394-
// call is not necessary for a Unix-based OS (case-sensitive filesystem).
6395-
llvm::sys::fs::real_path(SYCLDeviceInput->getFilename(), RealPath);
6396-
#else // _WIN32
6397-
RealPath.assign(StringRef(SYCLDeviceInput->getFilename()));
6398-
#endif // _WIN32
6399-
const char *IntHeaderPath = Args.MakeArgString(RealPath);
6397+
const char *IntHeaderPath =
6398+
Args.MakeArgString(SYCLDeviceInput->getFilename());
64006399
CmdArgs.push_back("-include");
64016400
CmdArgs.push_back(IntHeaderPath);
64026401
// When creating dependency information, filter out the generated

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -511,19 +511,6 @@ static void addImpliedArgs(const llvm::Triple &Triple,
511511
BeArgs.push_back("-g");
512512
if (Args.getLastArg(options::OPT_O0))
513513
BeArgs.push_back("-cl-opt-disable");
514-
// Check if floating pointing optimizations are allowed.
515-
bool isFastMath = isOptimizationLevelFast(Args);
516-
Arg *A = Args.getLastArg(options::OPT_ffast_math, options::OPT_fno_fast_math,
517-
options::OPT_funsafe_math_optimizations,
518-
options::OPT_fno_unsafe_math_optimizations);
519-
isFastMath =
520-
isFastMath || (A && (A->getOption().getID() == options::OPT_ffast_math ||
521-
A->getOption().getID() ==
522-
options::OPT_funsafe_math_optimizations));
523-
A = Args.getLastArg(options::OPT_ffp_model_EQ);
524-
isFastMath = isFastMath || (A && StringRef(A->getValue()).equals("fast"));
525-
if (isFastMath)
526-
BeArgs.push_back("-cl-fast-relaxed-math");
527514
if (BeArgs.empty())
528515
return;
529516
if (Triple.getSubArch() == llvm::Triple::NoSubArch ||

0 commit comments

Comments
 (0)