#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Function.h"
-#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
namespace {
-
+
class AlphaCodeEmitter {
MachineCodeEmitter &MCE;
public:
};
template <class CodeEmitter>
- class VISIBILITY_HIDDEN Emitter : public MachineFunctionPass,
- public AlphaCodeEmitter
+ class Emitter : public MachineFunctionPass, public AlphaCodeEmitter
{
const AlphaInstrInfo *II;
TargetMachine &TM;
public:
static char ID;
explicit Emitter(TargetMachine &tm, CodeEmitter &mce)
- : MachineFunctionPass(&ID), AlphaCodeEmitter(mce),
+ : MachineFunctionPass(&ID), AlphaCodeEmitter(mce),
II(0), TM(tm), MCE(mce) {}
Emitter(TargetMachine &tm, CodeEmitter &mce, const AlphaInstrInfo& ii)
: MachineFunctionPass(&ID), AlphaCodeEmitter(mce),
for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
I != E; ++I) {
const MachineInstr &MI = *I;
- MCE.processDebugLoc(MI.getDebugLoc());
+ MCE.processDebugLoc(MI.getDebugLoc(), true);
switch(MI.getOpcode()) {
default:
MCE.emitWordLE(getBinaryCodeForInstr(*I));
case Alpha::PCLABEL:
case Alpha::MEMLABEL:
case TargetInstrInfo::IMPLICIT_DEF:
+ case TargetInstrInfo::KILL:
break; //skip these
}
+ MCE.processDebugLoc(MI.getDebugLoc(), false);
}
}