Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

early feedback commit#149579

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
akuhlens wants to merge1 commit intollvm:main
base:main
Choose a base branch
Loading
fromakuhlens:andre/atomic-capture

Conversation

akuhlens
Copy link
Contributor

WIP Just posting for early feedback

"RHS of atomic update statement must be scalar"_err_en_US);
"RHS of atomic %s statement must be scalar"_err_en_US, construct);
}
// TODO: Check if lhs is intrinsic type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

rhs

Do they have to be the same type?

constauto &rhs{std::get<parser::Expr>(assign.t)};

// Is the rhs something a valid operations that references the updatedVar?
constauto expr{GetExpr(context_, rhs)};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

const auto * please, otherwise it makes me wonder whether you omitted a&.

llvm::errs() <<"IsAtomicUpdateStmt: no expr\n";
returnnullptr;
}
constauto [op, args] =evaluate::GetTopLevelOperation(*expr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should there be braces here?

}
constauto [op, args] =evaluate::GetTopLevelOperation(*expr);
switch (op) {
// 2909-2910 operator is one of +, *, -, /, .and., .or., .eqv., or .neqv..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

what aboutintegervar = integervar * 2.5? the top-level operator will be a conversion here. maybe check that the rhs type is the same as the lhs type.

if (!varExpr || !updatedVarExpr || !exprExpr) {
returnfalse;
}
return updatedVarExpr == exprExpr && !(updatedVarExpr == varExpr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

you probably want to compare pointees rather than pointers

akuhlens reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@klauslerklauslerklausler left review comments

@clementvalclementvalAwaiting requested review from clementval

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@akuhlens@klausler

[8]ページ先頭

©2009-2025 Movatter.jp