[llvm] [X86][NFC] Reorgnize the X86Instr*.td (PR #74454)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 04:44:56 PST 2023


KanRobert wrote:

> What is the motivation for this ?

Several motivations:

1.  X86InstrFragmentsSIMD.td was created as its name indicates, so moving all pattern fragments for SIMD instructions into it sounds reasonable to me. Similar for X86InstrFragments.td.
2. To improve readability. X86InstrInfo.td/X86InstrFormats.td contained different kinds of definitions for different purposes.
So I split them by purposes to help us better understand what we have done
3. To combine duplicated definitions in the following patches. When similar definitions are grouped together, it is easier for us to discover which definitions can be refined. In fact, there are too many superclasses  for `X86Inst` now, especially in X86InstrArithmetic.td, X86InstrSSE.td and X86InstrAVX512.td.  However, some classes are not well abstracted, making it very ugly to extend their support for APX features EGPR, NDD, and NF. I'd like to refine the classes along with the following APX support.

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


More information about the llvm-commits mailing list