OpenASIP
2.2
Loading...
Searching...
No Matches
src
applibs
Scheduler
Algorithms
BFPostpassLoopDRE.hh
Go to the documentation of this file.
1
/*
2
Copyright (c) 2002-2014 Tampere University.
3
4
This file is part of TTA-Based Codesign Environment (TCE).
5
6
Permission is hereby granted, free of charge, to any person obtaining a
7
copy of this software and associated documentation files (the "Software"),
8
to deal in the Software without restriction, including without limitation
9
the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
and/or sell copies of the Software, and to permit persons to whom the
11
Software is furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
DEALINGS IN THE SOFTWARE.
23
*/
24
25
/**
26
* @file BFPostpassLoopDRE.hh
27
*
28
* Declaration of BFPostpassLoopDRE class
29
*
30
* Performs a dead-result elimination of a loop-bypassed move.
31
* The move which is eliminated from the loop body is still left
32
* in the epilog, to have correct value for the register after
33
* the loop.
34
*
35
* This class is called in the postpass-bypass phase.
36
*
37
* @author Heikki Kultala 2014-2020(heikki.kultala-no.spam-tuni.fi)
38
* @note rating: red
39
*/
40
41
#ifndef TTA_BF_POSTPASS_LOOP_DRE_HH
42
#define TTA_BF_POSTPASS_LOOP_DRE_HH
43
44
#include "
BFOptimization.hh
"
45
46
class
BFPostpassLoopDRE
:
public
BFOptimization
{
47
public
:
48
BFPostpassLoopDRE
(
BF2Scheduler
& sched,
MoveNode
& mn,
int
srcCycle) :
49
BFOptimization
(sched),
mn_
(mn),
srcCycle_
(srcCycle) {}
50
bool
operator()
()
override
;
51
void
undoOnlyMe
()
override
;
52
private
:
53
54
bool
dreAllowed
();
55
MoveNode
&
mn_
;
56
MoveNode
*
prologMN_
;
57
int
srcCycle_
;
58
};
59
60
#endif
BFOptimization.hh
BF2Scheduler
Definition
BF2Scheduler.hh:74
BFOptimization
Definition
BFOptimization.hh:73
BFPostpassLoopDRE
Definition
BFPostpassLoopDRE.hh:46
BFPostpassLoopDRE::operator()
bool operator()() override
Definition
BFPostpassLoopDRE.cc:54
BFPostpassLoopDRE::srcCycle_
int srcCycle_
Definition
BFPostpassLoopDRE.hh:57
BFPostpassLoopDRE::prologMN_
MoveNode * prologMN_
Definition
BFPostpassLoopDRE.hh:56
BFPostpassLoopDRE::mn_
MoveNode & mn_
Definition
BFPostpassLoopDRE.hh:55
BFPostpassLoopDRE::undoOnlyMe
void undoOnlyMe() override
Definition
BFPostpassLoopDRE.cc:111
BFPostpassLoopDRE::BFPostpassLoopDRE
BFPostpassLoopDRE(BF2Scheduler &sched, MoveNode &mn, int srcCycle)
Definition
BFPostpassLoopDRE.hh:48
BFPostpassLoopDRE::dreAllowed
bool dreAllowed()
Definition
BFPostpassLoopDRE.cc:88
MoveNode
Definition
MoveNode.hh:65
Generated by
1.9.8