[llvm] [AMDGPU] Fix operand definitions for atomic scalar memory instructions. (PR #71799)
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 06:08:47 PST 2023
================
@@ -909,6 +909,10 @@ class AMDGPUOperand : public MCParsedAsmOperand {
bool isWaitVDST() const;
bool isWaitEXP() const;
+ auto getPredicate(std::function<bool(const AMDGPUOperand &Op)> P) const {
----------------
kosarev wrote:
I don't know. I see it more an implementation detail and would just do what seems most natural given the current state of things. My immediate impression is that `getPredicate()` basically works around AsmMatcherEmitter expecting the predicate be an operand method, which doesn't seem to work well for non-trivial cases.
Speaking more generally, I would try to design it in such a way that wouldn't require specifying any predicate names explicitly at all, whether it's with or without the object expression.
https://github.com/llvm/llvm-project/pull/71799
More information about the llvm-commits
mailing list