DirectXShaderCompiler/lib/Analysis
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00
..
IPA first commit 2016-12-28 11:52:27 -08:00
AliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
AliasAnalysisCounter.cpp first commit 2016-12-28 11:52:27 -08:00
AliasAnalysisEvaluator.cpp first commit 2016-12-28 11:52:27 -08:00
AliasDebugger.cpp first commit 2016-12-28 11:52:27 -08:00
AliasSetTracker.cpp first commit 2016-12-28 11:52:27 -08:00
Analysis.cpp first commit 2016-12-28 11:52:27 -08:00
AssumptionCache.cpp first commit 2016-12-28 11:52:27 -08:00
BasicAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
BlockFrequencyInfo.cpp first commit 2016-12-28 11:52:27 -08:00
BlockFrequencyInfoImpl.cpp first commit 2016-12-28 11:52:27 -08:00
BranchProbabilityInfo.cpp first commit 2016-12-28 11:52:27 -08:00
CFG.cpp first commit 2016-12-28 11:52:27 -08:00
CFGPrinter.cpp first commit 2016-12-28 11:52:27 -08:00
CFLAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
CGSCCPassManager.cpp first commit 2016-12-28 11:52:27 -08:00
CMakeLists.txt first commit 2016-12-28 11:52:27 -08:00
CaptureTracking.cpp first commit 2016-12-28 11:52:27 -08:00
CodeMetrics.cpp first commit 2016-12-28 11:52:27 -08:00
ConstantFolding.cpp first commit 2016-12-28 11:52:27 -08:00
CostModel.cpp first commit 2016-12-28 11:52:27 -08:00
Delinearization.cpp first commit 2016-12-28 11:52:27 -08:00
DependenceAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
DivergenceAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
DomPrinter.cpp first commit 2016-12-28 11:52:27 -08:00
DominanceFrontier.cpp first commit 2016-12-28 11:52:27 -08:00
IVUsers.cpp first commit 2016-12-28 11:52:27 -08:00
InstCount.cpp first commit 2016-12-28 11:52:27 -08:00
InstructionSimplify.cpp first commit 2016-12-28 11:52:27 -08:00
Interval.cpp first commit 2016-12-28 11:52:27 -08:00
IntervalPartition.cpp first commit 2016-12-28 11:52:27 -08:00
IteratedDominanceFrontier.cpp first commit 2016-12-28 11:52:27 -08:00
LLVMBuild.txt first commit 2016-12-28 11:52:27 -08:00
LazyCallGraph.cpp first commit 2016-12-28 11:52:27 -08:00
LazyValueInfo.cpp first commit 2016-12-28 11:52:27 -08:00
LibCallAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
LibCallSemantics.cpp first commit 2016-12-28 11:52:27 -08:00
Lint.cpp first commit 2016-12-28 11:52:27 -08:00
Loads.cpp first commit 2016-12-28 11:52:27 -08:00
LoopAccessAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
LoopInfo.cpp first commit 2016-12-28 11:52:27 -08:00
LoopPass.cpp first commit 2016-12-28 11:52:27 -08:00
MemDepPrinter.cpp first commit 2016-12-28 11:52:27 -08:00
MemDerefPrinter.cpp first commit 2016-12-28 11:52:27 -08:00
MemoryBuiltins.cpp first commit 2016-12-28 11:52:27 -08:00
MemoryDependenceAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
MemoryLocation.cpp first commit 2016-12-28 11:52:27 -08:00
ModuleDebugInfoPrinter.cpp first commit 2016-12-28 11:52:27 -08:00
NoAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
PHITransAddr.cpp first commit 2016-12-28 11:52:27 -08:00
PostDominators.cpp first commit 2016-12-28 11:52:27 -08:00
PtrUseVisitor.cpp first commit 2016-12-28 11:52:27 -08:00
README.txt first commit 2016-12-28 11:52:27 -08:00
RegionPass.cpp first commit 2016-12-28 11:52:27 -08:00
ScalarEvolution.cpp first commit 2016-12-28 11:52:27 -08:00
ScalarEvolutionAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
ScalarEvolutionExpander.cpp first commit 2016-12-28 11:52:27 -08:00
ScalarEvolutionNormalization.cpp first commit 2016-12-28 11:52:27 -08:00
ScopedNoAliasAA.cpp first commit 2016-12-28 11:52:27 -08:00
SparsePropagation.cpp first commit 2016-12-28 11:52:27 -08:00
StratifiedSets.h first commit 2016-12-28 11:52:27 -08:00
TargetLibraryInfo.cpp first commit 2016-12-28 11:52:27 -08:00
TargetTransformInfo.cpp first commit 2016-12-28 11:52:27 -08:00
Trace.cpp first commit 2016-12-28 11:52:27 -08:00
TypeBasedAliasAnalysis.cpp first commit 2016-12-28 11:52:27 -08:00
ValueTracking.cpp first commit 2016-12-28 11:52:27 -08:00
VectorUtils.cpp first commit 2016-12-28 11:52:27 -08:00
regioninfo.cpp first commit 2016-12-28 11:52:27 -08:00
regionprinter.cpp first commit 2016-12-28 11:52:27 -08:00

README.txt

Copyright (C) Microsoft Corporation. All rights reserved.
Licensed under the MIT license. See COPYRIGHT in the project root for full licence information.
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))

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