mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
c5d014c133
This patch introduces a new KnownBits struct that wraps the two APInt used by computeKnownBits. This allows us to treat them as more of a unit. Initially I've just altered the signatures of computeKnownBits and InstCombine's simplifyDemandedBits to pass a KnownBits reference instead of two separate APInt references. I'll do similar to the SelectionDAG version of computeKnownBits/simplifyDemandedBits as a separate patch. I've added a constructor that allows initializing both APInts to the same bit width with a starting value of 0. This reduces the repeated pattern of initializing both APInts. Once place default constructed the APInts so I added a default constructor for those cases. Going forward I would like to add more methods that will work on the pairs. For example trunc, zext, and sext occur on both APInts together in several places. We should probably add a clear method that can be used to clear both pieces. Maybe a method to check for conflicting information. A method to return (Zero|One) so we don't write it out everywhere. Maybe a method for (Zero|One).isAllOnesValue() to determine if all bits are known. I'm sure there are many other methods we can come up with. Differential Revision: https://reviews.llvm.org/D32376 llvm-svn: 301432 |
||
---|---|---|
.. | ||
AliasAnalysis.h | ||
AliasAnalysisEvaluator.h | ||
AliasSetTracker.h | ||
AssumptionCache.h | ||
BasicAliasAnalysis.h | ||
BlockFrequencyInfo.h | ||
BlockFrequencyInfoImpl.h | ||
BranchProbabilityInfo.h | ||
CallGraph.h | ||
CallGraphSCCPass.h | ||
CallPrinter.h | ||
CaptureTracking.h | ||
CFG.h | ||
CFGPrinter.h | ||
CFLAndersAliasAnalysis.h | ||
CFLSteensAliasAnalysis.h | ||
CGSCCPassManager.h | ||
CodeMetrics.h | ||
ConstantFolding.h | ||
DemandedBits.h | ||
DependenceAnalysis.h | ||
DivergenceAnalysis.h | ||
DominanceFrontier.h | ||
DominanceFrontierImpl.h | ||
DomPrinter.h | ||
DOTGraphTraitsPass.h | ||
EHPersonalities.h | ||
GlobalsModRef.h | ||
IndirectCallPromotionAnalysis.h | ||
IndirectCallSiteVisitor.h | ||
InlineCost.h | ||
InstructionSimplify.h | ||
Interval.h | ||
IntervalIterator.h | ||
IntervalPartition.h | ||
IteratedDominanceFrontier.h | ||
IVUsers.h | ||
LazyBlockFrequencyInfo.h | ||
LazyBranchProbabilityInfo.h | ||
LazyCallGraph.h | ||
LazyValueInfo.h | ||
Lint.h | ||
Loads.h | ||
LoopAccessAnalysis.h | ||
LoopAnalysisManager.h | ||
LoopInfo.h | ||
LoopInfoImpl.h | ||
LoopIterator.h | ||
LoopPass.h | ||
LoopUnrollAnalyzer.h | ||
MemoryBuiltins.h | ||
MemoryDependenceAnalysis.h | ||
MemoryLocation.h | ||
MemorySSA.h | ||
MemorySSAUpdater.h | ||
ModuleSummaryAnalysis.h | ||
ObjCARCAliasAnalysis.h | ||
ObjCARCAnalysisUtils.h | ||
ObjCARCInstKind.h | ||
ObjectUtils.h | ||
OptimizationDiagnosticInfo.h | ||
OrderedBasicBlock.h | ||
Passes.h | ||
PHITransAddr.h | ||
PostDominators.h | ||
ProfileSummaryInfo.h | ||
PtrUseVisitor.h | ||
RegionInfo.h | ||
RegionInfoImpl.h | ||
RegionIterator.h | ||
RegionPass.h | ||
RegionPrinter.h | ||
ScalarEvolution.h | ||
ScalarEvolutionAliasAnalysis.h | ||
ScalarEvolutionExpander.h | ||
ScalarEvolutionExpressions.h | ||
ScalarEvolutionNormalization.h | ||
ScopedNoAliasAA.h | ||
SparsePropagation.h | ||
TargetFolder.h | ||
TargetLibraryInfo.def | ||
TargetLibraryInfo.h | ||
TargetTransformInfo.h | ||
TargetTransformInfoImpl.h | ||
Trace.h | ||
TypeBasedAliasAnalysis.h | ||
TypeMetadataUtils.h | ||
ValueTracking.h | ||
VectorUtils.h |