[LLVMdev] Qs on building LLVM passes

Bill Wendling
2009-01-18T11:05:13Z

On Jan 17, 2009, at 10:27 PM, Keun Soo Yim wrote:

> 3.       In code generator, how can we add new instruction in a way
> that back-end consider
> this added instruction for its instruction scheduling and register
> allocation?
>
You will want to add this in the appropriate .td file. The .td files
are full of "recipes" which match nodes in the DAG. The appropriate
instruction is selected from those recipes that match a pattern in the
DAG.

-bw