This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Change label numbers to variables in test
ClosedPublic

Authored by aheejin on Jan 4 2021, 3:33 PM.

Details

Summary

cfg-stackify-eh.ll contains many CHECK lines specifying label / catch
comments with numbers. These numbers are subject to change every time
any block/loop/try is added in the middle in existing functions or any
other function is added in the middle of the file, generating a large
number of lines in diffs. This change converts them to variables so they
can be more resistent to future changes.

Diff Detail

Event Timeline

aheejin created this revision.Jan 4 2021, 3:33 PM
aheejin requested review of this revision.Jan 4 2021, 3:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2021, 3:33 PM
tlively accepted this revision.Jan 5 2021, 10:22 AM

Looks good! A few of the replacements in the code don't match the replacements in the comments, but I assume the comments were previously just stale.

llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
440

This should have been label35 rather than label4 previously, right?

581

And catch19 should have been catch23?

This revision is now accepted and ready to land.Jan 5 2021, 10:22 AM
dschuff accepted this revision.Jan 6 2021, 2:15 PM
aheejin added inline comments.Jan 8 2021, 5:42 AM
llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
440

Yes, the comment looks stale already. Hope this CL prevents something like this in future...

581

Yes here too. These numbers changed whenever I added a test in the middle.

This revision was automatically updated to reflect the committed changes.