hanchenye-llvm-project/llvm/lib/Analysis
Simon Pilgrim 54a138a0c5 [CostModel] Recognise BROADCAST shuffle mask if the elements come from the second src
llvm-svn: 334620
2018-06-13 16:52:02 +00:00
..
AliasAnalysis.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h Revert r332657: "[AA] cfl-anders-aa with field sensitivity" 2018-05-17 21:56:39 +00:00
AliasSetTracker.cpp [AliasSet] Teach the alias set how to handle atomic memcpy/memmove/memset 2018-05-30 14:43:39 +00:00
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp [BasicAA] Teach the analysis about atomic memcpy 2018-05-29 19:23:50 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BranchProbabilityInfo.cpp [BPI] Apply invoke heuristic before loop branch heuristic 2018-06-08 13:03:21 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp Replace AA's uses of uint64_t with LocationSize; NFC. 2018-05-25 21:16:58 +00:00
CFLGraph.h [CFLAA] Reflow comments; NFC 2018-05-26 02:17:43 +00:00
CFLSteensAliasAnalysis.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CGSCCPassManager.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CMakeLists.txt
CallGraph.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
CallGraphSCCPass.cpp Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
CallPrinter.cpp
CaptureTracking.cpp Fix aliasing of launder.invariant.group 2018-05-23 09:16:44 +00:00
CmpInstAnalysis.cpp
CodeMetrics.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
ConstantFolding.cpp Constant fold launder of null and undef 2018-05-18 23:52:57 +00:00
CostModel.cpp
Delinearization.cpp
DemandedBits.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
DependenceAnalysis.cpp [DA] Fix direction vectors for weakZeroSrcSIV 2018-05-31 14:55:29 +00:00
DivergenceAnalysis.cpp
DomPrinter.cpp
DominanceFrontier.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
EHPersonalities.cpp [WebAssembly] Add Wasm personality and isScopedEHPersonality() 2018-05-17 20:52:03 +00:00
GlobalsModRef.cpp
IVUsers.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
IndirectCallPromotionAnalysis.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
InlineCost.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
InstCount.cpp
InstructionSimplify.cpp [NFC][InstSimplify] SimplifyAddInst(): coding style: variable names. 2018-06-08 15:44:53 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp [IDF] Enforce the returned blocks to be sorted. 2018-05-12 01:44:32 +00:00
LLVMBuild.txt
LazyBlockFrequencyInfo.cpp Require DominatorTree when requiring/preserving LoopInfo in the old pass manager 2018-05-17 09:05:40 +00:00
LazyBranchProbabilityInfo.cpp Require DominatorTree when requiring/preserving LoopInfo in the old pass manager 2018-05-17 09:05:40 +00:00
LazyCallGraph.cpp [STLExtras] Add size() for ranges, and remove distance() 2018-05-16 23:20:42 +00:00
LazyValueInfo.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Lint.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Loads.cpp Fix aliasing of launder.invariant.group 2018-05-23 09:16:44 +00:00
LoopAccessAnalysis.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopAnalysisManager.cpp
LoopInfo.cpp [STLExtras] Add distance() for ranges, pred_size(), and succ_size() 2018-05-10 23:01:54 +00:00
LoopPass.cpp Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
LoopUnrollAnalyzer.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp [InstCombine] Remove calloc transformations 2018-05-22 20:27:36 +00:00
MemoryDependenceAnalysis.cpp Dissallow non-empty metadata for invariant.group 2018-05-18 23:53:46 +00:00
MemoryLocation.cpp [DSE] Teach the pass that atomic memory intrinsics are stores. 2018-04-23 19:06:49 +00:00
MemorySSA.cpp [MemorySSA] Reflow comments + clean up control flow; NFC 2018-05-26 02:28:55 +00:00
MemorySSAUpdater.cpp [MemorySSA] Reflow comments + clean up control flow; NFC 2018-05-26 02:28:55 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [ThinLTO] Rename index IsAnalysis flag to HaveGVs (NFC) 2018-06-06 22:22:01 +00:00
MustExecute.cpp [MustExecute] Fix a debug invariant issue in isGuaranteedToExecute() 2018-05-25 13:02:59 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ObjCARCInstKind.cpp [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
OptimizationRemarkEmitter.cpp
OrderedBasicBlock.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PHITransAddr.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
PostDominators.cpp [Dominators] Add PDT constructor from Function 2018-05-23 17:29:21 +00:00
ProfileSummaryInfo.cpp [SampleFDO] Don't treat warm callsite with inline instance in the profile as cold 2018-05-10 23:02:27 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
RegionPass.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Add transform zext((A * B * ...)<nuw>) --> (zext(A) * zext(B) * ...)<nuw>. 2018-06-11 18:57:58 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StratifiedSets.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [TargetLibraryInfo] add mappings from LLVM sin/cos intrinsics to SVML calls 2018-06-07 18:21:24 +00:00
TargetTransformInfo.cpp [CostModel] Recognise BROADCAST shuffle mask if the elements come from the second src 2018-06-13 16:52:02 +00:00
Trace.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [ValueTracking] Match select abs pattern when there's an sext involved 2018-06-04 16:53:57 +00:00
VectorUtils.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00: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))

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