From 733bab3ec6821748e151288a140fb6622aee295e Mon Sep 17 00:00:00 2001 From: Wen HU Date: Mon, 22 Mar 2021 06:52:53 -0700 Subject: [PATCH 1/2] fix broken build --- src/mplfe/common/src/mplfe_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mplfe/common/src/mplfe_compiler.cpp b/src/mplfe/common/src/mplfe_compiler.cpp index 9813ec8ccb..c5b2f67732 100644 --- a/src/mplfe/common/src/mplfe_compiler.cpp +++ b/src/mplfe/common/src/mplfe_compiler.cpp @@ -197,7 +197,7 @@ void MPLFECompiler::ExportMpltFile() { void MPLFECompiler::ExportMplFile() { FETimer timer; timer.StartAndDump("Output mpl"); - module.OutputAsciiMpl("", false); + module.OutputAsciiMpl("", "mpl"); timer.StopAndDumpTimeMS("Output mpl"); } -- Gitee From 5f44acd76e782ee6470f0973616b6dac59d8d2a4 Mon Sep 17 00:00:00 2001 From: Feng Ye Date: Mon, 22 Mar 2021 11:56:25 -0700 Subject: [PATCH 2/2] More setup for risc-v --- src/mapleall/maple_be/src/ad/mad.cpp | 4 ++++ src/mapleall/maple_be/src/cg/args.cpp | 2 ++ src/mapleall/maple_be/src/cg/cfgo.cpp | 4 ++++ src/mapleall/maple_be/src/cg/cg_cfg.cpp | 2 ++ src/mapleall/maple_be/src/cg/cg_phasemanager.cpp | 4 ++++ src/mapleall/maple_be/src/cg/ebo.cpp | 2 ++ src/mapleall/maple_be/src/cg/global.cpp | 2 ++ src/mapleall/maple_be/src/cg/ico.cpp | 4 ++++ src/mapleall/maple_be/src/cg/live.cpp | 2 ++ src/mapleall/maple_be/src/cg/offset_adjust.cpp | 2 ++ src/mapleall/maple_be/src/cg/peep.cpp | 2 ++ src/mapleall/maple_be/src/cg/pressure.cpp | 4 ++++ src/mapleall/maple_be/src/cg/proepilog.cpp | 2 ++ src/mapleall/maple_be/src/cg/reaching.cpp | 2 ++ 14 files changed, 38 insertions(+) diff --git a/src/mapleall/maple_be/src/ad/mad.cpp b/src/mapleall/maple_be/src/ad/mad.cpp index 238f631652..4ebb0076bb 100644 --- a/src/mapleall/maple_be/src/ad/mad.cpp +++ b/src/mapleall/maple_be/src/ad/mad.cpp @@ -14,7 +14,11 @@ */ #include "mad.h" #include +#if TARGAARCH64 #include "aarch64_operand.h" +#elif TARGRISCV64 +#include "riscv64_operand.h" +#endif #include "schedule.h" #include "insn.h" diff --git a/src/mapleall/maple_be/src/cg/args.cpp b/src/mapleall/maple_be/src/cg/args.cpp index e52886155d..e1fef0fbb9 100644 --- a/src/mapleall/maple_be/src/cg/args.cpp +++ b/src/mapleall/maple_be/src/cg/args.cpp @@ -15,6 +15,8 @@ #include "args.h" #if TARGAARCH64 #include "aarch64_args.h" +#elif TARGRISCV64 +#include "riscv64_args.h" #endif #if TARGARM32 #include "arm32_args.h" diff --git a/src/mapleall/maple_be/src/cg/cfgo.cpp b/src/mapleall/maple_be/src/cg/cfgo.cpp index 4dad1f4b99..b30958f480 100644 --- a/src/mapleall/maple_be/src/cg/cfgo.cpp +++ b/src/mapleall/maple_be/src/cg/cfgo.cpp @@ -15,7 +15,11 @@ #include "cfgo.h" #include "cgbb.h" #include "cg.h" +#if TARGAARCH64 #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_insn.h" +#endif #include "mpl_logging.h" /* diff --git a/src/mapleall/maple_be/src/cg/cg_cfg.cpp b/src/mapleall/maple_be/src/cg/cg_cfg.cpp index d795028c5c..6191e38ddc 100644 --- a/src/mapleall/maple_be/src/cg/cg_cfg.cpp +++ b/src/mapleall/maple_be/src/cg/cg_cfg.cpp @@ -15,6 +15,8 @@ #include "cg_cfg.h" #if TARGAARCH64 #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_insn.h" #endif #if TARGARM32 #include "arm32_insn.h" diff --git a/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp b/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp index 0025071390..5b50618873 100644 --- a/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp +++ b/src/mapleall/maple_be/src/cg/cg_phasemanager.cpp @@ -24,7 +24,11 @@ #include "global.h" #include "strldr.h" #include "peep.h" +#if TARGAARCH64 #include "aarch64_fixshortbranch.h" +#elif TARGRISCV64 +#include "riscv64_fixshortbranch.h" +#endif #include "live.h" #include "loop.h" #include "mpl_timer.h" diff --git a/src/mapleall/maple_be/src/cg/ebo.cpp b/src/mapleall/maple_be/src/cg/ebo.cpp index db4fc9b68b..45384e278b 100644 --- a/src/mapleall/maple_be/src/cg/ebo.cpp +++ b/src/mapleall/maple_be/src/cg/ebo.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_ebo.h" +#elif TARGRISCV64 +#include "riscv64_ebo.h" #endif #if TARGARM32 #include "arm32_ebo.h" diff --git a/src/mapleall/maple_be/src/cg/global.cpp b/src/mapleall/maple_be/src/cg/global.cpp index 1493b07509..a2f09a71cf 100644 --- a/src/mapleall/maple_be/src/cg/global.cpp +++ b/src/mapleall/maple_be/src/cg/global.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_global.h" +#elif TARGRISCV64 +#include "riscv64_global.h" #endif #if TARGARM32 #include "arm32_global.h" diff --git a/src/mapleall/maple_be/src/cg/ico.cpp b/src/mapleall/maple_be/src/cg/ico.cpp index 9b92a45b6a..adaa4cd37d 100644 --- a/src/mapleall/maple_be/src/cg/ico.cpp +++ b/src/mapleall/maple_be/src/cg/ico.cpp @@ -18,6 +18,10 @@ #include "aarch64_ico.h" #include "aarch64_isa.h" #include "aarch64_insn.h" +#elif TARGRISCV64 +#include "riscv64_ico.h" +#include "riscv64_isa.h" +#include "riscv64_insn.h" #elif TARGARM32 #include "arm32_ico.h" #include "arm32_isa.h" diff --git a/src/mapleall/maple_be/src/cg/live.cpp b/src/mapleall/maple_be/src/cg/live.cpp index f1da998956..364c59e195 100644 --- a/src/mapleall/maple_be/src/cg/live.cpp +++ b/src/mapleall/maple_be/src/cg/live.cpp @@ -16,6 +16,8 @@ #include #if TARGAARCH64 #include "aarch64_live.h" +#elif TARGRISCV64 +#include "riscv64_live.h" #endif #if TARGARM32 #include "arm32_live.h" diff --git a/src/mapleall/maple_be/src/cg/offset_adjust.cpp b/src/mapleall/maple_be/src/cg/offset_adjust.cpp index e0763773c4..3d6e6d284c 100644 --- a/src/mapleall/maple_be/src/cg/offset_adjust.cpp +++ b/src/mapleall/maple_be/src/cg/offset_adjust.cpp @@ -15,6 +15,8 @@ #include "offset_adjust.h" #if TARGAARCH64 #include "aarch64_offset_adjust.h" +#elif TARGRISCV64 +#include "riscv64_offset_adjust.h" #endif #if TARGARM32 #include "arm32_offset_adjust.h" diff --git a/src/mapleall/maple_be/src/cg/peep.cpp b/src/mapleall/maple_be/src/cg/peep.cpp index 991900287b..4f3d8fde6d 100644 --- a/src/mapleall/maple_be/src/cg/peep.cpp +++ b/src/mapleall/maple_be/src/cg/peep.cpp @@ -18,6 +18,8 @@ #include "common_utils.h" #if TARGAARCH64 #include "aarch64_peep.h" +#elif TARGRISCV64 +#include "riscv64_peep.h" #endif #if TARGARM32 #include "arm32_peep.h" diff --git a/src/mapleall/maple_be/src/cg/pressure.cpp b/src/mapleall/maple_be/src/cg/pressure.cpp index 8fe05f3ba1..65369ba570 100644 --- a/src/mapleall/maple_be/src/cg/pressure.cpp +++ b/src/mapleall/maple_be/src/cg/pressure.cpp @@ -13,7 +13,11 @@ * See the Mulan PSL v2 for more details. */ #include "pressure.h" +#if TARGAARCH64 #include "aarch64_schedule.h" +#elif TARGRISCV64 +#include "riscv64_schedule.h" +#endif #include "deps.h" namespace maplebe { diff --git a/src/mapleall/maple_be/src/cg/proepilog.cpp b/src/mapleall/maple_be/src/cg/proepilog.cpp index b618468563..18d86af56c 100644 --- a/src/mapleall/maple_be/src/cg/proepilog.cpp +++ b/src/mapleall/maple_be/src/cg/proepilog.cpp @@ -15,6 +15,8 @@ #include "proepilog.h" #if TARGAARCH64 #include "aarch64_proepilog.h" +#elif TARGRISCV64 +#include "riscv64_proepilog.h" #endif #if TARGARM32 #include "arm32_proepilog.h" diff --git a/src/mapleall/maple_be/src/cg/reaching.cpp b/src/mapleall/maple_be/src/cg/reaching.cpp index 7babdea784..92d6352213 100644 --- a/src/mapleall/maple_be/src/cg/reaching.cpp +++ b/src/mapleall/maple_be/src/cg/reaching.cpp @@ -14,6 +14,8 @@ */ #if TARGAARCH64 #include "aarch64_reaching.h" +#elif TARGRISCV64 +#include "riscv64_reaching.h" #endif #if TARGARM32 #include "arm32_reaching.h" -- Gitee