OpenASIP 2.2
Loading...
Searching...
No Matches
OperationPoolPimpl.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 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 OperationPoolPimpl.hh
26 *
27 * Declaration of OperationPoolPimpl (private implementation) class.
28 *
29 * @author Viljami Korhonen 2008 (viljami.korhonen-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#ifndef OPERATIONPOOL_PIMPL_HH
34#define OPERATIONPOOL_PIMPL_HH
35
36#include <string>
37#include <map>
38#include "tce_config.h"
39
40class OperationPool;
43class OperationIndex;
44class Operation;
45namespace llvm {
46 class MCInstrDesc;
47 class MCInstrInfo;
48}
49
50/**
51 * A private implementation class for OperationPool
52 */
54public:
55 friend class OperationPool;
57
58 Operation& operation(const char* name);
60 bool sharesState(const Operation& op);
61
62 static void cleanupCache();
63
64 static void setLLVMTargetInstrInfo(const llvm::MCInstrInfo* tid) {
66 }
67private:
69
70 /// Container for operations indexed by their names.
71 typedef std::map<std::string, Operation*> OperationTable;
72
73 /// Copying not allowed.
75 /// Assignment not allowed.
77 Operation* loadFromLLVM(const llvm::MCInstrDesc& tid);
78 /// Operation pool uses this to load behavior models of the operations.
80 /// Indexed table used to find out which operation module contains the
81 /// given operation.
83
85
86 /// Contains all operations that have been already requested by the client.
88 /// Contains all operation behavior proxies.
89 static std::vector<OperationBehaviorProxy*> proxies_;
90 /// If this is set, OSAL data is loaded from the TargetInstrInfo
91 /// instead of .opp XML files. Used when calling the TCE scheduler from
92 /// non-TTA LLVM targets.
93 static const llvm::MCInstrInfo* llvmTargetInstrInfo_;
94};
95
96#endif
97
Operation & operation(const char *name)
static OperationIndex * index_
Indexed table used to find out which operation module contains the given operation.
std::map< std::string, Operation * > OperationTable
Container for operations indexed by their names.
static OperationTable operationCache_
Contains all operations that have been already requested by the client.
static std::vector< OperationBehaviorProxy * > proxies_
Contains all operation behavior proxies.
Operation * loadFromLLVM(const llvm::MCInstrDesc &tid)
static OperationBehaviorLoader * loader_
Operation pool uses this to load behavior models of the operations.
OperationSerializer serializer_
bool sharesState(const Operation &op)
OperationPoolPimpl & operator=(const OperationPoolPimpl &)
Assignment not allowed.
OperationPoolPimpl(const OperationPoolPimpl &)
Copying not allowed.
OperationIndex & index()
static const llvm::MCInstrInfo * llvmTargetInstrInfo_
If this is set, OSAL data is loaded from the TargetInstrInfo instead of .opp XML files....
static void setLLVMTargetInstrInfo(const llvm::MCInstrInfo *tid)