[llvm] r350334 - [UnrollRuntime] Add DomTree verification under debug mode
Anna Thomas via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 3 11:17:13 PST 2019
Thanks Hal. I will change this to also be under EXPENSIVE_CHECKS instead of NDEBUG.
However, I’m planning on keeping it under "VerificationLevel::Full” rather than Fast, since we’re anyway running under EXPENSIVE_CHECKS.
Anna
> On Jan 3, 2019, at 1:56 PM, Finkel, Hal J. <hfinkel at anl.gov> wrote:
>
> Hi, Anna,
>
> Didn't we just take something like this out in r349871? I think we used
> EXPENSIVE_CHECKS instead of NDEBUG for this, as it can change the
> asymptotic complexity of the operation.
>
> Thanks again,
>
> Hal
>
> On 1/3/19 11:44 AM, Anna Thomas via llvm-commits wrote:
>> Author: annat
>> Date: Thu Jan 3 09:44:44 2019
>> New Revision: 350334
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=350334&view=rev
>> Log:
>> [UnrollRuntime] Add DomTree verification under debug mode
>>
>> NFC: This adds the dom tree verification under debug mode at a point
>> just before we start unrolling the loop. This allows us to verify dom
>> tree at a state where it is much smaller and before the unrolling
>> actually happens.
>> This also implies we do not need to run -verify-dom-info everytime to
>> see if the DT is in a valid state when we transform the loop for runtime
>> unrolling.
>>
>> Modified:
>> llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp?rev=350334&r1=350333&r2=350334&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp Thu Jan 3 09:44:44 2019
>> @@ -927,6 +927,12 @@ bool llvm::UnrollRuntimeLoopRemainder(Lo
>> // of its parent loops, so the Scalar Evolution pass needs to be run again.
>> SE->forgetTopmostLoop(L);
>>
>> + // Verify that the Dom Tree is correct.
>> +#if !defined(NDEBUG)
>> + if (DT)
>> + assert(DT->verify(DominatorTree::VerificationLevel::Full));
>> +#endif
>> +
>> // Canonicalize to LoopSimplifyForm both original and remainder loops. We
>> // cannot rely on the LoopUnrollPass to do this because it only does
>> // canonicalization for parent/subloops and not the sibling loops.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
> --
> Hal Finkel
> Lead, Compiler Technology and Programming Languages
> Leadership Computing Facility
> Argonne National Laboratory
>
More information about the llvm-commits
mailing list