diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_proepilog.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_proepilog.cpp index 883c14dd17beccb0a2b82f47be12126a6904cf3c..95ca52a7259df81c23ade2bb458f3d585b838d2f 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_proepilog.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_proepilog.cpp @@ -1415,8 +1415,14 @@ void AArch64GenProEpilog::GenerateProlog(BB &bb) { aarchCGFunc.GetDummyBB()->ClearInsns(); aarchCGFunc.GetDummyBB()->SetIsProEpilog(true); cgFunc.SetCurBB(*aarchCGFunc.GetDummyBB()); - if (!cgFunc.GetHasProEpilogue()) { - return; + + bool hasProEpilogue = cgFunc.GetHasProEpilogue(); + if (!hasProEpilogue) { + if (!(currCG->GetMIRModule()->IsCModule() && + currCG->GetCGOptions().WithLoc() && + currCG->GetMIRModule()->IsWithDbgInfo())) { + return; + } } // insert .loc for function @@ -1447,6 +1453,12 @@ void AArch64GenProEpilog::GenerateProlog(BB &bb) { Insn &loc = currCG->BuildInstruction(mpldbg::OP_DBG_loc, *o0, *o1); cgFunc.GetCurBB()->AppendInsn(loc); } + if (!hasProEpilogue) { + bb.InsertAtBeginning(*aarchCGFunc.GetDummyBB()); + cgFunc.SetCurBB(*formerCurBB); + aarchCGFunc.GetDummyBB()->SetIsProEpilog(false); + return; + } } const MapleVector ®sToSave = (!CGOptions::DoRegSavesOpt()) ? diff --git a/src/mapleall/maple_me/include/me_merge_stmts.h b/src/mapleall/maple_me/include/me_merge_stmts.h index 70e03ca1b7fee10fefbe923fac2f6480d3929dd4..dbc290ae1b5b7fcf03ba43753e24bd7b56a3cc9d 100644 --- a/src/mapleall/maple_me/include/me_merge_stmts.h +++ b/src/mapleall/maple_me/include/me_merge_stmts.h @@ -1,16 +1,16 @@ /* - * Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. + * Copyright (C) [2021] Futurewei Technologies, Inc. All rights reverved. * - * OpenArkCompiler is licensed under Mulan PSL v2. - * You can use this software according to the terms and conditions of the Mulan PSL v2. - * You may obtain a copy of Mulan PSL v2 at: + * Licensed under the Mulan Permissive Software License v2. + * You can use this software according to the terms and conditions of the MulanPSL - 2.0. + * You may obtain a copy of MulanPSL - 2.0 at: * - * http://license.coscl.org.cn/MulanPSL2 + * https://opensource.org/licenses/MulanPSL-2.0 * * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR * FIT FOR A PARTICULAR PURPOSE. - * See the Mulan PSL v2 for more details. + * See the MulanPSL - 2.0 for more details. */ #ifndef MAPLE_ME_INCLUDE_ME_MERGE_STMTS_H #define MAPLE_ME_INCLUDE_ME_MERGE_STMTS_H diff --git a/src/mapleall/maple_me/src/me_merge_stmts.cpp b/src/mapleall/maple_me/src/me_merge_stmts.cpp index d8e1b59a53e9d354f2a5d10754ecc6aca00517f5..49d1a2a4e6dfeccfa4e1b5bc920200c490a92ab1 100644 --- a/src/mapleall/maple_me/src/me_merge_stmts.cpp +++ b/src/mapleall/maple_me/src/me_merge_stmts.cpp @@ -1,16 +1,16 @@ /* - * Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. + * Copyright (C) [2021] Futurewei Technologies, Inc. All rights reverved. * - * OpenArkCompiler is licensed under Mulan PSL v2. - * You can use this software according to the terms and conditions of the Mulan PSL v2. - * You may obtain a copy of Mulan PSL v2 at: + * Licensed under the Mulan Permissive Software License v2. + * You can use this software according to the terms and conditions of the MulanPSL - 2.0. + * You may obtain a copy of MulanPSL - 2.0 at: * - * http://license.coscl.org.cn/MulanPSL2 + * https://opensource.org/licenses/MulanPSL-2.0 * * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR * FIT FOR A PARTICULAR PURPOSE. - * See the Mulan PSL v2 for more details. + * See the MulanPSL - 2.0 for more details. */ #include "me_merge_stmts.h" #include "me_irmap.h"