[llvm] [TableGen] Add support for DefaultMode in per-HwMode encode/decode. (PR #83029)

Jason Eckhardt via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 16:09:47 PST 2024


nvjle wrote:

> That's great context, thanks -- and I don't want to cause you any grief. :)
> 
> But I also know of a private backend that _tried_ to use this feature, but ran into real trouble due to the inability to set constant values in the usual way. Hearing that you're using this feature extensively makes me think that maybe you have figured out good ways to workaround (or fix?) this issue?

Without more context, I can't claim to have a solution to the (potential?) issue.  I've worked around problems, but those were mainly just implementation shortcomings (like the one this patch addresses). The feature may or may not make sense for _every_ use case related to encoding. It makes huge sense  in our context-- and I/we are not the only stakeholders.

Perhaps creating a stand-alone, unit-test-sized .td file (not unlike HwEncodeDecode*.td) exhibiting what you wish to do would help give context. But I don't think that has much to do with this patch, which just fixes a minor problem in the existing feature (which has been around since 2019). Here, all I wish to do is allow DefaultMode as one of the allowable modes-- just as can be done with RegInfoByHwMode. This was just a minor oversight in the original implementation. 

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


More information about the llvm-commits mailing list