[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h SelectionDAG.h
Christopher Lamb
christopher.lamb at gmail.com
Sun Apr 22 16:15:47 PDT 2007
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAGNodes.h updated: 1.188 -> 1.189
SelectionDAG.h updated: 1.149 -> 1.150
---
Log message:
PR400: http://llvm.org/PR400 phase 2. Propagate attributed load/store information through DAGs.
---
Diffs of the changes: (+10 -5)
SelectionDAG.h | 11 +++++++----
SelectionDAGNodes.h | 4 +++-
2 files changed, 10 insertions(+), 5 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.189
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 Sat Apr 21 15:56:26 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sun Apr 22 18:15:29 2007
@@ -1438,7 +1438,7 @@
friend class SelectionDAG;
LoadSDNode(SDOperand *ChainPtrOff, SDVTList VTs,
ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
+ const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
: SDNode(ISD::LOAD, VTs),
AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
Alignment(Align), IsVolatile(Vol) {
@@ -1446,6 +1446,7 @@
Ops[1] = ChainPtrOff[1]; // Ptr
Ops[2] = ChainPtrOff[2]; // Off
InitOperands(Ops, 3);
+ assert(Align != 0 && "Loads should have non-zero aligment");
assert((getOffset().getOpcode() == ISD::UNDEF ||
AddrMode != ISD::UNINDEXED) &&
"Only indexed load has a non-undef offset operand");
@@ -1508,6 +1509,7 @@
Ops[2] = ChainValuePtrOff[2]; // Ptr
Ops[3] = ChainValuePtrOff[3]; // Off
InitOperands(Ops, 4);
+ assert(Align != 0 && "Stores should have non-zero aligment");
assert((getOffset().getOpcode() == ISD::UNDEF ||
AddrMode != ISD::UNINDEXED) &&
"Only indexed store has a non-undef offset operand");
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.149 llvm/include/llvm/CodeGen/SelectionDAG.h:1.150
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.149 Sat Apr 21 13:36:27 2007
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Sun Apr 22 18:15:29 2007
@@ -311,10 +311,12 @@
/// determined by their operands, and they produce a value AND a token chain.
///
SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr,
- const Value *SV, int SVOffset, bool isVolatile=false);
+ const Value *SV, int SVOffset, bool isVolatile=false,
+ unsigned Alignment=0);
SDOperand getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT,
SDOperand Chain, SDOperand Ptr, const Value *SV,
- int SVOffset, MVT::ValueType EVT, bool isVolatile=false);
+ int SVOffset, MVT::ValueType EVT, bool isVolatile=false,
+ unsigned Alignment=0);
SDOperand getIndexedLoad(SDOperand OrigLoad, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain,
@@ -323,10 +325,11 @@
/// getStore - Helper function to build ISD::STORE nodes.
///
SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
- const Value *SV, int SVOffset, bool isVolatile=false);
+ const Value *SV, int SVOffset, bool isVolatile=false,
+ unsigned Alignment=0);
SDOperand getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
const Value *SV, int SVOffset, MVT::ValueType TVT,
- bool isVolatile=false);
+ bool isVolatile=false, unsigned Alignment=0);
SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
More information about the llvm-commits
mailing list