This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Improve merging of constant stores
Needs ReviewPublic

Authored by anadolskiy on Feb 8 2016, 4:59 AM.

Details

Summary

I tried to improve merging of constant stores. In particular, cases like this (x86):

movb (%esp)
movb 1(%esp) -> movw (%esp)
mov 2(%esp) mov 2(%esp)

Also there is opportunity to go further:

movb (%esp)
movb 1(%esp) -> movw (%esp) -> mov (%esp)
movw 2(%esp) movw 2(%esp)

but after first merge a token node comes up in chain and I'm not sure how to process it properly.

Diff Detail

Event Timeline

anadolskiy updated this revision to Diff 47176.Feb 8 2016, 4:59 AM
anadolskiy retitled this revision from to [SDAG] Improve merging of constant stores.
anadolskiy updated this object.
anadolskiy added reviewers: DavidKreitzer, resistor.
anadolskiy added a subscriber: llvm-commits.
arsenm added a subscriber: arsenm.Feb 8 2016, 8:04 AM

Does this work if you -enable combiner-aa?