llvm-project/llvm/test/Transforms
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
..
ADCE
AddDiscriminators
AggressiveInstCombine [AggressiveInstcombine] Conditionally fold saturated fptosi to llvm.fptosi.sat 2022-06-10 09:36:09 +01:00
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion] Add unused-argument.ll test (NFC) 2022-05-18 10:05:13 +03:00
AtomicExpand [PowerPC] Correct test RUN line. NFC. 2022-06-14 14:56:00 +08:00
Attributor Revert "[Attributor] Ensure to use the proper liveness AA" 2022-06-10 14:05:09 -07:00
BDCE
BlockExtractor [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
BranchFolding
CallSiteSplitting [llvm][test] rewrite callbr to use i rather than X constraint NFC 2022-01-11 11:31:08 -08:00
CalledValuePropagation
CanonicalizeAliases
CanonicalizeFreezeInLoops
CodeExtractor [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
CodeGenPrepare [CGP] Also freeze ctlz/cttz operand when despeculating 2022-06-10 09:46:10 +02:00
ConstantHoisting [OpaquePtr][AArch64] Use elementtype on ldxr/stxr 2022-03-14 10:09:59 -07:00
ConstantMerge
ConstraintElimination [ConstraintElimination] Support constraints with only const ops. 2022-06-14 10:37:12 +01:00
Coroutines [Coroutines] Convert coroutine.presplit to enum attr 2022-06-14 14:23:46 +08:00
CorrelatedValuePropagation [LVI] Compute range for xor 2022-05-17 10:18:38 +02:00
CrossDSOCFI
DCE [DCE] Update tests to use opaque pointers (NFC) 2022-06-10 17:31:35 +02:00
DFAJumpThreading [DFAJumpThreading] Relax analysis to handle unpredictable initial values 2022-05-26 11:29:54 -04:00
DeadArgElim [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
DeadStoreElimination [test][DSE] Precommit test 2022-04-12 16:21:04 -07:00
DivRemPairs [Mips] Implement hasDivRemOp() 2022-05-16 14:45:40 +08:00
EarlyCSE [SimplifyCFG,EarlyCSE] Update 2 tests to not branch on undef (NFC). 2022-06-12 18:03:26 +01:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp [ExpandMemCmp] Properly expand `bcmp` to an equality pattern. 2022-04-15 11:26:24 +02:00
FixIrreducible LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
Float2Int [Float2Int] Make sure dependent ranges are calculated first (PR54669) 2022-04-04 10:18:39 +02:00
ForcedFunctionAttrs
FunctionAttrs [Coroutines] Convert coroutine.presplit to enum attr 2022-06-14 14:23:46 +08:00
FunctionImport [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
FunctionSpecialization [FuncSpec]Fix assertion failure when value is not added to solver 2022-06-10 18:45:53 +08:00
GCOVProfiling [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
GVN [CaptureTracking] Increase limit and use it for all visited uses. 2022-06-02 21:43:58 +01:00
GVNHoist [GVNHoist] drop debug location according to the debug info guide 2022-03-30 20:17:53 -07:00
GVNSink [GVNSink] Make GVNSink resistant against self referencing instructions (PR36954) 2022-05-10 16:06:12 +02:00
GlobalDCE [GlobalDCE] [VFE] Avoid dropping vfunc dependencies when an invalid vtable entry is present 2022-02-17 19:41:46 -08:00
GlobalMerge
GlobalOpt [GlobalOpt][test] Remove br i1 undef 2022-06-10 20:36:22 -07:00
GlobalSplit
GuardWidening [GuardWidening] Remove nuw/nsw flags for hoisted instructions 2022-05-26 13:20:55 +07:00
HardwareLoops
HelloNew
HotColdSplit [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
IRCE
IROutliner [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
IndVarSimplify [IndVarSimplify] Don't assert that terminator is not SCEVable (PR55925) 2022-06-09 10:12:13 +02:00
IndirectBrExpand
InferAddressSpaces [InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair 2022-04-28 11:10:55 +08:00
InferFunctionAttrs BuildLibCalls: infer allockind attributes on relevant functions 2022-05-31 10:01:17 -04:00
Inline [inliner] Add per-SCC-pass InlineAdvisor printing option 2022-06-14 08:06:52 -07:00
InstCombine [ValueTracking] recognize sub X, (X -nsw Y) as not overflowing 2022-06-14 14:51:49 -04:00
InstMerge
InstNamer
InstSimplify [InstSimplify][IR] Handle trapping constant aggregate (PR49839) 2022-06-13 12:35:17 +02:00
InterleavedAccess
Internalize
JumpThreading [NFC][JumpThreading] Remove InsertFreezeWhenUnfoldingSelect pass parameter 2022-05-26 16:13:34 -07:00
LCSSA
LICM [SSAUpdaterImpl] Do not generate phi node with all the same incoming values 2022-06-03 12:24:33 +07:00
LoadStoreVectorizer [AMDGPU][FIX] Proper load-store-vectorizer result with opaque pointers 2022-04-15 13:42:46 -05:00
LoopBoundSplit
LoopDataPrefetch
LoopDeletion [InstSimplify] Handle unknown function context in pointer icmp fold (PR54615) 2022-05-10 11:48:43 +02:00
LoopDistribute Autogen a couple of predicated SCEV tests 2022-02-11 13:56:35 -08:00
LoopFlatten [LoopFlatten] Fix crash if the inner loop trip count comes from a sext instruction. 2022-06-07 08:21:21 -07:00
LoopFusion [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
LoopIdiom [LoopIdiom] Fix bailout for aliasing in memcpy transform. 2022-05-31 17:24:23 -07:00
LoopInstSimplify [LoopInstSimplify] Ignore users in unreachable blocks. PR55072 2022-04-25 17:35:28 +07:00
LoopInterchange Revert "[LoopInterchange] New cost model for loop interchange" 2022-06-03 00:52:08 +00:00
LoopLoadElim [NFC][LAA] Match-up type sizes for possible extensions, based on actual bit-size rather than rounded-up byte size. 2022-04-22 23:16:20 -07:00
LoopPredication
LoopReroll
LoopRotate Pipe potentially invalid InstructionCost through CodeMetrics 2022-06-09 15:17:24 -07:00
LoopSimplify [BasicBlockUtils] Do not move loop metadata if outer loop header. 2022-05-23 16:39:54 -07:00
LoopSimplifyCFG [LoopSimplifyCFG] Check predecessors of exits before marking them dead. 2022-03-18 08:54:44 +00:00
LoopStrengthReduce Recommit "[SCEV] Look through single value PHIs." (take 3) 2022-06-09 15:20:10 +01:00
LoopTransformWarning
LoopUnroll Plumb InstructionCost through unroll costing 2022-06-09 15:42:53 -07:00
LoopUnrollAndJam [LoopUnroll] Disable loop unroll when user explicitly asks for unroll-and-jam 2021-12-15 15:58:05 +00:00
LoopVectorize [LV] Update test to use GEP so it is not dead. 2022-06-12 16:57:47 +01:00
LoopVersioning [IRBuilder] Migrate and-folding to value-based FoldAnd. 2022-01-20 10:22:21 +00:00
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics [builtin_object_size] Basic support for posix_memalign 2022-04-08 09:31:11 +02:00
LowerExpectIntrinsic
LowerGlobalDestructors Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" 2022-03-23 18:36:55 -07:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Check if iterator is at beginning of BB in optimizeTranspose. 2022-06-14 21:37:02 +01:00
LowerSwitch LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
LowerTypeTests [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg [Mem2Reg] Check that load type matches alloca type 2022-02-08 17:16:15 +01:00
MemCpyOpt [MemCpyOpt] Work around PR54682 2022-04-04 10:19:51 +02:00
MergeFunc [FileCheck] Catch missspelled directives. 2022-05-26 11:37:19 +01:00
MergeICmps Reapply [MergeICmps] Don't require GEP 2022-03-04 11:39:11 +01:00
MetaRenamer [TLI] Check that malloc argument has type size_t 2022-03-14 17:22:24 +01:00
NameAnonGlobals
NaryReassociate
NewGVN [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
ObjCARC Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes" 2022-03-25 09:36:50 -05:00
OpenMP Revert "[Attributor] Replace AAValueSimplify with AAPotentialValues" 2022-06-09 17:04:01 +02:00
PGOProfile [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
PartialInlining
PartiallyInlineLibCalls [PartiallyInlineLibCalls] Don't partially inline a musttail libcall. 2022-04-05 22:30:50 +03:00
PhaseOrdering [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate Split fast-basictest.ll according to passes responsible for optimizations 2022-02-04 12:20:10 +03:00
Reg2Mem
RelLookupTableConverter/X86 [RelLookupTableConverter] Ensure that GV, GEP and load types match 2022-02-17 12:05:05 +01:00
RewriteStatepointsForGC [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
SCCP [SCCP] Don't mark ranges from branch conditions as potentially undef 2022-06-07 10:20:24 +02:00
SLPVectorizer [NFC] Add 3 more -inseltpoison.ll test variations 2022-06-10 14:06:32 +01:00
SROA [NFC] Remove straight UB from SROA tests 2022-06-13 08:59:07 +01:00
SafeStack [safestack] Support safestack in stack size diagnostics 2022-04-20 18:29:40 +00:00
SampleProfile [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
ScalarizeMaskedMemIntrin
Scalarizer [Scalarizer] Regenerate test checks (NFC) 2022-05-31 17:23:15 +02:00
SeparateConstOffsetFromGEP [CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC. 2022-02-18 16:10:56 +00:00
SimpleLoopUnswitch [SimpleLoopUnswitch] Always skip trivial select and set condition. 2022-05-26 09:46:24 +01:00
SimplifyCFG [SimplifyCFG] Handle trapping aggregates (PR49839) 2022-06-13 14:56:49 +02:00
Sink [Sink] Don't sink non-willreturn calls (PR51188) 2022-04-07 16:35:05 +02:00
SpeculativeExecution
StraightLineStrengthReduce [CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC. 2022-02-18 16:10:56 +00:00
StripDeadPrototypes
StripSymbols
StructurizeCFG LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
SyntheticCountsPropagation
TailCallElim [IR] Define "ptrauth" operand bundle. 2022-02-14 11:27:35 -08:00
ThinLTOBitcodeWriter [ThinLTO][MC] Use conditional assignments for promotion aliases 2021-12-10 12:21:37 -08:00
TypePromotion [TypePromotion] Avoid unnecessary trunc zext pairs 2022-05-24 15:34:36 +01:00
UnifyFunctionExitNodes
UnifyLoopExits LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
Util [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
VectorCombine [ValueTracking] Enable -branch-on-poison-as-ub by default 2022-06-01 10:46:06 +02:00
WholeProgramDevirt [WPD] Add statistics 2022-04-05 18:48:23 -07:00