/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/ |
H A D | cg_option.cpp | 104 if (opts::cg::supportFuncSymbol.IsEnabledByUser()) { in SolveOptions() 105 opts::cg::supportFuncSymbol ? EnableSupportFuncSymbol() : DisableSupportFuncSymbol(); in SolveOptions() 108 if (opts::cg::verboseAsm.IsEnabledByUser()) { in SolveOptions() 109 opts::cg::verboseAsm ? SetOption(CGOptions::kVerboseAsm) : ClearOption(CGOptions::kVerboseAsm); in SolveOptions() 113 if (opts::cg::verboseCg.IsEnabledByUser()) { in SolveOptions() 114 opts::cg::verboseCg ? SetOption(CGOptions::kVerboseCG) : ClearOption(CGOptions::kVerboseCG); in SolveOptions() 117 if (opts::cg::spillRange.IsEnabledByUser()) { in SolveOptions() 119 SetRange(opts::cg::spillRange, "--pill-range", GetSpillRanges()); in SolveOptions() 123 if (opts::cg::range.IsEnabledByUser()) { in SolveOptions() 125 SetRange(opts::cg in SolveOptions() [all...] |
H A D | cg_phasemanager.cpp | 75 CHECK_FATAL(cg != nullptr, "cg is null"); in GenerateOutPutFile() 77 auto codegen = cg; in GenerateOutPutFile() 79 cg->Emit([codegen, &m](Emitter *emitter) { in GenerateOutPutFile() 86 cg->template Emit<CG::EmitterType::AsmEmitter>([codegen, &m](Emitter *emitter) { in GenerateOutPutFile() 116 cg->Emit([this](Emitter * emitter) { in PostOutPut() 119 x64Emitter->EmitGlobalVariable(*cg); in PostOutPut() 124 cg->template Emit<CG::EmitterType::AsmEmitter>([this, &m](Emitter* emitter) { in PostOutPut() 129 cg->template Emit<CG::EmitterType::ObjEmiter>([](Emitter* emitter) { in PostOutPut() 164 /* Run the cg optimization in PhaseRun() [all...] |
H A D | cg.cpp | 34 cg = ⌖ in SetTarget() 38 DEBUG_ASSERT(cg, " set target info please "); in GetTarget() 39 return cg; in GetTarget()
|
/arkcompiler/ets_frontend/ets2panda/compiler/base/ |
H A D | catchTable.cpp | 21 TryLabelSet::TryLabelSet(CodeGen *cg) in TryLabelSet() argument 22 : try_(cg->AllocLabel(), cg->AllocLabel()), catch_(cg->AllocLabel(), cg->AllocLabel()) in TryLabelSet() 26 TryLabelSet::TryLabelSet(CodeGen *cg, LabelPair tryLabelPair) in TryLabelSet() argument 27 : try_(tryLabelPair), catch_(cg->AllocLabel(), cg->AllocLabel()) in TryLabelSet()
|
H A D | catchTable.h | 27 explicit TryLabelSet(CodeGen *cg); 28 explicit TryLabelSet(CodeGen *cg, LabelPair tryLabelPair); 71 CatchTable(CodeGen *cg, uint32_t depth, util::StringView exceptionType) in CatchTable() argument 72 : labelSet_(cg), depth_(depth), exceptionType_(exceptionType) in CatchTable() 75 CatchTable(CodeGen *cg, uint32_t depth, LabelPair tryLabelPair, util::StringView exceptionType) in CatchTable() argument 76 : labelSet_(cg, tryLabelPair), depth_(depth), exceptionType_(exceptionType) in CatchTable()
|
H A D | lreference.cpp | 36 LReference::LReferenceBase LReference::CreateBase(CodeGen *cg, const ir::AstNode *node, bool isDeclaration) in CreateBase() argument 42 auto res = cg->Scope()->Find(name, varbinder::ResolveBindingOptions::ALL); in CreateBase() 47 return {cg, node, ReferenceKind::VAR_OR_GLOBAL, res, isDeclaration}; in CreateBase() 50 return {cg, node, ReferenceKind::MEMBER, {}, false}; in CreateBase() 54 return CreateBase(cg, node->AsVariableDeclaration()->Declarators()[0]->Id(), true); in CreateBase() 57 return CreateBase(cg, node->AsVariableDeclarator()->Id(), true); in CreateBase() 61 return {cg, node, ReferenceKind::DESTRUCTURING, {}, isDeclaration}; in CreateBase() 64 return CreateBase(cg, node->AsAssignmentPattern()->Left(), true); in CreateBase() 67 return CreateBase(cg, node->AsRestElement()->Argument(), true); in CreateBase() 70 return CreateBase(cg, nod in CreateBase() 78 JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, bool isDeclaration) JSLReference() argument 175 ETSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, bool isDeclaration) ETSLReference() argument 206 Create(CodeGen *const cg, const ir::AstNode *const node, const bool isDeclaration) Create() argument [all...] |
H A D | lreference.h | 94 static LReferenceBase CreateBase(CodeGen *cg, const ir::AstNode *node, bool isDeclaration); 111 JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, 120 static JSLReference Create(CodeGen *cg, const ir::AstNode *node, bool isDeclaration) in Create() argument 122 return std::make_from_tuple<JSLReference>(CreateBase(cg, node, isDeclaration)); in Create() 134 ETSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, 143 static ETSLReference Create(CodeGen *const cg, const ir::AstNode *const node, const bool isDeclaration);
|
/arkcompiler/ets_frontend/ets2panda/compiler/core/ |
H A D | dynamicContext.h | 78 explicit DynamicContext(CodeGen *cg, LabelTarget target); 98 explicit LabelContext(CodeGen *cg, LabelTarget target) : DynamicContext(cg, target) {} in LabelContext() argument 99 explicit LabelContext(CodeGen *cg, const ir::LabelledStatement *labelledStmt); 187 explicit CatchContext(CodeGen *cg) : DynamicContext(cg, {}) in CatchContext() argument 199 explicit TryContext(CodeGen *cg, const ir::TryStatement *tryStmt, bool hasFinalizer = true) in TryContext() argument 200 : CatchContext(cg), tryStmt_(tryStmt), hasFinalizer_(hasFinalizer) in TryContext() 206 explicit TryContext(CodeGen *cg) : CatchContext(cg) {} in TryContext() argument 259 ETSCatchContext(CodeGen *cg, ArenaAllocator *allocator) ETSCatchContext() argument 270 ETSTryContext(CodeGen *cg, ArenaAllocator *allocator, const ir::TryStatement *tryStmt, bool hasFinalizer = true) ETSTryContext() argument 277 ETSTryContext(CodeGen *cg, ArenaAllocator *allocator) ETSTryContext() argument [all...] |
H A D | regSpiller.cpp | 48 void RegSpiller::SetCodeGen(CodeGen &cg) noexcept 50 cg_ = &cg; 63 RegScope DynamicRegSpiller::Start(CodeGen &cg) in Start() argument 65 SetCodeGen(cg); in Start() 67 return RegScope {&cg}; in Start() 92 RegScope StaticRegSpiller::Start(CodeGen &cg) in Start() argument 94 SetCodeGen(cg); in Start() 95 return RegScope {&cg}; in Start()
|
H A D | labelTarget.cpp | 21 LabelTarget::LabelTarget(CodeGen *cg) in LabelTarget() argument 22 : LabelPair(cg->AllocLabel(), cg->AllocLabel()), breakLabel_(BREAK_LABEL), continueLabel_(CONTINUE_LABEL) in LabelTarget()
|
H A D | regAllocator.cpp | 27 AllocatorBase::AllocatorBase(CodeGen *const cg) noexcept : cg_(cg) {} in cg_() 56 SimpleAllocator::SimpleAllocator(CodeGen *const cg) noexcept : AllocatorBase(cg) {} in AllocatorBase() 72 RegAllocatorBase::RegAllocatorBase(CodeGen *const cg, RegSpiller *const spiller) noexcept 73 : AllocatorBase(cg), spiller_(spiller) in spiller_() 143 RegAllocator::RegAllocator(CodeGen *const cg, RegSpiller *const spiller) noexcept : RegAllocatorBase(cg, spiller) {} in RegAllocatorBase() 207 RangeRegAllocator::RangeRegAllocator(CodeGen *const cg, RegSpiller *const spiller) noexcept 208 : RegAllocatorBase(cg, spille [all...] |
H A D | regScope.cpp | 29 RegScope::RegScope(CodeGen *cg) : cg_(cg), regBase_(cg_->usedRegs_) {} in RegScope() argument 50 LocalRegScope::LocalRegScope(CodeGen *cg, varbinder::Scope *scope) : RegScope(cg) in LocalRegScope() argument 86 FunctionRegScope::FunctionRegScope(CodeGen *cg) : RegScope(cg) in FunctionRegScope() argument
|
H A D | dynamicContext.cpp | 34 DynamicContext::DynamicContext(CodeGen *cg, LabelTarget target) : cg_(cg), target_(target), prev_(Cg()->dynamicContext_) in DynamicContext() argument 44 LabelContext::LabelContext(CodeGen *cg, const ir::LabelledStatement *labelledStmt) in LabelContext() argument 45 : DynamicContext(cg, LabelTarget(labelledStmt->Ident()->Name())), labelledStmt_(labelledStmt) in LabelContext() 51 label_ = cg->AllocLabel(); in LabelContext() 192 auto *cg = Cg(); in AddNewCathTable() local 194 CatchTable *catchTable = cg->CreateCatchTable(assemblerType); in AddNewCathTable() 202 auto *cg = Cg(); in AddNewCathTable() local 204 CatchTable *catchTable = cg->CreateCatchTable(tryLabelPair, assemblerType); in AddNewCathTable()
|
H A D | envScope.cpp | 23 ScopeContext::ScopeContext(CodeGen *cg, varbinder::Scope *newScope) : cg_(cg), prevScope_(cg_->scope_) in ScopeContext() argument 25 cg->scope_ = newScope; in ScopeContext()
|
H A D | regAllocator.h | 32 explicit AllocatorBase(CodeGen *const cg) noexcept; 63 explicit SimpleAllocator(CodeGen *const cg) noexcept; 80 explicit RegAllocatorBase(CodeGen *cg, RegSpiller *spiller) noexcept; 99 explicit RegAllocator(CodeGen *cg, RegSpiller *spiller) noexcept; 117 explicit RangeRegAllocator(CodeGen *cg, RegSpiller *spiller) noexcept;
|
H A D | switchBuilder.h | 37 SwitchBuilder(CodeGen *cg, const ir::SwitchStatement *stmt) in SwitchBuilder() argument 38 : cg_(cg), end_(cg->AllocLabel()), labelCtx_(cg, LabelTarget(end_, LabelTarget::BREAK_LABEL)), stmt_(stmt) in SwitchBuilder()
|
H A D | regScope.h | 33 explicit RegScope(CodeGen *cg); 53 explicit LocalRegScope(CodeGen *cg, varbinder::Scope *scope); 82 explicit FunctionRegScope(CodeGen *cg);
|
H A D | ASTCompiler.h | 191 void SetCodeGen(CodeGen *cg) in SetCodeGen() argument 193 cg_ = cg; in SetCodeGen()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/cg/ |
H A D | target_registry.h | 18 #include "cg.h" 34 using DecoupledEmitterCtorFnTy = std::function<Emitter*(CG &cg, assembler::Assembler &newAssembler)>; 61 Emitter *createEmitter(CG &cg, const std::string &asmFileName) const in createEmitter() argument 66 return EmitterCtorFn(cg, asmFileName); in createEmitter() 70 Emitter *createDecoupledEmitter(CG &cg, assembler::Assembler &newAssembler) const in createDecoupledEmitter() argument 75 return DecoupedEmitterCtorFn(cg, newAssembler); in createDecoupledEmitter() 161 std::function<Emitter*(CG&, const std::string&)> Allocator = [m](CG &cg, const std::string &asmFileName) { in RegisterEmitter() 162 return m->New<EmitterImpl>(cg, asmFileName); in RegisterEmitter() 173 std::function<Emitter*(CG &cg, assembler::Assembler &newAssembler)> Allocator = [m](CG &cg, in RegisterDecoupledEmitter() [all...] |
H A D | cg_phasemanager.h | 44 cg = nullptr; 59 return cg; in GetCG() 80 CG *cg = nullptr; member in maplebe::CgFuncPM
|
H A D | emit.h | 27 #include "cg.h" 300 return cg; in GetCG() 325 Emitter(CG &cg, const std::string &fileName) in Emitter() argument 326 : cg(&cg), in Emitter() 327 rangeIdx2PrefixStr(cg.GetMIRModule()->GetMPAllocator().Adapter()), in Emitter() 328 stringPtr(cg.GetMIRModule()->GetMPAllocator().Adapter()), in Emitter() 329 localStrPtr(cg.GetMIRModule()->GetMPAllocator().Adapter()), in Emitter() 330 hugeSoTargets(cg.GetMIRModule()->GetMPAllocator().Adapter()), in Emitter() 331 fileMap(std::less<uint32_t>(), cg in Emitter() 344 CG *cg; global() member in maplebe::Emitter [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/compiler/ |
H A D | codegen_intrinsics_ets.cpp | 124 static inline void GenerateSbAppendCall(Codegen *cg, IntrinsicInst *inst, SbAppendArgs args, in GenerateSbAppendCall() argument 127 auto *runtime = cg->GetGraph()->GetRuntime(); in GenerateSbAppendCall() 128 if (cg->GetGraph()->IsAotMode()) { in GenerateSbAppendCall() 129 auto *enc = cg->GetEncoder(); in GenerateSbAppendCall() 131 enc->EncodeLdr(klass, false, MemRef(cg->ThreadReg(), runtime->GetArrayU16ClassPointerTlsOffset(cg->GetArch()))); in GenerateSbAppendCall() 132 cg->CallFastPath(inst, entrypoint, args.Dst(), {}, args.Builder(), args.Value(), klass); in GenerateSbAppendCall() 134 auto klass = TypedImm(reinterpret_cast<uintptr_t>(runtime->GetArrayU16Class(cg->GetGraph()->GetMethod()))); in GenerateSbAppendCall() 135 cg->CallFastPath(inst, entrypoint, args.Dst(), {}, args.Builder(), args.Value(), klass); in GenerateSbAppendCall() 173 static inline void EncodeSbAppendNullString(Codegen *cg, IntrinsicIns argument 179 EncodeSbInsertStringIntoSlot(Codegen *cg, IntrinsicInst *inst, Reg slot, SbAppendArgs args) EncodeSbInsertStringIntoSlot() argument 190 EncodeSbAppendString(Codegen *cg, IntrinsicInst *inst, const SbAppendArgs &args, LabelHolder::LabelId labelReturn, LabelHolder::LabelId labelSlowPath) EncodeSbAppendString() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/cg/x86_64/ |
H A D | x64_emitter.h | 26 X64Emitter(CG &cg, assembler::Assembler &newAssembler) : Emitter(cg, ""), assmbler(newAssembler) {} in X64Emitter() argument 48 void EmitGlobalVariable(maplebe::CG &cg); 50 uint64 EmitArray(maple::MIRConst &mirConst, maplebe::CG &cg, bool belongsToDataSec = true);
|
/arkcompiler/runtime_core/compiler/optimizer/templates/ |
H A D | codegen_arm64.rb | 43 if (cg->GetGraph()->GetRuntime()->GetGCEntryPoint() == 0) { 50 auto arg_mem = vixl::aarch64::MemOperand(vixl::aarch64::sp, cg->GetStackOffset()); 64 "cg->GetBackEdgeSP(inst)" 69 auto label = cg->GetLabelSS(inst);) 103 "cg->EncodeReg(cg->GetTmp(), #{IR::get_ir_type(type)})"
|
/arkcompiler/runtime_core/static_core/compiler/optimizer/templates/ |
H A D | codegen_arm64.rb | 43 if (cg->GetGraph()->GetRuntime()->GetGCEntryPoint() == 0) { 50 auto arg_mem = vixl::aarch64::MemOperand(vixl::aarch64::sp, cg->GetStackOffset()); 64 "cg->GetBackEdgeSP(inst)" 69 auto label = cg->GetLabelSS(inst);) 103 "cg->EncodeReg(cg->GetTmp(), #{IR::get_ir_type(type)})"
|