Home
last modified time | relevance | path

Searched full:loop (Results 1 – 25 of 473) sorted by relevance

12345678910>>...19

/arkcompiler/runtime_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, marker_loop_exit); 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) const in IsRedundant()
39 for (auto block : loop->GetBlocks()) { in IsRedundant()
40 // check that loop have only one exit and one outside blocks in IsRedundant()
42 if (succ->GetLoop() != loop) { in IsRedundant()
50 // check that loop doesn't contains not redundant insts in IsRedundant()
57 if (user.GetInst()->GetBasicBlock()->GetLoop() != loop) { in IsRedundant()
63 // Check that loop is finite. in IsRedundant()
65 if (!CountableLoopParser(*loop).Parse().has_value()) { in IsRedundant()
71 void RedundantLoopElimination::DeleteLoop(Loop *loop, BasicBlock *outside_succ) const in DeleteLoop() argument
73 auto header = loop->GetHeader(); in DeleteLoop()
[all …]
Dloop_peeling.cpp26 * Loop-peeling optimization works with a loops with the following requirements:
27 * - loop is not irreducible;
29 * - loop-header is a single loop-exit point;
40 * 1 stage - insert pre-loop which is an if-block:
45 * [pre-loop]--------\
61 * [pre-loop]--------\
105 bool LoopPeeling::TransformLoop(Loop *loop) in TransformLoop() argument
107 ASSERT(loop->GetBackEdges().size() == 1); in TransformLoop()
108 ASSERT(loop->GetHeader()->GetLastInst()->GetOpcode() == Opcode::IfImm || in TransformLoop()
109 loop->GetHeader()->GetLastInst()->GetOpcode() == Opcode::If); in TransformLoop()
[all …]
Dloop_unroll.cpp44 bool LoopUnroll::HasPreHeaderCompare(Loop *loop, const CountableLoopInfo &loop_info) in HasPreHeaderCompare() argument
46 auto pre_header = loop->GetPreHeader(); in HasPreHeaderCompare()
50 auto back_edge = loop->GetBackEdges()[0]; in HasPreHeaderCompare()
112 bool LoopUnroll::TransformLoop(Loop *loop) in TransformLoop() argument
114 auto unroll_params = GetUnrollParams(loop); in TransformLoop()
117 << "Loop isn't unrolled since it contains calls. Loop id = " << loop->GetId(); in TransformLoop()
124 …<< "Loop isn't unrolled due to unroll factor = " << unroll_factor << ". Loop id = " << loop->GetId… in TransformLoop()
129 auto loop_parser = CountableLoopParser(*loop); in TransformLoop()
132 HasPreHeaderCompare(loop, loop_info.value())) { in TransformLoop()
133 auto clone_loop = graph_cloner.CloneLoop(loop); in TransformLoop()
[all …]
Dloop_unroll.h24 * Loop unroll optimization
25 * @param inst_limit - the maximum number of loop instructions after its unrolling
26 * @param unroll_factor - the number of loop body copies including the original one
56 bool TransformLoop(Loop *loop) override;
57 UnrollParams GetUnrollParams(Loop *loop);
60 bool HasPreHeaderCompare(Loop *loop, const CountableLoopInfo &loop_info);
/arkcompiler/runtime_core/compiler/optimizer/analysis/
Dloop_analyzer.cpp30 for (auto loop : GetGraph()->GetRootLoop()->GetInnerLoops()) { in RunImpl() local
31 FindAndInsertPreHeaders(loop); in RunImpl()
50 Loop *LoopAnalyzer::CreateNewLoop(BasicBlock *loop_header) in CreateNewLoop()
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()
60 …auto root_loop = GetGraph()->GetAllocator()->New<Loop>(GetGraph()->GetAllocator(), nullptr, loop_c… in CreateRootLoop()
95 * Create new Loop if it doesn't exists.
96 * Append information about its header, back edge and check if this loop is irreducible.
97 * Loop is irreducible when its header doesn't dominate back edge.
[all …]
Dloop_analyzer.h26 class Loop final {
28 Loop(ArenaAllocator *allocator, BasicBlock *header, uint32_t id) in Loop() function
37 DEFAULT_MOVE_SEMANTIC(Loop);
38 DEFAULT_COPY_SEMANTIC(Loop);
39 ~Loop() = default;
41 bool operator==(const Loop &other) const
103 // 1. is not a header of the loop
104 // 2. is not a back-edge of the loop
105 // 3. is not a pre-header of any inner loop
116 void AppendInnerLoop(Loop *inner_loop) in AppendInnerLoop()
[all …]
/arkcompiler/runtime_core/compiler/docs/
Dloop_unrolling.md1 # Loop Unrolling
4 `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.
12 * Loop Analysis
15 * Loop Peeling (to make loop with exit-point from backedge)
20 `Loop unrolling` modifies loops with the following requirements:
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;
[all …]
Dredundant_loop_elimination_doc.md1 # Redundant Loop Elimination
3 **Redundant Loop Elimination(RLE)** - optimization which find and remove useless loops.
7 * Loop analysis
10 For each loop check that:
12 * Loop doesn't contain instructions with side effect (ex. call instructions).
13 * Loop doesn't contain instructions with users out of the loop.
15 If all checks are true then loop is removing:
16 1. Loop pre-header connect with loop outer block.
17 2. Loop inner blocks disconnect from graph.
20 LoopVisitLRN(Loop* loop) {
[all …]
Dloop_peeling.md1 # Loop Peeling
4 `Loop peeling` optimization modifies the loops with exit-point at loop-header to the loops with exi…
8 Simplify the loop and allow further loop optimizations.
12 * Loop Analysis
18 `Loop peeling` modifies loops with the following requirements:
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]--------\
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Dgraph_cloner.h30 bool IsLoopSingleBackEdgeExitPoint(Loop *loop);
41 * - Clone loop;
42 * - Unroll loop;
43 * - Peel loop;
70 Loop *CloneLoop(Loop *loop);
71 bool IsLoopClonable(Loop *loop, size_t inst_limit);
74 * Make equal to the `factor` number of clones of loop body and insert them into the graph
76 * /----[pre-loop]
79 * | [loop-body]<----\
91 * /----[pre-loop]
[all …]
Dgraph_cloner.cpp74 // Clone loops if analysis is valid to check loop-tree in CloneAnalyses()
92 void GraphCloner::CopyLoop(Loop *loop, Loop *cloned_loop) in CopyLoop() argument
94 if (!loop->IsRoot() && !loop->IsIrreducible() && !loop->IsTryCatchLoop()) { in CopyLoop()
95 ASSERT(GetClone(loop->GetHeader()) == cloned_loop->GetHeader()); in CopyLoop()
96 cloned_loop->SetPreHeader(GetClone(loop->GetPreHeader())); in CopyLoop()
98 for (auto block : loop->GetBlocks()) { in CopyLoop()
105 for (auto back_edge : loop->GetBackEdges()) { in CopyLoop()
108 cloned_loop->SetIsIrreducible(loop->IsIrreducible()); in CopyLoop()
109 cloned_loop->SetIsInfinite(loop->IsInfinite()); in CopyLoop()
112 for (const auto &inner_loop : loop->GetInnerLoops()) { in CopyLoop()
[all …]
/arkcompiler/runtime_core/tests/regression/
Dloop-unroll.pa25 loop:
30 jmp loop
46 loop:
51 jmp loop
60 loop:
65 jmp loop
81 loop:
89 jmp loop
99 loop:
107 jmp loop
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/js/lexicalEnv/
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
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-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-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-body-decl-head-body-outer-expected.txt1 check enter loop, len == 5: true
2 check enter loop, len == 5: true
3 check enter loop, len == 5: true
4 check enter loop, len == 5: true
5 check exit loop, len == 5: true
Dfor-update-continue-return-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
Dfor-update-continue-head-decl-body-outer-expected.txt1 check enter loop, len == 5: true
2 check enter loop, len == 5: true
3 check enter loop, len == 5: true
4 check enter loop, len == 5: true
5 check exit loop, len == 5: true
Dfor-update-continue-return-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
Dfor-update-continue-body-decl-body-outer-expected.txt1 check enter loop, len == 5: true
2 check enter loop, len == 5: true
3 check enter loop, len == 5: true
4 check enter loop, len == 5: true
5 check exit loop, len == 5: true
/arkcompiler/runtime_core/tests/benchmarks/
Dbitops-nsieve-bits.pa26 movi v5, 0 #loop counter
30 loop:
38 jmp loop
65 movi v0, 2 #loop counter
67 loop:
83 jmp loop
115 movi v1, 0 #loop counter
117 loop:
123 jmp loop

12345678910>>...19