[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
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c6fdb1de47bd5f26868838c37fa9e8cc1ac484bf
https://github.com/llvm/llvm-project/commit/c6fdb1de47bd5f26868838c37fa9e8cc1ac484bf
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-04-16 (Sat, 16 Apr 2022)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
Log Message:
-----------
[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
mailing list