Page MenuHomePhabricator

Emit DICallSite and DICallSiteParam metadata

Authored by djtodoro on Feb 11 2019, 3:28 AM.



Attach on call/invoke IR instructions '!call_site' MD node that references on particular DICallSite metadata.

Also this creates DICallsite and DICallSiteParam metadata.

An example of call site metadata:
!DICallSite(scope: !7, file: !8, parameters: !15, line: 8, calledSubprogram: !18)
Called subprogram references to DISubprogram of a called function. For external functions, we generate new DISubprogram at this place.

An example of call site parameter metadata:
!DICallSiteParam(argno: 1, var: !20, expr: !DIExpression())
DIExpression within DICallSiteparam is used as backup location information when primary parameter's location is lost. This basically describes technique of jumping in parent frame and printing certain argument expressions. Expressions with multiple variables (e.g. foo(a+b)) is not supported for now.

Authors: @asowda, @NikolaPrica, @djtodoro, @ivanbaev

Diff Detail