Fix va_arg for doubles. With this patch VAARG nodes always contain the
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 11 Jul 2010 04:01:49 +0000 (04:01 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 11 Jul 2010 04:01:49 +0000 (04:01 +0000)
commitcbeeae23c31d32b833c9c7c3e8984e4cbcf22f45
tree75fe2f72c8e4d9e68e7c9ec8c7655f4d94d710f3
parent4f8e771ae89bcf934f931d64ef3ad9a188ce4921
Fix va_arg for doubles. With this patch VAARG nodes always contain the
correct alignment information, which simplifies ExpandRes_VAARG a bit.

The patch introduces a new alignment information to TargetLoweringInfo. This is
needed since the two natural candidates cannot be used:

* The 's' in target data: If this is set to the minimal alignment of any
  argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for
  example.
* The getTransientStackAlignment method. It is possible for an architecture to
  have argument less aligned than what we maintain the stack pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108072 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/va_arg.ll