forked from OSchip/llvm-project
Initialize BasicAA's AliasCache to set it to use fewer buckets by
default, since it usually has very few elements. This speeds up alias queries in many cases, because AliasCache.clear() doesn't have to visit as many buckets. llvm-svn: 132862
This commit is contained in:
parent
300f55dcad
commit
cc59548793
|
@ -451,7 +451,13 @@ namespace {
|
||||||
/// BasicAliasAnalysis - This is the primary alias analysis implementation.
|
/// BasicAliasAnalysis - This is the primary alias analysis implementation.
|
||||||
struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis {
|
struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis {
|
||||||
static char ID; // Class identification, replacement for typeinfo
|
static char ID; // Class identification, replacement for typeinfo
|
||||||
BasicAliasAnalysis() : ImmutablePass(ID) {
|
BasicAliasAnalysis() : ImmutablePass(ID),
|
||||||
|
// AliasCache rarely has more than 1 or 2 elements,
|
||||||
|
// so start it off fairly small so that clear()
|
||||||
|
// doesn't have to tromp through 64 (the default)
|
||||||
|
// elements on each alias query. This really wants
|
||||||
|
// something like a SmallDenseMap.
|
||||||
|
AliasCache(8) {
|
||||||
initializeBasicAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
initializeBasicAliasAnalysisPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue