[PATCH] Early Target Dependent DAG Combine

Quentin Colombet qcolombet at apple.com
Tue Jan 29 11:05:25 PST 2013


Hi,

Currently in DAG combiner, we have roughly the following workflow for each Selection DAG node:
1. Target-independent DAG combine
2. Target-specific DAG combine

I'd like to add a target-specific DAG combine pass before any target-independent, i.e.,
1. Target-specific DAG combine
2. Target-independent DAG combine
3. Target-specific DAG combine

Attached is a patch that realizes that.

The patch uses the exact same construction as the existing "late" target-specific DAG combine hook. In other words, it defines three new methods in the base class of target lowering:
- One to set which types of SDNode should be processed through the "early" target specific DAG combine
- One to query whether a type of SDNode has been marked as should be "early" DAG combined.
- One virtual method that is the hook to the "early" DAG combine processing.
And adds the call to the related hook in DAGCombiner.

Thanks for your reviews.

-Quentin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/7664ab8f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: earlyTargetSpecificDAGCombine.patch
Type: application/octet-stream
Size: 5215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/7664ab8f/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/7664ab8f/attachment-0001.html>


More information about the llvm-commits mailing list