#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Function.h"
#include <fstream>
-
-namespace llvm {
+using namespace llvm;
namespace {
struct DebugMachineCodeEmitter : public MachineCodeEmitter {
MachineCodeEmitter::createFilePrinterEmitter(MachineCodeEmitter &MCE) {
return new FilePrinterEmitter(MCE, std::cerr);
}
-
-} // End llvm namespace
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/MRegisterInfo.h"
#include "Support/LeakDetector.h"
-
-namespace llvm {
+using namespace llvm;
// Global variable holding an array of descriptors for machine instructions.
// The actual object needs to be created separately for each target machine.
// FIXME: This should be a property of the target so that more than one target
// at a time can be active...
//
-extern const TargetInstrDescriptor *TargetInstrDescriptors;
+namespace {
+ extern const TargetInstrDescriptor *TargetInstrDescriptors;
+}
// Constructor for instructions with variable #operands
MachineInstr::MachineInstr(short opcode, unsigned numOperands)
// Specialize printing if op#0 is definition
if (getNumOperands() && getOperand(0).isDef() && !getOperand(0).isUse()) {
- llvm::print(getOperand(0), OS, TM);
+ ::print(getOperand(0), OS, TM);
OS << " = ";
++StartOp; // Don't print this operand again!
}
if (i != StartOp)
OS << ",";
OS << " ";
- llvm::print(mop, OS, TM);
+ ::print(mop, OS, TM);
if (mop.isDef())
if (mop.isUse())
break;
}
- if (MO.flags &
- (MachineOperand::HIFLAG32 | MachineOperand::LOFLAG32 |
- MachineOperand::HIFLAG64 | MachineOperand::LOFLAG64))
+ if (MO.isHiBits32() || MO.isLoBits32() || MO.isHiBits64() || MO.isLoBits64())
OS << ")";
return OS;
}
-} // End llvm namespace
#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/iOther.h"
#include "llvm/Type.h"
-
-namespace llvm {
+using namespace llvm;
CallArgsDescriptor::CallArgsDescriptor(CallInst* _callInstr,
TmpInstruction* _retAddrReg,
assert(desc->getCallInst()==callInstr && "Incorrect call args descriptor?");
return desc;
}
-
-} // End llvm namespace
//
//===----------------------------------------------------------------------===//
+#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/CFG.h"
#include "Support/STLExtras.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
struct PNE : public MachineFunctionPass {
}
-const PassInfo *PHIEliminationID = X.getPassInfo();
+const PassInfo *llvm::PHIEliminationID = X.getPassInfo();
/// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions in
/// predecessor basic blocks.
}
return true;
}
-
-} // End llvm namespace