1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/Analysis
Florian Hahn 6276196b86 [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments.
This adjusts the description of `llvm.memcpy` to also allow operands
to be equal. This is in line with what Clang currently expects.

This change is intended to be temporary and followed by re-introduce
a variant with the non-overlapping guarantee for cases where we can
actually ensure that property in the front-end.

See the links below for more details:
http://lists.llvm.org/pipermail/cfe-dev/2020-August/066614.html
and PR11763.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D86815
2020-09-05 19:18:23 +01:00
..
models/inliner [MLInliner] Simplify TFUTILS_SUPPORTED_TYPES 2020-08-25 14:19:39 -07:00
AliasAnalysis.cpp [opt][NewPM] Add basic-aa in legacy PM compatibility mode 2020-08-21 14:05:07 -07:00
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp
Analysis.cpp [NewPM][Lint] Port -lint to NewPM 2020-09-03 13:03:44 -07:00
AssumeBundleQueries.cpp [AssumeBundles] Fix Bug in Assume Queries 2020-08-17 21:36:53 +02:00
AssumptionCache.cpp Use llvm::is_contained where appropriate (NFC) 2020-07-27 10:20:44 -07:00
BasicAliasAnalysis.cpp [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments. 2020-09-05 19:18:23 +01:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp Revert "[BPI] Improve static heuristics for integer comparisons" 2020-08-17 20:44:33 +02:00
CallGraph.cpp [CallGraph] Preserve call records vector when replacing call edge 2020-07-27 06:02:55 -07:00
CallGraphSCCPass.cpp Skip analysis re-computation when no changes are reported 2020-08-28 21:41:01 +02:00
CallPrinter.cpp Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
CaptureTracking.cpp [NFC] GetUnderlyingObject -> getUnderlyingObject 2020-07-30 21:08:24 -07:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp [NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks 2020-08-21 16:10:42 +07:00
CMakeLists.txt Revert "[NewPM][Lint] Port -lint to NewPM" 2020-09-02 21:34:29 -07:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp [WebAssembly][ConstantFolding] Fold fp-to-int truncation intrinsics 2020-08-10 12:40:05 -07:00
CostModel.cpp
DDG.cpp
Delinearization.cpp
DemandedBits.cpp [DemandedBits] Improve accuracy of Add propagator 2020-08-17 12:54:09 +01:00
DependenceAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
DependenceGraphBuilder.cpp
DevelopmentModeInlineAdvisor.cpp [MLInliner] Support training that doesn't require partial rewards 2020-08-24 17:36:29 -07:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
EHPersonalities.cpp
FunctionPropertiesAnalysis.cpp Use llvm::size rather than an empty loop to get the number of top 2020-07-23 14:55:50 -07:00
GlobalsModRef.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
GuardUtils.cpp
HeatUtils.cpp
IndirectCallPromotionAnalysis.cpp
InlineAdvisor.cpp [InlineAdvisor] New inliner advisor to replay inlining from optimization remarks 2020-08-15 20:17:21 -07:00
InlineCost.cpp [InlineCost] Fix scalable vectors in visitAlloca 2020-08-17 10:34:27 +00:00
InlineSizeEstimatorAnalysis.cpp [llvm][NFC] TensorSpec abstraction for ML evaluator 2020-07-29 16:29:21 -07:00
InstCount.cpp [NFC] Port InstCount pass to new pass manager 2020-08-21 12:39:42 +03:00
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp [InstSimplify] Fold min/max based on dominating condition 2020-09-05 16:16:40 +02:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp [LoopVectorizer] Inloop vector reductions 2020-08-06 10:10:50 +01:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [LVI] Remove unnecessary lambda capture (NFC) 2020-08-29 21:33:19 +02:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [NewPM][Lint] Port -lint to NewPM 2020-09-03 13:03:44 -07:00
LLVMBuild.txt
Loads.cpp [NFC] Fix unused var in release build 2020-09-01 13:05:56 -07:00
LoopAccessAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp [LoopNest] False negative of arePerfectlyNested with LCSSA loops 2020-08-25 16:20:52 +00:00
LoopPass.cpp Skip analysis re-computation when no changes are reported 2020-08-28 21:41:01 +02:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp IR: Define byref parameter attribute 2020-07-20 10:23:09 -04:00
MemoryDependenceAnalysis.cpp [MemDep] Use BatchAA when computing pointer dependencies 2020-08-25 21:34:34 +02:00
MemoryLocation.cpp [MemLoc] Support memcmp in MemoryLocation::getForArgument. 2020-08-28 10:19:54 +01:00
MemorySSA.cpp [MemorySSA] Assert defining access is not a MemoryUse. 2020-08-27 18:21:10 -07:00
MemorySSAUpdater.cpp [MemorySSA] Update phi map with replacement value. 2020-09-01 11:56:40 -07:00
MLInlineAdvisor.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [StackSafety] Use ValueInfo in ParamAccess::Call 2020-08-14 12:42:44 -07:00
MustExecute.cpp
ObjCARCAliasAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp RegionInfo.cpp - remove duplicate includes that already exist in RegionInfo.h. NFC. 2020-07-23 17:50:22 +01:00
RegionPass.cpp Skip analysis re-computation when no changes are reported 2020-08-28 21:41:01 +02:00
RegionPrinter.cpp
ReleaseModeModelRunner.cpp Build: Move TF source file inclusion from build system to source files 2020-07-21 13:02:34 -04:00
ReplayInlineAdvisor.cpp [InlineAdvisor] New inliner advisor to replay inlining from optimization remarks 2020-08-15 20:17:21 -07:00
ScalarEvolution.cpp [SCEV] Recognize min/max intrinsics 2020-09-05 16:30:11 +02:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
StackLifetime.cpp [StackSafety] Ignore allocas with partial lifetime markers 2020-08-27 13:54:41 -07:00
StackSafetyAnalysis.cpp [NFC][StackSafety] Move out sort from the loop 2020-08-17 03:30:14 -07:00
StratifiedSets.h
SyncDependenceAnalysis.cpp [sda][nfc] clang-formatting 2020-08-27 18:27:44 +02:00
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [LLVM] Add libatomic load/store functions to TargetLibraryInfo 2020-07-18 03:18:48 +00:00
TargetTransformInfo.cpp [ARM][LV] Add a preferPredicatedReductionSelect target hook 2020-08-21 08:48:12 +01:00
TFUtils.cpp [MLInliner] Simplify TFUTILS_SUPPORTED_TYPES 2020-08-25 14:19:39 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [InstCombine] Fix a couple crashes with extractelement on a scalable vector. 2020-09-02 18:02:07 -07:00
VectorUtils.cpp [CodeGenPrepare][X86] Teach optimizeGatherScatterInst to turn a splat pointer into GEP with scalar base and 0 index 2020-09-02 20:44:12 -07:00
VFABIDemangling.cpp [SVE] Make ElementCount members private 2020-08-28 14:43:53 +01:00

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))

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