This is an archive of the discontinued LLVM Phabricator instance.

Fix several places that were calling verifyFunction or verifyModule without checking the return value.
ClosedPublic

Authored by craig.topper on May 17 2020, 11:47 PM.

Details

Summary

verifyFunction/verifyModule don't assert or error internally. They
also don't print anything if you don't pass a raw_ostream to them.
So the caller needs to check the result and ideally pass a stream
to get the messages. Otherwise they're just really expensive no-ops.

I've replaced calls inside LLVM_DEBUG with assert. The call in
CoroSplit should probably be in an assert, but I don't know
enough about the coroutine pipeline health.

Diff Detail

Event Timeline

craig.topper created this revision.May 17 2020, 11:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2020, 11:47 PM

Are those all cases? Wasn't there on in the SLP vectorizer?

llvm/lib/CodeGen/WinEHPrepare.cpp
1077

Nit: I don't know what the convention is, &errs() might be better, but no strong feelings.

I filed a bug for SLP since it has a failing lit test.

Coroutine change LGTM.

jdoerfert accepted this revision.May 18 2020, 11:28 AM

LGTM. Maybe add a reference to the SLP bug number to the commit message. Thanks for addressing this!

This revision is now accepted and ready to land.May 18 2020, 11:28 AM
This revision was automatically updated to reflect the committed changes.