[llvm-dev] [RFC] Enabling opt's -enable-new-pm by default with ENABLE_NEW_EXPERIMENTAL_PASS_MANAGER

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 22 09:34:59 PST 2021


On 2021-01-22, Florian Hahn via llvm-dev wrote:
>
>
>> On Jan 21, 2021, at 21:02, Arthur Eubanks via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> With many of the new PM issues ironed out, I'd like to turn on opt's -enable-new-pm flag by default when we build LLVM with ENABLE_NEW_EXPERIMENTAL_PASS_MANAGER on.
>>
>
>That sounds like a great idea & sounds good to me, as long as all current tests pass with the new behavior and there’s a public bot that uses ENABLE_NEW_EXPERIMENTAL_PASS_MANAGER=true.
>
>Thanks everyone involved in ironing out the remaining issues!

+1 for making -enable-new-pm default dependent on the CMake variable ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER (I have fixed the spelling).

>> -enable-new-pm essentially translates the legacy way of specifying opt passes (e.g. -instcombine) into the new way of specifying passes (e.g. -passes=instcombine), making tests that use `opt -instcombine` run under the new PM, unless specifically opted out via `-enable-new-pm=0`.
>>
>> One issue is that until we enable the new PM by default, testing locally may not show issues that pop up until a bot with ENABLE_NEW_EXPERIMENTAL_PASS_MANAGER on complains after committing, since basically everybody has ENABLE_NEW_EXPERIMENTAL_PASS_MANAGER off locally. Hopefully the amount of time between conditionally turning on opt's -enable-new-pm and turning on the new PM by default everywhere is fairly small and this won't be too big of an issue. I haven't seen this discrepancy appear too often when looking at existing passing tests failing when -enable-new-pm is turned on.
>
>I think that’s fine, the same issue exists for a lot of different options. IIUC to reproduce a failure, it should be enough to pass `-enable-new-pm` to the failing test locally?
>
>Cheers,
>Florian
>_______________________________________________
>LLVM Developers mailing list
>llvm-dev at lists.llvm.org
>https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list