[PATCH] D31262: MIParser/MIRPrinter: Compute block successors if not explicitely specified

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 14:16:38 PDT 2017


MatzeB marked 2 inline comments as done.
MatzeB added a comment.

Thanks for the review.



================
Comment at: test/CodeGen/MIR/X86/auto-successor.mir:1
+# RUN: llc -o - %s -run-pass=none -verify-machineinstrs -simplify-mir | FileCheck %s
+---
----------------
qcolombet wrote:
> Could we have a positive test as well? (I.e., where successors are printed.)
bb.0, bb.1, bb.2 are various levels of positive tests. For printing without `-simplify-mir` we already have `test/CodeGen/MIR/X86/successor-basic-blocks.mir`.


================
Comment at: test/CodeGen/MIR/X86/branch-probabilities.mir:6
+# CHECK: bb.0:
+# CHECK-NEXT: successors: %bb.1(0x66666666), %bb.2(0x1999999a)
+name: test
----------------
qcolombet wrote:
> This does not seem related to this patch.
This is a translation of `test/CodeGen/MIR/Generic/branch-probabilities.ll` to .mir.

When this patch had the `-simplify-mir` beahvior the existing test would break because the probabilities were just balanced and therefore perfectly predictable.

Even though the change is not necessary anymore as the default printing behavior doesn't change I think I'll still keep this in here as it improves upon the robustness of the test.


Repository:
  rL LLVM

https://reviews.llvm.org/D31262





More information about the llvm-commits mailing list