Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-08-12 00:36:31 +00:00
parent 45563ba9e3
commit 23b9b19b1a
24 changed files with 434 additions and 355 deletions

View File

@@ -373,7 +373,7 @@ LowerLOAD(SDValue Op, SelectionDAG &DAG)
return SDValue();
}
unsigned ABIAlignment = getTargetData()->
getABITypeAlignment(LD->getMemoryVT().getTypeForEVT());
getABITypeAlignment(LD->getMemoryVT().getTypeForEVT(*DAG.getContext()));
// Leave aligned load alone.
if (LD->getAlignment() >= ABIAlignment) {
return SDValue();
@@ -469,7 +469,7 @@ LowerSTORE(SDValue Op, SelectionDAG &DAG)
return SDValue();
}
unsigned ABIAlignment = getTargetData()->
getABITypeAlignment(ST->getMemoryVT().getTypeForEVT());
getABITypeAlignment(ST->getMemoryVT().getTypeForEVT(*DAG.getContext()));
// Leave aligned store alone.
if (ST->getAlignment() >= ABIAlignment) {
return SDValue();
@@ -1058,8 +1058,8 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N,
if (StoreBits % 8) {
break;
}
unsigned ABIAlignment = getTargetData()->
getABITypeAlignment(ST->getMemoryVT().getTypeForEVT());
unsigned ABIAlignment = getTargetData()->getABITypeAlignment(
ST->getMemoryVT().getTypeForEVT(*DCI.DAG.getContext()));
unsigned Alignment = ST->getAlignment();
if (Alignment >= ABIAlignment) {
break;