[PATCH] D43337: [CodeGen] Don't omit any redundant information in -debug output
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 11:32:19 PST 2018
thegameg updated this revision to Diff 134473.
thegameg retitled this revision from "[CodeGen] Don't omit any redundant information in -debug output when asserts are enabled" to "[CodeGen] Don't omit any redundant information in -debug output".
thegameg edited the summary of this revision.
thegameg added a comment.
Forget the asserts part.
https://reviews.llvm.org/D43337
Files:
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/MachineFunction.cpp
test/CodeGen/AArch64/tailcall_misched_graph.ll
test/CodeGen/ARM/Windows/dbzchk.ll
test/CodeGen/Hexagon/post-inc-aa-metadata.ll
test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll
Index: test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll
===================================================================
--- test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll
+++ test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll
@@ -42,7 +42,7 @@
; CHECK-LABEL: fn3
define signext i32 @fn3(i32 %a) {
-; CHECK: ANDIo killed {{[%0-9]+}}, 10, implicit-def $cr0
+; CHECK: ANDIo killed {{[%0-9]+}}{{[^,]*}}, 10, implicit-def $cr0
; CHECK: [[CREG:[^, ]+]]:crrc = COPY $cr0
; CHECK: BCC 76, killed [[CREG]]
%1 = and i32 %a, 10
Index: test/CodeGen/Hexagon/post-inc-aa-metadata.ll
===================================================================
--- test/CodeGen/Hexagon/post-inc-aa-metadata.ll
+++ test/CodeGen/Hexagon/post-inc-aa-metadata.ll
@@ -3,7 +3,7 @@
; Check that the generated post-increment load has TBAA information.
; CHECK-LABEL: Machine code for function fred:
-; CHECK: = V6_vL32b_pi %{{[0-9]+}}, 64; mem:LD64[{{.*}}](tbaa=
+; CHECK: = V6_vL32b_pi %{{[0-9]+}}{{[^,]*}}, 64; mem:LD64[{{.*}}](tbaa=
target triple = "hexagon"
Index: test/CodeGen/ARM/Windows/dbzchk.ll
===================================================================
--- test/CodeGen/ARM/Windows/dbzchk.ll
+++ test/CodeGen/ARM/Windows/dbzchk.ll
@@ -119,7 +119,7 @@
; CHECK-CFG-DAG: t2B %bb.3
; CHECK-CFG-DAG: %bb.2
-; CHECK-CFG-DAG: tCMPi8 %{{[0-9]}}, 0
+; CHECK-CFG-DAG: tCMPi8 %{{[0-9]}}{{[^,]*}}, 0
; CHECK-CFG-DAG: t2Bcc %bb.5
; CHECK-CFG-DAG: %bb.4
Index: test/CodeGen/AArch64/tailcall_misched_graph.ll
===================================================================
--- test/CodeGen/AArch64/tailcall_misched_graph.ll
+++ test/CodeGen/AArch64/tailcall_misched_graph.ll
@@ -29,7 +29,7 @@
; CHECK: [[VRA:%.*]]:gpr64 = LDRXui %fixed-stack.3
; CHECK: [[VRB:%.*]]:gpr64 = LDRXui %fixed-stack.2
; CHECK: STRXui %{{.*}}, %fixed-stack.0
-; CHECK: STRXui [[VRB]], %fixed-stack.1
+; CHECK: STRXui [[VRB]]{{[^,]*}}, %fixed-stack.1
; Make sure that there is an dependence edge between fi#-2 and fi#-4.
; Without this edge the scheduler would be free to move the store accross the load.
Index: lib/CodeGen/MachineFunction.cpp
===================================================================
--- lib/CodeGen/MachineFunction.cpp
+++ lib/CodeGen/MachineFunction.cpp
@@ -522,9 +522,8 @@
MST.incorporateFunction(getFunction());
for (const auto &BB : *this) {
OS << '\n';
- // If we print the whole function, don't print any verbose information,
- // since that information is already present.
- BB.print(OS, MST, Indexes, /*IsStandalone=*/false);
+ // If we print the whole function, print it at its most verbose level.
+ BB.print(OS, MST, Indexes, /*IsStandalone=*/true);
}
OS << "\n# End machine code for function " << getName() << ".\n\n";
Index: lib/CodeGen/MachineBasicBlock.cpp
===================================================================
--- lib/CodeGen/MachineBasicBlock.cpp
+++ lib/CodeGen/MachineBasicBlock.cpp
@@ -328,7 +328,7 @@
bool HasLineAttributes = false;
// Print the preds of this block according to the CFG.
- if (!pred_empty()) {
+ if (!pred_empty() && IsStandalone) {
if (Indexes) OS << '\t';
// Don't indent(2), align with previous line attributes.
OS << "; predecessors: ";
@@ -354,7 +354,7 @@
<< format("0x%08" PRIx32, getSuccProbability(I).getNumerator())
<< ')';
}
- if (!Probs.empty()) {
+ if (!Probs.empty() && IsStandalone) {
// Print human readable probabilities as comments.
OS << "; ";
for (auto I = succ_begin(), E = succ_end(); I != E; ++I) {
@@ -422,7 +422,7 @@
if (IsInBundle)
OS.indent(2) << "}\n";
- if (IrrLoopHeaderWeight) {
+ if (IrrLoopHeaderWeight && IsStandalone) {
if (Indexes) OS << '\t';
OS.indent(2) << "; Irreducible loop header weight: "
<< IrrLoopHeaderWeight.getValue() << '\n';
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43337.134473.patch
Type: text/x-patch
Size: 3894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180215/6beeb306/attachment.bin>
More information about the llvm-commits
mailing list