Add two new calling conventions for runtime calls
[oota-llvm.git] / lib / Target / R600 / AMDGPUTargetMachine.cpp
index 89c27839abdd2099f3289d61ff41d4cce1c800c1..a550cc0178ae7e0e5c0d197350e2d5903846a17f 100644 (file)
 #include "SIISelLowering.h"
 #include "SIInstrInfo.h"
 #include "llvm/Analysis/Passes.h"
-#include "llvm/Analysis/Verifier.h"
 #include "llvm/CodeGen/MachineFunctionAnalysis.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
 #include "llvm/CodeGen/Passes.h"
+#include "llvm/IR/Verifier.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/TargetRegistry.h"
@@ -42,7 +42,7 @@ extern "C" void LLVMInitializeR600Target() {
 }
 
 static ScheduleDAGInstrs *createR600MachineScheduler(MachineSchedContext *C) {
-  return new ScheduleDAGMI(C, new R600SchedStrategy());
+  return new ScheduleDAGMILive(C, new R600SchedStrategy());
 }
 
 static MachineSchedRegistry
@@ -50,13 +50,12 @@ SchedCustomRegistry("r600", "Run R600's custom scheduler",
                     createR600MachineScheduler);
 
 static std::string computeDataLayout(const AMDGPUSubtarget &ST) {
-  std::string Ret = "e";
+  std::string Ret = "e-p:32:32";
 
-  if (!ST.is64bit())
-    Ret += "-p:32:32";
-
-  if (ST.getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS)
-    Ret += "-p3:32:32";
+  if (ST.is64bit()) {
+    // 32-bit private, local, and region pointers. 64-bit global and constant.
+    Ret += "-p1:64:64-p2:64:64-p3:32:32-p4:32:32-p5:64:64";
+  }
 
   Ret += "-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256"
          "-v512:512-v1024:1024-v2048:2048-n32:64";