This is an archive of the discontinued LLVM Phabricator instance.

Emit comment for gc.relocate's showing base and derived pointers in human readable form
ClosedPublic

Authored by igor-laevsky on Apr 28 2015, 9:30 AM.

Details

Summary

In AsmWriter emit comment for gc.relocate showing base and derived pointer in human readable form. This is a lot more convenient than looking just at the indexes in this call.

Example: %67 = call float addrspace(1)* @llvm.experimental.gc.relocate.p1f32(i32 %sp, i32 40, i32 31) ; (%base, %derived)

Diff Detail

Repository
rL LLVM

Event Timeline

igor-laevsky retitled this revision from to Emit comment for gc.relocate's showing base and derived pointers in human readable form.
igor-laevsky updated this object.
igor-laevsky edited the test plan for this revision. (Show Details)
igor-laevsky added a reviewer: reames.
igor-laevsky set the repository for this revision to rL LLVM.
igor-laevsky added a subscriber: Unknown Object (MLST).
reames edited edge metadata.Apr 29 2015, 9:44 AM

The idea seems helpful and reasonable, but I am not familiar enough with this code to review. I'd suggest checking git blame for the functions in question.

p.s. I suspect that this should be inside the annotation writer mechanism, but I haven't really checked to confirm.

Duncan, could you please take a look at this changes? I am asking you because I am seeing a lot of submits from you to AsmParser lately. Please correct me if you are the wrong person to ask.

Philip, by using AnnotationWriter I can achieve same thing only for calls to which we explicitly pass AnnotationWriter. And there is no default AnnotationWriter. Because of this, for example, calls to Value->dump() will not emit intended comments. Also -print-after-all will not emit them. This will reduce usability of this feature.

igor-laevsky edited edge metadata.

Move comment generation into separate function.

This revision was automatically updated to reflect the committed changes.