diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-04-27 18:54:45 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-04-30 09:11:55 -0700 |
commit | 611815e0233302e1fcccca113e6f865fa450b7ae (patch) | |
tree | 02261598447e1f7f5e2b850d366499b044f98dc7 /libcpp | |
parent | 9c18bdb07e299b25e7526fea16659c7ff8f0d14e (diff) | |
download | gcc-611815e0233302e1fcccca113e6f865fa450b7ae.zip gcc-611815e0233302e1fcccca113e6f865fa450b7ae.tar.gz gcc-611815e0233302e1fcccca113e6f865fa450b7ae.tar.bz2 |
PHI-OPT: speed up value_replacement slightly
This adds a few early outs to value_replacement that I noticed
while rewriting this to use match-and-simplify but could be committed
seperately.
* virtual operands won't change so return early for them
* special case `A ? B : B` as that is already just `B`
Also moves the check for NE/EQ earlier as calculating empty_or_with_defined_p
is an IR walk for a BB and that might be big.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (value_replacement): Move check for
NE/EQ earlier.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions