[PATCH] D66428: Change TargetLibraryInfo analysis passes to always require Function

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 10:15:19 PDT 2019


tejohnson created this revision.
tejohnson added reviewers: chandlerc, hfinkel.
Herald added subscribers: asbirlea, jfb, dexonsmith, george.burgess.iv, steven_wu, aheejin, eraman, jgravelle-google, sbc100, javed.absar, mehdi_amini, nhaehnle, jvesely, dschuff, arsenm.
Herald added a project: LLVM.

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 <https://reviews.llvm.org/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.


Repository:
  rL LLVM

https://reviews.llvm.org/D66428

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66428.215941.patch
Type: text/x-patch
Size: 102913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190819/17642826/attachment-0001.bin>


More information about the llvm-commits mailing list