1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Analysis
Chandler Carruth 10f8380767 [PM] Switch the CGSCC debug messages to use the standard LLVM debug
printing techniques with a DEBUG_TYPE controlling them.

It was a mistake to start re-purposing the pass manager `DebugLogging`
variable for generic debug printing -- those logs are intended to be
very minimal and primarily used for testing. More detailed and
comprehensive logging doesn't make sense there (it would only make for
brittle tests).

Moreover, we kept forgetting to propagate the `DebugLogging` variable to
various places making it also ineffective and/or unavailable. Switching
to `DEBUG_TYPE` makes this a non-issue.

llvm-svn: 310695
2017-08-11 05:47:13 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
Analysis.cpp
AssumptionCache.cpp [IR][AssumptionCache] Add m_Shift and m_BitwiseLogic matchers to replace a couple m_CombineOr 2017-06-24 06:27:14 +00:00
BasicAliasAnalysis.cpp BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias response 2017-08-08 21:25:26 +00:00
BlockFrequencyInfo.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BlockFrequencyInfoImpl.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BranchProbabilityInfo.cpp [ConstantInt] Use ConstantInt::getValue instead of Constant::getUniqueInteger in a few places where we obviously have a ConstantInt. NFC 2017-08-04 16:59:29 +00:00
CallGraph.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp fix trivial typos; NFC 2017-07-09 05:54:44 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp CFLAA: return MustAlias when pointers p, q are equal, i.e., 2017-08-09 17:02:18 +00:00
CFLGraph.h
CFLSteensAliasAnalysis.cpp [CFLAA] Remove unneded function declaration. NFCI. 2017-06-29 22:57:37 +00:00
CGSCCPassManager.cpp [PM] Switch the CGSCC debug messages to use the standard LLVM debug 2017-08-11 05:47:13 +00:00
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp
CostModel.cpp [SLP] Initial rework for min/max horizontal reduction vectorization, NFC. 2017-07-31 14:36:05 +00:00
Delinearization.cpp
DemandedBits.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
DependenceAnalysis.cpp fix typos in comments and error messages; NFC 2017-07-10 12:44:25 +00:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
IndirectCallPromotionAnalysis.cpp Make ICP uses PSI to check for hotness. 2017-08-08 20:57:33 +00:00
InlineCost.cpp [Inliner] Fix a typo in option description. NFC. 2017-08-04 17:15:17 +00:00
InstCount.cpp [Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back other Statistic variables 2017-07-18 02:41:12 +00:00
InstructionSimplify.cpp [InstSimplify] Add test cases that show that simplifySelectWithICmpCond doesn't work with non-canonical comparisons. 2017-08-10 01:02:02 +00:00
Interval.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IntervalPartition.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IteratedDominanceFrontier.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp [LCG] Fix an assert in a on-scope-exit lambda that checked the contents 2017-08-10 03:05:21 +00:00
LazyValueInfo.cpp [LVI] Fix LVI compile time regression around constantFoldUser() 2017-08-10 02:23:14 +00:00
Lint.cpp [Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI 2017-07-06 18:39:47 +00:00
LLVMBuild.txt
Loads.cpp Make visible isDereferenceableAndAlignedPointer(..., const APInt &Size, ...) 2017-06-24 01:35:13 +00:00
LoopAccessAnalysis.cpp
LoopAnalysisManager.cpp
LoopInfo.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp [MemoryBuiltins] Allow truncation in visitAllocaInst() 2017-07-12 06:19:10 +00:00
MemoryDependenceAnalysis.cpp [MemDep] Cleanup return after else & use auto. NFC. 2017-06-25 22:12:59 +00:00
MemoryLocation.cpp
MemorySSA.cpp Allow None as a MemoryLocation to getModRefInfo 2017-08-01 00:28:29 +00:00
MemorySSAUpdater.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [ThinLTO] Add FunctionAttrs to ThinLTO index 2017-08-04 16:00:58 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationDiagnosticInfo.cpp [ORE] Add diagnostics hotness threshold 2017-06-30 23:14:53 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
ProfileSummaryInfo.cpp Adjust the hotness threshold from 99.9% to 99%. 2017-08-04 16:20:54 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-27 21:52:05 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Preserve NSW information for sext(subtract). 2017-08-04 20:19:46 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h
TargetLibraryInfo.cpp
TargetTransformInfo.cpp [LSR / TTI / SystemZ] Eliminate TargetTransformInfo::isFoldableMemAccess() 2017-08-09 11:28:01 +00:00
Trace.cpp [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
TypeBasedAliasAnalysis.cpp [TBAA] Remove metadata keyword from IR examples in comments (NFC). 2017-06-29 13:55:23 +00:00
TypeMetadataUtils.cpp
ValueTracking.cpp [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 2. 2017-08-10 11:24:57 +00:00
VectorUtils.cpp [Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI 2017-07-06 18:39:47 +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))

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