DirectXShaderCompiler/lib/Analysis
Adam Yang 0e77209223
Moved unroll to after dxilgen and scalarizer. (#3094)
2020-08-28 09:09:53 -07:00
..
IPA Integration from OS repo (#2541) 2019-10-22 15:43:26 -07:00
AliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
AliasAnalysisCounter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
AliasAnalysisEvaluator.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
AliasDebugger.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
AliasSetTracker.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Analysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
AssumptionCache.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BasicAliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BlockFrequencyInfo.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BlockFrequencyInfoImpl.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BranchProbabilityInfo.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CFG.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CFGPrinter.cpp fix dot-cfg so it doesn't act like dot-cfg-only (#556) 2017-08-15 12:13:24 -07:00
CFLAliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CGSCCPassManager.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CMakeLists.txt Using DxilValueCache for unroll. (#2694) 2020-02-13 15:46:00 -08:00
CaptureTracking.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CodeMetrics.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConstantFolding.cpp [linux-port] Evade unused in LLVM code (#1327) 2018-06-05 14:07:51 -04:00
CostModel.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Delinearization.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DependenceAnalysis.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
DivergenceAnalysis.cpp Merge DivergenceAnalysis from llvm3.8. (#528) 2017-08-07 12:14:46 -07:00
DomPrinter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DominanceFrontier.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DxilConstantFolding.cpp const folding on dxil.convergent.marker. (#2523) 2019-10-16 16:56:03 -07:00
DxilConstantFoldingExt.cpp Add hooks for constant folding extensions (#209) 2017-04-13 15:04:14 -07:00
DxilSimplify.cpp Move DxilModule into DXIL directory. (#1599) 2018-10-16 00:28:35 -07:00
DxilValueCache.cpp Moved unroll to after dxilgen and scalarizer. (#3094) 2020-08-28 09:09:53 -07:00
IVUsers.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
InstCount.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
InstructionSimplify.cpp Integrate dxcapi v2 and other changes from internal (#2575) 2019-11-13 16:16:45 -08:00
Interval.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
IntervalPartition.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
IteratedDominanceFrontier.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LLVMBuild.txt Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LazyCallGraph.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LazyValueInfo.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LibCallAliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LibCallSemantics.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Lint.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Loads.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LoopAccessAnalysis.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
LoopInfo.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
LoopPass.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
MemDepPrinter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MemDerefPrinter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MemoryBuiltins.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MemoryDependenceAnalysis.cpp Increase scan limit for DSE, add option (#2725) 2020-03-04 15:50:01 -08:00
MemoryLocation.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ModuleDebugInfoPrinter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
NoAliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
PHITransAddr.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
PostDominators.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
PtrUseVisitor.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
README.txt Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ReducibilityAnalysis.cpp Fix Validation for RDAT and other issues with Subobjects (#1706) 2018-11-13 14:49:32 -08:00
RegionPass.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
ScalarEvolution.cpp Added instructions to preserve intermediate values of computations. (#2721) 2020-03-03 00:29:42 -08:00
ScalarEvolutionAliasAnalysis.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ScalarEvolutionExpander.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ScalarEvolutionNormalization.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ScopedNoAliasAA.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
SparsePropagation.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
StratifiedSets.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
TargetLibraryInfo.cpp [linux-port] Fix GCC build on alpine Linux (and others) (#1378) 2018-06-26 15:15:32 -04:00
TargetTransformInfo.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Trace.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
TypeBasedAliasAnalysis.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
ValueTracking.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
VectorUtils.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
regioninfo.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
regionprinter.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08: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))

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