Skip to content

Commit cdfa7a3

Browse files
committed
fix conflict
Signed-off-by: Zahira Ammarguellat <[email protected]>
1 parent 350744a commit cdfa7a3

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,13 @@ void CodeGenFunction::EmitOpenCLKernelMetadata(const FunctionDecl *FD,
739739
Fn->setMetadata("stall_enable", llvm::MDNode::get(Context, AttrMDArgs));
740740
}
741741

742-
if (const auto *A = FD->getAttr<SYCLIntelFPGAMaxConcurrencyAttr>()) {
743-
const auto *CE = cast<ConstantExpr>(A->getNThreadsExpr());
742+
if (const auto* A = FD->getAttr<SYCLIntelFPGAMaxConcurrencyAttr>()) {
743+
const auto* CE = cast<ConstantExpr>(A->getNThreadsExpr());
744744
llvm::APSInt ArgVal = CE->getResultAsAPSInt();
745-
llvm::Metadata *AttrMDArgs[] = {
745+
llvm::Metadata* AttrMDArgs[] = {
746746
llvm::ConstantAsMetadata::get(Builder.getInt32(ArgVal.getSExtValue()))};
747747
Fn->setMetadata("max_concurrency", llvm::MDNode::get(Context, AttrMDArgs));
748+
}
748749

749750
if (FD->hasAttr<SYCLIntelFPGADisableLoopPipeliningAttr>()) {
750751
llvm::Metadata *AttrMDArgs[] = {

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,13 @@ class MarkDeviceFunction : public RecursiveASTVisitor<MarkDeviceFunction> {
565565
}
566566
}
567567

568-
<<<<<<< HEAD
569568
// Attribute "max_concurrency" is applied to device functions only. The
570569
// attribute is not propagated to the caller.
571570
if (auto *A = FD->getAttr<SYCLIntelFPGAMaxConcurrencyAttr>())
572571
if (ParentFD == SYCLKernel) {
573572
Attrs.push_back(A);
574573
}
575-
=======
574+
576575
// Attribute "disable_loop_pipelining" can be applied explicitly on
577576
// kernel function. Attribute should not be propagated from device
578577
// functions to kernel.
@@ -590,7 +589,6 @@ class MarkDeviceFunction : public RecursiveASTVisitor<MarkDeviceFunction> {
590589
Attrs.push_back(A);
591590
}
592591
}
593-
>>>>>>> remote/sycl
594592

595593
// TODO: vec_len_hint should be handled here
596594

@@ -3544,12 +3542,9 @@ void Sema::MarkDevice(void) {
35443542
case attr::Kind::SYCLIntelNoGlobalWorkOffset:
35453543
case attr::Kind::SYCLIntelUseStallEnableClusters:
35463544
case attr::Kind::SYCLIntelLoopFuse:
3547-
<<<<<<< HEAD
35483545
case attr::Kind::SYCLIntelFPGAMaxConcurrency:
3549-
=======
35503546
case attr::Kind::SYCLIntelFPGADisableLoopPipelining:
35513547
case attr::Kind::SYCLIntelFPGAInitiationInterval:
3552-
>>>>>>> remote/sycl
35533548
case attr::Kind::SYCLSimd: {
35543549
if ((A->getKind() == attr::Kind::SYCLSimd) && KernelBody &&
35553550
!KernelBody->getAttr<SYCLSimdAttr>()) {

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,11 @@ void Sema::InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs,
959959
*this, TemplateArgs, SYCLIntelMaxWorkGroupSize, New);
960960
continue;
961961
}
962-
if (const auto *SYCLIntelMaxConcurrency =
962+
if (const auto* SYCLIntelMaxConcurrency =
963963
dyn_cast<SYCLIntelFPGAMaxConcurrencyAttr>(TmplAttr)) {
964964
instantiateSYCLIntelFPGAMaxConcurrencyAttr(*this, TemplateArgs,
965965
SYCLIntelMaxConcurrency, New);
966+
}
966967
if (const auto *SYCLIntelFPGAInitiationInterval =
967968
dyn_cast<SYCLIntelFPGAInitiationIntervalAttr>(TmplAttr)) {
968969
instantiateSYCLIntelFPGAInitiationIntervalAttr(

0 commit comments

Comments
 (0)