Bug fix: need to initialize new CallArgsDescriptor pointer.
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9TargetMachine.cpp
index f04fcf5285ffdfcc6a54539899f3d33b4d97d4fd..faed36c32a8e18fddde85239bb43f7330f564ab8 100644 (file)
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SparcInternals.h"
-#include "llvm/Target/Sparc.h"
+#include "llvm/Target/TargetMachineImpls.h"
 #include "llvm/Function.h"
 #include "llvm/PassManager.h"
 #include "llvm/Transforms/Scalar.h"
@@ -28,7 +28,7 @@ const MachineInstrDescriptor SparcMachineInstrDesc[] = {
 #define I(ENUM, OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE, \
           NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS)             \
   { OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE,             \
-          NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS },
+          NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS, 0 },
 #include "SparcInstr.def"
 };
 
@@ -125,23 +125,19 @@ UltraSparcFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo,
 //---------------------------------------------------------------------------
 
 UltraSparc::UltraSparc()
-  : TargetMachine("UltraSparc-Native"),
+  : TargetMachine("UltraSparc-Native", 4),
     schedInfo(*this),
     regInfo(*this),
     frameInfo(*this),
     cacheInfo(*this),
-    optInfo(*this)
-{
-  optSizeForSubWordData = 4;
-  minMemOpWordSize = 8; 
-  maxAtomicMemOpWordSize = 8;
+    optInfo(*this) {
 }
 
 
 // addPassesToEmitAssembly - This method controls the entire code generation
 // process for the ultra sparc.
 //
-void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
+bool UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
 {
   // Construct and initialize the MachineFunction object for this fn.
   PM.add(createMachineCodeConstructionPass(*this));
@@ -189,4 +185,5 @@ void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
   // Emit bytecode to the assembly file into its special section next
   PM.add(getEmitBytecodeToAsmPass(Out));
   PM.add(getFunctionInfo(Out)); 
+  return false;
 }