1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/IR
Manoj Gupta 647946fa14 llvm: Add support for "-fno-delete-null-pointer-checks"
Summary:
Support for this option is needed for building Linux kernel.
This is a very frequently requested feature by kernel developers.

More details : https://lkml.org/lkml/2018/4/4/601

GCC option description for -fdelete-null-pointer-checks:
This Assume that programs cannot safely dereference null pointers,
and that no code or data element resides at address zero.

-fno-delete-null-pointer-checks is the inverse of this implying that
null pointer dereferencing is not undefined.

This feature is implemented in LLVM IR in this CL as the function attribute
"null-pointer-is-valid"="true" in IR (Under review at D47894).
The CL updates several passes that assumed null pointer dereferencing is
undefined to not optimize when the "null-pointer-is-valid"="true"
attribute is present.

Reviewers: t.p.northover, efriedma, jyknight, chandlerc, rnk, srhines, void, george.burgess.iv

Reviewed By: efriedma, george.burgess.iv

Subscribers: eraman, haicheng, george.burgess.iv, drinkcat, theraven, reames, sanjoy, xbolva00, llvm-commits

Differential Revision: https://reviews.llvm.org/D47895

llvm-svn: 336613
2018-07-09 22:27:23 +00:00
..
AsmWriter.cpp [IR] Fix inconsistent declaration parameter name 2018-07-06 19:26:00 +00:00
AttributeImpl.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Attributes.cpp [ADT] Make escaping fn conform to coding guidelines 2018-05-31 17:01:42 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp [X86] Remove FMA4 scalar intrinsics. Use llvm.fma intrinsic instead. 2018-07-06 07:14:41 +00:00
BasicBlock.cpp Rename skipDebugInfo -> skipDebugIntrinsics, NFC 2018-06-26 21:16:59 +00:00
CMakeLists.txt Reappl "[Dominators] Add the DomTreeUpdater class" 2018-07-03 02:06:23 +00:00
Comdat.cpp [LLVM-C] [bindings/go] Add C and Golang bindings for COMDAT 2018-03-14 18:33:53 +00:00
ConstantFold.cpp llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
ConstantFold.h
ConstantRange.cpp [IR] Strip trailing whitespace. NFC 2018-07-03 12:39:52 +00:00
Constants.cpp [Constants] extend getBinOpIdentity(); NFC 2018-07-06 15:18:58 +00:00
ConstantsContext.h Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Core.cpp [LLVM-C] Improve Bindings For Aliases 2018-05-20 23:49:08 +00:00
DataLayout.cpp Use uniform mechanism for OOM errors handling 2018-06-09 05:19:45 +00:00
DebugInfo.cpp [IR] Strip trailing whitespace. NFC 2018-07-03 12:39:52 +00:00
DebugInfoMetadata.cpp Fix DIExpression::ExprOperand::appendToVector 2018-07-06 21:06:21 +00:00
DebugLoc.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
DiagnosticHandler.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DiagnosticInfo.cpp This change add's optimization remark in LoopVersioning LICM pass. 2018-01-23 09:47:28 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp [DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFC 2018-06-01 23:15:09 +00:00
Dominators.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DomTreeUpdater.cpp Reappl "[Dominators] Add the DomTreeUpdater class" 2018-07-03 02:06:23 +00:00
Function.cpp llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
Globals.cpp Sink Analysis/ObjectUtil(canBeOmittedFromSymbolTable) into IR so it can be legitimately be used by Object/IRSymtab 2018-03-21 19:23:45 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp [IR] Introduce helpers to skip debug instructions (NFC) 2018-06-19 23:42:17 +00:00
Instructions.cpp Improve ConvertDebugDeclareToDebugValue 2018-06-26 06:17:00 +00:00
IntrinsicInst.cpp [DebugInfo] Fix PR37395. 2018-07-03 07:56:04 +00:00
IRBuilder.cpp [IR] Strip trailing whitespace. NFC 2018-07-03 12:39:52 +00:00
IRPrintingPasses.cpp [Debugify] Add -debugify-each for testing each pass in a pipeline 2018-05-15 00:29:27 +00:00
LegacyPassManager.cpp [IR] Strip trailing whitespace. NFC 2018-07-03 12:39:52 +00:00
LLVMBuild.txt
LLVMContext.cpp allow custom OptBisect classes set to LLVMContext 2018-04-05 10:29:37 +00:00
LLVMContextImpl.cpp [LLVMContext] Detecting leaked instructions with metadata 2018-06-29 20:13:13 +00:00
LLVMContextImpl.h Extend the GlobalObject metadata interface 2018-05-31 13:29:58 +00:00
Mangler.cpp [IR] Avoid the need to prefix MS C++ symbols with '\01' 2018-03-16 20:13:32 +00:00
MDBuilder.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Metadata.cpp Extend the GlobalObject metadata interface 2018-05-31 13:29:58 +00:00
MetadataImpl.h
Module.cpp Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Add GraphTraits for FunctionSummaries 2018-02-19 15:14:50 +00:00
Operator.cpp Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
OptBisect.cpp [NFC] OptPassGate extracted from OptBisect 2018-03-27 16:57:20 +00:00
Pass.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
PassManager.cpp
PassRegistry.cpp
ProfileSummary.cpp [ProfileSummary] Move a vector we're about to destroy anyway; NFC 2018-04-12 20:54:05 +00:00
SafepointIRVerifier.cpp SafepointIRVerifier should ignore dead blocks and dead edges 2018-06-25 13:51:11 +00:00
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp [IR] Strip trailing whitespace. NFC 2018-07-03 12:39:52 +00:00
TypeFinder.cpp Use ranged for loops in TypeFinder.cpp, NFC 2018-02-08 18:02:27 +00:00
Use.cpp
User.cpp Remove redundant includes from lib/IR. 2017-12-13 21:30:52 +00:00
Value.cpp Implement strip.invariant.group 2018-07-02 04:49:30 +00:00
ValueSymbolTable.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Verifier.cpp Use Type::isIntOrPtrTy where possible, NFC 2018-07-06 20:17:42 +00:00