1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/IR
Marco Elver b835b9cf36 [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute
We really ought to support no_sanitize("coverage") in line with other
sanitizers. This came up again in discussions on the Linux-kernel
mailing lists, because we currently do workarounds using objtool to
remove coverage instrumentation. Since that support is only on x86, to
continue support coverage instrumentation on other architectures, we
must support selectively disabling coverage instrumentation via function
attributes.

Unfortunately, for SanitizeCoverage, it has not been implemented as a
sanitizer via fsanitize= and associated options in Sanitizers.def, but
rolls its own option fsanitize-coverage. This meant that we never got
"automatic" no_sanitize attribute support.

Implement no_sanitize attribute support by special-casing the string
"coverage" in the NoSanitizeAttr implementation. To keep the feature as
unintrusive to existing IR generation as possible, define a new negative
function attribute NoSanitizeCoverage to propagate the information
through to the instrumentation pass.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=49035

Reviewed By: vitalybuka, morehouse

Differential Revision: https://reviews.llvm.org/D102772
2021-05-25 12:57:14 +02:00
..
AbstractCallSite.cpp
AsmWriter.cpp [APFloat] convertToDouble/Float can work on shorter types 2021-05-21 11:02:51 +07:00
Assumptions.cpp
AttributeImpl.h Normalize interaction with boolean attributes 2021-04-17 08:17:33 +02:00
Attributes.cpp [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00
AutoUpgrade.cpp [IR][AutoUpgrade] Drop alignment from non-pointer parameters and returns 2021-05-20 09:54:38 -07:00
BasicBlock.cpp [IR] Add BasicBlock::isEntryBlock() (NFC) 2021-05-15 12:41:58 +02:00
BuiltinGCs.cpp [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
CMakeLists.txt [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
Comdat.cpp
ConstantFold.cpp Reapply [ConstantFold] Fold more operations to poison 2021-05-13 16:04:12 +02:00
ConstantFold.h
ConstantRange.cpp [NFC][ConstantRange] Add 'icmp' helper method 2021-04-10 19:38:55 +03:00
Constants.cpp [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding 2021-05-14 15:35:21 -07:00
ConstantsContext.h Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
Core.cpp [APFloat] convertToDouble/Float can work on shorter types 2021-05-21 11:02:51 +07:00
DataLayout.cpp [StructLayout] Use TrailingObjects to allocate space for MemberOffsets. 2021-03-30 17:36:50 -07:00
DebugInfo.cpp [DebugInfo] Move the findDbg* functions into DebugInfo.cpp 2021-04-19 10:30:25 +01:00
DebugInfoMetadata.cpp 3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-05-21 11:06:20 +01:00
DebugLoc.cpp
DiagnosticHandler.cpp
DiagnosticInfo.cpp [Diagnostics] Allow emitting analysis and missed remarks on functions 2021-05-19 15:10:20 -04:00
DiagnosticPrinter.cpp
DIBuilder.cpp Add debug support for set types 2021-03-29 18:04:48 -07:00
Dominators.cpp [gvn] Precisely propagate equalities to phi operands 2021-03-08 08:59:00 -08:00
FPEnv.cpp
Function.cpp [IR][AutoUpgrade] Drop alignment from non-pointer parameters and returns 2021-05-20 09:54:38 -07:00
GCStrategy.cpp [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
Globals.cpp [NFC] Use Aliasee to determine Type and AddrSpace in GlobalAlias::create() 2021-05-02 11:50:08 -07:00
GVMaterializer.cpp
InlineAsm.cpp Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
Instruction.cpp [SROA] Allow SROA on pointers with invariant group intrinsic uses 2021-04-05 19:53:40 -07:00
Instructions.cpp [Verifier] Move some atomicrmw/cmpxchg checks to instruction creation 2021-05-21 13:41:17 -07:00
IntrinsicInst.cpp 3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-05-21 11:06:20 +01:00
IRBuilder.cpp [SVE][LoopVectorize] Add support for scalable vectorization of first-order recurrences 2021-05-06 11:35:39 +01:00
IRPrintingPasses.cpp
LegacyPassManager.cpp [opt] Error if -debug-pass is specified alongside the new PM 2021-03-02 15:59:28 -08:00
LLVMContext.cpp [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
LLVMContextImpl.cpp [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-16 09:40:53 -08:00
LLVMContextImpl.h [IR] Introduce the opaque pointer type 2021-05-13 15:22:27 -07:00
LLVMRemarkStreamer.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
Mangler.cpp [IR] Use range-based for loops (NFC) 2021-02-27 10:09:25 -08:00
MDBuilder.cpp
Metadata.cpp [SamplePGO] Keeping prof metadata for IndirectBrInst 2021-03-30 10:44:48 -07:00
MetadataImpl.h
Module.cpp [IR] make stack-protector-guard-* flags into module attrs 2021-05-21 15:53:30 -07:00
ModuleSummaryIndex.cpp [IR] Use range-based for loops (NFC) 2021-03-01 23:40:33 -08:00
Operator.cpp 3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-05-21 11:06:20 +01:00
OptBisect.cpp
Pass.cpp [PM] Avoid duplicates in the Used/Preserved/Required sets 2021-01-20 13:55:18 +01:00
PassInstrumentation.cpp
PassManager.cpp
PassRegistry.cpp
PassTimingInfo.cpp
PrintPasses.cpp
ProfileSummary.cpp
PseudoProbe.cpp [CSSPGO] Deduplicating dangling pseudo probes. 2021-03-03 22:44:42 -08:00
ReplaceConstant.cpp [HIP] Fix managed variable linkage 2021-02-23 22:34:45 -05:00
SafepointIRVerifier.cpp [llvm] Use append_range (NFC) 2021-01-27 23:25:41 -08:00
Statepoint.cpp
StructuralHash.cpp
SymbolTableListTraitsImpl.h
Type.cpp [IR] Introduce the opaque pointer type 2021-05-13 15:22:27 -07:00
TypeFinder.cpp
Use.cpp
User.cpp Use AssumeInst in a few more places [nfc] 2021-04-06 13:18:53 -07:00
Value.cpp [IR] Allow Value::replaceUsesWithIf() to process constants 2021-05-25 02:12:01 -07:00
ValueSymbolTable.cpp
Verifier.cpp [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00