Use .text.unlikely and .text.eh prefixes for MachineBasicBlock sections.
authorSnehasish Kumar <snehasishk@google.com>
Fri, 24 Apr 2020 21:35:19 +0000 (14:35 -0700)
committerSriraman Tallam <tmsriram@google.com>
Fri, 24 Apr 2020 22:07:38 +0000 (15:07 -0700)
commit0cc063a8ffc896aa82ebe4b11003f0bbd78d6d5b
treeb07fdbb5f8c4023c03e06e0496aefd718b187cdd
parent10bc12588dac532fad044b2851dde8e7b9121e88
Use .text.unlikely and .text.eh prefixes for MachineBasicBlock sections.

Summary:
Instead of adding a ".unlikely" or ".eh" suffix for machine basic blocks,
this change updates the behaviour to use an appropriate prefix
instead. This allows lld to group basic block sections together
when -z,keep-text-section-prefix is specified and matches the behaviour
observed in gcc.

Reviewers: tmsriram, mtrofin, efriedma

Reviewed By: tmsriram, efriedma

Subscribers: eli.friedman, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78742
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/basicblock-sections-clusters-branches.ll
llvm/test/CodeGen/X86/basicblock-sections-clusters-eh.ll
llvm/test/CodeGen/X86/basicblock-sections-clusters.ll
llvm/test/CodeGen/X86/basicblock-sections-cold.ll