OpenASIP  2.0
LLVMTCEScheduler.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2011 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 LLVMTCEScheduler.hh
26  *
27  *
28  * Wrapper for TCE scheduler to be called from LLVM codegen.
29  *
30  * @author Pekka Jääskeläinen 2011
31  * @note rating: red
32  */
33 
34 #ifndef LLVM_TCE_SCHEDULER_H
35 #define LLVM_TCE_SCHEDULER_H
36 
37 #include <llvm/CodeGen/MachineFunctionPass.h>
38 
39 #include "Machine.hh"
40 #include "LLVMTCEIRBuilder.hh"
41 #include "InterPassData.hh"
42 
43 namespace llvm {
44 
45  extern "C" FunctionPass* createTCESchedulerPass(const char* target);
46 
47  class LLVMTCEScheduler : public MachineFunctionPass {
48  public:
49  static char ID;
51  virtual ~LLVMTCEScheduler() {}
52  virtual bool runOnMachineFunction(MachineFunction &MF);
53  private:
54  virtual bool doInitialization(Module& m);
58  llvm::Module* mod_;
59  };
60 }
61 
62 #endif
llvm
Definition: InlineAsmParser.hh:49
llvm::LLVMTCEScheduler::mod_
llvm::Module * mod_
Definition: LLVMTCEScheduler.hh:58
llvm::LLVMTCEScheduler::tceMachine_
TTAMachine::Machine * tceMachine_
Definition: LLVMTCEScheduler.hh:55
llvm::LLVMTCEScheduler::~LLVMTCEScheduler
virtual ~LLVMTCEScheduler()
Definition: LLVMTCEScheduler.hh:51
llvm::LLVMTCEScheduler::doInitialization
virtual bool doInitialization(Module &m)
Definition: LLVMTCEScheduler.cc:116
llvm::LLVMTCEScheduler::LLVMTCEScheduler
LLVMTCEScheduler()
Definition: LLVMTCEScheduler.cc:79
llvm::LLVMTCEScheduler
Definition: LLVMTCEScheduler.hh:47
llvm::LLVMTCEIRBuilder
Definition: LLVMTCEIRBuilder.hh:60
InterPassData
Definition: InterPassData.hh:48
Machine.hh
llvm::createTCESchedulerPass
FunctionPass * createTCESchedulerPass(const char *)
Definition: LLVMTCEScheduler.cc:142
llvm::LLVMTCEScheduler::runOnMachineFunction
virtual bool runOnMachineFunction(MachineFunction &MF)
Definition: LLVMTCEScheduler.cc:121
LLVMTCEIRBuilder.hh
llvm::LLVMTCEScheduler::tceIRBuilder_
LLVMTCEIRBuilder * tceIRBuilder_
Definition: LLVMTCEScheduler.hh:56
InterPassData.hh
llvm::LLVMTCEScheduler::ID
static char ID
Definition: LLVMTCEScheduler.hh:49
llvm::LLVMTCEScheduler::interPassData_
InterPassData * interPassData_
Definition: LLVMTCEScheduler.hh:57
TTAMachine::Machine
Definition: Machine.hh:73