llvm-6502/lib/Analysis
Chris Lattner 17f0cd3cc1 teach libanalysis to simplify vector loads with bitcast sources. This
implements something out of Target/README.txt producing:

_foo:                                                       ## @foo
	movl	4(%esp), %eax
	movapd	LCPI1_0, %xmm0
	movapd	%xmm0, (%eax)
	ret	$4

instead of:

_foo:                                                       ## @foo
	movl	4(%esp), %eax
	movapd	_b, %xmm0
	mulpd	LCPI1_0, %xmm0
	addpd	_a, %xmm0
	movapd	%xmm0, (%eax)
	ret	$4



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-23 06:57:37 +00:00
..
IPA Remove MallocInst from LLVM Instructions. 2009-10-17 01:18:07 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp
Analysis.cpp
BasicAliasAnalysis.cpp inline isGEP away. 2009-10-17 23:48:54 +00:00
CaptureTracking.cpp
CFGPrinter.cpp make DOTGraphTraits public, patch by Tobias Grosser! 2009-10-18 04:09:11 +00:00
CMakeLists.txt add function passes for printing various dominator datastructures 2009-10-18 04:10:40 +00:00
ConstantFolding.cpp teach libanalysis to simplify vector loads with bitcast sources. This 2009-10-23 06:57:37 +00:00
DbgInfoPrinter.cpp Remove std::string uses from DebugInfo interface. 2009-09-29 18:40:58 +00:00
DebugInfo.cpp "there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :) 2009-10-13 17:35:35 +00:00
DomPrinter.cpp fix the other issue with ID's, hopefully really fixing the linux build. 2009-10-18 04:58:34 +00:00
InlineCost.cpp Remove MallocInst from LLVM Instructions. 2009-10-17 01:18:07 +00:00
InstCount.cpp Remove MallocInst from LLVM Instructions. 2009-10-17 01:18:07 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
LiveValues.cpp
LoopDependenceAnalysis.cpp
LoopInfo.cpp Fix another place that calls Loop::contains a lot to construct a sorted 2009-10-20 20:41:13 +00:00
LoopPass.cpp Fix this debug output to handle the case where the loop has been deleted. 2009-09-28 15:40:01 +00:00
Makefile
MallocHelper.cpp Invert isSafeToGetMallocArraySize check because we return NULL when we don't know the size. 2009-10-16 18:08:17 +00:00
MemoryDependenceAnalysis.cpp Memory dependence analysis was incorrectly stopping to scan for stores to a pointer at bitcast uses of a malloc call. 2009-10-13 01:42:53 +00:00
PointerTracking.cpp Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper 2009-10-15 20:14:52 +00:00
PostDominators.cpp
ProfileEstimatorPass.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt Create a README.txt for lib/Analysis, and add an entry. 2009-09-28 18:38:53 +00:00
ScalarEvolution.cpp Revert r83606 and add comments explaining why it isn't safe. 2009-10-09 16:35:06 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Introduce and use convenience methods for getting pointer types 2009-10-06 15:40:36 +00:00
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp Remove MallocInst from LLVM Instructions. 2009-10-17 01:18:07 +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.

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