aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/IA64
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-06-30 22:38:32 +0000
committerBill Wendling <isanbard@gmail.com>2009-06-30 22:38:32 +0000
commit20c568f366be211323eeaf0e45ef053278ec9ddc (patch)
tree5542e5d0c5b1b7e34d9e5edf1f6ba4a2ce853dca /lib/Target/IA64
parent73b8f16b360544bc0f756d92fa2661028160cef3 (diff)
Add an "alignment" field to the MachineFunction object. It makes more sense to
have the alignment be calculated up front, and have the back-ends obey whatever alignment is decided upon. This allows for future work that would allow for precise no-op placement and the like. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/IA64')
-rw-r--r--lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp2
-rw-r--r--lib/Target/IA64/IA64ISelLowering.cpp5
-rw-r--r--lib/Target/IA64/IA64ISelLowering.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp b/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
index 6b34a4efd0..9c929d50e9 100644
--- a/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
@@ -137,7 +137,7 @@ bool IA64AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
SwitchToSection(TAI->SectionForGlobal(F));
// Print out labels for the function.
- EmitAlignment(5);
+ EmitAlignment(MF.getAlignment());
O << "\t.global\t" << CurrentFnName << '\n';
printVisibility(CurrentFnName, F->getVisibility());
diff --git a/lib/Target/IA64/IA64ISelLowering.cpp b/lib/Target/IA64/IA64ISelLowering.cpp
index c545b9c0eb..0142a55913 100644
--- a/lib/Target/IA64/IA64ISelLowering.cpp
+++ b/lib/Target/IA64/IA64ISelLowering.cpp
@@ -148,6 +148,11 @@ MVT IA64TargetLowering::getSetCCResultType(MVT VT) const {
return MVT::i1;
}
+/// getFunctionAlignment - Return the function alignment.
+unsigned IA64TargetLowering::getFunctionAlignment(const Function *) const {
+ return 5;
+}
+
void IA64TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG,
SmallVectorImpl<SDValue> &ArgValues,
DebugLoc dl) {
diff --git a/lib/Target/IA64/IA64ISelLowering.h b/lib/Target/IA64/IA64ISelLowering.h
index edf7eb895a..e586f7449b 100644
--- a/lib/Target/IA64/IA64ISelLowering.h
+++ b/lib/Target/IA64/IA64ISelLowering.h
@@ -70,6 +70,8 @@ namespace llvm {
/// (currently, only "ret void")
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
+ /// getFunctionAlignment - Return the function alignment.
+ virtual unsigned getFunctionAlignment(const Function *F) const;
};
}