llvm-project/llvm/lib/IR
Nick Desaulniers 140bfdca60 [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns
Follow up fix to
commit 2240d72f15 ("[X86] initial -mfunction-return=thunk-extern
support")
https://reviews.llvm.org/D129572

@nathanchance reported that -mfunction-return=thunk-extern was failing
to annotate the asan and tsan contructors.
https://lore.kernel.org/llvm/Ys7pLq+tQk5xEa%2FB@dev-arch.thelio-3990X/

I then noticed the same occurring for gcov synthetic functions.

Similar to
commit 2786e67 ("[IR][sanitizer] Add module flag "frame-pointer" and set
it for cc1 -mframe-pointer={non-leaf,all}")
define a new module level MetaData, "fn_ret_thunk_extern", then when set
adds the fn_ret_thunk_extern IR Fn Attr to synthetically created
Functions.

Fixes https://github.com/llvm/llvm-project/issues/56514

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129709
2022-07-14 11:25:24 -07:00
..
AbstractCallSite.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
AsmWriter.cpp Remove 'no_sanitize_memtag'. Add 'sanitize_memtag'. 2022-07-13 08:54:41 -07:00
Assumptions.cpp [Attributor][OpenMP] Add assumption for non-call assembly instructions 2022-03-28 20:57:52 -05:00
AttributeImpl.h attributes: introduce allockind attr for describing allocator fn behavior 2022-05-31 10:01:17 -04:00
Attributes.cpp Don't use Optional::hasValue (NFC) 2022-06-20 11:49:10 -07:00
AutoUpgrade.cpp [Bitcode] Restore bitcast expression auto-upgrade 2022-06-29 14:35:56 +02:00
BasicBlock.cpp Move BasicBlock::getTerminator definition to the header 2022-04-05 13:11:38 -07:00
BuiltinGCs.cpp [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
CMakeLists.txt [VP] Introducing VectorBuilder, the VP intrinsic builder 2022-03-07 10:02:07 +01:00
Comdat.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
ConstantFold.cpp [ConstExpr] Don't create div/rem expressions 2022-07-05 15:54:53 +02:00
ConstantRange.cpp [ConstantRange] Fix sdiv() with one bit values (PR56333) 2022-07-01 15:44:59 +02:00
Constants.cpp [IR] Remove support for float binop constant expressions 2022-07-12 09:40:49 +02:00
ConstantsContext.h [IR] Remove support for insertvalue constant expression 2022-07-04 09:27:22 +02:00
Core.cpp [IR] Remove support for float binop constant expressions 2022-07-12 09:40:49 +02:00
DIBuilder.cpp [DebugInfo] Add a TargetFuncName field in DISubprogram for 2022-04-15 16:38:23 -04:00
DataLayout.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
DebugInfo.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
DebugInfoMetadata.cpp Don't use Optional::hasValue (NFC) 2022-06-20 20:17:57 -07:00
DebugLoc.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
DiagnosticHandler.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
DiagnosticInfo.cpp [misexpect] Re-implement MisExpect Diagnostics 2022-04-19 21:23:48 +00:00
DiagnosticPrinter.cpp
Dominators.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
FPEnv.cpp [iwyu] Fix some header include regression 2022-04-05 15:02:03 +02:00
Function.cpp [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns 2022-07-14 11:25:24 -07:00
GCStrategy.cpp
GVMaterializer.cpp [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
Globals.cpp [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
IRBuilder.cpp [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
IRPrintingPasses.cpp
InlineAsm.cpp [InlineAsm] Improve error messages for invalid constraint strings 2022-07-12 11:41:16 +02:00
Instruction.cpp [SCCP][IR] Landing pads are not safe to remove 2022-03-14 14:59:32 +01:00
Instructions.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
IntrinsicInst.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
LLVMContext.cpp Don't use Optional::hasValue (NFC) 2022-06-20 20:05:16 -07:00
LLVMContextImpl.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
LLVMContextImpl.h [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
LLVMRemarkStreamer.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
LegacyPassManager.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
MDBuilder.cpp [ubsan] Using metadata instead of prologue data for function sanitizer 2022-06-27 12:09:13 -07:00
Mangler.cpp [Mangler] Mangle aliases to fastcall/vectorcall functions correctly 2022-02-25 22:06:47 +00:00
Metadata.cpp [NFC] Fix compile time regression seen on some benchmarks after a630ea3003 commit 2022-07-12 15:00:27 +02:00
MetadataImpl.h
Module.cpp [X86] Support -mstack-protector-guard-symbol 2022-07-12 10:17:00 +08:00
ModuleSummaryIndex.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
Operator.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
OptBisect.cpp ManagedStatic: remove many straightforward uses in llvm 2022-07-10 10:29:15 +02:00
Pass.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
PassInstrumentation.cpp
PassManager.cpp Revert "[PassManager] Add pretty stack entries before P->run() call." 2022-03-09 18:46:32 +00:00
PassRegistry.cpp ManagedStatic: remove many straightforward uses in llvm 2022-07-10 10:29:15 +02:00
PassTimingInfo.cpp
PrintPasses.cpp
ProfileSummary.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
PseudoProbe.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
ReplaceConstant.cpp [NFC] Remove unnecessary "#include"s from header files 2022-02-23 01:20:48 -08:00
SSAContext.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
SafepointIRVerifier.cpp freeze does not change the constant property 2022-06-14 19:53:26 +03:00
Statepoint.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
StructuralHash.cpp
SymbolTableListTraitsImpl.h
Type.cpp Cleanup header dependencies in LLVMCore 2022-02-02 06:54:20 +01:00
TypeFinder.cpp [IR] Support ifuncs in opaque pointer mode 2022-01-27 13:01:33 +01:00
Use.cpp [IR] Remove unused forward declarations (NFC) 2022-04-03 12:54:54 -07:00
User.cpp [IR] Report whether replaceUsesOfWith() changed something (NFC) 2022-05-18 11:46:28 +02:00
Value.cpp [IR] Fix typo in comment. NFC 2022-06-30 11:30:23 +01:00
ValueSymbolTable.cpp
VectorBuilder.cpp [llvm] Don't use Optional::hasValue (NFC) 2022-06-25 21:42:52 -07:00
Verifier.cpp [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00