aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2025-01-10 19:25:56 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2025-01-10 19:25:56 +0900
commit63f5dc16d6bfca0512fb034052b41d13c3751e20 (patch)
treee70266be1fda941e0974e71e3d2c1cf080081311 /clang/lib/CodeGen/CGStmt.cpp
parent9e5734688ed3d5f6b3fb76a26b3d90a736d60781 (diff)
parent397ac44f623f891d8f05d6673a95984ac0a26671 (diff)
downloadllvm-users/chapuni/cov/single/unify.zip
llvm-users/chapuni/cov/single/unify.tar.gz
llvm-users/chapuni/cov/single/unify.tar.bz2
Merge branch 'main' into users/chapuni/cov/single/unifyusers/chapuni/cov/single/unify
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp12
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