]> granicus.if.org Git - llvm/commit
Change TargetLibraryInfo analysis passes to always require Function
authorTeresa Johnson <tejohnson@google.com>
Sat, 7 Sep 2019 03:09:36 +0000 (03:09 +0000)
committerTeresa Johnson <tejohnson@google.com>
Sat, 7 Sep 2019 03:09:36 +0000 (03:09 +0000)
commitef512ca8e66e2d6abee71b9729b2887cb094cb6e
tree40ba77fdf1d9e2bfe9473af66c00bbdf271ee776
parent58425baecf648051d6f4b478f049d2959905304b
Change TargetLibraryInfo analysis passes to always require Function

Summary:
This is the first change to enable the TLI to be built per-function so
that -fno-builtin* handling can be migrated to use function attributes.
See discussion on D61634 for background. This is an enabler for fixing
handling of these options for LTO, for example.

This change should not affect behavior, as the provided function is not
yet used to build a specifically per-function TLI, but rather enables
that migration.

Most of the changes were very mechanical, e.g. passing a Function to the
legacy analysis pass's getTLI interface, or in Module level cases,
adding a callback. This is similar to the way the per-function TTI
analysis works.

There was one place where we were looking for builtins but not in the
context of a specific function. See FindCXAAtExit in
lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround
could provide the wrong behavior in some corner cases. Suggestions
welcome.

Reviewers: chandlerc, hfinkel

Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371284 91177308-0d34-0410-b5e6-96231b3b80d8
82 files changed:
include/llvm/Analysis/CFLAndersAliasAnalysis.h
include/llvm/Analysis/CFLSteensAliasAnalysis.h
include/llvm/Analysis/GlobalsModRef.h
include/llvm/Analysis/LazyCallGraph.h
include/llvm/Analysis/MemoryBuiltins.h
include/llvm/Analysis/TargetLibraryInfo.h
include/llvm/Transforms/Instrumentation/InstrProfiling.h
include/llvm/Transforms/Scalar/SCCP.h
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/BranchProbabilityInfo.cpp
lib/Analysis/CFLAndersAliasAnalysis.cpp
lib/Analysis/CFLSteensAliasAnalysis.cpp
lib/Analysis/GlobalsModRef.cpp
lib/Analysis/InstructionSimplify.cpp
lib/Analysis/LazyBranchProbabilityInfo.cpp
lib/Analysis/LazyCallGraph.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/Lint.cpp
lib/Analysis/LoopAccessAnalysis.cpp
lib/Analysis/MemoryBuiltins.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/TargetLibraryInfo.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/ExpandMemCmp.cpp
lib/CodeGen/HardwareLoops.cpp
lib/CodeGen/SafeStack.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Passes/PassRegistry.def
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
lib/Target/ARM/ARMParallelDSP.cpp
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp
lib/Target/WebAssembly/WebAssemblyPeephole.cpp
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/InferFunctionAttrs.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/IPO/SCCP.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/BoundsChecking.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Instrumentation/InstrProfiling.cpp
lib/Transforms/Instrumentation/MemorySanitizer.cpp
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
lib/Transforms/Scalar/CallSiteSplitting.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/EarlyCSE.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InstSimplifyPass.cpp
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
lib/Transforms/Scalar/LoopInstSimplify.cpp
lib/Transforms/Scalar/LoopRerollPass.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Scalar/MemCpyOptimizer.cpp
lib/Transforms/Scalar/MergeICmps.cpp
lib/Transforms/Scalar/NaryReassociate.cpp
lib/Transforms/Scalar/NewGVN.cpp
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
lib/Transforms/Scalar/PlaceSafepoints.cpp
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
lib/Transforms/Utils/LibCallsShrinkWrap.cpp
lib/Transforms/Utils/MetaRenamer.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Other/new-pass-manager.ll
test/Other/new-pm-defaults.ll
test/Other/new-pm-lto-defaults.ll
test/Other/new-pm-thinlto-defaults.ll
unittests/Analysis/CGSCCPassManagerTest.cpp
unittests/Analysis/GlobalsModRefTest.cpp
unittests/Analysis/LazyCallGraphTest.cpp
unittests/IR/PassBuilderCallbacksTest.cpp