@@ -552,7 +552,7 @@ MDNode *LoopInfo::createMetadata(
552
552
}
553
553
554
554
// Setting max_concurrency attribute with number of threads
555
- if (Attrs.SYCLMaxConcurrencyNThreads . hasValue () ) {
555
+ if (Attrs.SYCLMaxConcurrencyNThreads ) {
556
556
Metadata *Vals[] = {
557
557
MDString::get (Ctx, " llvm.loop.max_concurrency.count" ),
558
558
ConstantAsMetadata::get (ConstantInt::get (
@@ -582,7 +582,7 @@ MDNode *LoopInfo::createMetadata(
582
582
LoopProperties.push_back (MDNode::get (Ctx, Vals));
583
583
}
584
584
585
- if (Attrs.SYCLMaxInterleavingNInvocations . hasValue () ) {
585
+ if (Attrs.SYCLMaxInterleavingNInvocations ) {
586
586
Metadata *Vals[] = {MDString::get (Ctx, " llvm.loop.max_interleaving.count" ),
587
587
ConstantAsMetadata::get (ConstantInt::get (
588
588
llvm::Type::getInt32Ty (Ctx),
@@ -596,7 +596,7 @@ MDNode *LoopInfo::createMetadata(
596
596
LoopProperties.push_back (MDNode::get (Ctx, Vals));
597
597
}
598
598
599
- if (Attrs.SYCLSpeculatedIterationsNIterations . hasValue () ) {
599
+ if (Attrs.SYCLSpeculatedIterationsNIterations ) {
600
600
Metadata *Vals[] = {
601
601
MDString::get (Ctx, " llvm.loop.intel.speculated.iterations.count" ),
602
602
ConstantAsMetadata::get (
@@ -673,12 +673,12 @@ LoopInfo::LoopInfo(BasicBlock *Header, const LoopAttributes &Attrs,
673
673
Attrs.VectorizeScalable == LoopAttributes::Unspecified &&
674
674
Attrs.InterleaveCount == 0 && !Attrs.GlobalSYCLIVDepInfo .hasValue () &&
675
675
Attrs.ArraySYCLIVDepInfo .empty () && Attrs.SYCLIInterval == 0 &&
676
- !Attrs.SYCLMaxConcurrencyNThreads . hasValue () &&
676
+ !Attrs.SYCLMaxConcurrencyNThreads &&
677
677
Attrs.SYCLLoopCoalesceEnable == false &&
678
678
Attrs.SYCLLoopCoalesceNLevels == 0 &&
679
679
Attrs.SYCLLoopPipeliningDisable == false &&
680
- !Attrs.SYCLMaxInterleavingNInvocations . hasValue () &&
681
- !Attrs.SYCLSpeculatedIterationsNIterations . hasValue () &&
680
+ !Attrs.SYCLMaxInterleavingNInvocations &&
681
+ !Attrs.SYCLSpeculatedIterationsNIterations &&
682
682
Attrs.SYCLIntelFPGAVariantCount .empty () && Attrs.UnrollCount == 0 &&
683
683
Attrs.UnrollAndJamCount == 0 && !Attrs.PipelineDisabled &&
684
684
Attrs.PipelineInitiationInterval == 0 &&
@@ -1028,7 +1028,7 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx,
1028
1028
const auto *CE =
1029
1029
cast<ConstantExpr>(IntelFPGAMaxConcurrency->getNThreadsExpr ());
1030
1030
llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1031
- addSYCLMaxConcurrencyNThreads (ArgVal.getSExtValue ());
1031
+ setSYCLMaxConcurrencyNThreads (ArgVal.getSExtValue ());
1032
1032
}
1033
1033
1034
1034
if (const auto *IntelFPGALoopCountAvg =
@@ -1062,15 +1062,15 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx,
1062
1062
dyn_cast<SYCLIntelFPGAMaxInterleavingAttr>(A)) {
1063
1063
const auto *CE = cast<ConstantExpr>(IntelFPGAMaxInterleaving->getNExpr ());
1064
1064
llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1065
- addSYCLMaxInterleavingNInvocations (ArgVal.getSExtValue ());
1065
+ setSYCLMaxInterleavingNInvocations (ArgVal.getSExtValue ());
1066
1066
}
1067
1067
1068
1068
if (const auto *IntelFPGASpeculatedIterations =
1069
1069
dyn_cast<SYCLIntelFPGASpeculatedIterationsAttr>(A)) {
1070
1070
const auto *CE =
1071
1071
cast<ConstantExpr>(IntelFPGASpeculatedIterations->getNExpr ());
1072
1072
llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1073
- addSYCLSpeculatedIterationsNIterations (ArgVal.getSExtValue ());
1073
+ setSYCLSpeculatedIterationsNIterations (ArgVal.getSExtValue ());
1074
1074
}
1075
1075
1076
1076
if (isa<SYCLIntelFPGANofusionAttr>(A))
0 commit comments