forked from OSchip/llvm-project
parent
8adfc8ef3a
commit
6dedf65cc9
|
@ -847,7 +847,7 @@ static bool hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
|
||||||
DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " << I
|
DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " << I
|
||||||
<< "\n");
|
<< "\n");
|
||||||
ORE->emit(OptimizationRemark(DEBUG_TYPE, "Hoisted", &I)
|
ORE->emit(OptimizationRemark(DEBUG_TYPE, "Hoisted", &I)
|
||||||
<< "hosting " << ore::NV("Inst", &I));
|
<< "hoisting " << ore::NV("Inst", &I));
|
||||||
|
|
||||||
// Metadata can be dependent on conditions we are hoisting above.
|
// Metadata can be dependent on conditions we are hoisting above.
|
||||||
// Conservatively strip all metadata on the instruction unless we were
|
// Conservatively strip all metadata on the instruction unless we were
|
||||||
|
|
|
@ -53,7 +53,7 @@ Loop:
|
||||||
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ]
|
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ]
|
||||||
%addr = getelementptr i32, i32* %array, i32 %j
|
%addr = getelementptr i32, i32* %array, i32 %j
|
||||||
%a = load i32, i32* %addr
|
%a = load i32, i32* %addr
|
||||||
; CHECK: remark: /tmp/kk.c:2:20: hosting load
|
; CHECK: remark: /tmp/kk.c:2:20: hoisting load
|
||||||
%b = load i32, i32* %p, !dbg !8
|
%b = load i32, i32* %p, !dbg !8
|
||||||
%a2 = add i32 %a, %b
|
%a2 = add i32 %a, %b
|
||||||
store i32 %a2, i32* %addr
|
store i32 %a2, i32* %addr
|
||||||
|
|
|
@ -10,7 +10,7 @@ Loop:
|
||||||
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ]
|
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ]
|
||||||
%addr = getelementptr i32, i32* %array, i32 %j
|
%addr = getelementptr i32, i32* %array, i32 %j
|
||||||
%a = load i32, i32* %addr
|
%a = load i32, i32* %addr
|
||||||
; CHECK: remark: /tmp/kk.c:2:20: hosting load
|
; CHECK: remark: /tmp/kk.c:2:20: hoisting load
|
||||||
%b = load i32, i32* %p, !dbg !8
|
%b = load i32, i32* %p, !dbg !8
|
||||||
%a2 = add i32 %a, %b
|
%a2 = add i32 %a, %b
|
||||||
store i32 %a2, i32* %addr
|
store i32 %a2, i32* %addr
|
||||||
|
|
Loading…
Reference in New Issue