Skip to content

[TableGen][InstrInfoEmitter] Count sub-operands on def operands #88972

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

darkbuck
Copy link
Contributor

@darkbuck darkbuck commented Apr 16, 2024

  • If a def operand includes multiple sub-operands, count them when
    generating instr info.
  • Found issues in x86 and sparc backends, where memory operands of
    store or store-like instructions are wrongly placed in the output
    list.

Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Comment on lines +1185 to +1189
int DefOperands = 0;
if (Inst.Operands.NumDefs) {
auto &Opnd = Inst.Operands[Inst.Operands.NumDefs - 1];
DefOperands = Opnd.MIOperandNo + Opnd.MINumOperands;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably should have some better helpers for dealing with these compound operands

Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
darkbuck added a commit that referenced this pull request Apr 17, 2024
- If a def operand includes multiple sub-operands, count them when
  generating instr info.
- Found issues in x86 and sparc backends, where memory operands of
  store or store-like instructions are wrongly placed in the output
  list.

Reviewers: jayfoad, arsenm, Pierre-vh

Reviewed By: arsenm

Pull Request: #88972
@darkbuck darkbuck closed this Apr 17, 2024
@darkbuck darkbuck deleted the users/darkbuck/spr/tablegeninstrinfoemitter-count-sub-operands-on-def-operands-1 branch April 17, 2024 01:04
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