[llvm-dev] TableGen enhancements
Paul C. Anagnostopoulos via llvm-dev
llvm-dev at lists.llvm.org
Sun Aug 30 09:04:39 PDT 2020
Ah, yes, it appears that the locations are saved only with records, not with any components of them. For better error messages, locations probably need to be saved with Inits. This should be interesting.
At 8/29/2020 09:23 PM, Chris Lattner wrote:
>My sense (which is mostly historic, I havenât worked on the code generators for a long time sadly) is that tblgen is reasonable with syntactic and other errors. However, it doesnât maintain the location info in the AST, so if a tblgen backend wants to report something that is wrong, it points back up to the top level records more often than not.
>For example, consider if someone writes an invalid pattern like:
> (ADDrr32 EAX, AL)
>The AL def is for an 8 bit register, but the instruction requires a 32-bit register. The error message should point to the âALâ token on that line when it complains about it.
>This is very dated memory, it is possible someone already fixed this up.
More information about the llvm-dev