[llvm-dev] [Inliner] Loop info in the inliner

Chandler Carruth via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 28 15:18:01 PDT 2016


What Philip said.

Also, it is possible to help with the pass manager work by porting
individual passes over. There are a number of commits that serve as good
examples here.

On Mon, Mar 21, 2016 at 6:22 PM Philip Reames via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> FYI - There is currently an architectural issue which prevents the SCC
> pass manager (which runs the inliner) from relying on Function or Loop
> analysis passes.  This is the primary motivation of the pass manager
> rewrite that Chandler Carruth has been working on for the last two years.
> He's getting relatively close to that project being done, but until then
> you are going to be effectively blocked on this.
>
> Philip
>
>
> On 03/21/2016 11:56 AM, Aditya K via llvm-dev wrote:
>
> Hi,
> It seems inliner does not take into account if a call is inside a loop.
> I'm trying to figure out if loop-info can be made available to the inliner.
>
> When I try to add LoopInfoWrapperPass to Inliner.cpp,
>
>
> diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp
> b/llvm/lib/Transforms/IPO/Inliner.cpp
> index 568707d..cb51ea8 100644
> --- a/llvm/lib/Transforms/IPO/Inliner.cpp
> +++ b/llvm/lib/Transforms/IPO/Inliner.cpp
> @@ -14,6 +14,7 @@
>
>  //===----------------------------------------------------------------------===//
>
>  #include "llvm/Transforms/IPO/InlinerPass.h"
> +#include "llvm/Analysis/LoopInfo.h"
>  #include "llvm/ADT/SmallPtrSet.h"
>  #include "llvm/ADT/Statistic.h"
>  #include "llvm/Analysis/AliasAnalysis.h"
> @@ -58,6 +59,7 @@ Inliner::Inliner(char &ID, bool InsertLifetime)
>  void Inliner::getAnalysisUsage(AnalysisUsage &AU) const {
>    AU.addRequired<AssumptionCacheTracker>();
>    AU.addRequired<TargetLibraryInfoWrapperPass>();
> +  AU.addRequired<LoopInfoWrapperPass>();
>    getAAResultsAnalysisUsage(AU);
>    CallGraphSCCPass::getAnalysisUsage(AU);
> }
>
> I get llvm_unreachable in `void
> PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass)'
>
> Thanks,
> -Aditya
>
>
> _______________________________________________
> LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160328/4e605dff/attachment.html>


More information about the llvm-dev mailing list