From 194a407bda2b604ca0e43edbb56ce51989a7dc0a Mon Sep 17 00:00:00 2001 From: Fedor Sergeev Date: Thu, 15 Mar 2018 11:01:19 +0000 Subject: [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager There are two nontrivial details here: * Loop structure update interface is quite different with new pass manager, so the code to add new loops was factored out * BranchProbabilityInfo is not a loop analysis, so it can not be just getResult'ed from within the loop pass. It cant even be queried through getCachedResult as LoopCanonicalization sequence (e.g. LoopSimplify) might invalidate BPI results. Complete solution for BPI will likely take some time to discuss and figure out, so for now this was partially solved by making BPI optional in IRCE (skipping a couple of profitability checks if it is absent). Most of the IRCE tests got their corresponding new-pass-manager variant enabled. Only two of them depend on BPI, both marked with TODO, to be turned on when BPI starts being available for loop passes. Reviewers: chandlerc, mkazantsev, sanjoy, asbirlea Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D43795 llvm-svn: 327619 --- llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll') diff --git a/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll b/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll index 0225af903ef..d47cee00377 100644 --- a/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll +++ b/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll @@ -1,4 +1,5 @@ ; RUN: opt -irce -S < %s 2>&1 | FileCheck %s +; RUN: opt -passes='require,loop(irce)' -S < %s 2>&1 | FileCheck %s ; test that the pre and post loops have loop metadata which disables any further ; loop optimizations. -- cgit v1.2.3