diff --git a/src/bin/maple b/src/bin/maple index 7eba3e6242f3b3999272a8ba70914509f77339f3..940360dce09d4c93fb1d44b26025a6d80dfbc735 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/maple_me/src/me_irmap.cpp b/src/maple_me/src/me_irmap.cpp index 0461bab1c4d01e30fb374bb4c48770c6d544c175..6ffa3b927ddb6069b4c542495e98204ed710a15d 100644 --- a/src/maple_me/src/me_irmap.cpp +++ b/src/maple_me/src/me_irmap.cpp @@ -62,9 +62,9 @@ void MeIRMap::EmitBBStmts(BB &bb, BlockNode &curblk) { auto &meStmts = bb.GetMeStmts(); for (auto &meStmt : meStmts) { if (!GetNeedAnotherPass()) { - if (meStmt.GetOp() == OP_interfaceicall || meStmt.GetOp() == OP_virtualicall) { + if (meStmt.GetOp() == OP_interfaceicall) { meStmt.SetOp(OP_icall); - } else if (meStmt.GetOp() == OP_interfaceicallassigned || meStmt.GetOp() == OP_virtualicallassigned) { + } else if (meStmt.GetOp() == OP_interfaceicallassigned) { meStmt.SetOp(OP_icallassigned); } } diff --git a/src/maple_me/src/ssa_epre.cpp b/src/maple_me/src/ssa_epre.cpp index ff565dc5dfcb7c99ecf1bda025572403c98af78f..db9f42d954da71972efde3018521c762c972a1d1 100644 --- a/src/maple_me/src/ssa_epre.cpp +++ b/src/maple_me/src/ssa_epre.cpp @@ -126,6 +126,7 @@ void SSAEPre::GenerateSaveRealOcc(MeRealOcc &realOcc) { realOcc.SetSavedExpr(*regOrVar); } + void SSAEPre::GenerateReloadRealOcc(MeRealOcc &realOcc) { CHECK_FATAL(!realOcc.IsLHS(), "GenerateReloadRealOcc: cannot be LHS occurrence"); MeExpr *regOrVar = nullptr; diff --git a/src/mpl2mpl/include/muid_replacement.h b/src/mpl2mpl/include/muid_replacement.h index fa6d62c7f7fb1c33d3908e99230d65c45a4e62cd..13dd73916e9dba33dcc99affbc6fb9a314a95c81 100644 --- a/src/mpl2mpl/include/muid_replacement.h +++ b/src/mpl2mpl/include/muid_replacement.h @@ -114,6 +114,7 @@ class MUIDReplacement : public FuncOptimizeImpl { void CollectFuncAndDataFromFuncList(); void GenerateCompilerVersionNum(); static MIRSymbol *GetSymbolFromName(const std::string &name); + ConstvalNode* GetConstvalNode(int64 index); // The following sets are for internal uses. Sorting order does not matter here. std::unordered_set funcDefSet; std::unordered_set funcUndefSet; diff --git a/src/mpl2mpl/src/muid_replacement.cpp b/src/mpl2mpl/src/muid_replacement.cpp index e2e2519b1e3739b1e7fe4d643204f76edfdca2b2..bb4bd986a3d8c1f49e86c9e2b6bc35b71b53559a 100644 --- a/src/mpl2mpl/src/muid_replacement.cpp +++ b/src/mpl2mpl/src/muid_replacement.cpp @@ -32,7 +32,6 @@ constexpr maple::uint64 kFromUndefIndexMask = 0x4000000000000000; constexpr maple::uint64 kFromDefIndexMask = 0x2000000000000000; #endif - } // namespace // MUIDReplacement @@ -57,6 +56,14 @@ MIRSymbol *MUIDReplacement::GetSymbolFromName(const std::string &name) { return GlobalTables::GetGsymTable().GetSymbolFromStrIdx(gStrIdx); } +ConstvalNode* MUIDReplacement::GetConstvalNode(int64 index) { +#ifdef USE_ARM32_MACRO + return builder->CreateIntConst(index, PTY_i32); +#else + return builder->CreateIntConst(index, PTY_i64); +#endif +} + void MUIDReplacement::DumpMUIDFile(bool isFunc) { std::ofstream outFile; const std::string &mplName = GetMIRModule().GetFileName(); @@ -1028,7 +1035,7 @@ void MUIDReplacement::ReplaceDirectInvokeOrAddroffunc(MIRFunction ¤tFunc, index = FindIndexFromUndefTable(*(calleeFunc->GetFuncSymbol()), true); arrayType = static_cast(funcUndefTabSym->GetType()); } - ConstvalNode *offsetExpr = builder->CreateIntConst(index, PTY_i64); + ConstvalNode *offsetExpr = GetConstvalNode(index); ArrayNode *arrayExpr = builder->CreateExprArray(*arrayType, baseExpr, offsetExpr); arrayExpr->SetBoundsCheck(false); MIRType *elemType = arrayType->GetElemType(); @@ -1094,7 +1101,7 @@ void MUIDReplacement::ReplaceDassign(MIRFunction ¤tFunc, const DassignNode index = FindIndexFromUndefTable(*mirSymbol, false); arrayType = static_cast(dataUndefTabSym->GetType()); } - ConstvalNode *offsetExpr = builder->CreateIntConst(index, PTY_i64); + ConstvalNode *offsetExpr = GetConstvalNode(index); ArrayNode *arrayExpr = builder->CreateExprArray(*arrayType, baseExpr, offsetExpr); arrayExpr->SetBoundsCheck(false); MIRType *elemType = arrayType->GetElemType(); @@ -1227,7 +1234,7 @@ BaseNode *MUIDReplacement::ReplaceDread(MIRFunction ¤tFunc, const StmtNode index = FindIndexFromUndefTable(*mirSymbol, false); arrayType = static_cast(dataUndefTabSym->GetType()); } - ConstvalNode *offsetExpr = builder->CreateIntConst(index, PTY_i64); + ConstvalNode *offsetExpr = GetConstvalNode(index); ArrayNode *arrayExpr = builder->CreateExprArray(*arrayType, baseExpr, offsetExpr); arrayExpr->SetBoundsCheck(false); MIRType *elemType = arrayType->GetElemType(); diff --git a/src/mpl2mpl/src/vtable_impl.cpp b/src/mpl2mpl/src/vtable_impl.cpp index 7ea995dc00375ff92bcb48a7ebbd7d814f54b4e9..64ae6d0a55ee8959c2be653c65dee0c37bb24c3a 100644 --- a/src/mpl2mpl/src/vtable_impl.cpp +++ b/src/mpl2mpl/src/vtable_impl.cpp @@ -91,7 +91,7 @@ void VtableImpl::ProcessFunc(MIRFunction *func) { #undef DEF_MIR_INTRINSIC }; const std::string funcName = calleefunc->GetName(); - if (Options::O2 && intrisicsList.find(funcName) != intrisicsList.end() && + if (!Options::buildApp && Options::O2 && intrisicsList.find(funcName) != intrisicsList.end() && funcName != "Ljava_2Flang_2FString_3B_7CindexOf_7C_28Ljava_2Flang_2FString_3B_29I") { if (Intrinsify(*func, *cnode)) { stmt = next;