opencilk-project icon indicating copy to clipboard operation
opencilk-project copied to clipboard

Oddity with `-Wpass-failed=loop-spawning`

Open wheatman opened this issue 1 year ago • 1 comments

Compiling some code gave the warning

warning: Tapir loop not transformed: failed to use divide-and-conquer loop spawning.  Compile with -Rpass-analysis=loop-spawning for more details. [-Wpass-failed=loop-spawning]

However, this warning seems unknown and trying to add it to any compilation gives a

warning: unknown warning option '-Wpass-failed=loop-spawning'; did you mean '-Wpass-failed'? [-Wunknown-warning-option]

Also the warning was only appearing for this particular codebase if I compiled it with sanitizers -fsan itize=cilk,undefined,address

If you cannot reconstruct what is going on let me know and I can try to get a minimal example. I was having trouble making any sort of small example since I am not sure what is triggering the warning initially.

wheatman avatar Apr 05 '25 22:04 wheatman

I think there is a badly designed interface between the front end and back end of clang that makes the compiler suggest a -W option that doesn't work. -Wno-pass-failed alone (no =loop-spawning) might disable the message.

If you use -Rpass-analysis=loop-spawning you should get a more detailed message. For example, it might say something derogatory about your loop's preheader. With that message we can suggest what's going on with the structure of your loop that Tapir doesn't like.

VoxSciurorum avatar Apr 08 '25 19:04 VoxSciurorum