This is an archive of the discontinued LLVM Phabricator instance.

[EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]
AbandonedPublic

Authored by reames on Dec 4 2015, 5:23 PM.

Details

Reviewers
aadg
hfinkel
Summary

Restructure ParseMemoryInst - which was introduced to abstract over target specific load and stores instructions - to just query the underlying instructions. In theory, this could be slightly slower than caching the results, but in practice, it's very unlikely to be measurable.

The simple query scheme makes it far easier to understand, and much easier to extend with new queries. Given I'm about to need to add new query types, doing the cleanup first seemed worthwhile.

Posting this for review mostly as an FYI for Ha and Arnaudl. I plan to submit this first thing Monday without waiting for comments.

Do we still believe the target specific intrinsic handling is worthwhile in EarlyCSE? It adds quite a bit of complexity and makes the code harder to read. Being able to delete the abstraction entirely would be wonderful.

Diff Detail

Event Timeline

reames updated this revision to Diff 41964.Dec 4 2015, 5:23 PM
reames retitled this revision from to [EarlyCSE] Simplify and invert ParseMemoryInst [NFCI].
reames updated this object.
reames added reviewers: hfinkel, aadg.
reames added a subscriber: llvm-commits.
reames abandoned this revision.Dec 7 2015, 1:30 PM

Sending lib/Transforms/Scalar/EarlyCSE.cpp
Transmitting file data .
Committed revision 254950.