]> granicus.if.org Git - llvm/commit
[SlotIndexes] Add print-slotindexes to disable printing slotindexes
authorJinsong Ji <jji@us.ibm.com>
Thu, 22 Aug 2019 13:44:47 +0000 (13:44 +0000)
committerJinsong Ji <jji@us.ibm.com>
Thu, 22 Aug 2019 13:44:47 +0000 (13:44 +0000)
commit1acbd600bf65898c8b2f35db5e2864726577b4d6
treeb130c564d8a9624385527986d054af94d0e9dd65
parent3d7ae45ca1c46a902854f852777caea73881b759
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369650 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBasicBlock.cpp
test/Other/print-slotindexes.ll [new file with mode: 0644]