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

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 08:57:09 PDT 2017


Meinersbur 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.
   }
----------------
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.


https://reviews.llvm.org/D37010





More information about the llvm-commits mailing list