[llvm] [AMDGPU][MC] Allow UC_VERSION_* constant reuse (PR #96461)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 17:32:16 PDT 2024


perlfu wrote:

@kosarev - I am getting mixed messages here about what the desired solution is.

> If this is going to be updated, maybe we don't really want the assert at all, because generally **there's no guarantee the user won't redefine the symbol and it wouldn't be nice to crash when they do**.

If we are not going to crash then, I believe we should give redefinition some defined/stable behaviour.

> This sounds like we want them be redefinable for some reason *whereas it's actually quite the opposite*.

In which case this needs to use a different mechanism.

---

I cannot reasonably put any more time in on this, so here is my final offer:
- Revert the change back to the initial version, where assertion occurs if UC_VERSION symbols do not have expected value, but incorporating reviewer feedback.
- Remove custom-uc-version.s.
- Remove unit test for custom symbol redefinition, but leave multiple disassembler in same context unit test covering initial fixed bug.


https://github.com/llvm/llvm-project/pull/96461


More information about the llvm-commits mailing list