llvm-6502/lib/Analysis
Joerg Sonnenberger 3470693641 Allow inlining of functions with returns_twice calls, if they have the
attribute themselve.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146851 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-18 20:35:43 +00:00
..
IPA LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
AliasAnalysis.cpp Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions. 2011-09-26 20:15:28 +00:00
AliasAnalysisCounter.cpp
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
AliasSetTracker.cpp Atomic load/store support in LICM. 2011-08-15 20:52:09 +00:00
Analysis.cpp C API functions must be able to see their extern "C" definitions, or it will be impossible to call them from C. 2011-08-19 01:36:54 +00:00
BasicAliasAnalysis.cpp Refactor code to use new attribute getters on CallSite for NoCapture and ByVal. 2011-11-20 19:09:04 +00:00
BlockFrequencyInfo.cpp Add pass printing support to BlockFrequencyInfo pass. The implementation 2011-10-19 10:12:41 +00:00
BranchProbabilityInfo.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
CaptureTracking.cpp Fix crasher in GVN due to my recent capture tracking changes. 2011-11-21 19:42:56 +00:00
CFGPrinter.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
CMakeLists.txt build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
ConstantFolding.cpp Switch llvm.cttz and llvm.ctlz to accept a second i1 parameter which 2011-12-12 04:26:04 +00:00
DbgInfoPrinter.cpp Fix for DbgInfoPrinter.cpp:174:12: warning: ‘LineNo’ may be used uninitialized in this function. 2011-09-21 23:34:23 +00:00
DebugInfo.cpp When recursing for the original size of a type, stop if we are at a 2011-12-16 23:42:45 +00:00
DIBuilder.cpp In DICompositeType, referenced to derived type is either metadata or null. 2011-12-16 17:51:31 +00:00
DominanceFrontier.cpp Move DominanceFrontier from VMCore to Analysis. 2011-01-18 06:06:27 +00:00
DomPrinter.cpp
InlineCost.cpp Allow inlining of functions with returns_twice calls, if they have the 2011-12-18 20:35:43 +00:00
InstCount.cpp
InstructionSimplify.cpp Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp Slightly more useful tracing. 2011-10-13 17:06:38 +00:00
LazyValueInfo.cpp Clear the new cache. 2011-12-03 15:19:55 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Fix a few more places where TargetData/TargetLibraryInfo is not being passed. 2011-12-02 01:26:24 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Loads.cpp Add some comments here because the lack of a check for volatile/atomic here is a bit unusual. 2011-08-15 21:56:39 +00:00
LoopDependenceAnalysis.cpp Misc analysis passes that need to be aware of atomic load/store. 2011-08-15 20:54:19 +00:00
LoopInfo.cpp Move Instruction::isSafeToSpeculativelyExecute out of VMCore and 2011-12-14 23:49:11 +00:00
LoopPass.cpp Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
Makefile
MemDepPrinter.cpp Fix a stupid typo in MemDepPrinter. 2011-12-14 02:54:39 +00:00
MemoryBuiltins.cpp Validate the return type when checking if a function is malloc. 2011-11-23 17:58:47 +00:00
MemoryDependenceAnalysis.cpp Fix crasher in GVN due to my recent capture tracking changes. 2011-11-21 19:42:56 +00:00
ModuleDebugInfoPrinter.cpp
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 Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
PHITransAddr.cpp Move Instruction::isSafeToSpeculativelyExecute out of VMCore and 2011-12-14 23:49:11 +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 Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +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 Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
ProfileVerifierPass.cpp Move code into anonymous namespaces. 2011-11-26 23:01:57 +00:00
README.txt
RegionInfo.cpp Missed some users of Value::getNameStr. 2011-11-15 18:30:06 +00:00
RegionPass.cpp Reapply r138695. Fix PassManager stack depths. 2011-08-29 17:07:00 +00:00
RegionPrinter.cpp RegionPrinter: Ignore back edges when layouting the graph 2011-02-27 04:11:07 +00:00
ScalarEvolution.cpp Fix a few more places where TargetData/TargetLibraryInfo is not being passed. 2011-12-02 01:26:24 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp LSR: Fold redundant bitcasts on-the-fly. 2011-12-14 22:07:19 +00:00
ScalarEvolutionNormalization.cpp Fix memory corruption I introduced a few checkins ago. 2011-10-13 18:49:23 +00:00
SparsePropagation.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +00:00
Trace.cpp Remove all remaining uses of Value::getNameStr(). 2011-11-15 16:27:03 +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 Move Instruction::isSafeToSpeculativelyExecute out of VMCore and 2011-12-14 23:49:11 +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))

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