This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Code generalization/clean-up for replacing indexed vector instructions for Exynos
AbandonedPublic

Authored by az on Dec 13 2016, 4:16 PM.

Details

Summary

Generalize the code that replaces an indexed vector instruction by two equivalent instructions: This is mainly done by removing some hard-code and replace it by a more general table driven code.

There is no change in functionality or performance as the code generated is still the same.

Diff Detail

Event Timeline

az updated this revision to Diff 81323.Dec 13 2016, 4:16 PM
az retitled this revision from to [AArch64] Code generalization/clean-up for replacing indexed vector instructions for Exynos.
az updated this object.
az added reviewers: rengolin, evandro, t.p.northover, sebpop.
az added a subscriber: llvm-commits.
rengolin requested changes to this revision.Dec 14 2016, 2:46 AM
rengolin edited edge metadata.

I'm not convinced changing from hard-coded switches to hard-coded tables bring any additional clarity. I actually think it removes clarity and adds more seemingly-unrelated magical constants.

This revision now requires changes to proceed.Dec 14 2016, 2:46 AM
az added a comment.Dec 22 2016, 3:57 PM

I agree that changing hard-coded switches by hard coded tables does not bring anything. However, the section of code that I was hoping to improve is how to build the operands of the two new instructions from the operands of the original instruction. That section of code gets more complicated if we add more instructions that do not follow exactly the fmla instruction format. I submitted a new patch to add more instructions to the pass and that patch shows in a small way this extra inconvenience (https://reviews.llvm.org/D28069).

I will abandon this changes for now and I will bring it back one day if improvement are more obvious.

az abandoned this revision.Dec 22 2016, 3:58 PM