[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Mar 19 17:51:58 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.79 -> 1.80
---
Log message:
TargetData doesn't know the alignment of vectors :(
---
Diffs of the changes: (+8 -1)
ScheduleDAG.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.79 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.80
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.79 Fri Mar 10 01:42:02 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Sun Mar 19 19:51:46 2006
@@ -20,6 +20,7 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetLowering.h"
+#include "llvm/Support/MathExtras.h"
using namespace llvm;
@@ -124,9 +125,15 @@
if (Align == 0) {
if (CP->get()->getType() == Type::DoubleTy)
Align = 3; // always 8-byte align doubles.
- else
+ else {
Align = TM.getTargetData()
.getTypeAlignmentShift(CP->get()->getType());
+ if (Align == 0) {
+ // Alignment of packed types. FIXME!
+ Align = TM.getTargetData().getTypeSize(CP->get()->getType());
+ Align = Log2_64(Align);
+ }
+ }
}
unsigned Idx = ConstPool->getConstantPoolIndex(CP->get(), Align);
More information about the llvm-commits
mailing list