Home
last modified time | relevance | path

Searched refs:loop (Results 1 – 25 of 466) sorted by relevance

12345678910>>...19

/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/
Dloop_transform.h32 virtual bool TransformLoop(Loop *loop) = 0;
45 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunLoopsVisitor() local
46 LoopVisitLRN(loop, markerLoopExit); in RunLoopsVisitor()
50 bool IsSupportedLoopType(const Loop *loop) in IsSupportedLoopType() argument
52 if (loop->IsIrreducible()) { in IsSupportedLoopType()
53 … COMPILER_LOG(DEBUG, LOOP_TRANSFORM) << "Irreducible loop isn't visited, id = " << loop->GetId(); in IsSupportedLoopType()
56 if (loop->IsOsrLoop()) { in IsSupportedLoopType()
57 … COMPILER_LOG(DEBUG, LOOP_TRANSFORM) << "OSR entry isn't visited, loop id = " << loop->GetId(); in IsSupportedLoopType()
60 if (loop->IsTryCatchLoop()) { in IsSupportedLoopType()
61 …COMPILER_LOG(DEBUG, LOOP_TRANSFORM) << "Try-catch loop isn't visited, loop id = " << loop->GetId(); in IsSupportedLoopType()
[all …]
Dredundant_loop_elimination.cpp36 BasicBlock *RedundantLoopElimination::IsRedundant(Loop *loop) in IsRedundant() argument
39 for (auto block : loop->GetBlocks()) { in IsRedundant()
42 if (succ->GetLoop() != loop) { in IsRedundant()
58 if (user.GetInst()->GetBasicBlock()->GetLoop() != loop) { in IsRedundant()
66 if (!CountableLoopParser(*loop).Parse().has_value()) { in IsRedundant()
72 void RedundantLoopElimination::DeleteLoop(Loop *loop, BasicBlock *outsideSucc) const in DeleteLoop() argument
74 auto header = loop->GetHeader(); in DeleteLoop()
75 auto preHeader = loop->GetPreHeader(); in DeleteLoop()
76 ASSERT(loop->GetBackEdges().size() == 1); in DeleteLoop()
87 for (auto block : loop->GetBlocks()) { in DeleteLoop()
[all …]
Dlicm.cpp43 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() local
44 LoopSearchDFS(loop); in RunImpl()
68 void Licm::LoopSearchDFS(Loop *loop) in LoopSearchDFS() argument
70 ASSERT(loop != nullptr); in LoopSearchDFS()
71 for (auto innerLoop : loop->GetInnerLoops()) { in LoopSearchDFS()
74 if (IsLoopVisited(*loop)) { in LoopSearchDFS()
75 VisitLoop(loop); in LoopSearchDFS()
79 bool Licm::IsLoopVisited(const Loop &loop) const in IsLoopVisited()
81 if (loop.IsIrreducible()) { in IsLoopVisited()
82 … COMPILER_LOG(DEBUG, LOOP_TRANSFORM) << "Irreducible loop isn't visited, id = " << loop.GetId(); in IsLoopVisited()
[all …]
Dloop_idioms.cpp40 bool LoopIdioms::TransformLoop(Loop *loop) in TransformLoop() argument
42 if (TryTransformArrayInitIdiom(loop)) { in TransformLoop()
78 bool AllUsesWithinLoop(Inst *inst, Loop *loop) in AllUsesWithinLoop() argument
81 if (user.GetInst()->GetBasicBlock()->GetLoop() != loop) { in AllUsesWithinLoop()
88 bool CanReplaceLoop(Loop *loop, Marker marker) in CanReplaceLoop() argument
90 ASSERT(loop->GetBlocks().size() == 1); in CanReplaceLoop()
91 auto block = loop->GetHeader(); in CanReplaceLoop()
104 bool IsLoopContainsArrayInitIdiom(StoreInst *store, Loop *loop, CountableLoopInfo &loopInfo) in IsLoopContainsArrayInitIdiom() argument
109 AllUsesWithinLoop(storeIdx, loop) && AllUsesWithinLoop(loopInfo.update, loop) && in IsLoopContainsArrayInitIdiom()
110 AllUsesWithinLoop(loopInfo.ifImm->GetInput(0).GetInst(), loop); in IsLoopContainsArrayInitIdiom()
[all …]
Dloop_peeling.cpp106 bool LoopPeeling::TransformLoop(Loop *loop) in TransformLoop() argument
108 ASSERT(loop->GetBackEdges().size() == 1); in TransformLoop()
109 ASSERT(loop->GetHeader()->GetLastInst()->GetOpcode() == Opcode::IfImm || in TransformLoop()
110 loop->GetHeader()->GetLastInst()->GetOpcode() == Opcode::If); in TransformLoop()
111 auto header = loop->GetHeader(); in TransformLoop()
116 auto backEdge = loop->GetBackEdges()[0]; in TransformLoop()
117 InsertPreLoop(loop); in TransformLoop()
121 COMPILER_LOG(DEBUG, LOOP_TRANSFORM) << "Loop was peeled, id = " << loop->GetId(); in TransformLoop()
122 …GetGraph()->GetEventWriter().EventLoopPeeling(loop->GetId(), header->GetGuestPc(), backEdge->GetGu… in TransformLoop()
128 void LoopPeeling::InsertPreLoop(Loop *loop) in InsertPreLoop() argument
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/analysis/
Dloop_analyzer.cpp30 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() local
31 FindAndInsertPreHeaders(loop); in RunImpl()
52 …auto loop = GetGraph()->GetAllocator()->New<Loop>(GetGraph()->GetAllocator(), loopHeader, loopCoun… in CreateNewLoop() local
53 loop->AppendBlock(loopHeader); in CreateNewLoop()
54 return loop; in CreateNewLoop()
101 auto loop = header->GetLoop(); in ProcessNewBackEdge() local
102 if (loop == nullptr) { in ProcessNewBackEdge()
103 loop = CreateNewLoop(header); in ProcessNewBackEdge()
106 loop->AppendBackEdge(backEdge); in ProcessNewBackEdge()
108 loop->SetIsIrreducible(true); in ProcessNewBackEdge()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/analysis/
Dloop_analyzer.cpp30 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() local
31 FindAndInsertPreHeaders(loop); in RunImpl()
52 …auto loop = GetGraph()->GetAllocator()->New<Loop>(GetGraph()->GetAllocator(), loop_header, loop_co… in CreateNewLoop() local
53 loop->AppendBlock(loop_header); in CreateNewLoop()
54 return loop; in CreateNewLoop()
101 auto loop = header->GetLoop(); in ProcessNewBackEdge() local
102 if (loop == nullptr) { in ProcessNewBackEdge()
103 loop = CreateNewLoop(header); in ProcessNewBackEdge()
106 loop->AppendBackEdge(back_edge); in ProcessNewBackEdge()
108 loop->SetIsIrreducible(true); in ProcessNewBackEdge()
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dloop_analyzer_new_test.cpp84 Loop loop(graph->GetAllocator(), bb->GetSuccessor(0), 1); in __anonb00bd9110202() local
86 EXPECT_FALSE(loop.IsInside(&other)); in __anonb00bd9110202()
88 loop.SetOuterLoop(&other); in __anonb00bd9110202()
89 EXPECT_TRUE(loop.IsInside(&other)); in __anonb00bd9110202()
118 Loop loop(graph->GetAllocator(), bb->GetSuccessor(0), 1); in __anonb00bd9110302() local
119 loop.AppendBackEdge(bb->GetSuccessor(1)); in __anonb00bd9110302()
120 loop.GetBackEdges()[0]->AddSucc(bb->GetSuccessor(0)); in __anonb00bd9110302()
121 EXPECT_EQ(loop.GetBackEdges()[0]->GetSuccBlockIndex(loop.GetHeader()), 1); in __anonb00bd9110302()
122 EXPECT_NE(GetLoopOutsideSuccessor(&loop), nullptr); in __anonb00bd9110302()
123 EXPECT_FALSE(loop.IsRoot()); in __anonb00bd9110302()
[all …]
/arkcompiler/runtime_core/static_core/compiler/docs/
Dloop_unrolling.md4 `Loop unrolling` optimization increases loop body by copying instructions of the original loop body.
8 Increase number of instructions for each loop iteration, reduce branch penalty.
15 * Loop Peeling (to make loop with exit-point from backedge)
22 * loop is not irreducible;
23 * loop-header is not OSR-entry;
25 * loop-backedge is a single loop-exit point;
30 **Instructions limit** - the maximum number of loop instructions after its unrolling;
32 **Unroll factor** - the number of loop body copies including the original one;
38 …is countable if it contains compare between loop-index instruction and test-instruction defined ou…
54 There are 3 stages of unrolling loop without side-exits:
[all …]
Dloop_peeling.md4 … optimization modifies the loops with exit-point at loop-header to the loops with exit-point at lo…
8 Simplify the loop and allow further loop optimizations.
19 - loop is not irreducible;
20 - loop-header is not OSR-entry;
22 - loop-header is a single loop-exit point;
37 ### 1. Insert pre-loop
42 [pre-loop]--------\
53 Pre-loop basic block is a loop-header clone with all instructions, excluding `SafePoint`.
55 ### 2. Move exit-point form the loop-header to the loop-backedge block
60 [pre-loop]--------\
[all …]
/arkcompiler/runtime_core/static_core/compiler/optimizer/ir/
Dloop_unswitcher.cpp31 Loop *LoopUnswitcher::UnswitchLoop(Loop *loop, Inst *inst) in UnswitchLoop() argument
33 ASSERT(loop != nullptr && !loop->IsRoot()); in UnswitchLoop()
34 …ASSERT_PRINT(IsLoopSingleBackEdgeExitPoint(loop), "Cloning blocks doesn't have single entry/exit p… in UnswitchLoop()
35 ASSERT(loop->GetPreHeader() != nullptr); in UnswitchLoop()
36 ASSERT(!loop->IsIrreducible()); in UnswitchLoop()
37 ASSERT(!loop->IsOsrLoop()); in UnswitchLoop()
38 if (loop->GetPreHeader()->GetSuccsBlocks().size() != MAX_SUCCS_NUM) { in UnswitchLoop()
45 auto unswitchData = PrepareLoopToUnswitch(loop); in UnswitchLoop()
48 for (auto bb : loop->GetBlocks()) { in UnswitchLoop()
66 auto cloneLoop = GetClone(loop->GetHeader())->GetLoop(); in UnswitchLoop()
[all …]
Dgraph_cloner.cpp91 void GraphCloner::CopyLoop(Loop *loop, Loop *clonedLoop) in CopyLoop() argument
93 if (!loop->IsRoot() && !loop->IsIrreducible() && !loop->IsTryCatchLoop()) { in CopyLoop()
94 ASSERT(GetClone(loop->GetHeader()) == clonedLoop->GetHeader()); in CopyLoop()
95 clonedLoop->SetPreHeader(GetClone(loop->GetPreHeader())); in CopyLoop()
97 for (auto block : loop->GetBlocks()) { in CopyLoop()
104 for (auto backEdge : loop->GetBackEdges()) { in CopyLoop()
107 clonedLoop->SetIsIrreducible(loop->IsIrreducible()); in CopyLoop()
108 clonedLoop->SetIsInfinite(loop->IsInfinite()); in CopyLoop()
111 for (const auto &innerLoop : loop->GetInnerLoops()) { in CopyLoop()
176 BasicBlock *GraphCloner::CreateResolverBlock(Loop *loop, BasicBlock *backEdge) in CreateResolverBlock() argument
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.kinds_of_contexts/01.assignment_and_call_contexts/
Dunboxing_call.ets24 public fld_{{loop.index}}: {{c.type}};
27 …public constructor({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }…
29 this.fld_{{loop.index}} = p{{loop.index}};
33 …public foo({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }}{% endf…
36 this.fld_{{loop.index}} != p{{loop.index}}{{ " ||" if not loop.last }}
48 let v{{loop.index}}: {{c.ref_type}} = {{v|safe}};
51 …let c: A = new A({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
52 return c.foo({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
Dboxing_call.ets24 public fld_{{loop.index}}: {{c.type}};
27 …public constructor({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }…
29 this.fld_{{loop.index}} = p{{loop.index}};
33 …public foo({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }}{% endf…
36 this.fld_{{loop.index}}.unboxed() != p{{loop.index}}.unboxed(){{ " ||" if not loop.last }}
48 let v{{loop.index}}: {{c.prim_type}} = {{v|safe}};
51 …let c: A = new A({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
52 return c.foo({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
Dunboxing2_call.ets24 public fld_{{loop.index}}: {{c.type}};
27 …public constructor({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }…
29 this.fld_{{loop.index}} = p{{loop.index}};
33 …public foo({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }}{% endf…
36 this.fld_{{loop.index}} != p{{loop.index}}{{ " ||" if not loop.last }}
48 let v{{loop.index}}: {{c.ref_type}} = {{v|safe}};
51 …let c: A = new A({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
52 return c.foo({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
Dboxing2_call.ets24 public fld_{{loop.index}}: {{c.type}};
27 …public constructor({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }…
29 this.fld_{{loop.index}} = p{{loop.index}};
33 …public foo({% for v in c['values'] %}p{{loop.index}}: {{c.type}}{{ ", " if not loop.last }}{% endf…
36 this.fld_{{loop.index}} === null {{ " ||" if not loop.last }}
48 let v{{loop.index}}: {{c.prim_type}} = {{v|safe}};
51 …let c: A = new A({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
52 return c.foo({% for v in c['values'] %}v{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
Didentity_call.ets29 public fld_{{loop.index}}: {{t.type|safe}};
34 p{{loop.index}}: {{t.type|safe}}{{ ", " if not loop.last }}
38 this.fld_{{loop.index}} = p{{loop.index}};
44 p{{loop.index}}: {{t.type|safe}}{{ ", " if not loop.last }}
49 this.fld_{{loop.index}} {{t.op}} p{{loop.index}}{{ " ||" if not loop.last }}
60 let c: A = new A({% for t in c['types'] %}{{t.expr|safe}}{{ ", " if not loop.last }}{% endfor %});
61 …return c.foo({% for t in c['types'] %}c.fld_{{loop.index}}{{ ", " if not loop.last }}{% endfor %});
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/
Dloop.cpp23 static void PrintLoopInfo(const LoopHierarchy &loop) in PrintLoopInfo() argument
25 LogInfo::MapleLogger() << "header " << loop.GetHeader()->GetId(); in PrintLoopInfo()
26 if (loop.otherLoopEntries.size()) { in PrintLoopInfo()
28 for (auto en : loop.otherLoopEntries) { in PrintLoopInfo()
32 if (loop.GetOuterLoop() != nullptr) { in PrintLoopInfo()
33 LogInfo::MapleLogger() << " parent " << loop.GetOuterLoop()->GetHeader()->GetId(); in PrintLoopInfo()
36 for (auto *bb : loop.GetBackedge()) { in PrintLoopInfo()
40 for (auto *bb : loop.GetLoopMembers()) { in PrintLoopInfo()
43 if (!loop.GetInnerLoops().empty()) { in PrintLoopInfo()
45 for (auto *inner : loop.GetInnerLoops()) { in PrintLoopInfo()
[all …]
/arkcompiler/runtime_core/static_core/libllvmbackend/transforms/
Dpipeline_irtoc.cfg28 loop-simplify, # Canonicalize natural loops
31 loop-unroll<O2;no-upperbound;peeling;partial>
70 loop-simplify, # Canonicalize natural loops
72 loop-mssa(
73 loop-instsimplify,
74 loop-simplifycfg,
76 loop-rotate, # Rotate Loops
78 simple-loop-unswitch # Unswitch loops
82 loop-simplify, # Canonicalize natural loops
84 loop-mssa(
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/js/lexicalEnv/forUpdate/
Dfor-update-continue-break-head-decl-head-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true
Dfor-update-continue-break-head-decl-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true
Dfor-update-continue-break-head-body-decl-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true
Dfor-update-continue-break-body-decl-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true
Dfor-update-continue-break-head-body-decl-head-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true
Dfor-update-continue-break-body-decl-head-body-outer-expected.txt1 check enter loop, len == 6: true
2 check enter loop, len == 6: true
3 check enter loop, len == 6: true
4 check enter loop, len == 6: true
5 check enter loop, len == 6: true
6 check exit loop, len == 6: true

12345678910>>...19