Revert "[SCEV] Factor out part of wrap flag detection logic [NFC-ish]"
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 15 Nov 2020 09:19:44 +0000 (10:19 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 15 Nov 2020 09:19:44 +0000 (10:19 +0100)
commit9ace4b337fe26dd2c15da854767064acdd8da543
treee1f9d2c37c458c2173ef8581ed8c53e7e7540ee4
parent581ebf44d28b3e12bab771737e508fde9d22b25e
Revert "[SCEV] Factor out part of wrap flag detection logic [NFC-ish]"

This reverts commit 1ec6e1eb8a084bffae8a40236eb9925d8026dd07.

This change causes a significant compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=dd0b8b94d0796bd895cc998dd163b4fbebceb0b8&to=1ec6e1eb8a084bffae8a40236eb9925d8026dd07&stat=instructions

I assume that this is due to the non-NFC part of the change, which
now performs expensive nowrap inference even for nowrap flags that
are not used by the particular code.
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/pr22641.ll
llvm/test/Analysis/ScalarEvolution/sext-iv-2.ll
llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll