This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer] Use InstructionsState to record AltOpcode
ClosedPublic

Authored by RKSimon on Jun 20 2018, 4:18 AM.

Details

Summary

This is part of a move towards generalizing the alternate opcode mechanism and not just supporting (F)Add/(F)Sub counterparts.

The patch embeds the AltOpcode in the InstructionsState instead of calling getAltOpcode so often.

I'm hoping to eventually remove all uses of getAltOpcode and handle alternate opcode selection entirely within getSameOpcode, that will require us to use InstructionsState throughout the BoUpSLP call hierarchy (similar to some of the changes in D28907), which I will begin in future patches.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Jun 20 2018, 4:18 AM

looks good for me.

ABataev accepted this revision.Jun 20 2018, 6:49 AM

LG except with a nit.

lib/Transforms/Vectorize/SLPVectorizer.cpp
355

s/IsAltShuffle/isAltShuffle/g

This revision is now accepted and ready to land.Jun 20 2018, 6:49 AM
This revision was automatically updated to reflect the committed changes.