[PATCH] PatternMatch for SelectionDAG

David Majnemer david.majnemer at gmail.com
Wed Jul 24 00:12:57 PDT 2013


Hi,

The attached patch introduces a PatternMatch-like interface for
SelectionDAG creatively called DAGPatternMatch.

While this patch does not address fused operations like ZEXTLOAD nor target
specific intrinsics, I do not see that preventing this patch from being
considered and committed. I'd love to hear suggestions regarding how they
should be handled.

Using DAGPatternMatch, I've identified bugs like hasOneUse() getting called
on ConstantSDNodes and I've managed to replace 400 lines of code with 300
lines of code that are simpler to reason about while making other patterns
more general and even adding new patterns.

Once this patch is accepted, I'll submit more patches that actually change
the DAGCombiner machinery to use the new DAGPatternMatch.

Thanks!
-- 
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130724/84e15f51/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpm.diff
Type: application/octet-stream
Size: 11559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130724/84e15f51/attachment.obj>


More information about the llvm-commits mailing list