diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-10 19:27:02 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-10 19:27:02 +0900 |
commit | c4a2ca9b936391fb930ecbb3d5c5d34e371e45fb (patch) | |
tree | f7bbf2b44d3dc178bcbaefdc56254e2220237737 /clang/lib/CodeGen/CGStmt.cpp | |
parent | 5633a2072696b20c554ff5568c5a1d25aa7e8db3 (diff) | |
parent | 0350c1eba1c1a6b73a8d9c271a7f3c8b33202579 (diff) | |
download | llvm-users/chapuni/cov/merge/forfile-base.zip llvm-users/chapuni/cov/merge/forfile-base.tar.gz llvm-users/chapuni/cov/merge/forfile-base.tar.bz2 |
Merge branch 'users/chapuni/cov/merge/region_segment' into users/chapuni/cov/merge/forfile-baseusers/chapuni/cov/merge/forfile-base
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 85be2b4..e9a8500 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -76,6 +76,7 @@ void CodeGenFunction::EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs) { // Verify that any decl statements were handled as simple, they may be in // scope of subsequent reachable statements. assert(!isa<DeclStmt>(*S) && "Unexpected DeclStmt!"); + PGO.markStmtMaybeUsed(S); return; } @@ -482,6 +483,9 @@ void CodeGenFunction::EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs) { case Stmt::OpenACCSetConstructClass: EmitOpenACCSetConstruct(cast<OpenACCSetConstruct>(*S)); break; + case Stmt::OpenACCUpdateConstructClass: + EmitOpenACCUpdateConstruct(cast<OpenACCUpdateConstruct>(*S)); + break; } } @@ -754,8 +758,6 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { bool noinline = false; bool alwaysinline = false; bool noconvergent = false; - HLSLControlFlowHintAttr::Spelling flattenOrBranch = - HLSLControlFlowHintAttr::SpellingNotCalculated; const CallExpr *musttail = nullptr; for (const auto *A : S.getAttrs()) { @@ -787,9 +789,6 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { Builder.CreateAssumption(AssumptionVal); } } break; - case attr::HLSLControlFlowHint: { - flattenOrBranch = cast<HLSLControlFlowHintAttr>(A)->getSemanticSpelling(); - } break; } } SaveAndRestore save_nomerge(InNoMergeAttributedStmt, nomerge); @@ -797,7 +796,6 @@ void CodeGenFunction::EmitAttributedStmt(const AttributedStmt &S) { SaveAndRestore save_alwaysinline(InAlwaysInlineAttributedStmt, alwaysinline); SaveAndRestore save_noconvergent(InNoConvergentAttributedStmt, noconvergent); SaveAndRestore save_musttail(MustTailCall, musttail); - SaveAndRestore save_flattenOrBranch(HLSLControlFlowAttr, flattenOrBranch); EmitStmt(S.getSubStmt(), S.getAttrs()); } @@ -878,6 +876,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { RunCleanupsScope ExecutedScope(*this); EmitStmt(Executed); } + PGO.markStmtMaybeUsed(Skipped); return; } } @@ -2200,6 +2199,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { for (unsigned i = 0, e = CaseStmts.size(); i != e; ++i) EmitStmt(CaseStmts[i]); incrementProfileCounter(&S); + PGO.markStmtMaybeUsed(S.getBody()); // Now we want to restore the saved switch instance so that nested // switches continue to function properly |