Index: include/llvm/Transforms/Utils/CodeExtractor.h =================================================================== --- include/llvm/Transforms/Utils/CodeExtractor.h +++ include/llvm/Transforms/Utils/CodeExtractor.h @@ -64,6 +64,11 @@ unsigned NumExitBlocks = std::numeric_limits::max(); Type *RetTy; + // Suffix to use when creating extracted function (appended to the original + // function name + "."). If empty, the default is to use the entry block + // label, if non-empty, otherwise "extracted". + std::string Suffix; + public: /// Create a code extractor for a sequence of blocks. /// @@ -78,7 +83,8 @@ CodeExtractor(ArrayRef BBs, DominatorTree *DT = nullptr, bool AggregateArgs = false, BlockFrequencyInfo *BFI = nullptr, BranchProbabilityInfo *BPI = nullptr, - bool AllowVarArgs = false, bool AllowAlloca = false); + bool AllowVarArgs = false, bool AllowAlloca = false, + std::string Suffix = ""); /// Create a code extractor for a loop body. /// @@ -86,7 +92,8 @@ /// block sequence of the loop. CodeExtractor(DominatorTree &DT, Loop &L, bool AggregateArgs = false, BlockFrequencyInfo *BFI = nullptr, - BranchProbabilityInfo *BPI = nullptr); + BranchProbabilityInfo *BPI = nullptr, + std::string Suffix = ""); /// Perform the extraction, returning the new function. /// Index: lib/Transforms/IPO/HotColdSplitting.cpp =================================================================== --- lib/Transforms/IPO/HotColdSplitting.cpp +++ lib/Transforms/IPO/HotColdSplitting.cpp @@ -265,7 +265,7 @@ DominatorTree *DT, PostDomTree *PDT); Function *extractColdRegion(const SmallVectorImpl &Region, DominatorTree *DT, BlockFrequencyInfo *BFI, - OptimizationRemarkEmitter &ORE); + OptimizationRemarkEmitter &ORE, unsigned Count); bool isOutlineCandidate(const SmallVectorImpl &Region, const BasicBlock *Exit) const { if (!Exit) @@ -331,16 +331,18 @@ return true; } -Function * -HotColdSplitting::extractColdRegion(const SmallVectorImpl &Region, - DominatorTree *DT, BlockFrequencyInfo *BFI, - OptimizationRemarkEmitter &ORE) { +Function *HotColdSplitting::extractColdRegion( + const SmallVectorImpl &Region, DominatorTree *DT, + BlockFrequencyInfo *BFI, OptimizationRemarkEmitter &ORE, unsigned Count) { assert(!Region.empty()); LLVM_DEBUG(for (auto *BB : Region) llvm::dbgs() << "\nExtracting: " << *BB;); // TODO: Pass BFI and BPI to update profile information. - CodeExtractor CE(Region, DT); + CodeExtractor CE(Region, DT, /* AggregateArgs */ false, /* BFI */ nullptr, + /* BPI */ nullptr, /* AllowVarArgs */ false, + /* AllowAlloca */ false, + /* Suffix */ "cold" + std::to_string(Count)); SetVector Inputs, Outputs, Sinks; CE.findInputsOutputs(Inputs, Outputs, Sinks); @@ -419,7 +421,7 @@ ++NumColdSESEFound; ValidColdRegion.push_back(ExitColdRegion); // Candidate for outlining. FIXME: Continue outlining. - return extractColdRegion(ValidColdRegion, DT, BFI, ORE); + return extractColdRegion(ValidColdRegion, DT, BFI, ORE, /* Count */ 1); } } } Index: lib/Transforms/Utils/CodeExtractor.cpp =================================================================== --- lib/Transforms/Utils/CodeExtractor.cpp +++ lib/Transforms/Utils/CodeExtractor.cpp @@ -228,19 +228,21 @@ CodeExtractor::CodeExtractor(ArrayRef BBs, DominatorTree *DT, bool AggregateArgs, BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI, bool AllowVarArgs, - bool AllowAlloca) + bool AllowAlloca, std::string Suffix) : DT(DT), AggregateArgs(AggregateArgs || AggregateArgsOpt), BFI(BFI), BPI(BPI), AllowVarArgs(AllowVarArgs), - Blocks(buildExtractionBlockSet(BBs, DT, AllowVarArgs, AllowAlloca)) {} + Blocks(buildExtractionBlockSet(BBs, DT, AllowVarArgs, AllowAlloca)), + Suffix(Suffix) {} CodeExtractor::CodeExtractor(DominatorTree &DT, Loop &L, bool AggregateArgs, BlockFrequencyInfo *BFI, - BranchProbabilityInfo *BPI) + BranchProbabilityInfo *BPI, std::string Suffix) : DT(&DT), AggregateArgs(AggregateArgs || AggregateArgsOpt), BFI(BFI), BPI(BPI), AllowVarArgs(false), Blocks(buildExtractionBlockSet(L.getBlocks(), &DT, /* AllowVarArgs */ false, - /* AllowAlloca */ false)) {} + /* AllowAlloca */ false)), + Suffix(Suffix) {} /// definedInRegion - Return true if the specified value is defined in the /// extracted region. @@ -669,10 +671,14 @@ FunctionType::get(RetTy, paramTy, AllowVarArgs && oldFunction->isVarArg()); + std::string SuffixToUse = + Suffix.empty() + ? (header->getName().empty() ? "extracted" : header->getName().str()) + : Suffix; // Create the new function Function *newFunction = Function::Create( funcType, GlobalValue::InternalLinkage, oldFunction->getAddressSpace(), - oldFunction->getName() + "_" + header->getName(), M); + oldFunction->getName() + "." + SuffixToUse, M); // If the old function is no-throw, so is the new one. if (oldFunction->doesNotThrow()) newFunction->setDoesNotThrow(); Index: test/Transforms/BlockExtractor/extract-blocks.ll =================================================================== --- test/Transforms/BlockExtractor/extract-blocks.ll +++ test/Transforms/BlockExtractor/extract-blocks.ll @@ -4,11 +4,11 @@ ; RUN: opt -S -extract-blocks -extract-blocks-file=%t -extract-blocks-erase-funcs %s | FileCheck %s --check-prefix=CHECK-ERASE ; CHECK-NO-ERASE: @foo( -; CHECK-NO-ERASE: @foo_bb9( -; CHECK-NO-ERASE: @foo_bb20( +; CHECK-NO-ERASE: @foo.bb9( +; CHECK-NO-ERASE: @foo.bb20( ; CHECK-ERASE: declare i32 @foo( -; CHECK-ERASE: @foo_bb9( -; CHECK-ERASE: @foo_bb20( +; CHECK-ERASE: @foo.bb9( +; CHECK-ERASE: @foo.bb20( define i32 @foo(i32 %arg, i32 %arg1) { bb: %tmp5 = icmp sgt i32 %arg, 0 Index: test/Transforms/CodeExtractor/ExtractedFnEntryCount.ll =================================================================== --- test/Transforms/CodeExtractor/ExtractedFnEntryCount.ll +++ test/Transforms/CodeExtractor/ExtractedFnEntryCount.ll @@ -22,7 +22,7 @@ ret i32 %val } -; CHECK: @inlinedFunc.1_if.then(i1 %cond) !prof [[COUNT1:![0-9]+]] +; CHECK: @inlinedFunc.1.if.then(i1 %cond) !prof [[COUNT1:![0-9]+]] !llvm.module.flags = !{!0} Index: test/Transforms/CodeExtractor/PartialInlineAnd.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineAnd.ll +++ test/Transforms/CodeExtractor/PartialInlineAnd.ll @@ -41,11 +41,11 @@ ; CHECK-LABEL: @dummy_caller ; CHECK: br i1 ; CHECK: br i1 -; CHECK: call void @bar.1_ +; CHECK: call void @bar.1. ; LIMIT-LABEL: @dummy_caller ; LIMIT: br i1 ; LIMIT-NOT: br -; LIMIT: call void @bar.1_ +; LIMIT: call void @bar.1. %tmp = tail call i32 @bar(i32 %arg) ret i32 %tmp } Index: test/Transforms/CodeExtractor/PartialInlineAndOr.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineAndOr.ll +++ test/Transforms/CodeExtractor/PartialInlineAndOr.ll @@ -49,7 +49,7 @@ ; CHECK: br i1 ; CHECK: br i1 ; CHECK: br i1 -; CHECK: call void @bar.1_ +; CHECK: call void @bar.1. ; LIMIT-LABEL: @dummy_caller ; LIMIT-NOT: br i1 ; LIMIT: call i32 @bar Index: test/Transforms/CodeExtractor/PartialInlineAttributes.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineAttributes.ll +++ test/Transforms/CodeExtractor/PartialInlineAttributes.ll @@ -55,9 +55,9 @@ ret i32 %add } ; CHECK-LABEL: @caller -; CHECK: call void @callee_most.2_if.then(i32 %v +; CHECK: call void @callee_most.2.if.then(i32 %v ; CHECK: call i32 @callee_noinline(i32 %v) -; CHECK: call void @callee_writeonly.1_if.then(i32 %v +; CHECK: call void @callee_writeonly.1.if.then(i32 %v define i32 @caller(i32 %v) { entry: %c1 = call i32 @callee_most(i32 %v) @@ -66,8 +66,8 @@ ret i32 %c3 } -; CHECK: define internal void @callee_writeonly.1_if.then(i32 %v, i32* %sub.out) { -; CHECK: define internal void @callee_most.2_if.then(i32 %v, i32* %sub.out) [[FN_ATTRS:#[0-9]+]] +; CHECK: define internal void @callee_writeonly.1.if.then(i32 %v, i32* %sub.out) { +; CHECK: define internal void @callee_most.2.if.then(i32 %v, i32* %sub.out) [[FN_ATTRS:#[0-9]+]] ; attributes to preserve attributes #0 = { Index: test/Transforms/CodeExtractor/PartialInlineDebug.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineDebug.ll +++ test/Transforms/CodeExtractor/PartialInlineDebug.ll @@ -23,7 +23,7 @@ ; CHECK-LABEL: @caller ; CHECK: codeRepl.i: -; CHECK-NEXT: call void @callee.2_if.then(i32 %v, i32* %mul.loc.i), !dbg ![[DBG2:[0-9]+]] +; CHECK-NEXT: call void @callee.2.if.then(i32 %v, i32* %mul.loc.i), !dbg ![[DBG2:[0-9]+]] define i32 @caller(i32 %v) !dbg !8 { entry: %call = call i32 @callee(i32 %v), !dbg !14 @@ -53,17 +53,17 @@ ; CHECK-LABEL: @caller2 ; CHECK: codeRepl.i: -; CHECK-NEXT: call void @callee2.1_if.then(i32 %v, i32* %sub.loc.i), !dbg ![[DBG4:[0-9]+]] +; CHECK-NEXT: call void @callee2.1.if.then(i32 %v, i32* %sub.loc.i), !dbg ![[DBG4:[0-9]+]] define i32 @caller2(i32 %v) !dbg !21 { entry: %call = call i32 @callee2(i32 %v), !dbg !22 ret i32 %call } -; CHECK-LABEL: define internal void @callee2.1_if.then +; CHECK-LABEL: define internal void @callee2.1.if.then ; CHECK: br label %if.then, !dbg ![[DBG5:[0-9]+]] -; CHECK-LABEL: define internal void @callee.2_if.then +; CHECK-LABEL: define internal void @callee.2.if.then ; CHECK: br label %if.then, !dbg ![[DBG6:[0-9]+]] ; CHECK: ![[DBG1]] = !DILocation(line: 10, column: 7, Index: test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll +++ test/Transforms/CodeExtractor/PartialInlineEntryUpdate.ll @@ -17,9 +17,9 @@ entry: ; CHECK-LABEL: @Caller1 ; CHECK: br -; CHECK: call void @Func.1_ +; CHECK: call void @Func.1. ; CHECK: br -; CHECK: call void @Func.1_ +; CHECK: call void @Func.1. %val = call i32 @Func(i1 %cond, i32* %align.val) %val2 = call i32 @Func(i1 %cond, i32* %align.val) ret i32 %val @@ -29,7 +29,7 @@ entry: ; CHECK-LABEL: @Caller2 ; CHECK: br -; CHECK: call void @Func.1_ +; CHECK: call void @Func.1. %val = call i32 @Func(i1 %cond, i32* %align.val) ret i32 %val } Index: test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll +++ test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll @@ -26,14 +26,14 @@ ; CHECK-LABEL: bb: ; CHECK-NEXT: [[CALL26LOC:%.*]] = alloca i8* ; CHECK-LABEL: codeRepl.i: -; CHECK-NEXT: call void @bar.1_bb1(i8** [[CALL26LOC]]) +; CHECK-NEXT: call void @bar.1.bb1(i8** [[CALL26LOC]]) define i8* @dummy_caller(i32 %arg) { bb: %tmp = tail call i8* @bar(i32 %arg) ret i8* %tmp } -; CHECK-LABEL: define internal void @bar.1_bb1 +; CHECK-LABEL: define internal void @bar.1.bb1 ; CHECK-LABEL: bb1: ; CHECK-NEXT: %call26 = invoke i8* @invoke_callee() ; CHECK-NEXT: to label %cont unwind label %lpad Index: test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll +++ test/Transforms/CodeExtractor/PartialInlineLiveAcross.ll @@ -36,7 +36,7 @@ define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 { ; CHECK-LABEL: @dummy_caller ; CHECK: codeRepl.i: -; CHECK: call void @test.1_bb2() +; CHECK: call void @test.1.bb2() ; CHECK-NOT: load ; CHECK br @@ -45,7 +45,7 @@ ret i32 %tmp } -; CHECK-LABEL: define internal void @test.1_bb2() +; CHECK-LABEL: define internal void @test.1.bb2() ; CHECK: .exitStub: ; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out ; CHECK: ret Index: test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll +++ test/Transforms/CodeExtractor/PartialInlineNoLiveOut.ll @@ -39,7 +39,7 @@ define i32 @dummy_caller(i32 %arg) local_unnamed_addr #0 { ; CHECK-LABEL: @dummy_caller ; CHECK: codeRepl.i: -; CHECK: call void @test.1_bb2() +; CHECK: call void @test.1.bb2() ; CHECK-NOT: load ; CHECK br bb: @@ -47,7 +47,7 @@ ret i32 %tmp } -; CHECK-LABEL: define internal void @test.1_bb2() +; CHECK-LABEL: define internal void @test.1.bb2() ; CHECK: .exitStub: ; CHECK-NOT: store i32 %tmp7, i32* %tmp7.out ; CHECK: ret Index: test/Transforms/CodeExtractor/PartialInlineOr.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineOr.ll +++ test/Transforms/CodeExtractor/PartialInlineOr.ll @@ -41,7 +41,7 @@ ; CHECK-LABEL: @dummy_caller ; CHECK: br i1 ; CHECK: br i1 -; CHECK: call void @bar.2_ +; CHECK: call void @bar.2. ; LIMIT-LABEL: @dummy_caller ; LIMIT-NOT: br ; LIMIT: call i32 @bar( @@ -84,7 +84,7 @@ define i32 @dummy_caller2(i32 %arg) local_unnamed_addr #0 { ; CHECK: br i1 ; CHECK: br i1 -; CHECK: call {{.*}} @bar_multi_ret.1_ +; CHECK: call {{.*}} @bar_multi_ret.1. %tmp = tail call i32 @bar_multi_ret(i32 %arg) ret i32 %tmp } Index: test/Transforms/CodeExtractor/PartialInlineOrAnd.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineOrAnd.ll +++ test/Transforms/CodeExtractor/PartialInlineOrAnd.ll @@ -52,12 +52,12 @@ ; CHECK: br i1 ; CHECK: br i1 ; CHECK: br i1 -; CHECK: call void @bar.1_ +; CHECK: call void @bar.1. ; LIMIT3-LABEL: @dummy_caller ; LIMIT3: br i1 ; LIMIT3: br i1 ; LIMIT3-NOT: br i1 -; LIMIT3: call void @bar.1_ +; LIMIT3: call void @bar.1. ; LIMIT2-LABEL: @dummy_caller ; LIMIT2-NOT: br i1 ; LIMIT2: call i32 @bar( Index: test/Transforms/CodeExtractor/PartialInlinePGOMultiRegion.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlinePGOMultiRegion.ll +++ test/Transforms/CodeExtractor/PartialInlinePGOMultiRegion.ll @@ -109,9 +109,9 @@ ; CHECK-LABEL: @foo ; CHECK-NOT: call signext i32 @bar ; CHECK: codeRepl1.i: -; CHECK: call void @bar.1_if.then +; CHECK: call void @bar.1.if.then ; CHECK: codeRepl.i: -; CHECK: call void @bar.1_if.then2 +; CHECK: call void @bar.1.if.then2 entry: %value.addr = alloca i32, align 4 %ub.addr = alloca i32, align 4 @@ -123,11 +123,11 @@ ret i32 %call } -; CHECK-LABEL: define internal void @bar.1_if.then2 +; CHECK-LABEL: define internal void @bar.1.if.then2 ; CHECK: .exitStub: ; CHECK: ret void -; CHECK-LABEL: define internal void @bar.1_if.then +; CHECK-LABEL: define internal void @bar.1.if.then ; CHECK: .exitStub: ; CHECK: ret void Index: test/Transforms/CodeExtractor/PartialInlinePGORegion.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlinePGORegion.ll +++ test/Transforms/CodeExtractor/PartialInlinePGORegion.ll @@ -66,7 +66,7 @@ ; CHECK-LABEL: @foo ; CHECK: codeRepl.i: ; CHECK-NOT: call signext i32 @bar -; CHECK: call void @bar.1_if.then +; CHECK: call void @bar.1.if.then entry: %value.addr = alloca i32, align 4 %ub.addr = alloca i32, align 4 @@ -78,7 +78,7 @@ ret i32 %call } -; CHECK-LABEL: define internal void @bar.1_if.then +; CHECK-LABEL: define internal void @bar.1.if.then ; CHECK: .exitStub: ; CHECK: ret void Index: test/Transforms/CodeExtractor/PartialInlineVarArg.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineVarArg.ll +++ test/Transforms/CodeExtractor/PartialInlineVarArg.ll @@ -36,7 +36,7 @@ } ; CHECK-LABEL: @caller1 ; CHECK: codeRepl.i: -; CHECK-NEXT: call void (i32, i8**, i32, ...) @vararg.3_bb1(i32 %stat1.i, i8** %vargs.i, i32 %arg) +; CHECK-NEXT: call void (i32, i8**, i32, ...) @vararg.3.bb1(i32 %stat1.i, i8** %vargs.i, i32 %arg) define i32 @caller2(i32 %arg, float %arg2) { bb: @@ -46,7 +46,7 @@ ; CHECK-LABEL: @caller2 ; CHECK: codeRepl.i: -; CHECK-NEXT: call void (i32, i8**, i32, ...) @vararg.3_bb1(i32 %stat1.i, i8** %vargs.i, i32 %arg, i32 10, float %arg2) +; CHECK-NEXT: call void (i32, i8**, i32, ...) @vararg.3.bb1(i32 %stat1.i, i8** %vargs.i, i32 %arg, i32 10, float %arg2) ; Test case to check that we do not extract a vararg function, if va_end is in ; a block that is not outlined. @@ -104,4 +104,4 @@ ; CHECK-LABEL: @caller_with_signext ; CHECK: codeRepl.i: -; CHECK-NEXT: call void (i32*, ...) @vararg2.1_cond.end(i32* %foo, i32 signext 8) +; CHECK-NEXT: call void (i32*, ...) @vararg2.1.cond.end(i32* %foo, i32 signext 8) Index: test/Transforms/CodeExtractor/PartialInlineVarArgsDebug.ll =================================================================== --- test/Transforms/CodeExtractor/PartialInlineVarArgsDebug.ll +++ test/Transforms/CodeExtractor/PartialInlineVarArgsDebug.ll @@ -19,14 +19,14 @@ ; CHECK-LABEL: @caller ; CHECK: codeRepl.i: -; CHECK-NEXT: call void (i32, i32*, ...) @callee.1_if.then(i32 %v, i32* %mul.loc.i, i32 99), !dbg ![[DBG2:[0-9]+]] +; CHECK-NEXT: call void (i32, i32*, ...) @callee.1.if.then(i32 %v, i32* %mul.loc.i, i32 99), !dbg ![[DBG2:[0-9]+]] define i32 @caller(i32 %v) !dbg !8 { entry: %call = call i32 (i32, ...) @callee(i32 %v, i32 99), !dbg !14 ret i32 %call, !dbg !15 } -; CHECK-LABEL: define internal void @callee.1_if.then +; CHECK-LABEL: define internal void @callee.1.if.then ; CHECK: br label %if.then, !dbg ![[DBG3:[0-9]+]] ; CHECK: ![[DBG1]] = !DILocation(line: 10, column: 7, Index: test/Transforms/CodeExtractor/SingleCondition.ll =================================================================== --- test/Transforms/CodeExtractor/SingleCondition.ll +++ test/Transforms/CodeExtractor/SingleCondition.ll @@ -16,7 +16,7 @@ entry: ; CHECK-LABEL: @dummyCaller ; CHECK: br -; CHECK: call void @inlinedFunc.1_ +; CHECK: call void @inlinedFunc.1. %val = call i32 @inlinedFunc(i1 %cond, i32* %align.val) ret i32 %val } Index: test/Transforms/CodeExtractor/X86/InheritTargetAttributes.ll =================================================================== --- test/Transforms/CodeExtractor/X86/InheritTargetAttributes.ll +++ test/Transforms/CodeExtractor/X86/InheritTargetAttributes.ll @@ -36,5 +36,5 @@ attributes #0 = { nounwind readnone } attributes #1 = { nounwind uwtable "target-cpu"="x86-64" "target-features"="+sse4.1" } -; CHECK: define {{.*}} @inlinedFunc.1_if.then{{.*}} [[COUNT1:#[0-9]+]] +; CHECK: define {{.*}} @inlinedFunc.1.if.then{{.*}} [[COUNT1:#[0-9]+]] ; CHECK: [[COUNT1]] = { {{.*}} "target-cpu"="x86-64" "target-features"="+sse4.1" } Index: test/Transforms/CodeExtractor/cost.ll =================================================================== --- test/Transforms/CodeExtractor/cost.ll +++ 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} Index: test/Transforms/CodeExtractor/cost_meta.ll =================================================================== --- test/Transforms/CodeExtractor/cost_meta.ll +++ test/Transforms/CodeExtractor/cost_meta.ll @@ -28,7 +28,7 @@ } -; CHECK-LABEL: define internal void @outline_region_notlikely.1_bb1(i32* %arg) { +; CHECK-LABEL: define internal void @outline_region_notlikely.1.bb1(i32* %arg) { ; CHECK-NEXT: newFuncRoot: declare i32 @foo(i32 * %arg) Index: test/Transforms/CodeExtractor/inline_eh.ll =================================================================== --- test/Transforms/CodeExtractor/inline_eh.ll +++ test/Transforms/CodeExtractor/inline_eh.ll @@ -42,11 +42,11 @@ ; CHECK: entry: ; CHECK-NEXT: br i1 ; CHECK: codeRepl.i: -; CHECK-NEXT: call void @callee.1_{{.*}}() +; CHECK-NEXT: call void @callee.1.{{.*}}() call void @callee(i1 %cond) ret void } -; CHECK-LABEL: define {{.*}} @callee.1_{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) +; CHECK-LABEL: define {{.*}} @callee.1.{{.*}}() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) ; CHECK: invoke void @bar() ; CHECK: landingpad Index: test/Transforms/CodeExtractor/inline_eh_1.ll =================================================================== --- test/Transforms/CodeExtractor/inline_eh_1.ll +++ test/Transforms/CodeExtractor/inline_eh_1.ll @@ -42,12 +42,12 @@ ; CHECK: entry: ; CHECK-NEXT: br i1 ; CHECK: codeRepl.i: -; CHECK-NEXT: call void @callee.1_{{.*}}() +; CHECK-NEXT: call void @callee.1.{{.*}}() call void @callee(i1 %cond) ret void } -; CHECK-LABEL: define {{.*}} @callee.1_{{.*}}() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK-LABEL: define {{.*}} @callee.1.{{.*}}() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) ; CHECK: invoke void @bar() ; CHECK: cleanuppad ; CHECK-NEXT: cleanupret Index: test/Transforms/CodeExtractor/live_shrink.ll =================================================================== --- test/Transforms/CodeExtractor/live_shrink.ll +++ test/Transforms/CodeExtractor/live_shrink.ll @@ -41,13 +41,13 @@ ; CHECK-NOT: llvm.lifetime ; CHECK: br i1 ; CHECK: codeRepl.i: -; CHECK: call void @_Z3foov.1_ +; CHECK: call void @_Z3foov.1. tail call void @_Z3foov() ret void } -; CHECK-LABEL: define internal void @_Z3foov.1_ +; CHECK-LABEL: define internal void @_Z3foov.1. ; CHECK: newFuncRoot: ; CHECK-NEXT: %tmp = alloca %class.A ; CHECK-NEXT: %tmp1 = bitcast %class.A* %tmp to i8* Index: test/Transforms/CodeExtractor/live_shrink_gep.ll =================================================================== --- test/Transforms/CodeExtractor/live_shrink_gep.ll +++ test/Transforms/CodeExtractor/live_shrink_gep.ll @@ -42,12 +42,12 @@ ; CHECK-NOT: llvm.lifetime ; CHECK: br i1 ; CHECK: codeRepl.i: -; CHECK: call void @_Z3foov.1_ +; CHECK: call void @_Z3foov.1. tail call void @_Z3foov() ret void } -; CHECK-LABEL: define internal void @_Z3foov.1_ +; CHECK-LABEL: define internal void @_Z3foov.1. ; CHECK: newFuncRoot: ; CHECK-NEXT: %tmp = alloca %class.A ; CHECK-NEXT: %tmp1 = getelementptr Index: test/Transforms/CodeExtractor/live_shrink_hoist.ll =================================================================== --- test/Transforms/CodeExtractor/live_shrink_hoist.ll +++ test/Transforms/CodeExtractor/live_shrink_hoist.ll @@ -50,7 +50,7 @@ ret void } -; CHECK-LABEL: define internal void @_Z3foov.1_ +; CHECK-LABEL: define internal void @_Z3foov.1. ; CHECK: bb9: ; CHECK: call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1) ; CHECK: br label %.exitStub Index: test/Transforms/CodeExtractor/live_shrink_multiple.ll =================================================================== --- test/Transforms/CodeExtractor/live_shrink_multiple.ll +++ test/Transforms/CodeExtractor/live_shrink_multiple.ll @@ -42,7 +42,7 @@ ret void } -; CHECK-LABEL: define internal void @_Z3foov.1_ +; CHECK-LABEL: define internal void @_Z3foov.1. ; CHECK: newFuncRoot: ; CHECK-NEXT: alloca ; CHECK-NEXT: bitcast Index: test/Transforms/CodeExtractor/unreachable-block.ll =================================================================== --- test/Transforms/CodeExtractor/unreachable-block.ll +++ test/Transforms/CodeExtractor/unreachable-block.ll @@ -1,12 +1,12 @@ ; RUN: opt -S -partial-inliner %s | FileCheck %s ; CHECK-LABEL: define void @dipsy( -; CHECK-NEXT: call void @tinkywinky.1_ontrue() +; CHECK-NEXT: call void @tinkywinky.1.ontrue() ; CHECK-NEXT: call void @patatuccio() ; CHECK-NEXT: ret void ; CHECK-NEXT: } -; CHECK-LABEL: define internal void @tinkywinky.1_ontrue() { +; CHECK-LABEL: define internal void @tinkywinky.1.ontrue() { ; CHECK-NEXT: newFuncRoot: ; CHECK-NEXT: br label %ontrue ; CHECK: onfalse{{.*}}: Index: test/Transforms/HotColdSplit/split-cold-2.ll =================================================================== --- test/Transforms/HotColdSplit/split-cold-2.ll +++ test/Transforms/HotColdSplit/split-cold-2.ll @@ -4,10 +4,10 @@ ; Make sure this compiles. This test used to fail with an invalid phi node: the ; two predecessors were outlined and the SSA representation was invalid. -; CHECK: remark: :0:0: fun split cold code into fun_if.else +; CHECK: remark: :0:0: fun split cold code into fun.cold ; CHECK-LABEL: @fun ; CHECK: codeRepl: -; CHECK-NEXT: call void @fun_if.else +; CHECK-NEXT: call void @fun.cold define void @fun() { entry: Index: test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll =================================================================== --- test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll +++ test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll @@ -1,6 +1,6 @@ ; RUN: opt -hotcoldsplit -S < %s | FileCheck %s -; CHECK-LABEL: define {{.*}}@foo_if.end +; CHECK-LABEL: define {{.*}}@foo.cold ; CHECK-NOT: llvm.dbg.value define void @foo(i32 %arg1) !dbg !6 { Index: test/tools/llvm-extract/extract-block.ll =================================================================== --- test/tools/llvm-extract/extract-block.ll +++ test/tools/llvm-extract/extract-block.ll @@ -12,7 +12,7 @@ ret void } -; CHECK: @foo_bb4 +; CHECK: @foo.bb4 ; CHECK: call void @bar() ; CHECK: %tmp5 define i32 @foo(i32 %arg) { Index: test/tools/llvm-extract/extract-multiple-blocks.ll =================================================================== --- test/tools/llvm-extract/extract-multiple-blocks.ll +++ test/tools/llvm-extract/extract-multiple-blocks.ll @@ -1,7 +1,7 @@ ; RUN: llvm-extract -S -bb foo:bb4 -bb foo:bb7 %s | FileCheck %s -; CHECK: @foo_bb4 -; CHECK: @foo_bb7 +; CHECK: @foo.bb4 +; CHECK: @foo.bb7 define i32 @foo(i32 %arg) { bb: %tmp = alloca i32, align 4