[IRCE] Avoid computing potentially unnecessary analyses. NFC
authorAnna Thomas <anna@azul.com>
Tue, 26 Apr 2022 21:15:48 +0000 (17:15 -0400)
committerAnna Thomas <anna@azul.com>
Wed, 27 Apr 2022 13:22:10 +0000 (09:22 -0400)
commitc515b2f39e77f80b564e53c4c59d8c4d8bd432cf
treeeeb857ce678c56e69b40a18bf7cb7c0485e377ef
parent70dbb5abd361c217b39693bc5ce6af9d70b2a5cb
[IRCE] Avoid computing potentially unnecessary analyses. NFC

IRCE is a function pass that operates on loops. If there are no loops in
the function (as seen through LI), we should avoid computing the
remaining expensive analyses (such as BPI). Reordered the analyses
requests and early return if there are no loops. This is an NFC with
compile time improvement.

The same will be done in a follow-up patch for the loop vectorizer.

Reviewed-By: nikic
Differential Revision: https://reviews.llvm.org/D124478
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp