Refactor scheduler code. Move register-reduction list scheduler to a
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index da89ea1821fcb6ae6edd53094644d944618e1bd5..02646de18fd1610babe3205cfe12f3b1359e116a 100644 (file)
@@ -366,6 +366,14 @@ void MachineJumpTableInfo::print(std::ostream &OS) const {
   }
 }
 
+unsigned MachineJumpTableInfo::getEntrySize() const { 
+  return TD->getPointerSize(); 
+}
+
+unsigned MachineJumpTableInfo::getAlignment() const { 
+  return TD->getPointerAlignment(); 
+}
+
 void MachineJumpTableInfo::dump() const { print(std::cerr); }
 
 
@@ -392,7 +400,7 @@ unsigned MachineConstantPool::getConstantPoolIndex(Constant *C,
   unsigned Offset = 0;
   if (!Constants.empty()) {
     Offset = Constants.back().Offset;
-    Offset += TD.getTypeSize(Constants.back().Val->getType());
+    Offset += TD->getTypeSize(Constants.back().Val->getType());
     Offset = (Offset+AlignMask)&~AlignMask;
   }