[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Mar 6 00:13:00 PST 2007
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.360 -> 1.361
---
Log message:
Use new SDIselParamAttr enumeration. This removes "magick" constants
from formal attributes' flags processing.
---
Diffs of the changes: (+8 -3)
X86ISelLowering.cpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.360 llvm/lib/Target/X86/X86ISelLowering.cpp:1.361
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.360 Fri Mar 2 17:16:35 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Mar 6 02:12:33 2007
@@ -29,6 +29,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/SelectionDAG.h"
+#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetOptions.h"
@@ -665,10 +666,12 @@
BytesToPopOnReturn = StackSize; // Callee pops everything..
BytesCallerReserves = 0;
} else {
- BytesToPopOnReturn = 0; // Callee pops hidden struct pointer.
+ BytesToPopOnReturn = 0; // Callee pops nothing.
// If this is an sret function, the return should pop the hidden pointer.
- if (NumArgs && (cast<ConstantSDNode>(Op.getOperand(3))->getValue() & 4))
+ if (NumArgs &&
+ (cast<ConstantSDNode>(Op.getOperand(3))->getValue() &
+ SDISelParamFlags::StructReturn))
BytesToPopOnReturn = 4;
BytesCallerReserves = StackSize;
@@ -740,7 +743,9 @@
}
// If the first argument is an sret pointer, remember it.
- bool isSRet = NumOps &&(cast<ConstantSDNode>(Op.getOperand(6))->getValue()&4);
+ bool isSRet = NumOps &&
+ (cast<ConstantSDNode>(Op.getOperand(6))->getValue() &
+ SDISelParamFlags::StructReturn);
if (!MemOpChains.empty())
Chain = DAG.getNode(ISD::TokenFactor, MVT::Other,
More information about the llvm-commits
mailing list