[hot-cold-split] Name split functions with ".cold" suffix

Summary:
The current default of appending "_"+entry block label to the new
extracted cold function breaks demangling. Change the deliminator from
"_" to "." to enable demangling. Because the header block label will
be empty for release compile code, use "extracted" after the "." when
the label is empty.

Additionally, add a mechanism for the client to pass in an alternate
suffix applied after the ".", and have the hot cold split pass use
"cold."+Count, where the Count is currently 1 but can be used to
uniquely number multiple cold functions split out from the same function
with D53588.

Reviewers: sebpop, hiraditya

Subscribers: llvm-commits, erik.pilkington

Differential Revision: https://reviews.llvm.org/D53534

llvm-svn: 345178
diff --git a/llvm/test/Transforms/CodeExtractor/cost.ll b/llvm/test/Transforms/CodeExtractor/cost.ll
index 4ac5ace..841b42b 100644
--- a/llvm/test/Transforms/CodeExtractor/cost.ll
+++ b/llvm/test/Transforms/CodeExtractor/cost.ll
@@ -47,14 +47,14 @@
 define i32 @dummy_caller(i32* %arg) local_unnamed_addr {
 ; CHECK-LABEL: @dummy_caller
   %tmp = call i32 @outline_region_notlikely(i32* %arg)
-; CHECK:  call void @outline_region_notlikely.2_bb1
+; CHECK:  call void @outline_region_notlikely.2.bb1
   %tmp2 = tail call i32 @outline_region_likely(i32* %arg)
 ; CHECK: %tmp2 = tail call i32 @outline_region_likely(i32* %arg)
   ret i32 %tmp
 
 }
 
-; CHECK-LABEL: define internal void @outline_region_notlikely.2_bb1(i32* %arg) {
+; CHECK-LABEL: define internal void @outline_region_notlikely.2.bb1(i32* %arg) {
 ; CHECK-NEXT: newFuncRoot:
 
 !llvm.module.flags = !{!0}