llvm-6502/lib/Transforms/Scalar
Chris Lattner b3f0673d52 Teach valuetracking that byval arguments with a specified alignment are
aligned.

Teach memcpyopt to not give up all hope when confonted with an underaligned
memcpy feeding an overaligned byval.  If the *source* of the memcpy can be
determined to be adequeately aligned, or if it can be forced to be, we can
eliminate the memcpy.

This addresses PR9794.  We now compile the example into:

define i32 @f(%struct.p* nocapture byval align 8 %q) nounwind ssp {
entry:
  %call = call i32 @g(%struct.p* byval align 8 %q) nounwind
  ret i32 %call
}

in both x86-64 and x86-32 mode.  We still don't get a tailcall though,
because tailcalls apparently can't handle byval.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131884 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-23 00:03:39 +00:00
..
ADCE.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
BasicBlockPlacement.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 Unbreak CMake build. 2011-02-28 23:56:33 +00:00
CodeGenPrepare.cpp Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. 2011-05-22 16:24:18 +00:00
ConstantProp.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
CorrelatedValuePropagation.cpp Don't include Operator.h from InstrTypes.h. 2011-04-11 09:35:34 +00:00
DCE.cpp Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
DeadStoreElimination.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
EarlyCSE.cpp Duncan deftly points out that readnone functions aren't 2011-01-03 23:38:13 +00:00
GVN.cpp fix PR9841 by having GVN not process dead loads. This was 2011-05-22 07:03:34 +00:00
IndVarSimplify.cpp indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs. 2011-05-20 18:25:42 +00:00
JumpThreading.cpp Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. 2011-05-22 16:24:18 +00:00
LICM.cpp PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad 2011-04-07 01:35:06 +00:00
LoopDeletion.cpp Make LoopDeletion work on loops with multiple edges, as long as the incoming 2011-02-22 22:25:39 +00:00
LoopIdiomRecognize.cpp Fix PR9815: I was trying to get out of "generating code and then 2011-05-22 17:39:56 +00:00
LoopInstSimplify.cpp LoopInstSimplify preserves ScalarEvolution. 2011-02-11 06:08:25 +00:00
LoopRotation.cpp Preserve line number information. 2011-04-29 20:38:55 +00:00
LoopStrengthReduce.cpp indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs. 2011-05-20 18:25:42 +00:00
LoopUnrollPass.cpp fix a couple -Wsign-compare warnings. 2011-04-14 02:27:25 +00:00
LoopUnswitch.cpp Make LoopUnswitch preserve ScalarEvolution by just forgetting everything about 2011-02-11 06:08:28 +00:00
LowerAtomic.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
Makefile
MemCpyOptimizer.cpp Teach valuetracking that byval arguments with a specified alignment are 2011-05-23 00:03:39 +00:00
Reassociate.cpp Preserve line number information. 2011-04-28 22:48:14 +00:00
Reg2Mem.cpp Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
Scalar.cpp Add the alias analysis to the C api. 2011-04-13 15:44:58 +00:00
ScalarReplAggregates.cpp Fix PR9820: a read-only call differs from a load in that a load doesn't 2011-05-06 10:30:37 +00:00
SCCP.cpp PR7952: Make isa<> use the same logic as cast<>, so that they both work 2011-05-21 19:13:10 +00:00
SimplifyCFGPass.cpp Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. 2011-05-22 16:24:18 +00:00
SimplifyLibCalls.cpp Preserve line number information while simplifying libcalls. 2011-03-09 21:27:52 +00:00
Sink.cpp Add helper functions for computing the Location of load, store, 2010-11-11 21:50:19 +00:00
TailDuplication.cpp Replace calls to ConstantFoldInstruction with calls to SimplifyInstruction 2010-11-23 20:26:33 +00:00
TailRecursionElimination.cpp Don't do tail calls in a function that call setjmp. The stack might be 2011-05-16 03:05:33 +00:00