[llvm] [TableGen] Rework `EmitIntrinsicToBuiltinMap` (PR #104681)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 11:10:17 PDT 2024


Artem-B wrote:

> > > ```c++
> > > static constexpr char BuiltinNames[] = {
> > >   'd', 'm', 'b', '\000', 'd', 's', 'b', '\000', 'i', 's', 'b', '\000', 'M', 'o', 'v',
> > > ```
> > 
> > 
> > Just curious. Would it make sense to generate string literals instead. Makes it more useful for grepping for the string values.
> > > ```c++
> > > static constexpr char BuiltinNames[] = 
> > >   "dmb\000" 
> > >   "dsb\000"
> > > ```
> 
> I did look at it. There are 2 classes in TableGen that support string emission: `StringToOffsetTable` and `SequenceToOffsetTable`. The latter supports emitting strings like what you mentioned. I can adopt that as a follow on change if that's ok.

SGTM.

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


More information about the llvm-commits mailing list