OSDN Git Service

[LPM] Use a map from analysis ID to immutable passes in the legacy pass
authorChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 02:31:42 +0000 (02:31 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 02:31:42 +0000 (02:31 +0000)
commitb29f7b83bb290ebc42d28cbb05836f043b507aab
treeb3fe6b222c5258694789fca7cec492ea9bc509d0
parent37d7ddff3efc44da34a33e08b8f2f94e16505ef3
[LPM] Use a map from analysis ID to immutable passes in the legacy pass
manager to avoid a slow linear scan of every immutable pass and on every
attempt to find an analysis pass.

This speeds up 'check-llvm' on an unoptimized build for me by 15%, YMMV.
It should also help (a tiny bit) other folks that are really
bottlenecked on repeated runs of tiny pass pipelines across small IR
files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247240 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/LegacyPassManagers.h
lib/IR/LegacyPassManager.cpp