Home
last modified time | relevance | path

Searched full:vreg (Results 1 – 25 of 259) sorted by relevance

1234567891011

/arkcompiler/ets_frontend/ets2panda/compiler/core/
Dpandagen.h61 void OptionalChainCheck(bool optional, VReg obj) const;
63 [[nodiscard]] VReg LexEnv() const noexcept;
70 void StoreAccumulator(const ir::AstNode *node, VReg vreg);
71 void LoadAccumulator(const ir::AstNode *node, VReg reg);
73 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override;
74 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override;
75 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs);
81 void StoreConst(const ir::AstNode *node, VReg reg, Constant id);
95 void StoreObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
96 void StoreOwnProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
[all …]
DvReg.h24 class VReg final {
27 explicit constexpr VReg() noexcept : VReg(INVALID_IDX) {} in VReg() function
28 explicit constexpr VReg(const uint32_t idx) noexcept : idx_(idx) {} in VReg() function
40 [[nodiscard]] static constexpr VReg Invalid() noexcept in Invalid()
42 return VReg(INVALID_IDX); in Invalid()
45 [[nodiscard]] static constexpr VReg RegStart() noexcept in RegStart()
47 return VReg(REG_START); in RegStart()
65 constexpr VReg &operator++() noexcept
72 constexpr const VReg operator++(int) noexcept
79 constexpr VReg &operator--() noexcept
[all …]
DregSpiller.h33 constexpr explicit SpillInfo(VReg originReg, VReg spillReg) noexcept;
35 [[nodiscard]] constexpr VReg OriginReg() const noexcept;
36 [[nodiscard]] constexpr VReg SpillReg() const noexcept;
40 VReg originReg_ {VReg::Invalid()};
41 VReg spillReg_ {VReg::Invalid()};
53 …[[nodiscard]] virtual IRNode *MoveReg(const ir::AstNode *node, VReg vd, VReg vs, bool spillMov) = …
58 void Adjust(const std::unordered_set<VReg> &regs) noexcept;
80 … [[nodiscard]] IRNode *MoveReg(const ir::AstNode *node, VReg vd, VReg vs, bool spillMov) override;
97 … [[nodiscard]] IRNode *MoveReg(const ir::AstNode *node, VReg vd, VReg vs, bool spillMov) override;
104 constexpr RegSpiller::SpillInfo::SpillInfo(const VReg originReg, const VReg spillReg) noexcept in SpillInfo()
[all …]
DETSGen.h39 [[nodiscard]] VReg &Acc() noexcept;
40 [[nodiscard]] VReg Acc() const noexcept;
46 [[nodiscard]] VReg StoreException(const ir::AstNode *node);
47 …void ApplyConversionAndStoreAccumulator(const ir::AstNode *node, VReg vreg, const checker::Type *t…
48 void StoreAccumulator(const ir::AstNode *node, VReg vreg);
49 void LoadAccumulator(const ir::AstNode *node, VReg vreg);
50 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override;
51 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override;
52 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs);
68 void StoreProperty(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
[all …]
DregSpiller.cpp29 const VReg origin {VReg::REG_START - spillIndex_++}; in New()
35 void RegSpiller::Adjust(const std::unordered_set<VReg> &regs) noexcept in Adjust()
38 const VReg origin {VReg::REG_START - spillIndex_}; in Adjust()
73 …return RegSpiller::SpillInfo(VReg {VReg::REG_START - newSpillIndex}, VReg {regEnd_ - SpillIndex()}… in Restore()
81 IRNode *DynamicRegSpiller::MoveReg(const ir::AstNode *const node, const VReg vd, const VReg vs, in MoveReg()
100 ES2PANDA_ASSERT(spills_.size() <= VReg::REG_START); in Restore()
112 IRNode *StaticRegSpiller::MoveReg(const ir::AstNode *const node, const VReg vd, const VReg vs, cons… in MoveReg()
Dpandagen.cpp60 size_t Registers([[maybe_unused]] std::array<VReg *, MAX_REG_OPERAND> *regs) override in Registers() argument
65 … size_t Registers([[maybe_unused]] std::array<const VReg *, MAX_REG_OPERAND> *regs) const override in Registers() argument
277 void PandaGen::OptionalChainCheck(const bool optional, const VReg obj) const in OptionalChainCheck()
332 void PandaGen::StoreAccumulator(const ir::AstNode *node, VReg vreg) in StoreAccumulator() argument
334 Ra().Emit<StaDyn>(node, vreg); in StoreAccumulator()
337 void PandaGen::LoadAccumulator(const ir::AstNode *node, VReg reg) in LoadAccumulator()
342 IRNode *PandaGen::AllocMov(const ir::AstNode *node, const VReg vd, const VReg vs) in AllocMov()
347 IRNode *PandaGen::AllocMov(const ir::AstNode *node, OutVReg vd, const VReg vs) in AllocMov()
353 void PandaGen::MoveVreg(const ir::AstNode *node, VReg vd, VReg vs) in MoveVreg()
368 void PandaGen::StoreConst(const ir::AstNode *node, VReg reg, Constant id) in StoreConst()
[all …]
DcodeGen.cpp65 VReg CodeGen::NextReg() const noexcept in NextReg()
67 return VReg {usedRegs_}; in NextReg()
85 VReg CodeGen::AllocReg() in AllocReg()
87 const VReg vreg(usedRegs_--); in AllocReg() local
88 SetVRegType(vreg, nullptr); in AllocReg()
89 return vreg; in AllocReg()
92 VReg CodeGen::AllocRegWithType(const checker::Type *const type) in AllocRegWithType()
94 const VReg vreg(usedRegs_--); in AllocRegWithType() local
95 SetVRegType(vreg, type); in AllocRegWithType()
96 return vreg; in AllocRegWithType()
[all …]
DcodeGen.h70 using TypeMap = ArenaUnorderedMap<VReg, const checker::Type *>;
95 [[nodiscard]] virtual IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) = 0;
96 [[nodiscard]] virtual IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) = 0;
107 [[nodiscard]] VReg AllocReg();
108 [[nodiscard]] VReg AllocRegWithType(const checker::Type *type);
109 [[nodiscard]] VReg NextReg() const noexcept;
147 void SetVRegType(VReg vreg, const checker::Type *type);
149 [[nodiscard]] virtual const checker::Type *GetVRegType(VReg vreg) const;
188 std::uint32_t usedRegs_ {VReg::REG_START};
189 std::uint32_t totalRegs_ {VReg::REG_START};
Dfunction.h33 …teOverElements(const ArenaVector<ir::AstNode *> &elements, PandaGen *pg, VReg &ctor, VReg &thisReg,
34 VReg &computedInstanceFieldsArray);
38 …static void LoadClassContexts(const ir::AstNode *node, PandaGen *pg, VReg ctor, const util::String…
/arkcompiler/ets_frontend/es2panda/compiler/core/
Dpandagen.h150 VReg AllocReg() in AllocReg()
158 VReg NextReg() const in NextReg()
277 void StoreAccumulator(const ir::AstNode *node, VReg vreg);
279 void LoadObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
281 void LoadObjByName(const ir::AstNode *node, VReg obj, const util::StringView &prop);
283 void StoreObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
284 void DefineOwnProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
285 void DefineClassPrivateField(const ir::AstNode *node, uint32_t level, uint32_t slot, VReg obj);
286 …void StoreOwnProperty(const ir::AstNode *node, VReg obj, const Operand &prop, bool nameSetting = f…
287 void DeleteObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop);
[all …]
Dpandagen.cpp288 VReg targetReg = totalRegs_; in CopyFunctionArguments()
295 MoveVreg(node, param->Vreg(), targetReg++); in CopyFunctionArguments()
405 VReg valueReg = AllocReg(); in StoreVar()
433 void PandaGen::StoreAccumulator(const ir::AstNode *node, VReg vreg) in StoreAccumulator() argument
435 ra_.Emit<Sta>(node, vreg); in StoreAccumulator()
453 void PandaGen::LoadObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop) in LoadObjProperty()
455 if (std::holds_alternative<VReg>(prop)) { in LoadObjProperty()
456 LoadAccumulator(node, std::get<VReg>(prop)); in LoadObjProperty()
470 void PandaGen::StoreObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop) in StoreObjProperty()
472 if (std::holds_alternative<VReg>(prop)) { in StoreObjProperty()
[all …]
/arkcompiler/ets_frontend/es2panda/compiler/function/
DfunctionBuilder.h75 …void SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg completionValue) co…
76 …void AsyncYield(const ir::AstNode *node, VReg value, VReg completionType, VReg completionValue) co…
78 VReg FunctionReg(const ir::ScriptFunction *node) const;
79 void HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completionValue);
83 VReg funcObj_ {};
87 void resumeGenerator(const ir::AstNode *node, VReg completionType, VReg completionValue) const;
DgeneratorFunctionBuilder.cpp26 VReg callee = FunctionReg(node); in Prepare()
27 VReg completionType = pg_->AllocReg(); in Prepare()
28 VReg completionValue = pg_->AllocReg(); in Prepare()
68 VReg value = pg_->AllocReg(); in Yield()
69 VReg done = pg_->AllocReg(); in Yield()
70 VReg completionType = pg_->AllocReg(); in Yield()
71 VReg completionValue = pg_->AllocReg(); in Yield()
DasyncGeneratorFunctionBuilder.cpp26 VReg callee = FunctionReg(node); in Prepare()
27 VReg completionType = pg_->AllocReg(); in Prepare()
28 VReg completionValue = pg_->AllocReg(); in Prepare()
44 VReg retVal = pg_->AllocReg(); in CleanUp()
59 VReg retVal = pg_->AllocReg(); in DirectReturn()
60 VReg canSuspend = pg_->AllocReg(); in DirectReturn()
83 VReg resumeType = pg_->AllocReg(); in ExplicitReturn()
84 VReg resumeValue = pg_->AllocReg(); in ExplicitReturn()
85 VReg canSuspend = pg_->AllocReg(); in ExplicitReturn()
98 VReg value = pg_->AllocReg(); in Yield()
[all …]
/arkcompiler/runtime_core/static_core/runtime/
Dcframe.cpp30 interpreter::VRegister CFrame::GetVRegValue(const VRegInfo &vreg, const compiler::CodeInfo &codeInf… in GetVRegValue() argument
33 switch (vreg.GetLocation()) { in GetVRegValue()
35 return GetVRegValueSlot<NEED_PACK>(vreg); in GetVRegValue()
38 return GetVRegValueRegister<NEED_PACK>(vreg, calleeStack); in GetVRegValue()
40 return GetVRegValueConstant<NEED_PACK>(vreg, codeInfo); in GetVRegValue()
46 template interpreter::VRegister CFrame::GetVRegValue<true>(const VRegInfo &vreg, const compiler::Co…
48 template interpreter::VRegister CFrame::GetVRegValue<false>(const VRegInfo &vreg, const compiler::C…
51 template void CFrame::SetVRegValue<true>(const VRegInfo &vreg, uint64_t value, SlotType **callee_st…
52 template void CFrame::SetVRegValue<false>(const VRegInfo &vreg, uint64_t value, SlotType **callee_s…
76 interpreter::VRegister CFrame::GetVRegValueSlot(const VRegInfo &vreg) const in GetVRegValueSlot()
[all …]
Dosr.cpp113 static int64_t GetValueFromVregAcc(const Frame *iframe, LanguageContext &ctx, VRegInfo &vreg) in GetValueFromVregAcc() argument
116 if (vreg.IsAccumulator()) { in GetValueFromVregAcc()
118 } else if (!vreg.IsSpecialVReg()) { in GetValueFromVregAcc()
119 ASSERT(vreg.GetVRegType() == VRegInfo::VRegType::VREG); in GetValueFromVregAcc()
120 value = iframe->GetVReg(vreg.GetIndex()).GetValue(); in GetValueFromVregAcc()
122 value = static_cast<int64_t>(ctx.GetOsrEnv(iframe, vreg)); in GetValueFromVregAcc()
125 if (vreg.IsObject()) { in GetValueFromVregAcc()
160 …for (auto vreg : codeInfo.GetVRegList(stackmap, mem::InternalAllocator<>::GetInternalAllocatorFrom… in PrepareOsrEntry() local
161 if (!vreg.IsLive()) { in PrepareOsrEntry()
164 int64_t value = GetValueFromVregAcc(iframe, ctx, vreg); in PrepareOsrEntry()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/function/
DfunctionBuilder.h73 …void SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg completionValue) co…
74 void AsyncYield(const ir::AstNode *node, VReg completionType, VReg completionValue) const;
76 VReg FunctionReg(const ir::ScriptFunction *node) const;
77 void HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completionValue);
82 VReg funcObj_ {};
87 void ResumeGenerator(const ir::AstNode *node, VReg completionType, VReg completionValue) const;
/arkcompiler/ets_frontend/es2panda/compiler/base/
Diterators.h43 VReg Method() const in Method()
48 VReg NextResult() const in NextResult()
70 VReg closed_;
72 VReg method_;
73 VReg iterator_;
74 VReg nextResult_;
86 VReg Done() const in Done()
91 VReg Result() const in Result()
103 VReg done_;
104 VReg result_;
/arkcompiler/ets_frontend/ets2panda/ir/
Dirnode.h20 #include "compiler/core/vReg.h"
41 // the least significant bit indicates vreg
61 const VReg *reg;
108 using Operand = std::variant<compiler::VReg, double, int64_t, util::StringView, Label *>;
128 ES2PANDA_ASSERT(reg != VReg::Invalid().GetIndex()); in MapRegister()
130 uint32_t regCount = VReg::REG_START - totalRegs; in MapRegister()
133 if (reg >= VReg::PARAM_START) { in MapRegister()
134 newReg = reg - VReg::PARAM_START + regCount; in MapRegister()
136 } else if (reg <= regCount + VReg::MANDATORY_PARAM_NUM) { in MapRegister()
137 newReg = VReg::REG_START - totalRegs + VReg::MANDATORY_PARAM_NUM + reg; in MapRegister()
[all …]
/arkcompiler/ets_frontend/ets2panda/compiler/base/
Diterators.h42 VReg Method() const in Method()
47 VReg NextResult() const in NextResult()
71 VReg method_;
72 VReg iterator_;
73 VReg nextResult_;
86 VReg Done() const in Done()
91 VReg Result() const in Result()
104 VReg done_;
105 VReg result_;
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dinst_builder.cpp45 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForCatch() local
47 defs_[current_bb_->GetId()][vreg] = catch_phi; in UpdateDefsForCatch()
59 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForLoopHead() local
60 auto def_inst = pred_defs[vreg]; in UpdateDefsForLoopHead()
64 phi->SetLinearNumber(vreg); in UpdateDefsForLoopHead()
66 (*current_defs_)[vreg] = phi; in UpdateDefsForLoopHead()
67 COMPILER_LOG(DEBUG, IR_BUILDER) << "create Phi(id=" << phi->GetId() << ") for r" << vreg in UpdateDefsForLoopHead()
68 << "(def id=" << pred_defs[vreg]->GetId() << ")"; in UpdateDefsForLoopHead()
86 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefs() local
98 value = defs_[pred_bb->GetId()][vreg]; in UpdateDefs()
[all …]
Dinst_builder.h54 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { variable
59 if (vreg == VREGS_AND_ARGS_COUNT) {
142 void UpdateDefinition(size_t vreg, Inst *inst) in UpdateDefinition() argument
144 ASSERT(vreg < current_defs_->size()); in UpdateDefinition()
145 COMPILER_LOG(DEBUG, IR_BUILDER) << "update def for r" << vreg << " from " in UpdateDefinition()
146 << ((*current_defs_)[vreg] != nullptr in UpdateDefinition()
147 ? std::to_string((*current_defs_)[vreg]->GetId()) in UpdateDefinition()
150 (*current_defs_)[vreg] = inst; in UpdateDefinition()
167 Inst *GetDefinition(size_t vreg) in GetDefinition() argument
169 ASSERT(vreg < current_defs_->size()); in GetDefinition()
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/ir_builder/
Dinst_builder.cpp48 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { local
54 if (vreg == vregsAndArgsCount_) {
56 } else if (vreg > vregsAndArgsCount_) {
179 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForCatch() local
181 defs_[currentBb_->GetId()][vreg] = catchPhi; in UpdateDefsForCatch()
193 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForLoopHead() local
194 auto defInst = predDefs[vreg]; in UpdateDefsForLoopHead()
197 if (vreg > vregsAndArgsCount_) { in UpdateDefsForLoopHead()
201 phi->SetLinearNumber(vreg); in UpdateDefsForLoopHead()
203 (*currentDefs_)[vreg] = phi; in UpdateDefsForLoopHead()
[all …]
/arkcompiler/runtime_core/libabckit/src/irbuilder_dynamic/
Dinst_builder_dyn.cpp49 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForCatch() local
51 defs_[currentBb_->GetId()][vreg] = catchPhi; in UpdateDefsForCatch()
62 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in UpdateDefsForLoopHead() local
63 auto defInst = predDefs[vreg]; in UpdateDefsForLoopHead()
67 phi->SetLinearNumber(vreg); in UpdateDefsForLoopHead()
69 (*currentDefs_)[vreg] = phi; in UpdateDefsForLoopHead()
76 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { in AddPhiToDifferent() local
88 value = defs_[predBb->GetId()][vreg]; in AddPhiToDifferent()
89 } else if (value != defs_[predBb->GetId()][vreg]) { in AddPhiToDifferent()
97 phi->SetLinearNumber(vreg); in AddPhiToDifferent()
[all …]
Dinst_builder_dyn.h54 for (size_t vreg = 0; vreg < GetVRegsCount(); vreg++) { variable
59 if (vreg == vregsAndArgsCount_) {
145 void UpdateDefinition(size_t vreg, ark::compiler::Inst *inst) in UpdateDefinition() argument
147 ASSERT(vreg < currentDefs_->size()); in UpdateDefinition()
148 (*currentDefs_)[vreg] = inst; in UpdateDefinition()
156 ark::compiler::Inst *GetDefinition(size_t vreg) in GetDefinition() argument
158 ASSERT(vreg < currentDefs_->size()); in GetDefinition()
159 ASSERT((*currentDefs_)[vreg] != nullptr); in GetDefinition()
161 if (vreg >= currentDefs_->size() || (*currentDefs_)[vreg] == nullptr) { in GetDefinition()
163 LIBABCKIT_LOG(DEBUG) << "GetDefinition failed for verg " << vreg << std::endl; in GetDefinition()
[all …]

1234567891011