1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Analysis
Brian Gesiak 61982c1630 [Analysis] bitreverse(undef) returns undef
Summary:
The reverse of an artbitrary bitpattern is also an arbitrary
bitpattern.

Reviewers: trentxintong, arsenm, majnemer

Reviewed By: majnemer

Subscribers: majnemer, wdng, llvm-commits

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

llvm-svn: 298201
2017-03-19 04:40:42 +00:00
..
AliasAnalysis.cpp [AliasAnalysis] Fences do not modify constant memory location 2017-01-20 00:21:33 +00:00
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 Use a WeakVH for UnknownInstructions in AliasSetTracker 2017-03-11 01:15:48 +00:00
Analysis.cpp [LCSSA] Perform LCSSA verification only for the current loop nest. 2016-10-28 12:57:20 +00:00
AssumptionCache.cpp AssumptionCache: Disable the verifier by default, move it behind a hidden cl::opt and verify from releaseMemory(). 2017-02-15 21:10:09 +00:00
BasicAliasAnalysis.cpp [BasicAA] Take attributes into account when requesting modref info for a call site 2017-03-01 13:19:51 +00:00
BlockFrequencyInfo.cpp [PGO] internal option cleanups 2017-02-02 21:29:17 +00:00
BlockFrequencyInfoImpl.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
BranchProbabilityInfo.cpp Retry: [BPI] Use a safer constructor to calculate branch probabilities 2016-12-17 01:02:08 +00:00
CallGraph.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
CallGraphSCCPass.cpp Implement getPassName() for IR printing passes. 2017-03-10 07:09:20 +00:00
CallPrinter.cpp [CG] Rename the DOT printing pass to actually reference "DOT". 2016-03-10 11:04:40 +00:00
CaptureTracking.cpp [CaptureTracking] Volatile operations capture their memory location 2016-05-26 17:36:22 +00:00
CFG.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:24:31 +00:00
CFGPrinter.cpp [PM] Port CFGViewer and CFGPrinter to the new Pass Manager 2016-09-15 18:35:27 +00:00
CFLAndersAliasAnalysis.cpp Apply clang-tidy's performance-unnecessary-value-param to LLVM. 2017-01-13 14:39:03 +00:00
CFLGraph.h [CFLAA] Check for pointer types in more places. 2016-07-29 01:23:45 +00:00
CFLSteensAliasAnalysis.cpp [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
CGSCCPassManager.cpp [PM/LCG] Teach the LazyCallGraph how to replace a function without 2017-02-09 23:24:13 +00:00
CMakeLists.txt [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
CodeMetrics.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
ConstantFolding.cpp [Analysis] bitreverse(undef) returns undef 2017-03-19 04:40:42 +00:00
CostModel.cpp [TargetTransformInfo] getIntrinsicInstrCost() scalarization estimation improved 2017-03-14 06:35:36 +00:00
Delinearization.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DemandedBits.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
DependenceAnalysis.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
DivergenceAnalysis.cpp DivergenceAnalysis: Fix crash with no return blocks 2016-05-09 16:57:08 +00:00
DominanceFrontier.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
DomPrinter.cpp Introduce analysis pass to compute PostDominators in the new pass manager. NFC 2016-02-25 17:54:07 +00:00
EHPersonalities.cpp [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
GlobalsModRef.cpp [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
IndirectCallPromotionAnalysis.cpp Remove another unused variable from r275216 2016-07-12 23:49:17 +00:00
InlineCost.cpp [InlineCost] Move the code in isGEPOffsetConstant to a lambda. 2017-02-25 00:10:22 +00:00
InstCount.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstructionSimplify.cpp [InstSimplify] allow folds for bool vector div/rem 2017-03-09 21:56:03 +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 Drop graph_ prefix 2017-02-09 20:37:46 +00:00
IVUsers.cpp [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LazyBlockFrequencyInfo.cpp [LazyBFI] Fix typos 2017-02-14 17:21:12 +00:00
LazyBranchProbabilityInfo.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyCallGraph.cpp [LCG] Fix EXPENSIVE_CHECKS typo. NFC 2017-02-28 18:34:55 +00:00
LazyValueInfo.cpp [LVI] Add Datalayout to the class LazyValueInfo since all its Impls require it. NFC 2017-03-12 14:06:41 +00:00
Lint.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
LLVMBuild.txt Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
Loads.cpp [JumpThread] Enhance finding partial redundant loads by continuing scanning single predecessor 2017-02-02 15:12:34 +00:00
LoopAccessAnalysis.cpp [SLP] Revert everything that has to do with memory access sorting. 2017-03-10 18:59:07 +00:00
LoopAnalysisManager.cpp Revert r293017 and fix the actual underlying issue. 2017-02-07 01:50:48 +00:00
LoopInfo.cpp Make VerifyDomInfo and VerifyLoopInfo global variables 2017-01-24 05:52:07 +00:00
LoopPass.cpp Implement getPassName() for IR printing passes. 2017-03-10 07:09:20 +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 NFC. Move isDereferenceable to Loads.h/cpp 2016-02-24 12:49:04 +00:00
MemoryBuiltins.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
MemoryDependenceAnalysis.cpp [Devirtualization] MemDep returns non-local !invariant.group dependencies 2017-01-12 11:33:58 +00:00
MemoryLocation.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
ModuleDebugInfoPrinter.cpp [IR] Remove the DIExpression field from DIGlobalVariable. 2016-12-20 02:09:43 +00:00
ModuleSummaryAnalysis.cpp Perform symbol binding for .symver versioned symbols 2017-03-09 00:19:49 +00:00
ObjCARCAliasAnalysis.cpp Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
ObjCARCAnalysisUtils.cpp [ARC] Pull the ObjC ARC components that really serve the role of 2015-08-20 08:06:03 +00:00
ObjCARCInstKind.cpp Create llvm.addressofreturnaddress intrinsic 2016-10-12 22:13:19 +00:00
OptimizationDiagnosticInfo.cpp [ORE] Remove ORE.emit{{.+}} functions 2017-02-23 21:32:53 +00:00
OrderedBasicBlock.cpp [CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore 2015-07-31 14:31:35 +00:00
PHITransAddr.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
PostDominators.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
ProfileSummaryInfo.cpp [ProfileSummaryInfo] Remove unneeded braces. NFCI. 2017-03-10 20:50:51 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
RegionPass.cpp Implement getPassName() for IR printing passes. 2017-03-10 07:09:20 +00:00
RegionPrinter.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
ScalarEvolution.cpp [SCEV] Use const Loop *L instead of Loop *L. NFC 2017-03-17 22:19:52 +00:00
ScalarEvolutionAliasAnalysis.cpp [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
ScalarEvolutionExpander.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
ScalarEvolutionNormalization.cpp Remove emacs mode markers from .cpp files. NFC 2016-04-24 17:55:41 +00:00
ScopedNoAliasAA.cpp [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
SparsePropagation.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
StratifiedSets.h Do a sweep over move ctors and remove those that are identical to the default. 2016-10-20 12:20:28 +00:00
TargetLibraryInfo.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
TargetTransformInfo.cpp [TargetTransformInfo] getIntrinsicInstrCost() scalarization estimation improved 2017-03-14 06:35:36 +00:00
Trace.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
TypeBasedAliasAnalysis.cpp [TBAA] Don't generate invalid TBAA when merging nodes 2016-12-11 20:07:25 +00:00
TypeMetadataUtils.cpp Analysis: Add appropriate const qualification to functions in TypeMetadataUtils.cpp. NFC. 2017-01-27 22:55:30 +00:00
ValueTracking.cpp [ValueTracking] Remove deadish code from computeKnownBitsAddSub. 2017-03-18 18:21:46 +00:00
VectorUtils.cpp [LV] Move interleaved access helper functions to VectorUtils (NFC) 2017-02-01 17:45:46 +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))

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