1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/Other/print-slotindexes.ll
Jinsong Ji f8fd02f6e7 [SlotIndexes] Add print-slotindexes to disable printing slotindexes
Summary:
When we print the IR with --print-after/before-*,
SlotIndexes will be printed whenever available (We haven't freed it).

This introduces some noises when we try to compare the IR
among different optimizations.

eg:
-print-before=machine-cp will print SlotIndexes for 1st machine-cp
pass, but NOT for 2nd machine-cp;
-print-after=machine-cp will NOT print SlotIndexes for both
machine-cp passes.
So SlotIndexes in 1st pass introduce noises when differing these IRs.

This patch introduces an option to hide indexes.

Reviewers: stoklund, thegameg, qcolombet

Reviewed By: thegameg

Subscribers: hiraditya, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66500

llvm-svn: 369650
2019-08-22 13:44:47 +00:00

13 lines
396 B
LLVM

; RUN: llc -print-after=slotindexes < %s 2>&1 | FileCheck %s --check-prefixes=ALL,SI
; RUN: llc -print-after=slotindexes -print-slotindexes=false < %s 2>&1 | FileCheck %s --check-prefixes=ALL,NOSI
; REQUIRES: default_triple
define void @foo(){
ret void
}
;CHECK: IR Dump {{.*}}
;CHECK: # Machine code for function foo{{.*}}
;SI: {{[0-9]+}}B bb.0 (%ir-block.0)
;NOSI: {{^}}bb.0 (%ir-block.0)