aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-21 03:41:46 +0000
committerDan Gohman <gohman@apple.com>2008-10-21 03:41:46 +0000
commit54aeea39a743effe88eedb43d2f7f4805e806ab5 (patch)
tree32acc7455f57fb7b1fd2a87578fded95605d2991 /lib/Target/PowerPC
parent4401361a2fb92c82317dbfbb1616f54ced2b51f3 (diff)
downloadexternal_llvm-54aeea39a743effe88eedb43d2f7f4805e806ab5.zip
external_llvm-54aeea39a743effe88eedb43d2f7f4805e806ab5.tar.gz
external_llvm-54aeea39a743effe88eedb43d2f7f4805e806ab5.tar.bz2
Disable constant-offset folding for PowerPC, as the PowerPC target
isn't yet prepared for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp6
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 553ca10..eb327dc 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -4912,3 +4912,9 @@ SDValue PPCTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
return DAG.getCopyFromReg(DAG.getEntryNode(), is31 ? PPC::R31 : PPC::R1,
MVT::i32);
}
+
+bool
+PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
+ // The PowerPC target isn't yet aware of offsets.
+ return false;
+}
diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h
index fa689de..00f707d 100644
--- a/lib/Target/PowerPC/PPCISelLowering.h
+++ b/lib/Target/PowerPC/PPCISelLowering.h
@@ -329,6 +329,8 @@ namespace llvm {
SDValue Ret,
SelectionDAG &DAG) const;
+ virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
+
private:
SDValue getFramePointerFrameIndex(SelectionDAG & DAG) const;
SDValue getReturnAddrFrameIndex(SelectionDAG & DAG) const;