This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Don't emit unused labels
ClosedPublic

Authored by marbre on Jan 25 2022, 8:24 AM.

Details

Summary

Stop the Cpp target from emitting unused labels. The previosly generated
code generated warning if -Wunused-label is passed to a compiler.

Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>

Diff Detail

Event Timeline

marbre created this revision.Jan 25 2022, 8:24 AM
marbre requested review of this revision.Jan 25 2022, 8:24 AM
jpienaar accepted this revision.Jan 25 2022, 8:32 AM
jpienaar added a subscriber: jpienaar.
jpienaar added inline comments.
mlir/lib/Target/Cpp/TranslateToCpp.cpp
634

Could you update this comment?

This revision is now accepted and ready to land.Jan 25 2022, 8:32 AM
marbre updated this revision to Diff 403240.Jan 26 2022, 6:18 AM

Updating D118154: [mlir] Don't emit unused labels

marbre marked an inline comment as done.Jan 26 2022, 6:20 AM
marbre added inline comments.
mlir/lib/Target/Cpp/TranslateToCpp.cpp
634

I've updated the comment and further revised the condition (it is sufficient to just check if the block has predecessors).

This revision was landed with ongoing or failed builds.Jan 26 2022, 11:56 PM
This revision was automatically updated to reflect the committed changes.
marbre marked an inline comment as done.