[polly] r278062 - [ScopDetection] Remove unused DetectionContexts during expansion.

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 00:34:59 PDT 2016


On Tue, Aug 9, 2016, at 12:39 AM, Michael Kruse via llvm-commits wrote:
> Author: meinersbur
> Date: Mon Aug  8 17:39:32 2016
> New Revision: 278062
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=278062&view=rev
> Log:
> [ScopDetection] Remove unused DetectionContexts during expansion.
> 
> The function expandRegion() frees Region* objects again when it
> determines that
> these are not valid SCoPs. However, the DetectionContext added to the
> DetectionContextMap still holds a reference. The validity is checked
> using the
> ValidRegions lookup table. When a new Region is added to that list, it
> might
> share the same address, such that the DetectionContext contains two
> Region* associations that are in ValidRegions, but that are unrelated and
> of
> which one has already been free.
> 
> Also remove the DetectionContext when not a valid expansion.

Nice. These are some of the most annoying bugs to spot. Thank you for
digging down and addressing this.

Best,
Tobias


More information about the llvm-commits mailing list