llvm-6502/lib/Analysis
Chandler Carruth 4147f39769 Temporarily revert r135528 which distinguishes between two copies of one
inlined variable, based on the discussion in PR10542.

This explodes the runtime of several passes down the pipeline due to
a large number of "copies" remaining live across a large function. This
only shows up with both debug and opt, but when it does it creates
a many-minute compile when self-hosting LLVM+Clang. There are several
other cases that show these types of regressions.

All of this is tracked in PR10542, and progress is being made on fixing
the issue. Once its addressed, the re-instated, but until then this
restores the performance for self-hosting and other opt+debug builds.

Devang, let me know if this causes any trouble, or impedes fixing it in
any way, and thanks for working on this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-05 00:51:31 +00:00
..
IPA Rewrite the CMake build to use explicit dependencies between libraries, 2011-07-29 00:14:25 +00:00
AliasAnalysis.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
AliasAnalysisCounter.cpp Teach AliasAnalysisCounter about PartialAlias. 2010-12-10 19:53:05 +00:00
AliasAnalysisEvaluator.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
AliasDebugger.cpp Extend the AliasAnalysis::pointsToConstantMemory interface to allow it 2010-11-08 16:45:26 +00:00
AliasSetTracker.cpp Minor simplification. 2011-07-27 01:02:25 +00:00
Analysis.cpp Rename BlockFrequency to BlockFrequencyInfo and MachineBlockFrequency to 2011-07-25 19:25:40 +00:00
BasicAliasAnalysis.cpp Explicitly cast narrowing conversions inside {}s that will become errors in 2011-07-27 06:22:51 +00:00
BlockFrequencyInfo.cpp Add more constantness in BlockFrequencyInfo. 2011-08-03 21:30:57 +00:00
BranchProbabilityInfo.cpp Change SmallVector to SmallPtrSet in BranchProbabilityInfo. Handle cases where 2011-08-01 19:16:26 +00:00
CaptureTracking.cpp Don't include Operator.h from InstrTypes.h. 2011-04-11 09:35:34 +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 Rewrite the CMake build to use explicit dependencies between libraries, 2011-07-29 00:14:25 +00:00
ConstantFolding.cpp Convert GetElementPtrInst to use ArrayRef. 2011-07-25 09:48:08 +00:00
DbgInfoPrinter.cpp Move DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp 2011-02-15 17:36:11 +00:00
DebugInfo.cpp Temporarily revert r135528 which distinguishes between two copies of one 2011-08-05 00:51:31 +00:00
DIBuilder.cpp Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday. 2011-07-19 19:41:54 +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 Change condition for determining whether a function is small for inlining metrics so that very long functions 2011-05-24 20:22:24 +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 Fix what seems an obvious typo. Patch by Ivan Krasin. Problem 2011-08-04 10:02:21 +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 Teach IVUsers to stop at non-affine expressions unless they are both 2011-07-01 22:05:19 +00:00
LazyValueInfo.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +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 land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
Loads.cpp Convert TargetData::getIndexedOffset to use ArrayRef. 2011-07-19 14:01:37 +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 Reverting r136884 updateUnloop, which crashed a linux builder. 2011-08-04 01:04:37 +00:00
LoopPass.cpp Reverting r136884 updateUnloop, which crashed a linux builder. 2011-08-04 01:04:37 +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 "unknown" results for memdep, which mean "I don't know whether a dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions. 2011-06-15 00:47:34 +00:00
MemoryBuiltins.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
MemoryDependenceAnalysis.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +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 Add this back in for now. There are still a few passes which create unwind instructions at the moment. 2011-08-03 01:07:57 +00:00
PathProfileInfo.cpp Implementation of path profiling. 2011-01-29 01:09:53 +00:00
PathProfileVerifier.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
PHITransAddr.cpp Shorten some expressions by using ArrayRef::slice(). 2011-07-25 15:13:01 +00:00
PostDominators.cpp remove postdom frontiers, because it is dead. Forward dom frontiers are 2011-04-05 21:57:17 +00:00
ProfileEstimatorPass.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ProfileInfo.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ProfileInfoLoader.cpp Remove unused STL header includes. 2011-04-23 19:53:52 +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 Region: Allow user control the printing style of the print function. 2011-04-04 07:19:18 +00:00
RegionPass.cpp Minor change: Fix the typo in RegionPass.h and RegionPass.cpp. 2011-05-05 13:59:38 +00:00
RegionPrinter.cpp RegionPrinter: Ignore back edges when layouting the graph 2011-02-27 04:11:07 +00:00
ScalarEvolution.cpp Use consistent terminology for loop exit/exiting blocks. Name change only. 2011-08-02 04:23:35 +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 Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use 2011-07-22 08:16:57 +00:00
ScalarEvolutionNormalization.cpp Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrap 2011-03-14 16:50:06 +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 Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ValueTracking.cpp Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used. 2011-07-18 12:00:32 +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))

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