[PATCH] DataLayout is mandatory, update the API to reflect it with references.
Mehdi AMINI
mehdi.amini at apple.com
Sun Mar 8 19:41:04 PDT 2015
Hi echristo,
Now that the DataLayout is a mandatory part of the module, let's start
cleaning the codebase. This patch is a first attempt at doing that.
This patch is not exactly NFC as for instance some places were passing a
nullptr instead of the DataLayout, possibly just because there was a
default value on the DataLayout argument to many functions in the API.
Even though it is not purely NFC, there is no change in the validation.
I turned as many pointer to DataLayout to references, this helped figuring
out all the places where a nullptr could come up.
I had initially a local version of this patch broken into over 30 independant,
commits but some later commit were cleaning the API and touching part of the
code modified in the previous commits, so the intermediate steps are not very
clean. Here is the squashed result.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8158
Files:
include/llvm/Analysis/AliasAnalysis.h
include/llvm/Analysis/ConstantFolding.h
include/llvm/Analysis/IVUsers.h
include/llvm/Analysis/InstructionSimplify.h
include/llvm/Analysis/LazyValueInfo.h
include/llvm/Analysis/Loads.h
include/llvm/Analysis/LoopAccessAnalysis.h
include/llvm/Analysis/MemoryBuiltins.h
include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/Analysis/PHITransAddr.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/ScalarEvolutionExpander.h
include/llvm/Analysis/TargetFolder.h
include/llvm/Analysis/ValueTracking.h
include/llvm/IR/IRBuilder.h
include/llvm/IR/InstrTypes.h
include/llvm/IR/Value.h
include/llvm/Target/TargetLowering.h
include/llvm/Transforms/IPO/LowerBitSets.h
include/llvm/Transforms/Utils/BuildLibCalls.h
include/llvm/Transforms/Utils/Cloning.h
include/llvm/Transforms/Utils/Local.h
include/llvm/Transforms/Utils/LoopUtils.h
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/ConstantFolding.cpp
lib/Analysis/DependenceAnalysis.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/IPA/InlineCost.cpp
lib/Analysis/IVUsers.cpp
lib/Analysis/InstructionSimplify.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/Lint.cpp
lib/Analysis/Loads.cpp
lib/Analysis/LoopAccessAnalysis.cpp
lib/Analysis/MemDerefPrinter.cpp
lib/Analysis/MemoryBuiltins.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Analysis/ValueTracking.cpp
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/CodeGen/WinEHPrepare.cpp
lib/IR/Instructions.cpp
lib/IR/Value.cpp
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/PowerPC/PPCCTRLoops.cpp
lib/Target/PowerPC/PPCLoopDataPrefetch.cpp
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
lib/Target/R600/R600ISelLowering.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/ConstantMerge.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/LowerBitSets.cpp
lib/Transforms/IPO/MergeFunctions.cpp
lib/Transforms/InstCombine/InstCombineAddSub.cpp
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
lib/Transforms/InstCombine/InstCombinePHI.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
lib/Transforms/InstCombine/InstCombineShifts.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/BoundsChecking.cpp
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
lib/Transforms/Instrumentation/MemorySanitizer.cpp
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
lib/Transforms/ObjCARC/DependencyAnalysis.cpp
lib/Transforms/ObjCARC/ObjCARC.h
lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
lib/Transforms/ObjCARC/ProvenanceAnalysis.h
lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp
lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
lib/Transforms/Scalar/BDCE.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/EarlyCSE.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoadCombine.cpp
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
lib/Transforms/Scalar/LoopInstSimplify.cpp
lib/Transforms/Scalar/LoopRerollPass.cpp
lib/Transforms/Scalar/LoopRotation.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/MemCpyOptimizer.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/SROA.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Scalar/Scalarizer.cpp
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
lib/Transforms/Scalar/SimplifyCFGPass.cpp
lib/Transforms/Scalar/Sink.cpp
lib/Transforms/Scalar/TailRecursionElimination.cpp
lib/Transforms/Utils/BuildLibCalls.cpp
lib/Transforms/Utils/CloneFunction.cpp
lib/Transforms/Utils/InlineFunction.cpp
lib/Transforms/Utils/Local.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/LoopUnrollRuntime.cpp
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
lib/Transforms/Utils/SSAUpdater.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
lib/Transforms/Utils/SimplifyInstructions.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
lib/Transforms/Vectorize/BBVectorize.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
lib/Transforms/Vectorize/SLPVectorizer.cpp
unittests/IR/IRBuilderTest.cpp
unittests/IR/InstructionsTest.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8158.21469.patch
Type: text/x-patch
Size: 671695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150309/f033a34f/attachment.bin>
More information about the llvm-commits
mailing list