[PATCH] D37010: [Polly][PM] Properly require and preservation of OptimizationRemarkEmitter.

Siddharth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 09:36:24 PDT 2017


bollu added inline comments.


================
Comment at: lib/CodeGen/CodeGeneration.cpp:315
     // FIXME: We do not yet add regions for the newly generated code to the
     //        region tree.
   }
----------------
Meinersbur wrote:
> annanay25 wrote:
> > Since RegionInfo is no longer preserved, do we need this?
> This is still an issue.
> 
> We mark RegionInfo and LoopInfo as preserved, but only such that their verifications do not fail. The code generated by Polly will have now regions and loops in it, but we do not update Loop/RegionInfo to include these new loops/regions. That is, the newly generated code looks 'flat' without structure. Its good enough for Polly because we do not need the information for the other SCoPs in the function and do not want to re-run Polly on SCoPs in the generated code.
> 
> There is a barrier pass after Polly that forces the LoopInfo/RegionInfo to be released. Any pass after that will get fresh new RegionInfo/LoopInfo redetection. At least in the legacy pass manager. Yes, it's a bad hack.
Since we edit the AST in controlled ways, can we not fix this issue? I'm asking if there is something inherent that stops from keeping Region and Loop info up-to-date? 

If not, we can incrementally fix this, correct?


https://reviews.llvm.org/D37010





More information about the llvm-commits mailing list