[llvm-commits] [llvm] r77869 - in /llvm/trunk/lib/Target/CellSPU: SPUTargetAsmInfo.cpp SPUTargetAsmInfo.h SPUTargetMachine.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 1 21:44:34 PDT 2009
Author: lattner
Date: Sat Aug 1 23:44:33 2009
New Revision: 77869
URL: http://llvm.org/viewvc/llvm-project?rev=77869&view=rev
Log:
simplify SPULinuxTargetAsmInfo, remove use of TM.
Modified:
llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.h
llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp
Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp?rev=77869&r1=77868&r2=77869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp Sat Aug 1 23:44:33 2009
@@ -12,16 +12,17 @@
//===----------------------------------------------------------------------===//
#include "SPUTargetAsmInfo.h"
-#include "SPUTargetMachine.h"
-#include "llvm/Function.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Dwarf.h"
-
using namespace llvm;
-using namespace llvm::dwarf;
-SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
- SPUTargetAsmInfo<TargetAsmInfo>(TM) {
+SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo() {
+ ZeroDirective = "\t.space\t";
+ SetDirective = "\t.set";
+ Data64bitsDirective = "\t.quad\t";
+ AlignmentIsInBytes = false;
+ LCOMMDirective = "\t.lcomm\t";
+ InlineAsmStart = "# InlineAsm Start";
+ InlineAsmEnd = "# InlineAsm End";
+
PCSymbol = ".";
CommentString = "#";
GlobalPrefix = "";
@@ -50,6 +51,3 @@
SupportsExceptionHandling = false;
}
-
-// Instantiate default implementation.
-TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>);
Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.h?rev=77869&r1=77868&r2=77869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.h Sat Aug 1 23:44:33 2009
@@ -15,32 +15,11 @@
#define SPUTARGETASMINFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "SPUTargetMachine.h"
-#include "SPUSubtarget.h"
namespace llvm {
- // Forward declaration.
- class SPUTargetMachine;
-
- template <class BaseTAI>
- struct SPUTargetAsmInfo : public BaseTAI {
- explicit SPUTargetAsmInfo(const SPUTargetMachine &TM) {
- /* (unused today)
- * const SPUSubtarget *Subtarget = &TM.getSubtarget<SPUSubtarget>(); */
-
- BaseTAI::ZeroDirective = "\t.space\t";
- BaseTAI::SetDirective = "\t.set";
- BaseTAI::Data64bitsDirective = "\t.quad\t";
- BaseTAI::AlignmentIsInBytes = false;
- BaseTAI::LCOMMDirective = "\t.lcomm\t";
- BaseTAI::InlineAsmStart = "# InlineAsm Start";
- BaseTAI::InlineAsmEnd = "# InlineAsm End";
- }
- };
-
- struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<TargetAsmInfo> {
- explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
+ struct SPULinuxTargetAsmInfo : public TargetAsmInfo {
+ explicit SPULinuxTargetAsmInfo();
};
} // namespace llvm
Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp?rev=77869&r1=77868&r2=77869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp Sat Aug 1 23:44:33 2009
@@ -34,10 +34,8 @@
return &LR[0];
}
-const TargetAsmInfo *
-SPUTargetMachine::createTargetAsmInfo() const
-{
- return new SPULinuxTargetAsmInfo(*this);
+const TargetAsmInfo *SPUTargetMachine::createTargetAsmInfo() const {
+ return new SPULinuxTargetAsmInfo();
}
SPUTargetMachine::SPUTargetMachine(const Target &T, const Module &M,
@@ -48,8 +46,7 @@
InstrInfo(*this),
FrameInfo(*this),
TLInfo(*this),
- InstrItins(Subtarget.getInstrItineraryData())
-{
+ InstrItins(Subtarget.getInstrItineraryData()) {
// For the time being, use static relocations, since there's really no
// support for PIC yet.
setRelocationModel(Reloc::Static);
@@ -59,10 +56,8 @@
// Pass Pipeline Configuration
//===----------------------------------------------------------------------===//
-bool
-SPUTargetMachine::addInstSelector(PassManagerBase &PM,
- CodeGenOpt::Level OptLevel)
-{
+bool SPUTargetMachine::addInstSelector(PassManagerBase &PM,
+ CodeGenOpt::Level OptLevel) {
// Install an instruction selector.
PM.add(createSPUISelDag(*this));
return false;
More information about the llvm-commits
mailing list