1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/Analysis
Arthur Eubanks bb84082e59 Revert "Use uint64_t for branch weights instead of uint32_t"
This reverts commit 10f2a0d662d8d72eaac48d3e9b31ca8dc90df5a4.

More uint64_t overflows.
2020-10-31 00:25:32 -07:00
..
models/inliner [MLInliner] Simplify TFUTILS_SUPPORTED_TYPES 2020-08-25 14:19:39 -07:00
AliasAnalysis.cpp [AA] Pass query info. 2020-10-29 18:07:53 -07:00
AliasAnalysisEvaluator.cpp [IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand(). 2020-04-27 22:17:03 -07:00
AliasAnalysisSummary.cpp AliasAnalysisSummary.h - cleanup includes and forward declarations. NFC. 2020-04-21 11:32:58 +01:00
AliasAnalysisSummary.h AliasAnalysisSummary.h - cleanup includes and forward declarations. NFC. 2020-04-21 11:32:58 +01:00
AliasSetTracker.cpp [NewPM] Port -print-alias-sets to NPM 2020-09-16 18:34:56 -07:00
Analysis.cpp [NPM] Port module-debuginfo pass to the new pass manager 2020-10-19 14:31:17 -07:00
AssumeBundleQueries.cpp Reland [AssumeBundles] Use operand bundles to encode alignment assumptions 2020-09-12 15:36:06 +02:00
AssumptionCache.cpp [Analysis] findAffectedValues - remove unused ConstantInt argument. NFCI. 2020-10-13 14:35:18 +01:00
BasicAliasAnalysis.cpp [BasicAA] Avoid duplicate cache lookup (NFCI) 2020-10-24 10:19:02 +02:00
BlockFrequencyInfo.cpp [BFI][CGP] Add limited support for detecting missed BFI updates and fix one in CodeGenPrepare. 2020-05-07 11:58:00 -07:00
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07: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][CaptureTracking] Move static function isNonEscapingLocalObject to llvm namespace 2020-10-15 18:37:29 +00:00
CFG.cpp [CFG] Replace hardcoded max BBs explored as CL option. NFC. 2020-10-30 15:11:48 -04:00
CFGPrinter.cpp [CFG] Turning on Heat Colors for CFG by default 2020-04-29 20:44:10 +00:00
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp Revert "[CGSCC] Detect devirtualization in more cases" 2020-10-23 09:53:52 -07:00
CMakeLists.txt [IRSim] Adding IR Instruction Mapper 2020-09-17 14:06:16 -05:00
CmpInstAnalysis.cpp
CodeMetrics.cpp CodeMetrics.cpp - remove unused includes. NFC. 2020-05-10 16:59:55 +01:00
ConstantFolding.cpp [AMDGPU] Add new llvm.amdgcn.fma.legacy intrinsic 2020-10-16 17:10:21 +01:00
ConstraintSystem.cpp [ConstraintSystem] Remove local variable that is set but not read [NFC] 2020-09-17 14:26:48 +02:00
CostModel.cpp [CostModel] add cl option to check size and latency costs; NFC 2020-09-27 09:52:56 -04:00
DDG.cpp
Delinearization.cpp [Delinearization][NewPM] Port delinearization to NPM 2020-09-21 17:59:08 -07:00
DemandedBits.cpp [DemandedBits][BDCE] Add support for min/max intrinsics 2020-09-10 22:13:31 +02:00
DependenceAnalysis.cpp [NFC][SCEV] Rename SCEVCastExpr into SCEVIntegralCastExpr 2020-10-19 10:59:53 +03:00
DependenceGraphBuilder.cpp SmallPtrSet::find -> SmallPtrSet::count 2020-06-07 22:38:08 +02:00
DevelopmentModeInlineAdvisor.cpp [NFC][MLInliner] Getters should return by reference 2020-10-07 13:55:38 -07:00
DivergenceAnalysis.cpp [DA][SDA] SyncDependenceAnalysis re-write 2020-09-30 17:36:26 +02:00
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp [DomTreeUpdater] Use const auto * when iterating over pointers (NFC). 2020-07-10 16:39:15 +01:00
EHPersonalities.cpp Rename EHPersonality::MSVC_Win64SEH to EHPersonality::MSVC_TableSEH. NFC. 2020-10-27 23:22:13 -07:00
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 [CallPrinter] Remove static constructor. 2020-06-17 13:02:58 +02:00
IndirectCallPromotionAnalysis.cpp [CallSite removal] Remove unneeded includes of CallSite.h. NFC 2020-04-22 00:07:13 -07:00
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 [NFC][MLInliner] Presort instruction successions. 2020-09-10 21:40:49 -07:00
InstCount.cpp [NFC] Port InstCount pass to new pass manager 2020-08-21 12:39:42 +03:00
InstructionPrecedenceTracking.cpp [IPT] Don't use OrderedInstructions (NFC) 2020-04-20 18:25:31 +02:00
InstructionSimplify.cpp [InstSimplify] peek through 'not' operand in logic-of-icmps fold 2020-10-25 11:13:30 -04:00
Interval.cpp
IntervalPartition.cpp
IRSimilarityIdentifier.cpp [IRSim] Adding wrapper pass for IRSimilarityIdentfier 2020-09-24 14:59:41 -05:00
IVDescriptors.cpp [LV] Tail folded inloop reductions. 2020-10-11 16:58:34 +01:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp [NewPM][CGSCC] Handle newly added functions in updateCGAndAnalysisManagerForPass 2020-09-23 15:22:18 -07:00
LazyValueInfo.cpp [LVI][CVP] Use block value when simplifying icmps 2020-09-27 20:25:16 +02:00
LegacyDivergenceAnalysis.cpp
Lint.cpp OpaquePtr: Add helpers for sret to mirror byval 2020-09-24 09:57:28 -04:00
LLVMBuild.txt [llvm][NFC] Move content of ML subdirectory into Analysis 2020-06-15 14:35:33 -07:00
Loads.cpp [Deref] Use maximum trip count instead of exact trip count 2020-10-28 14:33:30 -07:00
LoopAccessAnalysis.cpp [LAA] Use DL to get element size for bound computation. 2020-10-07 18:57:07 +01:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp [LoopInfo] empty() -> isInnermost(), add isOutermost() 2020-09-22 23:28:51 +03:00
LoopInfo.cpp [LCSSA] Doc for special treatment of PHIs 2020-10-29 22:50:07 +02:00
LoopNestAnalysis.cpp [LoopInfo] empty() -> isInnermost(), add isOutermost() 2020-09-22 23:28:51 +03:00
LoopPass.cpp [LoopInfo] empty() -> isInnermost(), add isOutermost() 2020-09-22 23:28:51 +03:00
LoopUnrollAnalyzer.cpp ScalarEvolution.h - reduce LoopInfo.h include to forward declarations. NFC. 2020-06-17 15:48:23 +01:00
MemDepPrinter.cpp GVN.h - reduce AliasAnalysis.h include to forward declaration. NFC. 2020-06-25 16:59:35 +01:00
MemDerefPrinter.cpp Loads.h - reduce AliasAnalysis.h include to forward declarations. NFC. 2020-06-24 13:49:04 +01:00
MemoryBuiltins.cpp Analysis: only query size of sized objects. 2020-10-14 12:16:05 +01:00
MemoryDependenceAnalysis.cpp Handle masked loads and stores in MemoryLocation/Dependence 2020-09-08 19:08:44 -05:00
MemoryLocation.cpp [MemLoc] Adjust memccpy support in MemoryLocation::getForArgument 2020-10-28 21:26:10 +01:00
MemorySSA.cpp [MemorySSA] Verify clobbering within reachable blocks. 2020-10-16 17:46:28 -07:00
MemorySSAUpdater.cpp [MemorySSA] Rename uses in blocks with Phis. 2020-09-16 17:24:17 -07:00
MLInlineAdvisor.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
ModuleDebugInfoPrinter.cpp [NPM] Port module-debuginfo pass to the new pass manager 2020-10-19 14:31:17 -07:00
ModuleSummaryAnalysis.cpp [StackSafety] Use ValueInfo in ParamAccess::Call 2020-08-14 12:42:44 -07:00
MustExecute.cpp MustBeExecutedContextPrinter::runOnModule: Use unique_ptr to simplify/clarify ownership 2020-04-28 11:30:53 -07:00
ObjCARCAliasAnalysis.cpp [ObjCARCAA][NewPM] Add already ported objc-arc-aa to PassRegistry.def 2020-09-30 08:50:44 -07:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp [Analysis/Transforms/Sanitizers] As part of using inclusive language 2020-06-20 00:42:26 -07:00
OptimizationRemarkEmitter.cpp [BPI][NFC] Reuse post dominantor tree from analysis manager when available 2020-04-30 11:31:03 +07:00
PHITransAddr.cpp
PhiValues.cpp [PhiValues] Use SetVector to avoid non-determinism 2020-10-23 20:14:02 +02:00
PostDominators.cpp
ProfileSummaryInfo.cpp [NFC] Change getEntryForPercentile to be a static function in ProfileSummaryBuilder. 2020-07-09 16:38:19 -07:00
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 [NFC] Clean up always false variables 2020-10-21 10:54:55 -07: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 [NFCI][SCEV] getPtrToIntExpr(): use SCEVRewriteVisitor<> for ptrtoint cast sinking 2020-10-30 17:05:14 +03:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp [SCEV] Generalize SCEVParameterRewriter to accept SCEV expression as target. 2020-09-18 10:05:02 +01:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
StackLifetime.cpp When dumping results of StackLifetime, it will print the following 2020-09-07 11:43:16 +08:00
StackSafetyAnalysis.cpp [Analysis] resolveAllCalls - fix use after std::move warning. NFCI. 2020-10-03 17:52:20 +01:00
StratifiedSets.h
SyncDependenceAnalysis.cpp [SDA] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds 2020-10-04 12:17:16 -07:00
SyntheticCountsUtils.cpp [CallSite removal] Remove unneeded includes of CallSite.h. NFC 2020-04-22 00:07:13 -07:00
TargetLibraryInfo.cpp Initial support for vectorization using Libmvec (GLIBC vector math library) 2020-10-22 16:01:39 -04:00
TargetTransformInfo.cpp Revert "[TTI] Add VecPred argument to getCmpSelInstrCost." 2020-10-30 21:26:14 +00:00
TFUtils.cpp [ML] Add final reward logging facility. 2020-10-19 08:44:50 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp TypeMetadataUtils.h - reduce Instructions.h include to forward declaration. NFC. 2020-06-05 17:40:33 +01:00
ValueLattice.cpp
ValueLatticeUtils.cpp [ValueLattice] Simplify canTrackGlobalVariableInterprocedurally (NFC). 2020-07-09 18:33:09 +01:00
ValueTracking.cpp Revert "[SLP] Consider alternatives for cost of select instructions." 2020-10-30 21:26:14 +00:00
VectorUtils.cpp [SVE] Fix TypeSize warning in llvm::getGEPInductionOperand 2020-10-26 17:40:32 +00: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))

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