[PATCH] D89176: Modify split CallSiteRanges to use correct lengths
Di Mo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 18:48:30 PDT 2020
modimo updated this revision to Diff 297377.
modimo added a comment.
Remove useless "if"
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89176/new/
https://reviews.llvm.org/D89176
Files:
llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll
llvm/test/CodeGen/X86/gcc_except_table_bb_sections_ehpad_groups_with_cold.ll
Index: llvm/test/CodeGen/X86/gcc_except_table_bb_sections_ehpad_groups_with_cold.ll
===================================================================
--- llvm/test/CodeGen/X86/gcc_except_table_bb_sections_ehpad_groups_with_cold.ll
+++ llvm/test/CodeGen/X86/gcc_except_table_bb_sections_ehpad_groups_with_cold.ll
@@ -67,6 +67,7 @@
; CHECK-NEXT: .uleb128 .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1
; CHECK-NEXT: .uleb128 .Ltmp2-main.cold # jumps to .Ltmp2
; CHECK-NEXT: .byte 3 # On action: 2
+; CHECK-NEXT: .Laction_table_base0:
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: .Lexception1:
; CHECK-NEXT: .byte 0 # @LPStart Encoding = absptr
@@ -75,13 +76,13 @@
; CHECK-NEXT: .uleb128 .Lttbase0-.Lttbaseref1
; CHECK-NEXT: .Lttbaseref1:
; CHECK-NEXT: .byte 1 # Call site Encoding = uleb128
-; CHECK-NEXT: .uleb128 .Laction_table_base0-.Lcst_begin1
+; CHECK-NEXT: .uleb128 .Laction_table_base1-.Lcst_begin1
; CHECK-NEXT: .Lcst_begin1:
; CHECK-NEXT: .uleb128 main.cold-main.cold # >> Call Site 2 <<
; CHECK-NEXT: .uleb128 .LBB_END0_2-main.cold # Call between main.cold and .LBB_END0_2
; CHECK-NEXT: .byte 0 # has no landing pad
; CHECK-NEXT: .byte 0 # On action: cleanup
-; CHECK-NEXT: .Laction_table_base0:
+; CHECK-NEXT: .Laction_table_base1:
; CHECK-NEXT: .byte 0 # >> Action Record 1 <<
; CHECK-NEXT: # Cleanup
; CHECK-NEXT: .byte 0 # No further actions
Index: llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll
===================================================================
--- llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll
+++ llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll
@@ -104,6 +104,7 @@
; CHECK-NEXT: .uleb128 .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1
; CHECK-NEXT: .uleb128 .Ltmp2-main.2 # jumps to .Ltmp2
; CHECK-NEXT: .byte 3 # On action: 2
+; CHECK-NEXT: .Laction_table_base0
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: .Lexception1:
@@ -121,8 +122,9 @@
; CHECK-NEXT: .uleb128 .Lttbase0-.Lttbaseref1
; CHECK-NEXT: .Lttbaseref1:
; CHECK-NEXT: .byte 1 # Call site Encoding = uleb128
-; CHECK-NEXT: .uleb128 .Laction_table_base0-.Lcst_begin1
+; CHECK-NEXT: .uleb128 .Laction_table_base1-.Lcst_begin1
; CHECK-NEXT: .Lcst_begin1:
+; CHECK-NEXT: .Laction_table_base1
; CHECK-NEXT: .p2align 2
; CHECK-NEXT: .Lexception2:
@@ -140,13 +142,13 @@
; CHECK-NEXT: .uleb128 .Lttbase0-.Lttbaseref2
; CHECK-NEXT: .Lttbaseref2:
; CHECK-NEXT: .byte 1 # Call site Encoding = uleb128
-; CHECK-NEXT: .uleb128 .Laction_table_base0-.Lcst_begin2
+; CHECK-NEXT: .uleb128 .Laction_table_base2-.Lcst_begin2
; CHECK-NEXT: .Lcst_begin2:
; CHECK-NEXT: .uleb128 main.2-main.2 # >> Call Site 2 <<
; CHECK-NEXT: .uleb128 .LBB_END0_2-main.2 # Call between main.2 and .LBB_END0_2
; CHECK-NEXT: .byte 0 # has no landing pad
; CHECK-NEXT: .byte 0 # On action: cleanup
-; CHECK-NEXT: .Laction_table_base0:
+; CHECK-NEXT: .Laction_table_base2:
; CHECK-NEXT: .byte 0 # >> Action Record 1 <<
; CHECK-NEXT: # Cleanup
; CHECK-NEXT: .byte 0 # No further actions
Index: llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
+++ llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
@@ -671,8 +671,12 @@
}
Asm->emitULEB128(S.Action);
}
+
+ Asm->OutStreamer->emitLabel(CstEndLabel);
+
+ // With multiple call ranges, we need go generate multiple bases
+ CstEndLabel = Asm->createTempSymbol("action_table_base");
}
- Asm->OutStreamer->emitLabel(CstEndLabel);
}
// Emit the Action Table.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89176.297377.patch
Type: text/x-patch
Size: 4354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201010/3d391876/attachment.bin>
More information about the llvm-commits
mailing list