OpenASIP
2.0
src
applibs
Scheduler
Algorithms
ScheduleEstimator.hh
Go to the documentation of this file.
1
/*
2
Copyright (c) 2002-2013 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
* @file ScheduleEstimator.hh
26
*
27
* Declaration of ScheduleEstimator class.
28
*
29
* This class tries to estimate the worst possible cycle count
30
* for a basic block.
31
*
32
* @author Heikki Kultala 2019 (hkultala-no.spam-tuni.fi)
33
* @note rating: red
34
*/
35
36
#include "
ControlFlowGraphPass.hh
"
37
38
namespace
TTAProgram
{
39
class
BasicBlock;
40
}
41
42
namespace
TTAMachine
{
43
class
Machine;
44
}
45
46
class
ScheduleEstimator
:
public
ControlFlowGraphPass
{
47
48
public
:
49
ScheduleEstimator
(
InterPassData
& data) :
ControlFlowGraphPass
(data) {}
50
51
virtual
void
52
handleControlFlowGraph
(
53
ControlFlowGraph
& cfg,
const
TTAMachine::Machine
& mach)
override
;
54
55
static
int
maximumSizeOfBB
(
56
TTAProgram::BasicBlock
& bb,
const
TTAMachine::Machine
& mach);
57
58
virtual
std::string
shortDescription
()
const
{
return
"Estimates max schedule length"
; }
59
};
TTAProgram
Definition:
Estimator.hh:65
ScheduleEstimator::ScheduleEstimator
ScheduleEstimator(InterPassData &data)
Definition:
ScheduleEstimator.hh:49
ScheduleEstimator::shortDescription
virtual std::string shortDescription() const
Definition:
ScheduleEstimator.hh:58
InterPassData
Definition:
InterPassData.hh:48
TTAProgram::BasicBlock
Definition:
BasicBlock.hh:85
ScheduleEstimator::maximumSizeOfBB
static int maximumSizeOfBB(TTAProgram::BasicBlock &bb, const TTAMachine::Machine &mach)
Definition:
ScheduleEstimator.cc:49
ControlFlowGraphPass.hh
ControlFlowGraphPass
Definition:
ControlFlowGraphPass.hh:50
TTAMachine
Definition:
Assembler.hh:48
ScheduleEstimator
Definition:
ScheduleEstimator.hh:46
ScheduleEstimator::handleControlFlowGraph
virtual void handleControlFlowGraph(ControlFlowGraph &cfg, const TTAMachine::Machine &mach) override
Definition:
ScheduleEstimator.cc:85
ControlFlowGraph
Definition:
ControlFlowGraph.hh:100
TTAMachine::Machine
Definition:
Machine.hh:73
Generated by
1.8.17