[Propeller]: Use a descriptive temporary symbol name for the end of the basic block.
authorRahman Lavaee <rahmanl@google.com>
Wed, 5 Aug 2020 19:31:24 +0000 (12:31 -0700)
committerRahman Lavaee <rahmanl@google.com>
Wed, 5 Aug 2020 20:17:19 +0000 (13:17 -0700)
commit20a568c29db0117a6f32861826fedbb33329e759
tree6c4dfa44f424356d82c31a059466f80ae142a15f
parent1dbac09dd6ec8587ae7e16ed669bf73889a21957
[Propeller]: Use a descriptive temporary symbol name for the end of the basic block.

This patch changes the functionality of AsmPrinter to name the basic block end labels as LBB_END${i}_${j}, with ${i} being the identifier for the function and ${j} being the identifier for the basic block. The new naming scheme is consistent with how basic block labels are named (.LBB${i}_{j}), and how function end symbol are named (.Lfunc_end${i}) and helps to write stronger tests for the upcoming patch for BB-Info section (as proposed in https://lists.llvm.org/pipermail/llvm-dev/2020-July/143512.html). The end label is used with basicblock-labels (BB-Info section in future) and basicblock-sections to compute the size of basic blocks and basic block sections, respectively. For BB sections, the section containing the entry basic block will not have a BB end label since it already gets the function end-label.
This label is cached for every basic block (CachedEndMCSymbol) like the label for the basic block (CachedMCSymbol).

Differential Revision: https://reviews.llvm.org/D83885
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/test/CodeGen/X86/basic-block-sections-clusters.ll
llvm/test/CodeGen/X86/basic-block-sections-listbb.ll
llvm/test/CodeGen/X86/basic-block-sections.ll
llvm/test/DebugInfo/X86/basic-block-sections_1.ll