forked from atduskgreg/llvm-avr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAVRTargetMachine.h
39 lines (28 loc) · 1.17 KB
/
AVRTargetMachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef AVR_TARGETMACHINE_H
#define AVR_TARGETMACHINE_H
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetFrameInfo.h"
namespace llvm {
class AVRTargetMachine : public LLVMTargetMachine {
const TargetData DataLayout; // Calculates type size and alignment
// AVRInstrInfo InstrInfo;
// TargetFrameInfo FrameInfo;
protected:
virtual const TargetAsmInfo *createTargetAsmInfo() const;
public:
AVRTargetMachine(const Module &M, const std::string &FS);
// virtual const AVRInstrInfo *getInstrInfo() const { return &InstrInfo; }
// virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
// virtual const TargetRegisterInfo *getRegisterInfo() const {
// return &InstrInfo.getRegisterInfo();
// }
virtual const TargetData *getTargetData() const { return &DataLayout; }
// static unsigned getModuleMatchQuality(const Module &M);
virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
raw_ostream &Out);
};
}
#endif