[llvm] r263090 - [opt] Only create Verifier passes when requested
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 23:04:57 PST 2016
Nice. Thanks.
--
Mehdi
> On Mar 9, 2016, at 11:04 PM, Vedant Kumar <vsk at apple.com> wrote:
>
> Thanks for the catch!
>
> In r263096, I changed the description of -disable-verify to "Do not run the verifier". Hope that fits.
>
> vedant
>
>
>>>> On Mar 9, 2016, at 7:40 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>>>
>>>> Author: vedantk
>>>> Date: Wed Mar 9 21:40:14 2016
>>>> New Revision: 263090
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=263090&view=rev
>>>> Log:
>>>> [opt] Only create Verifier passes when requested
>>>>
>>>> opt adds Verifier passes in AddOptimizationPasses even if
>>>> -disable-verify is on. Fix it so that the extra verification occurs
>>>> either when (1) -disable-verifier is off, or (2) -verify-each is on.
>>>>
>>>> Thanks to David Jones for pointing out this behavior!
>>>>
>>>> Modified:
>>>> llvm/trunk/tools/opt/opt.cpp
>>>>
>>>> Modified: llvm/trunk/tools/opt/opt.cpp
>>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=263090&r1=263089&r2=263090&view=diff
>>>> ==============================================================================
>>>> --- llvm/trunk/tools/opt/opt.cpp (original)
>>>> +++ llvm/trunk/tools/opt/opt.cpp Wed Mar 9 21:40:14 2016
>>>> @@ -217,7 +217,8 @@ static inline void addPass(legacy::PassM
>>>> static void AddOptimizationPasses(legacy::PassManagerBase &MPM,
>>>> legacy::FunctionPassManager &FPM,
>>>> unsigned OptLevel, unsigned SizeLevel) {
>>>> - FPM.add(createVerifierPass()); // Verify that input is correct
>>>> + if (!NoVerify || VerifyEach)
>>>> + FPM.add(createVerifierPass()); // Verify that input is correct
>>>
>>> I'm not sure I can agree with this change.
>>> The option is intended to be: "Do not verify result module".
>>
>> Actually opt *never* verifies the result module. At least can you update the description of the option to match behavior?
>>
>> --
>> Mehdi
>
More information about the llvm-commits
mailing list