forked from OSchip/llvm-project
[NFC][Alignment] Simplify code in JSONExporter
This commit is contained in:
parent
310e3279d5
commit
4296f91323
|
@ -451,14 +451,12 @@ importAccesses(Scop &S, const json::Object &JScop, const DataLayout &DL,
|
||||||
bool SpecialAlignment = true;
|
bool SpecialAlignment = true;
|
||||||
if (LoadInst *LoadI = dyn_cast<LoadInst>(MA->getAccessInstruction())) {
|
if (LoadInst *LoadI = dyn_cast<LoadInst>(MA->getAccessInstruction())) {
|
||||||
SpecialAlignment =
|
SpecialAlignment =
|
||||||
LoadI->getAlignment() &&
|
DL.getABITypeAlign(LoadI->getType()) != LoadI->getAlign();
|
||||||
DL.getABITypeAlignment(LoadI->getType()) != LoadI->getAlignment();
|
|
||||||
} else if (StoreInst *StoreI =
|
} else if (StoreInst *StoreI =
|
||||||
dyn_cast<StoreInst>(MA->getAccessInstruction())) {
|
dyn_cast<StoreInst>(MA->getAccessInstruction())) {
|
||||||
SpecialAlignment =
|
SpecialAlignment =
|
||||||
StoreI->getAlignment() &&
|
DL.getABITypeAlign(StoreI->getValueOperand()->getType()) !=
|
||||||
DL.getABITypeAlignment(StoreI->getValueOperand()->getType()) !=
|
StoreI->getAlign();
|
||||||
StoreI->getAlignment();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SpecialAlignment) {
|
if (SpecialAlignment) {
|
||||||
|
|
Loading…
Reference in New Issue