Skip to content
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

Update TargetRewrite after upstreaming #1210

Merged
merged 3 commits into from Nov 16, 2021
Merged

Update TargetRewrite after upstreaming #1210

merged 3 commits into from Nov 16, 2021

Conversation

rovka
Copy link
Collaborator

@rovka rovka commented Nov 9, 2021

Port back some of the changes made to the code while upstreaming TargetRewrite. Note that the upstreaming of TargetRewrite is not yet complete (I'm working on one more patch for AddrOf).

Copy link
Collaborator

@clementval clementval left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @rovka

Copy link
Collaborator

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

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

Looks great and builds OK for me, thanks.

@rovka
Copy link
Collaborator Author

rovka commented Nov 9, 2021

I don't have permissions to merge this, could someone else please push the button? :)
Thanks!

flang/lib/Optimizer/CodeGen/Target.cpp Outdated Show resolved Hide resolved
auto mod = getModule();
if (!forcedTargetTriple.empty()) {
setTargetTriple(mod, forcedTargetTriple);
}

Choose a reason for hiding this comment

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

nit: braces are not needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They're not in LLVM, but I think they are in flang:

Always wrap the bodies of `if()`, `else`, `while()`, `for()`, `do`, &c.

Copy link
Collaborator

Choose a reason for hiding this comment

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

files in the Optimizer directory are actually following the MLIR guidelines (see note in header in this file).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Riiight, I completely forgot about that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No worries. Hard to keep track of the different flavor sometimes :-)

flang/lib/Optimizer/CodeGen/TargetRewrite.cpp Show resolved Hide resolved
Copy link

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

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

LGTM.

rovka added a commit to llvm/llvm-project that referenced this pull request Nov 15, 2021
Clarify some comments as discussed here:
flang-compiler#1210
@clementval clementval merged commit a2233bf into flang-compiler:fir-dev Nov 16, 2021
@rovka rovka deleted the firdev/targetrwr branch May 4, 2022 08:29
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants