Issue description:
authorStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 10 Oct 2012 11:37:36 +0000 (11:37 +0000)
committerStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 10 Oct 2012 11:37:36 +0000 (11:37 +0000)
commitf13dbb8e243372cd5228620285c3d73fc5aa7c86
treec1bd2b4261d11357704e33ba99c676774ad68f80
parenta6399a519d4d89602ecf918b3d6841601095a648
Issue description:
SchedulerDAGInstrs::buildSchedGraph ignores dependencies between FixedStack
objects and byval parameters. So loading byval parameters from stack may be
inserted *before* it will be stored, since these operations are treated as
independent.

Fix:
Currently ARMTargetLowering::LowerFormalArguments saves byval registers with
FixedStack MachinePointerInfo. To fix the problem we need to store byval
registers with MachinePointerInfo referenced to first the "byval" parameter.

Also commit adds two new fields to the InputArg structure: Function's argument
index and InputArg's part offset in bytes relative to the start position of
Function's argument. E.g.: If function's argument is 128 bit width and it was
splitted onto 32 bit regs, then we got 4 InputArg structs with same arg index,
but different offset values.

llvm-svn: 165616
llvm/include/llvm/Target/TargetCallingConv.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/test/CodeGen/ARM/2012-10-04-FixedFrame-vs-byval.ll [new file with mode: 0644]