llvm-6502/lib/Analysis
Duncan Sands 50ca4d37f7 Improve threading of comparisons over select instructions (spotted by my
auto-simplifier).  This has a big impact on Ada code, but not much else.
Unfortunately the impact is mostly negative!  This is due to PR9004 (aka
SCCP failing to resolve conditional branch conditions in the destination
blocks of the branch), in which simple correlated expressions are not
resolved but complicated ones are, so simplifying has a bad effect!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124788 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 09:37:39 +00:00
..
IPA Use the new addEscapingValue callback to update GlobalsModRef when GVN adds PHIs of GEPs. For the moment, 2011-01-03 23:51:43 +00:00
AliasAnalysis.cpp Stub out a new updating interface to AliasAnalysis, allowing stateful analyses to be informed when 2011-01-03 21:38:41 +00:00
AliasAnalysisCounter.cpp Teach AliasAnalysisCounter about PartialAlias. 2010-12-10 19:53:05 +00:00
AliasAnalysisEvaluator.cpp Teach AliasAnalysisEvaluator about PartialAlias. 2010-12-10 19:52:40 +00:00
AliasDebugger.cpp Extend the AliasAnalysis::pointsToConstantMemory interface to allow it 2010-11-08 16:45:26 +00:00
AliasSetTracker.cpp Update this code to handle PartialAlias as MayAlias. 2010-12-10 19:40:47 +00:00
Analysis.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
BasicAliasAnalysis.cpp Give GetUnderlyingObject a TargetData, to keep it in sync 2011-01-24 18:53:32 +00:00
CaptureTracking.cpp VAArg doesn't capture its operand. 2010-11-09 20:09:35 +00:00
CFGPrinter.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
CMakeLists.txt Implementation of path profiling. 2011-01-29 01:09:53 +00:00
ConstantFolding.cpp Give GetUnderlyingObject a TargetData, to keep it in sync 2011-01-24 18:53:32 +00:00
DbgInfoPrinter.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
DebugInfo.cpp Fix typo in comment. 2011-02-03 00:13:47 +00:00
DIBuilder.cpp Add support to describe template value parameter in debug info. 2011-02-02 22:35:53 +00:00
DominanceFrontier.cpp Move DominanceFrontier from VMCore to Analysis. 2011-01-18 06:06:27 +00:00
DomPrinter.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
InlineCost.cpp Reapply 124275 since the Dragonegg failure was unreproducible. 2011-02-01 01:16:32 +00:00
InstCount.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
InstructionSimplify.cpp Improve threading of comparisons over select instructions (spotted by my 2011-02-03 09:37:39 +00:00
Interval.cpp Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
IntervalPartition.cpp Now with fewer extraneous semicolons! 2010-10-07 22:25:06 +00:00
IVUsers.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
LazyValueInfo.cpp Teach LazyValueInfo that allocas aren't NULL. Over all of llvm-test, this saves 2011-01-15 09:16:12 +00:00
LibCallAliasAnalysis.cpp Now with fewer extraneous semicolons! 2010-10-07 22:25:06 +00:00
LibCallSemantics.cpp Thread const correctness through a bunch of AliasAnalysis interfaces and 2010-08-03 21:48:53 +00:00
Lint.cpp Give GetUnderlyingObject a TargetData, to keep it in sync 2011-01-24 18:53:32 +00:00
LiveValues.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
Loads.cpp Move Value::getUnderlyingObject to be a standalone 2010-12-15 20:02:24 +00:00
LoopDependenceAnalysis.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
LoopInfo.cpp Fix typo pointed out by Trevor Harmon. 2010-11-13 12:16:27 +00:00
LoopPass.cpp zap dead code. 2010-09-04 18:12:00 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
MemDepPrinter.cpp Add helper functions for computing the Location of load, store, 2010-11-11 21:50:19 +00:00
MemoryBuiltins.cpp minor enhancement to llvm::isFreeCall API: return CallInst; no functional change 2010-06-23 21:51:12 +00:00
MemoryDependenceAnalysis.cpp Give GetUnderlyingObject a TargetData, to keep it in sync 2011-01-24 18:53:32 +00:00
ModuleDebugInfoPrinter.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
NoAliasAnalysis.cpp Use the new addEscapingValue callback to update GlobalsModRef when GVN adds PHIs of GEPs. For the moment, 2011-01-03 23:51:43 +00:00
PathNumbering.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PathProfileInfo.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PathProfileVerifier.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PHITransAddr.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
PostDominators.cpp split dom frontier handling stuff out to its own DominanceFrontier header, 2011-01-02 22:09:33 +00:00
ProfileEstimatorPass.cpp fix PR8928 by clearing a stale map, patch by Jakub Staszak! 2011-01-24 18:36:51 +00:00
ProfileInfo.cpp Null initialize a few variables flagged by 2011-01-23 17:05:06 +00:00
ProfileInfoLoader.cpp Reapplied r81355 with the problems fixed. 2009-09-16 11:35:50 +00:00
ProfileInfoLoaderPass.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
ProfileVerifierPass.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
README.txt When checking whether the special handling for an addrec increment which 2010-04-26 21:46:36 +00:00
RegionInfo.cpp Add single entry / single exit accessors. 2011-01-13 23:18:04 +00:00
RegionPass.cpp Remove useless dynamic_cast<>(). 2010-12-12 21:58:28 +00:00
RegionPrinter.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
ScalarEvolution.cpp Fix memory corruption. If one of the SCEV creation functions calls another but 2011-01-26 08:40:22 +00:00
ScalarEvolutionAliasAnalysis.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
ScalarEvolutionExpander.cpp Introduce memoization for ScalarEvolution dominates and properlyDominates 2010-11-18 00:34:22 +00:00
ScalarEvolutionNormalization.cpp Disable the asserts that check that normalization is perfectly 2010-09-03 22:12:56 +00:00
SparsePropagation.cpp Convert debug messages to use dbgs(). Generally this means 2009-12-23 22:28:01 +00:00
Trace.cpp Convert debug messages to use dbgs(). Generally this means 2009-12-23 22:35:10 +00:00
TypeBasedAliasAnalysis.cpp Update a comment. 2010-12-16 02:55:10 +00:00
ValueTracking.cpp Add a m_SignBit pattern for convenience. 2011-02-01 08:50:33 +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))

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