Skip to content

Commit

Permalink
disable phi-node gc-root refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and yuyichao committed Oct 11, 2017
1 parent 0d16bde commit c865802
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
14 changes: 8 additions & 6 deletions src/llvm-late-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,14 +861,16 @@ State LateLowerGCFrame::LocalScan(Function &F) {
continue;
auto Num = LiftPhi(S, Phi);
auto lift = cast<PHINode>(S.ReversePtrNumbering[Num]);
SmallVector<int, 1> RefinedPtr(nIncoming);
for (unsigned i = 0; i < nIncoming; ++i)
RefinedPtr[i] = Number(S, lift->getIncomingValue(i));
SmallVector<int, 1> RefinedPtr(0);
// DISABLED DUE TO BUG IN THE ALGORITHM (#24098)
//for (unsigned i = 0; i < nIncoming; ++i)
// RefinedPtr[i] = Number(S, lift->getIncomingValue(i));
S.Refinements[Num] = std::move(RefinedPtr);
} else {
SmallVector<int, 1> RefinedPtr(nIncoming);
for (unsigned i = 0; i < nIncoming; ++i)
RefinedPtr[i] = Number(S, Phi->getIncomingValue(i));
SmallVector<int, 1> RefinedPtr(0);
// DISABLED DUE TO BUG IN THE ALGORITHM (#24098)
//for (unsigned i = 0; i < nIncoming; ++i)
// RefinedPtr[i] = Number(S, Phi->getIncomingValue(i));
MaybeNoteDef(S, BBS, Phi, BBS.Safepoints, std::move(RefinedPtr));
for (unsigned i = 0; i < nIncoming; ++i) {
BBState &IncomingBBS = S.BBStates[Phi->getIncomingBlock(i)];
Expand Down
9 changes: 5 additions & 4 deletions test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ end
@test g22421_2(Ref(7), Ref(8), false) === 24

if opt_level > 0
@test !contains(get_llvm(g22421_1, Tuple{Base.RefValue{Int},Base.RefValue{Int},Bool}),
"%gcframe")
@test !contains(get_llvm(g22421_2, Tuple{Base.RefValue{Int},Base.RefValue{Int},Bool}),
"%gcframe")
# Disable temporarily. Don't use `@test_broken` since these won't reliably fail either
# @test !contains(get_llvm(g22421_1, Tuple{Base.RefValue{Int},Base.RefValue{Int},Bool}),
# "%gcframe")
# @test !contains(get_llvm(g22421_2, Tuple{Base.RefValue{Int},Base.RefValue{Int},Bool}),
# "%gcframe")
end

0 comments on commit c865802

Please sign in to comment.