[PATCH] D88517: [BasicBlockSections] Make sure that the labels for address-taken blocks are emitted after switching the seciton.
Snehasish Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 15:29:18 PDT 2020
snehasish accepted this revision.
snehasish added a comment.
This revision is now accepted and ready to land.
lgtm with some minor comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:3051
+ // entry block is always placed in the function section and is handled
+ // separately.
+ if (MBB.isBeginSection() && !MBB.pred_empty()) {
----------------
Can you extend the comment here to state that this needs to happen before the `if (MBB.hasAddressTaken())` part below?
================
Comment at: llvm/test/CodeGen/X86/basic-block-sections-blockaddress.ll:1
+;; This test verifies that basic-block-sections works with address-taken basic blocks.
+; RUN: llc < %s -mtriple=x86_64 -basic-block-sections=all | FileCheck %s
----------------
nit: perhaps a better name for this file is "basic-block-sections-address-taken.ll"
================
Comment at: llvm/test/CodeGen/X86/basic-block-sections-blockaddress.ll:28
+ ret void
+; CHECK: .section .text,"ax", at progbits,unique,2
+; CHECK-NEXT: .Ltmp1:
----------------
I think you meant to only indent the instructions, the labels should be indented less here and above?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88517/new/
https://reviews.llvm.org/D88517
More information about the llvm-commits
mailing list