llvm-project/llvm/lib/Analysis
Nikita Popov ed63fcb232 [GlobalsModRef] Remove check for allocator calls
As the FIXME already indicates, I don't see why this code would be
necessary. If there's a call to an allocator function, that should
get treated just like any other function call -- usually it will be
a declaration and handled conservatively based on memory attributes
only. There should be no need to explicitly force it to be modref.
No test failures either, so I think this is just dead code.

Differential Revision: https://reviews.llvm.org/D127273
2022-06-21 14:24:13 +02:00
..
models [MLGO] ML Regalloc Eviction Advisor 2022-01-19 11:00:32 -08:00
AliasAnalysis.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
AliasAnalysisEvaluator.cpp Cleanup includes: final pass 2022-03-29 09:00:21 +02:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp [Analysis] Remove getUniqueInstruction (NFC) 2022-06-13 14:26:20 -07:00
Analysis.cpp [DomPrinter] Migrate -dot-dom to the new pass manager. 2022-05-16 15:07:16 -05:00
AssumeBundleQueries.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
AssumptionCache.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
BasicAliasAnalysis.cpp [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
BlockFrequencyInfo.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
BlockFrequencyInfoImpl.cpp [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC 2022-06-03 21:59:05 -07:00
BranchProbabilityInfo.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
CFG.cpp [LoopInfo] Add getOutermostLoop() (NFC) 2022-06-10 11:48:21 +02:00
CFGPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
CFLAndersAliasAnalysis.cpp
CFLGraph.h [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
CFLSteensAliasAnalysis.cpp [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
CGSCCPassManager.cpp [CGSCC] Use make_early_inc_range. NFC 2022-03-23 15:31:09 -07:00
CMakeLists.txt [mlgo] Factor out TensorSpec 2022-04-25 18:35:46 -07:00
CallGraph.cpp [CallGraph] Don't preserve CallGraph when function CFG analyses are preserved 2022-06-19 13:01:08 -07:00
CallGraphSCCPass.cpp [NFC] Rename Instrinsic to Intrinsic 2022-04-25 18:13:23 +01:00
CallPrinter.cpp [CallPrinter] Port CallPrinter passes to new pass manager 2022-04-18 10:02:18 -07:00
CaptureTracking.cpp [CaptureTracking] Increase limit and use it for all visited uses. 2022-06-02 21:43:58 +01:00
CmpInstAnalysis.cpp [InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis. NFC 2022-03-03 09:33:24 -08:00
CodeMetrics.cpp Pipe potentially invalid InstructionCost through CodeMetrics 2022-06-09 15:17:24 -07:00
ConstantFolding.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
ConstraintSystem.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
CostModel.cpp [CostModel] Change printer pass wording to work with update_analyze_test_checks.py 2022-03-03 10:10:48 -08:00
CycleAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DDG.cpp [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC 2022-06-03 21:59:05 -07:00
DDGPrinter.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
Delinearization.cpp [Delinearization] Refactoring of fixed-size array delinearization 2022-06-16 16:03:41 -04:00
DemandedBits.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DependenceAnalysis.cpp Move debug-only code inside LLVM_DEUG to prevent unused variable warnings. 2022-06-16 14:01:26 -07:00
DependenceGraphBuilder.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
DevelopmentModeInlineAdvisor.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
DivergenceAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DomPrinter.cpp [DomPrinter] Migrate -dot-dom to the new pass manager. 2022-05-16 15:07:16 -05:00
DomTreeUpdater.cpp [DomTreeUpdater] Remove deprecated methods 2022-04-20 12:14:29 +02:00
DominanceFrontier.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
EHPersonalities.cpp [PS5] Use __gxx_personality_v0 for TSan 2022-06-14 10:39:34 -07:00
FunctionPropertiesAnalysis.cpp FunctionPropertiesAnalysis: handle callsite BBs that lose edges 2022-06-14 15:19:44 -07:00
GlobalsModRef.cpp [GlobalsModRef] Remove check for allocator calls 2022-06-21 14:24:13 +02:00
GuardUtils.cpp
HeatUtils.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
IRSimilarityIdentifier.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
IVDescriptors.cpp [LoopVectorize] Support reductions that store intermediary result 2022-05-03 10:12:30 +01:00
IVUsers.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ImportedFunctionsInliningStatistics.cpp
IndirectCallPromotionAnalysis.cpp Remove unneeded cl::ZeroOrMore for cl::opt options 2022-06-04 00:10:42 -07:00
InlineAdvisor.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
InlineCost.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
InlineSizeEstimatorAnalysis.cpp Fix build breaks on ml-* bots introduced by include cleanups 2022-03-01 11:29:18 -08:00
InstCount.cpp
InstructionPrecedenceTracking.cpp Revert "[IPT] Restructure cache to allow lazy update following invalidation [NFC]" 2021-10-21 10:48:41 -07:00
InstructionSimplify.cpp [ConstantFolding] Respect denormal handling mode attributes when folding instructions 2022-06-20 16:41:46 +01:00
Interval.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
IntervalPartition.cpp [llvm] Use range-based for loops (NFC) 2021-11-20 18:42:10 -08:00
LazyBlockFrequencyInfo.cpp Make dependency between certain analysis passes transitive (reapply) 2021-05-05 15:17:55 +02:00
LazyBranchProbabilityInfo.cpp Make dependency between certain analysis passes transitive (reapply) 2021-05-05 15:17:55 +02:00
LazyCallGraph.cpp Add missing include under EXPENSIVE_CHECKS 2022-03-12 18:54:29 +01:00
LazyValueInfo.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
LegacyDivergenceAnalysis.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
Lint.cpp [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
Loads.cpp [Loads] Check type size in bits during store to load forwarding 2022-04-08 17:29:29 +02:00
LoopAccessAnalysis.cpp Recommit "[LAA] Initial support for runtime checks with pointer selects." 2022-06-17 21:06:26 +02:00
LoopAnalysisManager.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
LoopCacheAnalysis.cpp [Delinearization] Refactoring of fixed-size array delinearization 2022-06-16 16:03:41 -04:00
LoopInfo.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
LoopNestAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
LoopPass.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
LoopUnrollAnalyzer.cpp [NFC] format InstructionSimplify & lowerCaseFunctionNames 2022-06-09 16:10:08 +02:00
MLInlineAdvisor.cpp [MLInliner] Don't inline call sites in unreachable basic blocks 2022-06-16 09:14:22 -07:00
MemDepPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemDerefPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemoryBuiltins.cpp [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
MemoryDependenceAnalysis.cpp [NFC] Remove commented cerr debugging loggings 2022-06-08 15:58:06 +08:00
MemoryLocation.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemorySSA.cpp [MSSA] Print memory phis when inspecting walker. 2022-04-06 16:06:14 -07:00
MemorySSAUpdater.cpp Fix MemorySSAUpdater::insertDef for dead code 2022-03-31 16:32:35 -07:00
ModelUnderTrainingRunner.cpp [iwyu] Handle regressions in libLLVM header include 2022-05-26 08:12:34 +02:00
ModuleDebugInfoPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ModuleSummaryAnalysis.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
MustExecute.cpp [NFC] format InstructionSimplify & lowerCaseFunctionNames 2022-06-09 16:10:08 +02:00
NoInferenceModelRunner.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
ObjCARCAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp [ObjCARC] Use "UnsafeClaimRV" to refer to unsafeClaim in enums. NFC. 2022-01-24 19:37:01 -08:00
OptimizationRemarkEmitter.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
OverflowInstAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
PHITransAddr.cpp [NFC] format InstructionSimplify & lowerCaseFunctionNames 2022-06-09 16:10:08 +02:00
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
PtrUseVisitor.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
README.txt
RegionInfo.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
RegionPass.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
RegionPrinter.cpp [polly] migrate -polly-show to the new pass manager 2022-05-09 14:04:29 -05:00
ReplayInlineAdvisor.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolution.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
ScalarEvolutionAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolutionDivision.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolutionNormalization.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
ScopedNoAliasAA.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
StackLifetime.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
StackSafetyAnalysis.cpp [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
StratifiedSets.h [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
SyncDependenceAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
SyntheticCountsUtils.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
TFUtils.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
TargetLibraryInfo.cpp [PS5] Make library function availability match PS4 2022-06-14 12:47:06 -07:00
TargetTransformInfo.cpp [TargetTransformInfo] Added an opt/llc option for cache line size 2022-06-16 15:57:51 -04:00
TensorSpec.cpp [mlgo] Factor out TensorSpec 2022-04-25 18:35:46 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
TypeMetadataUtils.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
VFABIDemangling.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ValueLattice.cpp
ValueLatticeUtils.cpp [SCCP] Check that load/store and global type match 2022-02-11 11:01:18 +01:00
ValueTracking.cpp [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
VectorUtils.cpp [llvm] Call *set::insert without checking membership first (NFC) 2022-06-18 08:32:54 -07:00

README.txt

Analysis Opportunities:

//===---------------------------------------------------------------------===//

In test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll, the
ScalarEvolution expression for %r is this:

  {1,+,3,+,2}<loop>

Outside the loop, this could be evaluated simply as (%n * %n), however
ScalarEvolution currently evaluates it as

  (-2 + (2 * (trunc i65 (((zext i64 (-2 + %n) to i65) * (zext i64 (-1 + %n) to i65)) /u 2) to i64)) + (3 * %n))

In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.

//===---------------------------------------------------------------------===//

In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll,

ScalarEvolution is forming this expression:

((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))

This could be folded to

(-1 * (trunc i64 undef to i32))

//===---------------------------------------------------------------------===//