Skip to content

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
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