From 8240b7a773a252009ed540b222cdc837561dd542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Thu, 12 Feb 2015 21:24:36 +0100 Subject: [PATCH] GH #34: Disable the PassInfo cache assertions to make the cache effective in builds with assertions enabld Since the PassInfo cache does a regular, uncached, slow lookup for the asserted condition, it's not very effective *cough* when assertions are enabled. Since disabling these assertions gives quite a nice perf boost and it's not really worse than the patch we had previously, let's just do that. --- lib/IR/LegacyPassManager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp index 995e1e570340..25c8cb4f63b3 100644 --- a/lib/IR/LegacyPassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -726,9 +726,6 @@ const PassInfo *PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) const { const PassInfo *&PI = AnalysisPassInfos[AID]; if (!PI) PI = PassRegistry::getPassRegistry()->getPassInfo(AID); - else - assert(PI == PassRegistry::getPassRegistry()->getPassInfo(AID) && - "The pass info pointer changed for an analysis ID!"); return PI; }