-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[CodeGen][MIR] Support parsing of scalable vectors in MIR #70893
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
This patch builds on the support for vectors by adding ability to parse scalable vectors in MIR.
d5e11a6
to
538e6a1
Compare
lex(); | ||
} | ||
|
||
auto GetError = [this, &HasVScale, Loc]() { |
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.
If you capture Loc
by value here, I don't think it update when lex()
is called. So the location will be stale.
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.
Oh nevermind. Loc is passed as an argument and not coming from lex().
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 with nit
if (HasVScale) | ||
return error( | ||
Loc, "expected <vscale x M x sN> or <vscale M x pA> for vector type"); | ||
else |
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.
No return after else
#70881) …gSizeInBits This patch changes getRegSizeInBits to return a TypeSize instead of an unsigned in the case that a virtual register has a scalable LLT. In the case that register is physical, a Fixed TypeSize is returned. The MachineVerifier pass is updated to allow copies between fixed and scalable operands as long as the Src size will fit into the Dest size. This is a precommit which will be stacked on by a change to GISel to generate COPYs with a scalable destination but a fixed size source. This patch is stacked on #70893 for the ability to use scalable vector types in MIR tests.
…… (#70881) …gSizeInBits This patch changes getRegSizeInBits to return a TypeSize instead of an unsigned in the case that a virtual register has a scalable LLT. In the case that register is physical, a Fixed TypeSize is returned. The MachineVerifier pass is updated to allow copies between fixed and scalable operands as long as the Src size will fit into the Dest size. This is a precommit which will be stacked on by a change to GISel to generate COPYs with a scalable destination but a fixed size source. This patch is stacked on llvm/llvm-project#70893 for the ability to use scalable vector types in MIR tests.
This patch builds on the support for vectors by adding ability to parse scalable vectors in MIR.