mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
minor tidying of comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f27e174a9
commit
2a6a645709
@ -313,12 +313,13 @@ void SROA::DoScalarReplacement(AllocationInst *AI,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace %res = load { i32, i32 }* %alloc
|
// Replace:
|
||||||
// by
|
// %res = load { i32, i32 }* %alloc
|
||||||
// %load.0 = load i32* %alloc.0
|
// with:
|
||||||
// %insert.0 insertvalue { i32, i32 } zeroinitializer, i32 %load.0, 0
|
// %load.0 = load i32* %alloc.0
|
||||||
// %load.1 = load i32* %alloc.1
|
// %insert.0 insertvalue { i32, i32 } zeroinitializer, i32 %load.0, 0
|
||||||
// %insert = insertvalue { i32, i32 } %insert.0, i32 %load.1, 1
|
// %load.1 = load i32* %alloc.1
|
||||||
|
// %insert = insertvalue { i32, i32 } %insert.0, i32 %load.1, 1
|
||||||
// (Also works for arrays instead of structs)
|
// (Also works for arrays instead of structs)
|
||||||
if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
|
if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
|
||||||
Value *Insert = UndefValue::get(LI->getType());
|
Value *Insert = UndefValue::get(LI->getType());
|
||||||
@ -331,12 +332,13 @@ void SROA::DoScalarReplacement(AllocationInst *AI,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace store { i32, i32 } %val, { i32, i32 }* %alloc
|
// Replace:
|
||||||
// by
|
// store { i32, i32 } %val, { i32, i32 }* %alloc
|
||||||
// %val.0 = extractvalue { i32, i32 } %val, 0
|
// with:
|
||||||
// store i32 %val.0, i32* %alloc.0
|
// %val.0 = extractvalue { i32, i32 } %val, 0
|
||||||
// %val.1 = extractvalue { i32, i32 } %val, 1
|
// store i32 %val.0, i32* %alloc.0
|
||||||
// store i32 %val.1, i32* %alloc.1
|
// %val.1 = extractvalue { i32, i32 } %val, 1
|
||||||
|
// store i32 %val.1, i32* %alloc.1
|
||||||
// (Also works for arrays instead of structs)
|
// (Also works for arrays instead of structs)
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
|
if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
|
||||||
Value *Val = SI->getOperand(0);
|
Value *Val = SI->getOperand(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user