[SCEV][NFC] Move check up the stack
authorMax Kazantsev <mkazantsev@azul.com>
Tue, 16 Mar 2021 14:27:25 +0000 (21:27 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Tue, 16 Mar 2021 15:09:17 +0000 (22:09 +0700)
commit5097143f0e7124d73646daa5de5d205579b9f7d2
tree5d6a59dc23fc7cdb72c56c3f531ece1946e2f923
parent229eeb187d42fab9ef73be7ce82a50ed63914819
[SCEV][NFC] Move check up the stack

One of (and primary) callers of isBasicBlockEntryGuardedByCond is
isKnownPredicateAt, which makes isKnownPredicate check before it.
It already makes non-recursive check inside. So, on this execution
path this check is made twice. The only other caller is
isLoopEntryGuardedByCond. Moving the check there should save some
compile time.
llvm/lib/Analysis/ScalarEvolution.cpp