-
Notifications
You must be signed in to change notification settings - Fork 15k
[NFC][OpenACC] Remove 'initExpr' from AST/etc. #161674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -840,14 +840,13 @@ class OpenACCClauseWithVarList : public OpenACCClauseWithExprs { | |||||
| // alloca at the level of the base, and the init at the element level. | ||||||
| struct OpenACCPrivateRecipe { | ||||||
| VarDecl *AllocaDecl; | ||||||
| Expr *InitExpr; | ||||||
|
|
||||||
| OpenACCPrivateRecipe(VarDecl *A, Expr *I) : AllocaDecl(A), InitExpr(I) {} | ||||||
| OpenACCPrivateRecipe(VarDecl *A) : AllocaDecl(A) {} | ||||||
|
|
||||||
| bool isSet() const { return AllocaDecl; } | ||||||
|
|
||||||
| static OpenACCPrivateRecipe Empty() { | ||||||
| return OpenACCPrivateRecipe(nullptr, nullptr); | ||||||
| return OpenACCPrivateRecipe(nullptr); | ||||||
| } | ||||||
| }; | ||||||
|
|
||||||
|
|
@@ -899,18 +898,16 @@ class OpenACCPrivateClause final | |||||
| // InitFromTemporary is the 'temp' declaration we put in to be 'copied from'. | ||||||
| struct OpenACCFirstPrivateRecipe { | ||||||
| VarDecl *AllocaDecl; | ||||||
| Expr *InitExpr; | ||||||
| VarDecl *InitFromTemporary; | ||||||
| OpenACCFirstPrivateRecipe(VarDecl *A, Expr *I, VarDecl *T) | ||||||
| : AllocaDecl(A), InitExpr(I), InitFromTemporary(T) { | ||||||
| assert(!AllocaDecl || AllocaDecl->getInit() == nullptr); | ||||||
| OpenACCFirstPrivateRecipe(VarDecl *A, VarDecl *T) | ||||||
| : AllocaDecl(A), InitFromTemporary(T) { | ||||||
| assert(!InitFromTemporary || InitFromTemporary->getInit() == nullptr); | ||||||
| } | ||||||
|
|
||||||
| bool isSet() const { return AllocaDecl; } | ||||||
|
|
||||||
| static OpenACCFirstPrivateRecipe Empty() { | ||||||
| return OpenACCFirstPrivateRecipe(nullptr, nullptr, nullptr); | ||||||
| return OpenACCFirstPrivateRecipe(nullptr, nullptr); | ||||||
|
||||||
| return OpenACCFirstPrivateRecipe(nullptr, nullptr); | |
| return OpenACCFirstPrivateRecipe(/*AllocaDecl=*/nullptr, /*InitFromTemporary=*/nullptr); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12860,10 +12860,9 @@ OpenACCClause *ASTRecordReader::readOpenACCClause() { | |
|
|
||
| llvm::SmallVector<OpenACCPrivateRecipe> RecipeList; | ||
| for (unsigned I = 0; I < VarList.size(); ++I) { | ||
| static_assert(sizeof(OpenACCPrivateRecipe) == 2 * sizeof(int *)); | ||
| static_assert(sizeof(OpenACCPrivateRecipe) == 1 * sizeof(int *)); | ||
| VarDecl *Alloca = readDeclAs<VarDecl>(); | ||
| Expr *InitExpr = readSubExpr(); | ||
| RecipeList.push_back({Alloca, InitExpr}); | ||
| RecipeList.push_back({Alloca}); | ||
| } | ||
|
|
||
| return OpenACCPrivateClause::Create(getContext(), BeginLoc, LParenLoc, | ||
|
|
@@ -12886,11 +12885,10 @@ OpenACCClause *ASTRecordReader::readOpenACCClause() { | |
| llvm::SmallVector<Expr *> VarList = readOpenACCVarList(); | ||
| llvm::SmallVector<OpenACCFirstPrivateRecipe> RecipeList; | ||
| for (unsigned I = 0; I < VarList.size(); ++I) { | ||
| static_assert(sizeof(OpenACCFirstPrivateRecipe) == 3 * sizeof(int *)); | ||
| static_assert(sizeof(OpenACCFirstPrivateRecipe) == 2 * sizeof(int *)); | ||
| VarDecl *Recipe = readDeclAs<VarDecl>(); | ||
| Expr *InitExpr = readSubExpr(); | ||
| VarDecl *RecipeTemp = readDeclAs<VarDecl>(); | ||
| RecipeList.push_back({Recipe, InitExpr, RecipeTemp}); | ||
| RecipeList.push_back({Recipe, RecipeTemp}); | ||
| } | ||
|
|
||
| return OpenACCFirstPrivateClause::Create(getContext(), BeginLoc, LParenLoc, | ||
|
|
@@ -13011,10 +13009,9 @@ OpenACCClause *ASTRecordReader::readOpenACCClause() { | |
| llvm::SmallVector<OpenACCReductionRecipe> RecipeList; | ||
|
|
||
| for (unsigned I = 0; I < VarList.size(); ++I) { | ||
| static_assert(sizeof(OpenACCReductionRecipe) == 2 * sizeof(int *)); | ||
| static_assert(sizeof(OpenACCReductionRecipe) == sizeof(int *)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having that assert here is a bit weird There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It IS a touch. But the idea is that this type ( |
||
| VarDecl *Recipe = readDeclAs<VarDecl>(); | ||
| Expr *InitExpr = readSubExpr(); | ||
| RecipeList.push_back({Recipe, InitExpr}); | ||
| RecipeList.push_back({Recipe}); | ||
| } | ||
|
|
||
| return OpenACCReductionClause::Create(getContext(), BeginLoc, LParenLoc, Op, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.