Rewriting is a common approach to logic optimization based on local
transformations. Most commercially available logic synthesis tools include a
rewriting engine that may be used multiple times on the same netlist during
optimization. This paper presents an And-Inverter graph based rewriting
algorithm using 5-input cuts. The best circuits are pre-computed for a subset
of NPN classes of 5-variable functions. Cut enumeration and Boolean matching
are used to identify replacement candidates. The presented approach is expected
to complement existing rewriting approaches which are usually based on 4-input
cuts. The experimental results show that, by adding the new rewriting algorithm
to ABC synthesis tool, we can further reduce the area of heavily optimized
large circuits by 5.57% on average.