1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Analysis
George Burgess IV a8e24cd205 Attempt #2 to unbreak bots broken by r273596.
Some of the bots running GCC 4.7 seem to be having trouble with lambdas
that explicitly capture `this`. Relevant-looking bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

llvm-svn: 273613
2016-06-23 20:59:13 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasSetTracker.cpp
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp
BitSetUtils.cpp
BlockFrequencyInfo.cpp [BFI]: NFC refactoring 2016-06-22 17:12:12 +00:00
BlockFrequencyInfoImpl.cpp [BFI]: NFC refactoring 2016-06-22 17:12:12 +00:00
BranchProbabilityInfo.cpp
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAliasAnalysis.cpp Attempt #2 to unbreak bots broken by r273596. 2016-06-23 20:59:13 +00:00
CGSCCPassManager.cpp
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp Replace silly uses of 'signed' with 'int' 2016-06-21 05:10:24 +00:00
CostModel.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
InlineCost.cpp
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic (PR27869) 2016-06-20 20:59:59 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp
LazyCallGraph.cpp Add a super basic LazyCallGraph DOT printer. 2016-06-18 09:17:32 +00:00
LazyValueInfo.cpp
Lint.cpp
LLVMBuild.txt
Loads.cpp InstCombine rule to fold trunc when value available 2016-06-23 20:22:22 +00:00
LoopAccessAnalysis.cpp [PM]: LoopAccessInfo simple refactoring 2016-06-22 23:20:59 +00:00
LoopInfo.cpp
LoopPass.cpp Fix dynamically linked debug builds. 2016-06-20 02:48:11 +00:00
LoopPassManager.cpp
LoopUnrollAnalyzer.cpp [LoopUnrollAnalyzer] Fix a bug in UnrolledInstAnalyzer::visitLoad. 2016-06-23 14:31:31 +00:00
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Fix incorrect trip count computation 2016-06-18 04:38:31 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Avoid output indeterminism between GCC and Clang builds. 2016-06-20 10:19:04 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h Attempt #2 to unbreak bots broken by r273596. 2016-06-23 20:59:13 +00:00
TargetLibraryInfo.cpp [TargetLibraryInfo] Reduce code duplication. 2016-06-21 04:32:21 +00:00
TargetTransformInfo.cpp
Trace.cpp
TypeBasedAliasAnalysis.cpp
ValueTracking.cpp [ValueTracking] simplify logic in ComputeNumSignBits (NFCI) 2016-06-23 17:41:59 +00:00
VectorUtils.cpp

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

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