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

[CIR][CodeGen] Adds constraints to inline assembly #351

Merged
merged 10 commits into from
Jan 16, 2024

Conversation

gitoleg
Copy link
Collaborator

@gitoleg gitoleg commented Dec 11, 2023

The next step for inline assembly. Sorry, maybe it looks too big on the first glance. And it's kind of hard to extract something well-grained from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next will (I hope :) ) simplify your review process.

  1. In this PR we introduce operand's constraints and the task is to collect them (and maybe transform a little)
  2. There are two big functions copy-pasted from the traditional Codegen and I doubt they need to be reviewed.
  3. We still don't do anything CIR-specific. Basically, we just work with strings in the same way like traditional Codegen does.
  4. We just iterate over the input and output operands and collect the constraints
  5. We still follow to the traditional CodeGen and don't do anything new, except a separate function that collects constraints infos in the very beginning of the buildStmt.

Also, I renamed AsmDialect to AsmFlavor as you asked in #326

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

This is great, no need to break it down further!

clang/lib/CIR/CodeGen/CIRAsm.cpp Outdated Show resolved Hide resolved
clang/test/CIR/CodeGen/asm.c Show resolved Hide resolved
@lanza lanza force-pushed the main branch 2 times, most recently from 05ffb2a to 34fceae Compare December 20, 2023 07:10
Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

Just reflecting the state of current review to keep track.

Copy link

github-actions bot commented Jan 12, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM

@bcardosolopes bcardosolopes merged commit e84e9a9 into llvm:main Jan 16, 2024
6 checks passed
lanza pushed a commit that referenced this pull request Jan 29, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.


Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
lanza pushed a commit that referenced this pull request Mar 23, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.


Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
eZWALT pushed a commit to eZWALT/clangir that referenced this pull request Mar 24, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.


Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
eZWALT pushed a commit to eZWALT/clangir that referenced this pull request Mar 24, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.


Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
lanza pushed a commit that referenced this pull request Apr 29, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
lanza pushed a commit that referenced this pull request Apr 29, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
eZWALT pushed a commit to eZWALT/clangir that referenced this pull request Apr 29, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.


Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
lanza pushed a commit that referenced this pull request Apr 29, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
bruteforceboy pushed a commit to bruteforceboy/clangir that referenced this pull request Oct 2, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
Hugobros3 pushed a commit to shady-gang/clangir that referenced this pull request Oct 2, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
keryell pushed a commit to keryell/clangir that referenced this pull request Oct 19, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in llvm#326
lanza pushed a commit that referenced this pull request Nov 5, 2024
The next step for inline assembly. Sorry, maybe it looks too big on the
first glance. And it's kind of hard to extract something well-grained
from the code and introduce it as a separate PR, but I try.

Actually there is nothing really interesting done here, and the next
will (I hope :) ) simplify your review process.

1) In this PR we introduce operand's constraints and the task is to
collect them (and maybe transform a little)
2) There are two big functions copy-pasted from the traditional
`Codegen` and I doubt they need to be reviewed.
3) We still don't do anything CIR-specific. Basically, we just work with
strings in the same way like traditional `Codegen` does.
4) We just iterate over the input and output operands and collect the
constraints
5) We still follow to the traditional `CodeGen` and don't do anything
new, except a separate function that collects constraints infos in the
very beginning of the `buildStmt`.

Also, I renamed `AsmDialect` to `AsmFlavor` as you asked in #326
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.

2 participants