[all-commits] [llvm/llvm-project] c6fdb1: [X86] Move some hasOneUse checks after checking wh...
Craig Topper via All-commits
all-commits at lists.llvm.org
Sat Apr 16 14:19:26 PDT 2022
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-04-16 (Sat, 16 Apr 2022)
[X86] Move some hasOneUse checks after checking what the opcode is.
Calling hasOneUse can be expensive on nodes with multiple results.
Especially when some results are Chains. By checking the opcode first,
we can avoid walking the uses if it isn't an interesting node,
and thus avoid calling hasOneUse on a node that might have many uses.
Found by profiling the IR given in D123857.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D123881
More information about the All-commits