diff --git a/src/bin/jbc2mpl b/src/bin/jbc2mpl index 219f1789ff182078e69a61fe86495fbc60f118d5..2ccdddadbd6bade4c4e26e19de02d49eccf3b952 100755 Binary files a/src/bin/jbc2mpl and b/src/bin/jbc2mpl differ diff --git a/src/bin/maple b/src/bin/maple index 654c437aa9898c07ccf1d1c10ce448d4ae55c323..965b8e5b12574756056b11529e96cce7f1e72986 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/maple_driver/include/usages.h b/src/maple_driver/include/usages.h index 7f07a1d612e1664b434318a375b79d08c234a9ff..df4d4da61389c6f0a4fcbbd224e5317197de353e 100644 --- a/src/maple_driver/include/usages.h +++ b/src/maple_driver/include/usages.h @@ -112,7 +112,6 @@ enum OptionIndex : uint64 { kProfileHotRate, kProfileColdRate, kMpl2MplNativeOpt, - kMpl2MplOptL1, kMpl2MplOptL2, kMpl2MplNoDot, // ----------mplcg begin--------- diff --git a/src/maple_driver/src/maple_comb_compiler.cpp b/src/maple_driver/src/maple_comb_compiler.cpp index c73adf39e1a2209d0fedfa019be2d6a193240680..8e8db44416dd3a924b4af7fb4e9caa9dea14169c 100644 --- a/src/maple_driver/src/maple_comb_compiler.cpp +++ b/src/maple_driver/src/maple_comb_compiler.cpp @@ -282,18 +282,10 @@ void MapleCombCompiler::DecideMpl2MplRealLevel(Options &mpl2mplOption, const std::vector &inputOptions, const MplOptions &options) { for (const mapleOption::Option &opt : inputOptions) { - switch (opt.Index()) { - case kMpl2MplOptL1: - mpl2mplOption.O1 = true; - mpl2mplOption.O2 = true; - mpl2mplOption.usePreg = true; - break; - case kMpl2MplOptL2: - mpl2mplOption.O2 = true; - mpl2mplOption.usePreg = true; - break; - default: - break; + if (opt.Index() == kMpl2MplOptL2) { + mpl2mplOption.O2 = true; + mpl2mplOption.usePreg = true; + break; } } } @@ -445,9 +437,6 @@ Options *MapleCombCompiler::MakeMpl2MplOptions(const MplOptions &options, MemPoo case kMpl2MplNativeOpt: mpl2mplOption->nativeOpt = (opt.Type() == kEnable); break; - case kMpl2MplOptL1: - // Already handled above in DecideMpl2MplRealLevel - break; case kMpl2MplOptL2: // Already handled above in DecideMpl2MplRealLevel break; diff --git a/src/maple_driver/src/mpl_options.cpp b/src/maple_driver/src/mpl_options.cpp index 904671142efb00e1bffff54d315901431e51b1e0..9af0224307b153a13a3a823fe3d9b869005f242e 100644 --- a/src/maple_driver/src/mpl_options.cpp +++ b/src/maple_driver/src/mpl_options.cpp @@ -1051,18 +1051,6 @@ const mapleOption::Descriptor usages[] = { " --no-nativeopt \tDisable native opt\n", "mpl2mpl", { { nullptr, nullptr, nullptr, nullptr } } }, - { kMpl2MplOptL1, - 0, - nullptr, - "O1", - nullptr, - false, - nullptr, - mapleOption::BuildType::kBuildTypeAll, - mapleOption::ArgCheckPolicy::kArgCheckPolicyOptional, - " -O1 \tDo some optimization.\n", - "mpl2mpl", - { { nullptr, nullptr, nullptr, nullptr } } }, { kMpl2MplOptL2, 0, nullptr, diff --git a/src/maple_ir/include/option.h b/src/maple_ir/include/option.h index 5d23f602a75f6ccb454cf32462f3a5420d15db02..dcbfc99f53bd7324138a9c422164060253a1e8f9 100644 --- a/src/maple_ir/include/option.h +++ b/src/maple_ir/include/option.h @@ -83,7 +83,6 @@ class Options { static bool skipVirtualMethod; #endif static bool nativeOpt; - static bool O1; static bool O2; static bool noDot; static std::string proFileData; diff --git a/src/maple_ir/src/option.cpp b/src/maple_ir/src/option.cpp index 20c3c4a0e273116476a8a6ac8b51e8be10eb59ec..e9db67c9256b5706cdb8ac9c17762a82b4fb880e 100644 --- a/src/maple_ir/src/option.cpp +++ b/src/maple_ir/src/option.cpp @@ -56,7 +56,6 @@ bool Options::emitVtableImpl = false; bool Options::skipVirtualMethod = false; #endif bool Options::nativeOpt = true; -bool Options::O1 = false; bool Options::O2 = false; bool Options::noDot = false; bool Options::profileStaticFields = false; diff --git a/src/maple_ir/src/parser.cpp b/src/maple_ir/src/parser.cpp index 059b4d6150bebfe6cbcfe2a65233466db66f89a0..2b76c2e20e9925c3318a9fa5c9087ac1d859c0f8 100644 --- a/src/maple_ir/src/parser.cpp +++ b/src/maple_ir/src/parser.cpp @@ -2214,13 +2214,11 @@ static void GenJStringType(MIRModule &module) { GStrIdx strIdx = GlobalTables::GetStrTable().GetOrCreateStrIdxFromName("dummy"); metaClassType.GetFields().push_back(FieldPair(strIdx, TyIdxFieldAttrPair(TyIdx(PTY_ref), FieldAttrs()))); strIdx = GlobalTables::GetStrTable().GetOrCreateStrIdxFromName("__class_meta__"); + metaClassType.SetNameStrIdx(strIdx); TyIdx tyIdx = GlobalTables::GetTypeTable().GetOrCreateMIRType(&metaClassType); // Global module.GetTypeNameTab()->SetGStrIdxToTyIdx(strIdx, tyIdx); ASSERT(GlobalTables::GetTypeTable().GetTypeTable().empty() == false, "container check"); - if (GlobalTables::GetTypeTable().GetTypeFromTyIdx(tyIdx)->GetNameStrIdx() == 0u) { - GlobalTables::GetTypeTable().GetTypeFromTyIdx(tyIdx)->SetNameStrIdx(strIdx); - } } bool MIRParser::ParseMIR(std::ifstream &mplFile) { diff --git a/src/maple_me/include/me_bb_layout.h b/src/maple_me/include/me_bb_layout.h index fcc76ac0678e47688cfe74432d940f0e24d65f11..f5804cb2845bd24fced4b3bbdfd0cb40ae8c317e 100644 --- a/src/maple_me/include/me_bb_layout.h +++ b/src/maple_me/include/me_bb_layout.h @@ -25,7 +25,7 @@ class BBLayout : public AnalysisResult { func(f), layoutAlloc(&memPool), layoutBBs(layoutAlloc.Adapter()), - startTryBBVec(func.GetAllBBs().size(), false), + startTryBBVec(func.GetAllBBs().size(), false, layoutAlloc.Adapter()), laidOut(func.GetAllBBs().size(), false, layoutAlloc.Adapter()), enabledDebug(enabledDebug) { laidOut[func.GetCommonEntryBB()->GetBBId()] = true; @@ -93,7 +93,7 @@ class BBLayout : public AnalysisResult { MeFunction &func; MapleAllocator layoutAlloc; MapleVector layoutBBs; // gives the determined layout order - std::vector startTryBBVec; // record the try BB to fix the try&endtry map + MapleVector startTryBBVec; // record the try BB to fix the try&endtry map bool needDealWithTryBB = false; BBId curBBId { 0 }; // to index into func.bb_vec_ to return the next BB bool bbCreated = false; // new create bb will change mefunction::bb_vec_ and