[PATCH] D46265: StackColoring: better handling of statically unreachable code

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 05:47:27 PDT 2018


sdardis added a comment.

I've tried the revised patch, but I am still seeing flakiness when running this on my darwin machine.

It appears CodeGenPrepare::eliminateMostlyEmptyBlock is leaving around stale information that is then read by the MIRPrintingPass.

I have a suggestion inline, and with that, the change to UnreachableBlockElim.cpp seems unnecessary. Can you also test on your side?



================
Comment at: test/CodeGen/X86/PR37310.mir:1
+# RUN: llc -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -disable-unreachableblockelim -no-stack-coloring=false -stop-after stack-coloring -o - %s
+
----------------
Can you add '-start-before isel' here?


================
Comment at: test/CodeGen/X86/stack-coloring-unreachable-bb.mir:22-25
+  ; ModuleID = 'llvm-pr-37130.opt.ll'
+  source_filename = "llvm-pr-37130.c"
+  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+  target triple = "x86_64-unknown-linux-gnu"
----------------
thanm wrote:
> sdardis wrote:
> > This can all be removed.
> OK, will do.  Regarding this and your other suggestions, is there a tool or programmatic way to do this? Or is this just an expected part of creating an MIR testcase?  Please bear with me, I haven't written a lot of MIR tests.
It's typical to reduce both LLVM IR and MIR to the smallest form that reproduces / tests the bug that a patch fixes. Unfortunately I don't believe we have a clang/llvm output mode which reduces output for test cases.


Repository:
  rL LLVM

https://reviews.llvm.org/D46265





More information about the llvm-commits mailing list