-
Notifications
You must be signed in to change notification settings - Fork 167
[CIR][CodeGen] adds array size into AllocaOp #340
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
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.
@gitoleg thanks for tackling VLAs!
Could you add a few tests in clang/test/CIR/
?
- In
IR/alloca.cir
, ensure the newAllocaOp
is properly parsed/printed. - In
IR/invalid.cir
, ensure that invalid renditions of theAllocaOp
will throw an error (e.g. array size as a float). - In
Lowering/alloca.cir
, ensure the lowering to LLVM IR of theAllocaOp
is as expected.
@sitio-couto done! |
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.
@gitoleg just a few minor improvements to the tests.
Other than that, LGTM!
Thanks for adding VLA support, yay!
Perfect! |
@bcardosolopes @sitio-couto fixed |
so... I made tests mote concise and fixed the description of the new argument. Did I understand right your suggestions? |
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
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in llvm#367 llvm#346 llvm#340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in llvm#367 llvm#346 llvm#340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in llvm#367 llvm#346 llvm#340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in llvm#367 llvm#346 llvm#340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in llvm#367 llvm#346 llvm#340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds dynamic stack allocation into `AllocaOp` that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance) No changes in tests needed, I tried to make the changes as smooth as possible, so no existing `AllocaOp` usages need to be changed.
This is a first PR for variable length array support. There are one (or more :) ) ahead. Basically, we already did lot's of preliminary job in order to land VLA in CIR in #367 #346 #340. So now we add initial VLA support itself. Most of the changes are taken from the original codegen, so there is nothing to be scary of) I added just one test, and basically that's all we can test right now. Later, I will add more, from the original codegen tests.
This PR adds array size into
AllocaOp
that will be useful in future - currently I work on variable length array support. So I start to make tiny PRs in advance)No changes in tests needed, I tried to make the changes as smooth as possible, so no existing
AllocaOp
usages need to be changed.