llvm-project/llvm/lib/Transforms/IPO
Manoj Gupta 77eeac3d9e 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
..
AlwaysInliner.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ArgumentPromotion.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BarrierNoopPass.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
BlockExtractor.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CMakeLists.txt Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
CalledValuePropagation.cpp [CVP] Handle calls with void return value. No need to create CVPLattice state for it. 2018-07-09 14:53:37 +00:00
ConstantMerge.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
CrossDSOCFI.cpp Don't call skipModule for CFI lowering passes. 2018-04-12 22:04:11 +00:00
DeadArgumentElimination.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
ElimAvailExtern.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
ExtractGV.cpp Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
ForceFunctionAttrs.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
FunctionAttrs.cpp Use SmallPtrSet explicitly for SmallSets with pointer types (NFC). 2018-06-12 11:16:56 +00:00
FunctionImport.cpp [ThinLTO] Print names in function import debug messages when available 2018-06-27 18:03:39 +00:00
GlobalDCE.cpp Remove redundant includes from lib/Transforms. 2017-12-13 21:31:01 +00:00
GlobalOpt.cpp llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
GlobalSplit.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
IPConstantPropagation.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
IPO.cpp Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
InferFunctionAttrs.cpp Remove redundant includes from lib/Transforms. 2017-12-13 21:31:01 +00:00
InlineSimple.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Inliner.cpp [ThinLTO] Port InlinerFunctionImportStats handling to new PM 2018-06-28 20:07:47 +00:00
Internalize.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LoopExtractor.cpp Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
LowerTypeTests.cpp [ThinLTO] Rename index IsAnalysis flag to HaveGVs (NFC) 2018-06-06 22:22:01 +00:00
MergeFunctions.cpp Use SmallPtrSet explicitly for SmallSets with pointer types (NFC). 2018-06-12 11:16:56 +00:00
PartialInlining.cpp [STLExtras] Add distance() for ranges, pred_size(), and succ_size() 2018-05-10 23:01:54 +00:00
PassManagerBuilder.cpp [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
PruneEH.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
SCCP.cpp Revert r335206 "Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions." 2018-06-21 19:18:36 +00:00
SampleProfile.cpp [SampleFDO] Add an option to turn on/off warning about samples unused. 2018-06-25 15:40:31 +00:00
StripDeadPrototypes.cpp
StripSymbols.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
SyntheticCountsPropagation.cpp [SyntheticCounts] Rewrite the code using only graph traits. 2018-01-25 22:02:29 +00:00
ThinLTOBitcodeWriter.cpp [ThinLTOBitcodeWriter] Emit summaries for regular LTO modules 2018-06-01 15:20:47 +00:00
WholeProgramDevirt.cpp [ThinLTO] Rename index IsAnalysis flag to HaveGVs (NFC) 2018-06-06 22:22:01 +00:00