This is an archive of the discontinued LLVM Phabricator instance.

ARM: skip debug instructions when matching jump-table patterns.
ClosedPublic

Authored by t.p.northover on Jan 18 2023, 7:14 AM.

Details

Reviewers
t.p.northover
Summary

When working out whether we can see a compressible jump-table pattern during ConstantIslands, we were stopping when we saw a debug instruction. Instead it's better to keep iterating backwards to the first real instruction.

Diff Detail

Event Timeline

t.p.northover created this revision.Jan 18 2023, 7:14 AM
t.p.northover requested review of this revision.Jan 18 2023, 7:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 7:14 AM
jmorse added a subscriber: jmorse.Jan 23 2023, 4:33 AM
jmorse added inline comments.
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
2290–2292

I believe you should be able to use skipDebugInstructionsBackward to achieve this more concisely.

Oh, thanks. I thought I'd seen something like that but only turned up the IR-level ones in my search. Switched. Also sanitized some of the strings in the test.

jmorse added a comment.Feb 7 2023, 2:54 AM

LGTM from a debug-info perspective; I know next to nothing about ARM though so can't venture an opinion there. A smaller test would be appreciated if that's possible.

(NB: with no reviewers this will be getting little visibility, this showed up for me as I filter for debug-info stuff).

t.p.northover accepted this revision.Feb 10 2023, 4:28 AM

Thanks, resynthesized a test from a much smaller, single, switch and committed as dc700f1e4daf.

This revision is now accepted and ready to land.Feb 10 2023, 4:28 AM
t.p.northover closed this revision.Feb 10 2023, 4:28 AM