Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
authorDan Gohman <gohman@apple.com>
Mon, 7 Jun 2010 19:06:13 +0000 (19:06 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 7 Jun 2010 19:06:13 +0000 (19:06 +0000)
commit4d52c6d622811d00d40b914a4ebd1996b1eed95d
treef1e85818a92e6e37a890fc1c85e4037bf1e6f3d6
parent22a5b298201d62daea3e06718469d8ad017895e1
Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
scrounging through SCEVUnknown contents and SCEVNAryExpr operands;
instead just do a simple deterministic comparison of the precomputed
hash data.

Also, since this is more precise, it eliminates the need for the slow
N^2 duplicate detection code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105540 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll