llvm/lib/Analysis
Duncan P. N. Exon Smith 936a383311 ObjCARC: Don't increment or dereference end() when scanning args
When there's only one argument and it doesn't match one of the known
functions, return ARCInstKind::CallOrUser rather than falling through
to the two argument case.  The old behaviour both incremented past and
dereferenced end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 01:02:18 +00:00
..
AliasAnalysis.cpp [AliasAnalysis] Give back AA results for fence instructions 2016-07-15 17:19:24 +00:00
AliasAnalysisEvaluator.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
AliasAnalysisSummary.cpp [CFLAA] Add more offset-sensitivity tracking. 2016-07-22 22:30:48 +00:00
AliasAnalysisSummary.h [CFLAA] Add more offset-sensitivity tracking. 2016-07-22 22:30:48 +00:00
AliasSetTracker.cpp Add comment /NFC 2016-08-11 23:09:56 +00:00
Analysis.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
AssumptionCache.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
BasicAliasAnalysis.cpp [BasicAA] Avoid calling GetUnderlyingObject, when the result of a previous call can be reused. 2016-08-12 16:05:03 +00:00
BlockFrequencyInfo.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
BlockFrequencyInfoImpl.cpp CodeExtractor : Add ability to preserve profile data. 2016-08-02 02:15:45 +00:00
BranchProbabilityInfo.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +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 [CaptureTracking] Volatile operations capture their memory location 2016-05-26 17:36:22 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +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
CMakeLists.txt [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
CodeMetrics.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
ConstantFolding.cpp [ConstantFolding] Don't create illegal (non-integral) inttoptrs 2016-08-05 19:23:29 +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 Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
DivergenceAnalysis.cpp DivergenceAnalysis: Fix crash with no return blocks 2016-05-09 16:57:08 +00:00
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 Remove another unused variable from r275216 2016-07-12 23:49:17 +00:00
InlineCost.cpp Make more fields of InlineParams Optional. 2016-08-11 03:58:05 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] Fold gep (gep V, C), (xor V, -1) to C-1 2016-08-16 06:13:46 +00:00
Interval.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
IntervalPartition.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
IteratedDominanceFrontier.cpp Normalize file docs. NFC. 2016-07-21 20:52:35 +00:00
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 Use the range variant of find/find_if instead of unpacking begin/end 2016-08-12 03:55:06 +00:00
LazyValueInfo.cpp [LVI] Take guards into account 2016-08-12 15:52:23 +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 Refactor indirect call promotion profitability analysis (NFC) 2016-07-12 21:13:44 +00:00
Loads.cpp [JumpThreading] Fix handling of aliasing metadata. 2016-08-08 04:10:22 +00:00
LoopAccessAnalysis.cpp Use the range variant of transform instead of unpacking begin/end 2016-08-12 04:32:42 +00:00
LoopInfo.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
LoopPass.cpp Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
LoopPassManager.cpp PM: Check that loop passes preserve a basic set of analyses 2016-05-03 21:35:08 +00:00
LoopUnrollAnalyzer.cpp [LoopUnrollAnalyzer] Handle out of bounds accesses in visitLoad 2016-07-23 02:56:49 +00:00
MemDepPrinter.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
MemDerefPrinter.cpp
MemoryBuiltins.cpp fix formatting; NFC 2016-07-07 16:19:09 +00:00
MemoryDependenceAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
MemoryLocation.cpp [TLI] Unify LibFunc signature checking. NFCI. 2016-04-27 19:04:35 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [PM] Port ModuleSummaryIndex analysis to new pass manager 2016-08-12 13:53:02 +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,OptDiag] Add hotness attribute to opt diagnostics 2016-08-10 00:44:44 +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 [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
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 [RegionPass] Some minor cleanups 2016-07-19 17:50:27 +00:00
RegionPrinter.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
ScalarEvolution.cpp Revert "Enhance SCEV to compute the trip count for some loops with unknown stride." 2016-08-16 21:02:04 +00:00
ScalarEvolutionAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ScalarEvolutionExpander.cpp Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
ScalarEvolutionNormalization.cpp Remove emacs mode markers from .cpp files. NFC 2016-04-24 17:55:41 +00:00
ScopedNoAliasAA.cpp [ScopedNoAliasAA] collectMDInDomain should be a free function 2016-08-15 03:56:06 +00:00
SparsePropagation.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
StratifiedSets.h [CFLAA] Simplify CFLGraphBuilder. NFC. 2016-07-11 22:59:09 +00:00
TargetLibraryInfo.cpp Recommitting r275284: add support to inline __builtin_mempcpy 2016-07-29 18:23:18 +00:00
TargetTransformInfo.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
TypeMetadataUtils.cpp [IR] Make getIndexedOffsetInType return a signed result 2016-07-13 03:42:38 +00:00
ValueTracking.cpp Revert "[ValueTracking] Improve ValueTracking on left shift with nsw flag" 2016-08-15 21:01:31 +00:00
VectorUtils.cpp SLPVectorizer: Move propagateMetadata to VectorUtils 2016-06-30 21:17:59 +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))

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