llvm-project/llvm/test/Transforms/DeadArgElim
Venkata Ramanaiah Nalamothu 340b0ca900 [llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed
Adding the `DW_CC_nocall` calling convention to the function debug metadata is needed when either the return values or the arguments of a function are removed as this helps in informing debugger that it may not be safe to call this function or try to interpret the return value.
This translates to setting `DW_AT_calling_convention` with `DW_CC_nocall` for appropriate DWARF DIEs.

The DWARF5 spec (section 3.3.1.1 Calling Convention Information) says:

If the `DW_AT_calling_convention` attribute is not present, or its value is the constant `DW_CC_normal`, then the subroutine may be safely called by obeying the `standard` calling conventions of the target architecture. If the value of the calling convention attribute is the constant `DW_CC_nocall`, the subroutine does not obey standard calling conventions, and it may not be safe for the debugger to call this subroutine.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D127134
2022-06-15 03:30:15 +05:30
..
2006-06-27-struct-ret.ll
2007-02-07-FuncRename.ll
2007-10-18-VarargsReturn.ll
2007-12-20-ParamAttrs.ll
2008-01-16-VarargsParamAttrs.ll
2008-06-23-DeadAfterLive.ll
2009-03-17-MRE-Invoke.ll
2010-04-30-DbgInfo.ll [llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed 2022-06-15 03:30:15 +05:30
2013-05-17-VarargsAndBlockAddress.ll
NoundefAttrs.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
aggregates.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
allocsize.ll
basictest.ll
byref.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
call_profile.ll
canon.ll
comdat.ll
dbginfo-preserve-dbgloc.ll
dbginfo-update-dbgval-local.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
dbginfo-update-dbgval.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
dbginfo.ll
dead_vaargs.ll
deadexternal.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
deadretval.ll
deadretval2.ll
fct_ptr.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
func_metadata.ll
funclet.ll
keepalive.ll Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes" 2022-03-25 09:36:50 -05:00
linkage.ll
multdeadretval.ll
musttail-caller.ll
naked_functions.ll
nonzero-address-spaces.ll
opaque-ptr.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00
operandbundle.ll
preserve-used-ret.ll
returned.ll
variadic_safety.ll [DeadArgElim] Use poison instead of undef as placeholder for dead arguments 2022-05-19 18:00:24 +01:00