[PATCH] D15253: [EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 17:23:17 PST 2015


reames created this revision.
reames added reviewers: hfinkel, aadg.
reames added a subscriber: llvm-commits.

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.  

http://reviews.llvm.org/D15253

Files:
  lib/Transforms/Scalar/EarlyCSE.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15253.41964.patch
Type: text/x-patch
Size: 5121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151205/94a193e6/attachment.bin>


More information about the llvm-commits mailing list