This is an archive of the discontinued LLVM Phabricator instance.

[MachineBasicBlock] Add helpers for skipping debug instructions [1/10]
ClosedPublic

Authored by vsk on Apr 15 2020, 6:10 PM.

Details

Summary

These helpers are exercised by follow-up commits in this patch series,
which is all about removing CodeGen differences with vs. without debug
info in the AArch64 backend.

Diff Detail

Event Timeline

vsk created this revision.Apr 15 2020, 6:10 PM
Herald added a project: Restricted Project. · View Herald Transcript
fhahn accepted this revision.Apr 16 2020, 3:15 AM

LGTM, the set of patches to use the new utils shows that those utilities can be quite useful. Please wait a day or so with committing though, in case there are additional suggestions.

llvm/include/llvm/CodeGen/MachineBasicBlock.h
1067

It looks like some existing uses of skipDebugInstructionsForward could be replaced by next_nodbg().

1073

It looks like some existing uses of skipDebugInstructionsBackward could be replaced by prev_nodbg().

This revision is now accepted and ready to land.Apr 16 2020, 3:15 AM
vsk updated this revision to Diff 258133.Apr 16 2020, 12:45 PM

Fold in changes to use {prev,next}_nodbg where they provide a clear readability
improvement.

This revision was automatically updated to reflect the committed changes.