1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Analysis
Duncan P. N. Exon Smith 2f789947a5 Analysis: Return early for UndefValue in computeKnownBits
There is no benefit in looking through assumptions on UndefValue to
guess known bits.  Return early to avoid walking their use-lists, and
assert that all instances of ConstantData are handled here for similar
reasons (UndefValue was the only integer/pointer holdout).

llvm-svn: 282337
2016-09-24 20:42:02 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
AliasAnalysisSummary.cpp Update a comment. 2016-08-25 01:29:55 +00:00
AliasAnalysisSummary.h Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
AliasSetTracker.cpp [AliasSetTracker] Degrade AliasSetTracker when may-alias sets get too large. 2016-08-19 17:05:22 +00:00
Analysis.cpp [PM] Port CFGViewer and CFGPrinter to the new Pass Manager 2016-09-15 18:35:27 +00:00
AssumptionCache.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
BasicAliasAnalysis.cpp Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
BlockFrequencyInfo.cpp s/static inline/static/ for headers I have changed in r279475. NFC. 2016-08-31 16:48:13 +00:00
BlockFrequencyInfoImpl.cpp [GraphTraits] Replace all NodeType usage with NodeRef 2016-08-22 21:09:30 +00:00
BranchProbabilityInfo.cpp Enhance calcColdCallHeuristics for InvokeInst 2016-09-23 17:26:14 +00:00
CallGraph.cpp Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
CallGraphSCCPass.cpp RefreshCallGraph does not modify the SCC, adding "const" to make it clear (NFC) 2016-08-08 18:51:05 +00:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp [PM] Port CFGViewer and CFGPrinter to the new Pass Manager 2016-09-15 18:35:27 +00:00
CFLAndersAliasAnalysis.cpp Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
CFLGraph.h [CFLAA] Check for pointer types in more places. 2016-07-29 01:23:45 +00:00
CFLSteensAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
CGSCCPassManager.cpp Fixup r279618, instantiate *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID. 2016-08-30 15:47:13 +00:00
CMakeLists.txt [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
CodeMetrics.cpp [Assumptions] Make collecting ephemeral values not quadratic in the 2016-08-18 17:51:24 +00:00
ConstantFolding.cpp [ConstantFold] Improve the bitcast folding logic for constant vectors. 2016-09-13 14:50:47 +00:00
CostModel.cpp [LV, X86] Be more optimistic about vectorizing shifts. 2016-08-04 22:48:03 +00:00
Delinearization.cpp
DemandedBits.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
DependenceAnalysis.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
GlobalsModRef.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp Fix a thinko in r278189. 2016-08-29 20:45:51 +00:00
InstCount.cpp
InstructionSimplify.cpp move variables closer to their uses; add FIXMEs; NFC 2016-09-20 14:36:14 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LazyBlockFrequencyInfo.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyBranchProbabilityInfo.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyCallGraph.cpp [LCG] Redesign the lazy post-order iteration mechanism for the 2016-09-16 10:20:17 +00:00
LazyValueInfo.cpp Add some shortcuts in LazyValueInfo to reduce compile time of Correlated Value Propagation. 2016-09-15 06:28:34 +00:00
Lint.cpp Fix some Clang-tidy modernize-use-using and Include What You Use warnings. 2016-08-13 00:50:41 +00:00
LLVMBuild.txt
Loads.cpp [Loads] Properly populate the visited set in isDereferenceableAndAlignedPointer 2016-08-31 03:22:32 +00:00
LoopAccessAnalysis.cpp [LV] When reporting about a specific instruction without debug location use loop's 2016-09-21 03:14:20 +00:00
LoopInfo.cpp [LoopInfo] Add verification by recomputation. 2016-08-31 19:26:19 +00:00
LoopPass.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopPassManager.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp Make some LLVM_CONSTEXPR variables const. NFC. 2016-08-25 01:05:08 +00:00
MemoryDependenceAnalysis.cpp Do not widen load for different variable in GVN. 2016-09-09 18:42:35 +00:00
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp NFC: add early exit in ModuleSummaryAnalysis 2016-08-30 00:46:26 +00:00
ObjCARCAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp ObjCARC: Don't increment or dereference end() when scanning args 2016-08-17 01:02:18 +00:00
OptimizationDiagnosticInfo.cpp [Inliner] Report when inlining fails because callee's def is unavailable 2016-08-26 20:21:05 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
PostDominators.cpp
ProfileSummaryInfo.cpp Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Reapplying r278731 after fixing the problem that caused it to be reverted. 2016-09-16 14:38:13 +00:00
ScalarEvolutionAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ScalarEvolutionExpander.cpp Create a getelementptr instead of sub expr for ValueOffsetPair if the 2016-09-14 04:39:50 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp [ScopedNoAliasAA] collectMDInDomain should be a free function 2016-08-15 03:56:06 +00:00
SparsePropagation.cpp
StratifiedSets.h
TargetLibraryInfo.cpp [TLI] isdigit / isascii / toascii param type should match return type (PR30484) 2016-09-23 18:44:09 +00:00
TargetTransformInfo.cpp [LoopStrenghtReduce] Refactoring and addition of a new target cost function. 2016-08-17 13:24:19 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
TypeMetadataUtils.cpp
ValueTracking.cpp Analysis: Return early for UndefValue in computeKnownBits 2016-09-24 20:42:02 +00:00
VectorUtils.cpp Add handling of !invariant.load to PropagateMetadata. 2016-09-11 01:39:08 +00: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))

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