[llvm-dev] [X86] Memory folding tables in x86 backend

Simon Pilgrim via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 23 07:09:36 PDT 2017


> On 23 Jul 2017, at 12:19, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> On Sun, Jul 23, 2017 at 08:48:00AM +0000, Musa, Ayman via llvm-dev wrote:
>> 3-     Give up on the auto-generation idea and manually update the current tables iteratively with new chunks of instructions until full state is achieved.
>> 
>> P.s. The TableGen backend emits more than 5200 entries, while the known exception at this point are ~20.
> 
> Why can't you do a variation of this by tagging the instructions with a
> flag? I.e. for the rm variant, add a flag that says "this has an
> equivalent register operand version". Given that a lot of the instruction
> patterns are created via multi-classes, I would expect that to require a
> lot less than 5200 updates.

+1 An opt-in ‘GenerateMemoryFolding’ style flag (defaulting to false) seems safer to me than than trying to ensure you’ve correctly flagged all illegal instruction fold.

You could then enable the flag on individual groups of instructions/multi-classes, testing and removing them from the manual tables in a relatively controlled fashion.

Similarly, new instructions can be enabled in a safe, staged approach without needing a ‘regenerate a full exceptions list’ stage.

Thanks for persevering with this Ayman!

Simon.


More information about the llvm-dev mailing list