HomePhabricator

[m_Constant] Check #operands/results before hasTrait()

Authored by lattner on Mar 14 2021, 6:41 PM.

Description

[m_Constant] Check #operands/results before hasTrait()

We know that all ConstantLike operations have one result and no operands,
so check this first before doing the trait check. This change speeds up
Canonicalize on a CIRCT testcase by ~5%.

Differential Revision: https://reviews.llvm.org/D98615

Details

Committed
lattnerMar 14 2021, 8:14 PM
Differential Revision
D98615: [m_Constant] Check #operands/results before hasTrait()
Parents
rGa81dff1e5839: [RISCV] Support inline asm for vector instructions.
Branches
Unknown
Tags
Unknown