llvm-6502/lib/Target/PIC16/PIC16AsmPrinter.h
Bill Wendling 2e9d5f912a Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 00:21:31 +00:00

64 lines
2.0 KiB
C++

//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains a printer that converts from our internal representation
// of machine-dependent LLVM code to PIC16 assembly language.
//
//===----------------------------------------------------------------------===//
#ifndef PIC16ASMPRINTER_H
#define PIC16ASMPRINTER_H
#include "PIC16.h"
#include "PIC16TargetMachine.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter {
explicit PIC16AsmPrinter(raw_ostream &O, PIC16TargetMachine &TM,
const TargetAsmInfo *T, unsigned OL, bool V)
: AsmPrinter(O, TM, T, OL, V) {
CurBank = "";
FunctionLabelBegin = '@';
IsRomData = false;
PTLI = TM.getTargetLowering();
}
private :
virtual const char *getPassName() const {
return "PIC16 Assembly Printer";
}
bool runOnMachineFunction(MachineFunction &F);
void printOperand(const MachineInstr *MI, int opNum);
void printCCOperand(const MachineInstr *MI, int opNum);
bool printInstruction(const MachineInstr *MI); // definition autogenerated.
bool printMachineInstruction(const MachineInstr *MI);
void EmitExternsAndGlobals (Module &M);
void EmitInitData (Module &M);
void EmitUnInitData (Module &M);
void EmitRomData (Module &M);
void emitFunctionData(MachineFunction &MF);
protected:
bool doInitialization(Module &M);
bool doFinalization(Module &M);
private:
PIC16TargetLowering *PTLI;
std::string CurBank;
bool IsRomData;
char FunctionLabelBegin;
};
} // end of namespace
#endif