This is an archive of the discontinued LLVM Phabricator instance.

[mips] Optimize folding of registers derived from the $zero register.
AbandonedPublic

Authored by vkalintiris on Mar 12 2015, 6:27 AM.

Details

Reviewers
dsanders
Summary

Instead of loading the zero value into a new register and then spilling
it into the stack, we can use the $zero register immediatelly.
This patch also changes the semantics of the foldMemoryOperandImpl()
method in order to insert the newly constructed instruction into the
machine basic block.

Diff Detail

Event Timeline

vkalintiris retitled this revision from to [mips] Optimize folding of registers derived from the $zero register..
vkalintiris updated this object.
vkalintiris edited the test plan for this revision. (Show Details)
vkalintiris added a reviewer: dsanders.
vkalintiris added a subscriber: Unknown Object (MLST).
dsanders edited edge metadata.Apr 21 2015, 3:34 AM

I think this patch might have been missed because it has a '[mips]' tag but it affects SystemZ and X86 too. I'd suggest re-sending it with a more generic subject. Maybe something like 'Make foldMemoryOperandImpl() insert instructions instead of caller' and go on to say something like 'and use this to store zero to memory using $zero on Mips'.

vkalintiris abandoned this revision.Apr 21 2015, 10:40 AM

Re-sent with a more generic subject in http://reviews.llvm.org/D9161