-
Notifications
You must be signed in to change notification settings - Fork 162
[CIR][cir-translate] Support specifying target for cir-translate
#1186
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][cir-translate] Support specifying target for cir-translate
#1186
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.
Overall looks great, couple of questions
clang/test/CIR/Tools/cir-translate-target-option/value-invalid.cir
Outdated
Show resolved
Hide resolved
Suggestions applied. The test files are not merged using |
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.
I just noticed way more tests (maybe you added more? I might have missed), that said, probably best to land them all under test/CIR/Tools/cir-translate/<name-of-test>
. Will merge once this is changed!
no need for the |
Gentle ping |
Just curious: why is the triple necessary for generating LLVM IR with |
@keryell Actually both are expected to have triple and data layout. |
Sorry for the delay @seven-mile, taking random vacation days in December! Thanks for working on this |
maybe we should create an issue to track it? |
…1186) This PR adds a new command line option `--target` to our tool `cir-translate`. The concrete behaviour of it also depends on the triple and data layout in the CIR module. See the table in code comments for details. The default triple is `x86_64-unknown-linux-gnu` currently. Some tests are updated with triple and DLTI attribute eliminated (replaced by an option in RUN line). But still some tests remain unchanged, primarily because they use `cir-opt` instead.
This PR adds a new command line option
--target
to our toolcir-translate
. The concrete behaviour of it also depends on the triple and data layout in the CIR module. See the table in code comments for details.The default triple is
x86_64-unknown-linux-gnu
currently.Some tests are updated with triple and DLTI attribute eliminated (replaced by an option in RUN line). But still some tests remain unchanged, primarily because they use
cir-opt
instead.