Skip to content
Commit 1982afb1 authored by River Riddle's avatar River Riddle Committed by Mehdi Amini
Browse files

Unify the 'constantFold' and 'fold' hooks on an operation into just...

    Unify the 'constantFold' and 'fold' hooks on an operation into just 'fold'. This new unified fold hook will take constant attributes as operands, and may return an existing 'Value *' or a constant 'Attribute' when folding. This removes the awkward situation where a simple canonicalization like "sub(x,x)->0" had to be written as a canonicalization pattern as opposed to a fold.

--

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