[llvm] [TableGen] fix tlbgen for EncodingByHwMode (PR #84906)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 19:53:41 PDT 2024


superZWT123 wrote:

> > @nvjle @topperc Hello, could you please help me review my code.
> 
> @superZWT123 Please give me a day or two to review this code. From a very quick scan, it actually undoes some of the work I did recently (or at least does it differently)-- which may be fine-- but I need to examine carefully. I'm using this feature in a downstream production backend with a complicated ISA (generously speaking) and even more complicated encoding schemes (100+ decoder tables). It tends to exercise the encode/decode heavily.
> 
> Also, my previous patch to suppress duplicates had a command line option so that existing downstream backends could opt-in to that feature-- at least temporarily. That is, a downstream backend could rebase and their disassembler would not need any changes due to decoder table naming. Something like that would probably be good to keep initially.
> 
> All of that said, I am certainly glad to see others helping to production-harden this feature.

Thanks [nvjle](https://github.com/nvjle), 
I recently reviewed your four changes related to hwmode. Your two modifications to the DecoderTable (“fix IndexOfInstruction” and “fix EncodingId and Opcode mismatch”) were similar to changes I had implemented locally. However, after comparison, I realized your changes are significantly superior to mine, particularly in terms of time complexity optimization. For the table duplication fix, I believe my modification might be more advantageous. My changes could drastically reduce table duplication and minimize the complexity of adapting the backend to accommodate EncodingByHwMode changes.

If you could help with validating my patch on your backend, that would be fantastic. Finally, I am truly thankful for the time you spent reviewing my code!

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


More information about the llvm-commits mailing list