[PATCH] D46078: [MIR] Reset unique MBB numbering in MachineFunction::reset()
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 12:03:23 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331213: [MIR] Reset unique MBB numbering in MachineFunction::reset() (authored by rtereshin, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46078?vs=143995&id=144604#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46078
Files:
llvm/trunk/lib/CodeGen/MachineFunction.cpp
llvm/trunk/test/CodeGen/MIR/AArch64/print-parse-verify-failedISel-property.mir
Index: llvm/trunk/test/CodeGen/MIR/AArch64/print-parse-verify-failedISel-property.mir
===================================================================
--- llvm/trunk/test/CodeGen/MIR/AArch64/print-parse-verify-failedISel-property.mir
+++ llvm/trunk/test/CodeGen/MIR/AArch64/print-parse-verify-failedISel-property.mir
@@ -14,6 +14,7 @@
# 5) It's possible to start llc mid-GlobalISel pipeline from a MIR file with
# the FailedISel property set to true and watch it properly fallback to
# FastISel / SelectionDAG ISel.
+# 6) Resetting a MachineFunction resets unique MachineBasicBlock IDs as well.
--- |
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--"
@@ -40,17 +41,21 @@
failedISel: true
tracksRegLiveness: true
body: |
- bb.1.entry:
+ bb.0.entry:
liveins: $w0, $w1
; CHECK: liveins: $w0, $w1
+ ;
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
; CHECK: [[ADD:%[0-9]+]]:gpr(s32) = G_ADD [[COPY1]], [[COPY]]
; CHECK: $w0 = COPY [[ADD]](s32)
; CHECK: RET_ReallyLR implicit $w0
;
- ; FALLBACK: liveins: $w0, $w1
+ ; FALLBACK: body: |
+ ; FALLBACK-NEXT: bb.0.entry:
+ ; FALLBACK-NEXT: liveins: $w0, $w1
+ ;
; FALLBACK: [[COPY:%[0-9]+]]:gpr32 = COPY $w1
; FALLBACK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0
; FALLBACK: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr [[COPY]], [[COPY1]]
Index: llvm/trunk/lib/CodeGen/MachineFunction.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp
@@ -196,6 +196,7 @@
// Do call MachineBasicBlock destructors, it contains std::vectors.
for (iterator I = begin(), E = end(); I != E; I = BasicBlocks.erase(I))
I->Insts.clearAndLeakNodesUnsafely();
+ MBBNumbering.clear();
InstructionRecycler.clear(Allocator);
OperandRecycler.clear(Allocator);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46078.144604.patch
Type: text/x-patch
Size: 1997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/8c3a499a/attachment.bin>
More information about the llvm-commits
mailing list