From 63a1eb62e4eef1cbdedce5c60c3e1243a071eba1 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 18 Oct 2012 08:05:46 +0000 Subject: Introduce a BarrierNoop pass, a hack designed to allow *some* control over the implicitly-formed-and-nesting CGSCC pass manager and function pass managers, especially when using them on the opt commandline or using extension points in the module builder. The '-barrier' opt flag (or the pass itself) will create a no-op module pass in the pipeline, resetting the pass manager stack, and allowing the creation of a new pipeline of function passes or CGSCC passes to be created that is independent from any previous pipelines. For example, this can be used to test running two CGSCC passes in independent CGSCC pass managers as opposed to in the same CGSCC pass manager. It also allows us to introduce a further hack into the PassManagerBuilder to separate the O0 pipeline extension passes from the always-inliner's CGSCC pass manager, which they likely do not want to participate in... At the very least none of the Sanitizer passes want this behavior. This fixes a bug with ASan at O0 currently, and I'll commit the ASan test which covers this pass. I'm happy to add a test case that this pass exists and works, but not sure how much time folks would like me to spend adding test cases for the details of its behavior of partition pass managers.... The whole thing is just vile, and mostly intended to unblock ASan, so I'm hoping to rip this all out in a brave new pass manager world. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166172 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/IPO.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/llvm/Transforms') diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index 962cb63758..08d3bbd941 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -198,6 +198,11 @@ ModulePass *createPartialInliningPass(); // ModulePass *createMetaRenamerPass(); +//===----------------------------------------------------------------------===// +/// createBarrierNoopPass - This pass is purely a module pass barrier in a pass +/// manager. +ModulePass *createBarrierNoopPass(); + } // End llvm namespace #endif -- cgit v1.2.3-70-g09d2