This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: make sure debugging variables are appropriately elided in release builds.
ClosedPublic

Authored by dlj on Nov 8 2016, 1:57 PM.

Details

Summary

There are two variables here that break. This change constrains both of them to
debug builds (via DEBUG() or #ifndef NDEBUG).

Diff Detail

Repository
rL LLVM

Event Timeline

dlj updated this revision to Diff 77253.Nov 8 2016, 1:57 PM
dlj retitled this revision from to GlobalISel: make sure debugging variables are appropriately elided in release builds..
dlj updated this object.
dlj added a reviewer: bkramer.

The first change looks fine, but I'd like to keep the second block:

lib/CodeGen/GlobalISel/InstructionSelect.cpp
138 ↗(On Diff #77253)

I don't think this should be guarded. It's intentionally part of the fallback to SDAG (it often gets hit when there's no selection rule for some instruction yet).

dlj updated this revision to Diff 77257.Nov 8 2016, 2:06 PM

Fix variable scopes that I missed.

bkramer accepted this revision.Nov 8 2016, 2:07 PM
bkramer edited edge metadata.

lg

This revision is now accepted and ready to land.Nov 8 2016, 2:07 PM
dlj marked an inline comment as done.Nov 8 2016, 2:08 PM

Thanks, everything now passes ninja check under release and debug. Thanks for bearing with me.

lib/CodeGen/GlobalISel/InstructionSelect.cpp
138 ↗(On Diff #77253)

Yup, and there was a test for it. So this definitely shouldn't be guarded.

t.p.northover accepted this revision.Nov 8 2016, 2:09 PM
t.p.northover added a reviewer: t.p.northover.

Ah, I forgot this was InstructionSelect and was wondering why MRI wasn't automatically available. Looks fine to me too.

dlj updated this revision to Diff 77258.Nov 8 2016, 2:10 PM
dlj marked an inline comment as done.
dlj edited edge metadata.

Update reviewers.

This revision was automatically updated to reflect the committed changes.