Home
last modified time | relevance | path

Searched refs:cg (Results 1 - 25 of 58) sorted by relevance

123

/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/
H A Dcg_option.cpp104 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 Dcg_phasemanager.cpp75 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 Dcg.cpp34 cg = &target; 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 DcatchTable.cpp21 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 DcatchTable.h27 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 Dlreference.cpp36 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 Dlreference.h94 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 DdynamicContext.h78 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 DregSpiller.cpp48 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 DlabelTarget.cpp21 LabelTarget::LabelTarget(CodeGen *cg) in LabelTarget() argument
22 : LabelPair(cg->AllocLabel(), cg->AllocLabel()), breakLabel_(BREAK_LABEL), continueLabel_(CONTINUE_LABEL) in LabelTarget()
H A DregAllocator.cpp27 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 DregScope.cpp29 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 DdynamicContext.cpp34 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 DenvScope.cpp23 ScopeContext::ScopeContext(CodeGen *cg, varbinder::Scope *newScope) : cg_(cg), prevScope_(cg_->scope_) in ScopeContext() argument
25 cg->scope_ = newScope; in ScopeContext()
H A DregAllocator.h32 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 DswitchBuilder.h37 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 DregScope.h33 explicit RegScope(CodeGen *cg);
53 explicit LocalRegScope(CodeGen *cg, varbinder::Scope *scope);
82 explicit FunctionRegScope(CodeGen *cg);
H A DASTCompiler.h191 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 Dtarget_registry.h18 #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 Dcg_phasemanager.h44 cg = nullptr;
59 return cg; in GetCG()
80 CG *cg = nullptr; member in maplebe::CgFuncPM
H A Demit.h27 #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 Dcodegen_intrinsics_ets.cpp124 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 Dx64_emitter.h26 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 Dcodegen_arm64.rb43 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 Dcodegen_arm64.rb43 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)})"

Completed in 11 milliseconds

123