[PATCH] D96462: [LV] Add remarks that explicitly mention error handling in candidate loops
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 01:35:03 PST 2021
fhahn added a comment.
Thanks for working on improving the remarks! Unfortunately we have to be careful to keep them generic with respect to the frontend. I don't think we should be using a function name string to detect using `assert` and include other implementation specific parts (like `NDEBUG`) in the message. For example, the user could define their own `__assert_fail` function or the IR could be coming from a Rust or Swift frontend.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:1078
+ "loop control flow is not understood by vectorizer. "
+ "Loop contains control flow that does not return",
+ "CFGNotUnderstood", ORE, TheLoop, U);
----------------
In this case, the loop *technically* does not contain the `unreachable`, right? One of the exit blocks does. I am not sure how to best phrase it, but it might be worth adjusting the message below `reportVectorizationFailure("The loop must have a unique exit block",` to include the information that some of the exit blocks end in `unreachable`
Unfortunately I don't think the user can do much with this information.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96462/new/
https://reviews.llvm.org/D96462
More information about the llvm-commits
mailing list