1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Analysis
Sanjay Patel a4be43cc7e [InstSimplify] allow exp/log simplifications with only 'reassoc' FMF
These intrinsic folds were added with D41381, but only allowed with isFast().
That's more than necessary because FMF has 'reassoc' to apply to these
kinds of folds after D39304, and that's all we need in these cases.

Differential Revision: https://reviews.llvm.org/D43160

llvm-svn: 324967
2018-02-12 23:51:23 +00:00
..
AliasAnalysis.cpp [ModRefInfo] Return NoModRef for Must and NoModRef. 2018-01-19 10:26:40 +00:00
AliasAnalysisEvaluator.cpp [ModRefInfo] Add must alias info to ModRefInfo. 2017-12-21 21:41:53 +00:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp Modify ModRefInfo values using static inline method abstractions [NFC]. 2017-12-05 20:12:23 +00:00
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp [ModRefInfo] Return NoModRef for Must and NoModRef. 2018-01-19 10:26:40 +00:00
BlockFrequencyInfo.cpp Revert r320104: infinite loop profiling bug fix 2017-12-08 19:38:07 +00:00
BlockFrequencyInfoImpl.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
BranchProbabilityInfo.cpp [BranchProbabilityInfo] Handle irreducible loops. 2017-11-01 15:16:50 +00:00
CallGraph.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp [CFGVPrinter] Fix -dot-cfg-only 2017-12-19 15:20:18 +00:00
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp Use a BumpPtrAllocator for Loop objects 2017-09-28 02:45:42 +00:00
CMakeLists.txt Add a pass to generate synthetic function entry counts. 2018-01-09 19:39:35 +00:00
CmpInstAnalysis.cpp
CodeMetrics.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ConstantFolding.cpp Revert "Fix typo [NFC]" 2017-10-01 00:09:53 +00:00
CostModel.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
Delinearization.cpp
DemandedBits.cpp Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
DependenceAnalysis.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
DivergenceAnalysis.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
DominanceFrontier.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp [GlobalsAA] Don't let dbg intrinsics affect analysis result 2018-01-15 07:05:51 +00:00
IndirectCallPromotionAnalysis.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
InlineCost.cpp [InlineCost] Mark functions accessing varargs as not viable. 2018-01-28 19:11:49 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] allow exp/log simplifications with only 'reassoc' FMF 2018-02-12 23:51:23 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp Fix typos of occurred and occurrence 2018-01-24 10:33:39 +00:00
LazyValueInfo.cpp [NFC] fix trivial typos in comments 2018-01-17 12:29:38 +00:00
Lint.cpp [Lint] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFCI) 2018-01-31 16:42:15 +00:00
LLVMBuild.txt
Loads.cpp Modify ModRefInfo values using static inline method abstractions [NFC]. 2017-12-05 20:12:23 +00:00
LoopAccessAnalysis.cpp Revert r320548:[SLP] Vectorize jumbled memory loads 2017-12-20 15:26:59 +00:00
LoopAnalysisManager.cpp Add MemorySSA as loop dependency, disabled by default [NFC]. 2017-11-21 15:45:46 +00:00
LoopInfo.cpp IR printing improvement for loop passes - handle -print-module-scope 2017-12-01 18:33:58 +00:00
LoopPass.cpp Follow-up for r324429: "[LCSSAVerification] Run verification only when asserts are enabled." 2018-02-07 04:24:44 +00:00
LoopUnrollAnalyzer.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
MemDepPrinter.cpp
MemDerefPrinter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp [MDA] Use common code instead of reimplementing same. [NFC] 2018-01-17 19:57:19 +00:00
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] Allow reordering of loads that alias in the presence of volatile loads. 2017-12-22 19:54:03 +00:00
MemorySSAUpdater.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ModuleDebugInfoPrinter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ModuleSummaryAnalysis.cpp Re-land "[ThinLTO] Add call edges' relative block frequency to per-module summary." 2018-01-25 19:27:17 +00:00
ObjCARCAliasAnalysis.cpp [ModRefInfo] Make enum ModRefInfo an enum class [NFC]. 2017-12-07 22:41:34 +00:00
ObjCARCAnalysisUtils.cpp Mark all library options as hidden. 2017-12-01 00:53:10 +00:00
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
PostDominators.cpp
ProfileSummaryInfo.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
RegionPass.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Make getPostIncExpr guaranteed to return AddRec 2018-02-12 05:09:38 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Use phi ranges to simplify code. No functionality change intended. 2017-12-30 15:27:33 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp [ModRefInfo] Make enum ModRefInfo an enum class [NFC]. 2017-12-07 22:41:34 +00:00
StratifiedSets.h
SyntheticCountsUtils.cpp Remove CallGraphTraits and use equivalent methods in GraphTraits 2018-02-01 19:40:35 +00:00
TargetLibraryInfo.cpp [Analysis] Disable calls to *_finite and other glibc-only functions on Android. 2018-01-31 19:12:50 +00:00
TargetTransformInfo.cpp [LoopStrengthReduce, x86] don't add cost for a cmp that will be macro-fused (PR35681) 2018-02-05 23:43:05 +00:00
Trace.cpp Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
TypeBasedAliasAnalysis.cpp [Analysis] Support aggregate access types in TBAA 2018-02-02 14:09:22 +00:00
TypeMetadataUtils.cpp
ValueLattice.cpp [LVI] Move LVILatticeVal class to separate header file (NFC). 2017-09-28 11:09:22 +00:00
ValueLatticeUtils.cpp [IPSCCP] Move common functions to ValueLatticeUtils (NFC) 2017-10-13 17:53:44 +00:00
ValueTracking.cpp [ValueTracking] don't crash when assumptions conflict (PR36270) 2018-02-08 14:52:40 +00:00
VectorUtils.cpp Add an @llvm.sideeffect intrinsic 2017-11-08 21:59:51 +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))

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