[polly] scop detection: small cleanups

Tobias Grosser tobias at grosser.es
Thu Jun 13 01:45:43 PDT 2013


On 06/12/2013 03:32 PM, Sebastian Pop wrote:
> Hi Tobi,
>
> I have 3 more small cleanups for compile time. I already sent an email about
> 4/4, so I'm not attaching it again here:
>
> [PATCH 1/4] scop detection: only execute print stmts under DEBUG
> [PATCH 2/4] scop detection: check flag before expensive call
> [PATCH 3/4] scop detection: inline and remove isValidBasicBlock
> [PATCH 4/4] scop detection: detect regions bottom up

2 and 3 are OK to commit.

The first patch causes minor troubles with:

polly-opt test/Dependences/do_pluto_matmult.ll -view-scops

Without the patch, the dotty graph gives the information that some scops 
are not detected due to aliasing. With the patch the information
is only printed if -debug is added. The other messages are still printed 
without -debug.

I understand that we want to move the formatting of the output message 
out of the hot path and I fully agree with this. However, just moving 
some of the formatting into DEBUG() causes inconsistent behavior. We 
should either have all error messages showing or none of them. A fast
solution would be to move this under a flag that is enabled if -debug
is set or if -polly-show or -polly-show-only is set.
A nicer solution would probably be to clean up the error system a 
little. Instead of those ugly macros, we could make the last-error
a pointer to an error class that could do the formatting of the error
on demand. The different error types could e.g. derive from a common 
class. This kind of error classes could also allow us to collect the set 
of all errors in a region which may be useful for debugging purposes.

Cheers,
Tobi









More information about the llvm-commits mailing list