@@ -552,7 +552,7 @@ MDNode *LoopInfo::createMetadata(
552552 }
553553
554554 // Setting max_concurrency attribute with number of threads
555- if (Attrs.SYCLMaxConcurrencyNThreads . hasValue () ) {
555+ if (Attrs.SYCLMaxConcurrencyNThreads ) {
556556 Metadata *Vals[] = {
557557 MDString::get (Ctx, " llvm.loop.max_concurrency.count" ),
558558 ConstantAsMetadata::get (ConstantInt::get (
@@ -582,7 +582,7 @@ MDNode *LoopInfo::createMetadata(
582582 LoopProperties.push_back (MDNode::get (Ctx, Vals));
583583 }
584584
585- if (Attrs.SYCLMaxInterleavingNInvocations . hasValue () ) {
585+ if (Attrs.SYCLMaxInterleavingNInvocations ) {
586586 Metadata *Vals[] = {MDString::get (Ctx, " llvm.loop.max_interleaving.count" ),
587587 ConstantAsMetadata::get (ConstantInt::get (
588588 llvm::Type::getInt32Ty (Ctx),
@@ -596,7 +596,7 @@ MDNode *LoopInfo::createMetadata(
596596 LoopProperties.push_back (MDNode::get (Ctx, Vals));
597597 }
598598
599- if (Attrs.SYCLSpeculatedIterationsNIterations . hasValue () ) {
599+ if (Attrs.SYCLSpeculatedIterationsNIterations ) {
600600 Metadata *Vals[] = {
601601 MDString::get (Ctx, " llvm.loop.intel.speculated.iterations.count" ),
602602 ConstantAsMetadata::get (
@@ -673,12 +673,12 @@ LoopInfo::LoopInfo(BasicBlock *Header, const LoopAttributes &Attrs,
673673 Attrs.VectorizeScalable == LoopAttributes::Unspecified &&
674674 Attrs.InterleaveCount == 0 && !Attrs.GlobalSYCLIVDepInfo .hasValue () &&
675675 Attrs.ArraySYCLIVDepInfo .empty () && Attrs.SYCLIInterval == 0 &&
676- !Attrs.SYCLMaxConcurrencyNThreads . hasValue () &&
676+ !Attrs.SYCLMaxConcurrencyNThreads &&
677677 Attrs.SYCLLoopCoalesceEnable == false &&
678678 Attrs.SYCLLoopCoalesceNLevels == 0 &&
679679 Attrs.SYCLLoopPipeliningDisable == false &&
680- !Attrs.SYCLMaxInterleavingNInvocations . hasValue () &&
681- !Attrs.SYCLSpeculatedIterationsNIterations . hasValue () &&
680+ !Attrs.SYCLMaxInterleavingNInvocations &&
681+ !Attrs.SYCLSpeculatedIterationsNIterations &&
682682 Attrs.SYCLIntelFPGAVariantCount .empty () && Attrs.UnrollCount == 0 &&
683683 Attrs.UnrollAndJamCount == 0 && !Attrs.PipelineDisabled &&
684684 Attrs.PipelineInitiationInterval == 0 &&
@@ -1028,7 +1028,7 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx,
10281028 const auto *CE =
10291029 cast<ConstantExpr>(IntelFPGAMaxConcurrency->getNThreadsExpr ());
10301030 llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1031- addSYCLMaxConcurrencyNThreads (ArgVal.getSExtValue ());
1031+ setSYCLMaxConcurrencyNThreads (ArgVal.getSExtValue ());
10321032 }
10331033
10341034 if (const auto *IntelFPGALoopCountAvg =
@@ -1062,15 +1062,15 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx,
10621062 dyn_cast<SYCLIntelFPGAMaxInterleavingAttr>(A)) {
10631063 const auto *CE = cast<ConstantExpr>(IntelFPGAMaxInterleaving->getNExpr ());
10641064 llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1065- addSYCLMaxInterleavingNInvocations (ArgVal.getSExtValue ());
1065+ setSYCLMaxInterleavingNInvocations (ArgVal.getSExtValue ());
10661066 }
10671067
10681068 if (const auto *IntelFPGASpeculatedIterations =
10691069 dyn_cast<SYCLIntelFPGASpeculatedIterationsAttr>(A)) {
10701070 const auto *CE =
10711071 cast<ConstantExpr>(IntelFPGASpeculatedIterations->getNExpr ());
10721072 llvm::APSInt ArgVal = CE->getResultAsAPSInt ();
1073- addSYCLSpeculatedIterationsNIterations (ArgVal.getSExtValue ());
1073+ setSYCLSpeculatedIterationsNIterations (ArgVal.getSExtValue ());
10741074 }
10751075
10761076 if (isa<SYCLIntelFPGANofusionAttr>(A))
0 commit comments