Skip to content
Commit a57b3989 authored by Lei Zhang's avatar Lei Zhang Committed by jpienaar
Browse files

[TableGen] Assign created ops to variables and rewrite with PatternRewriter::replaceOp()

Previously we were using PatternRewrite::replaceOpWithNewOp() to both create the new op
inline and rewrite the matched op. That does not work well if we want to generate multiple
ops in a sequence. To support that, this CL changed to assign each newly created op to a
separate variable.

This CL also refactors how PatternEmitter performs the directive dispatch logic.

PiperOrigin-RevId: 233206819
parent d7e6b33e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment