-
Notifications
You must be signed in to change notification settings - Fork 168
[CIR] Add GEP flags to ptr stride op #1863
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
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This also needs CIRGen changes and lowering to LLVM support, but looks like a good start
It might make sense for |
is there any historical reason why we didn't consolidate the two? |
Nope, I introduced |
I like |
I added lowering and codegen, I added OGCG test initially but was reluctant if i should push it. I also didn't remove the missing feature check, i'm not sure how feature ready this is compared to OG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be first ported to incubator then mirrored here.
I dont quite follow, this repo is the incubator yes? |
- Add CIR_I32BitEnum similar to CIR_I32Enum. - Add usage example where we use enums - Use look up table instead of static cast when converting from CIR to LLVM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update the CIR-to-LLVM GEP flag function. Also some formatting nits.
Yeah sorry, I was jumping in between PRs and missed that this was already in clangir. |
i got an unrelated code formatting error, should I wait for the formatting PR to come in separately or do you guys want me to include the correct formatting as well? |
How sure it's unrelated? Is it showing up in other PRs? I see at least clang/test/CIR/CodeGen/pointers.cpp in the list, haven't checked the others. If you can reproduce locally and there's a small workaround you could include that'd be welcome |
Gotcha, maybe we made a mistake and landed non-formatted things, just landed a fix for it. Can you rebase the PR just to make sure it goes smooth? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll merge as soon as it passes all tests
From the comment on PR review #1844, it seems like we're missing the flags for GEP.
I'm opening the PR to add the flags.
The first commit is just a prototype to gather opinions and reviews to see if I'm heading to the right direction with this.