This is an archive of the discontinued LLVM Phabricator instance.

Parse and print DIExpressions inline to ease IR and MIR testing
ClosedPublic

Authored by rnk on Aug 23 2017, 11:55 AM.

Details

Summary

Most DIExpressions are empty or very simple. When they are complex, they
tend to be unique, so checking them inline is reasonable.

This also avoids the need for CodeGen passes to append to the
llvm.dbg.mir named md node.

See also PR22780, for making DIExpression not be an MDNode.

Event Timeline

rnk created this revision.Aug 23 2017, 11:55 AM
aprantl accepted this revision.Aug 23 2017, 12:07 PM

Thanks! Looks good (one comment inline).

llvm/test/Transforms/InstCombine/debuginfo-dce.ll
77

I think it would be safer to have everything on one line.

92

same here

This revision is now accepted and ready to land.Aug 23 2017, 12:07 PM

You'll likely need to update clang tests, too.

rnk added a comment.Aug 23 2017, 12:49 PM

Thanks!

You'll likely need to update clang tests, too.

Yeah, I ran those and went to lunch. Only 8 failures! =D

rnk updated this revision to Diff 112428.Aug 23 2017, 1:31 PM
  • fix clang tests
  • remove stale dump call
This revision was automatically updated to reflect the committed changes.