aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/program-tree.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-04-16 14:08:04 -0700
committerCraig Topper <craig.topper@sifive.com>2022-04-16 14:18:58 -0700
commitc6fdb1de47bd5f26868838c37fa9e8cc1ac484bf (patch)
tree039324d44c17c805eb3cb4e31e0f2eabbed2cc2f /flang/lib/Semantics/program-tree.cpp
parenta7bceb3f835cea9dce245adb89a5678536b35bd5 (diff)
downloadllvm-c6fdb1de47bd5f26868838c37fa9e8cc1ac484bf.zip
llvm-c6fdb1de47bd5f26868838c37fa9e8cc1ac484bf.tar.gz
llvm-c6fdb1de47bd5f26868838c37fa9e8cc1ac484bf.tar.bz2
[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
Diffstat (limited to 'flang/lib/Semantics/program-tree.cpp')
0 files changed, 0 insertions, 0 deletions