[llvm-commits] Patch for simplifying regions

Tobias Grosser grosser at fim.uni-passau.de
Wed Mar 23 22:09:46 PDT 2011


On 03/24/2011 12:55 AM, ether zhhb wrote:
> hi,
>
> hi,
>
> I seem Polly have a pass with the same name, how is this patch going on?

I committed that pass temporarily to Polly, as I needed it to fix a bug. 
Unfortunately, it is not currently in a state that we can commit it 
upstream. See the last comments in my mail. If they are addressed, I 
would love to move this one to LLVM.

>>> +namespace {
>>> +class RegionSimplify: public RegionPass {
>>> +  bool modified;
>>> +  Region *CR;
>>> +  void createSingleEntryEdge(Region *R);
>>> +  void createSingleExitEdge(Region *R);
> I seems there are also functions with the same name defined in
> ScopHelper.cpp of polly, are they the same functions?

I believe Andreas used the version in Polly as a start for the ones in 
the RegionSimplify pass.

> Instead of implement these functions in a specific pass, i suggest
> that we move these two functions into
> lib\Transforms\Utils\BasicBlockUtils.cpp or even
> lib\Transforms\Utils\RegionUtils.cpp, just like the "SplitBlock"
> function in llvm. So people can call these function anywhere their
> want to modify any region. And the RegionSimplify should simply call
> these functions to do their jobs instead denfining the same functions
> again.

The functions would be removed from Polly as soon as they are committed 
upstream. I personally have no strong opinion where to put them in LLVM. 
As RegionSimplify is at the moment the only user, I think putting them 
directly into RegionSimplify is a good start. If someone else needs 
them, we can easily move them over.

Cheers
Tobi



More information about the llvm-commits mailing list