OSDN Git Service

[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs
authorMax Kazantsev <max.kazantsev@azul.com>
Wed, 6 Dec 2017 12:44:56 +0000 (12:44 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Wed, 6 Dec 2017 12:44:56 +0000 (12:44 +0000)
commit0c3c7c5485d7895f514451511411dab9ab14ffdc
treeda17207ee74995b5207e1f6b556ae9389e150d50
parentce85eebf503315a5e9bf2c1f7c6ab72e13f2d16c
[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs

Lexicographical comparison of SCEV trees is potentially expensive for big
expression trees. We can define ordering between them for AddRecs and
N-ary operations by SCEV NoWrap flags to make non-equality check
cheaper.

This change does not prevent grouping eqivalent SCEVs together and is
not supposed to have any meaningful impact on behavior of any transforms.

Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D40645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319889 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp