Skip to content

[SandboxIR] Implement ConstantFP #106648

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

Merged
merged 1 commit into from
Aug 30, 2024
Merged

[SandboxIR] Implement ConstantFP #106648

merged 1 commit into from
Aug 30, 2024

Conversation

vporpo
Copy link
Contributor

@vporpo vporpo commented Aug 30, 2024

This patch implements sandboxir::ConstantFP mirroring llvm::ConstantFP.

return From->getSubclassID() == ClassID::ConstantFP;
}

unsigned getUseOperandNo(const Use &Use) const final {
Copy link
Member

Choose a reason for hiding this comment

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

I am trying to match this with LLVM IR. Why not just call this "getOperandNo" with the Use as parameter?

Copy link
Contributor Author

@vporpo vporpo Aug 30, 2024

Choose a reason for hiding this comment

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

This is a SandboxIR-specific function, it is not wrapping any LLVM IR one. We should probably make this private at some point. But yeah getOperandNo(const Use &) is a much better name.

Copy link
Member

@tmsri tmsri left a comment

Choose a reason for hiding this comment

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

LGTM otherwise, having TODOs in all places where you expect a cleanup would be very useful.

This patch implements sandboxir::ConstantFP mirroring llvm::ConstantFP.
@vporpo vporpo merged commit 2c7e1b8 into llvm:main Aug 30, 2024
5 of 6 checks passed
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