diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:12:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-16 21:12:30 +0000 |
commit | 9468a9b6beed640eca64274c8dcc5aed3b94450b (patch) | |
tree | a78896d298334b38e78ac91f76d4174d14dba3a0 /lib/Target/Sparc | |
parent | 05ae98346a190d74c2c8799c3af2f8ca23e47c27 (diff) | |
download | external_llvm-9468a9b6beed640eca64274c8dcc5aed3b94450b.zip external_llvm-9468a9b6beed640eca64274c8dcc5aed3b94450b.tar.gz external_llvm-9468a9b6beed640eca64274c8dcc5aed3b94450b.tar.bz2 |
- Change "ExternalSymbolSDNode" to "SymbolSDNode".
- Add linkage to SymbolSDNode (default to external).
- Change ISD::ExternalSymbol to ISD::Symbol.
- Change ISD::TargetExternalSymbol to ISD::TargetSymbol
These changes pave the way to allowing SymbolSDNodes with non-external linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r-- | lib/Target/Sparc/SparcISelDAGToDAG.cpp | 4 | ||||
-rw-r--r-- | lib/Target/Sparc/SparcISelLowering.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 4a3ca7f..ae11762 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -77,7 +77,7 @@ bool SparcDAGToDAGISel::SelectADDRri(SDValue Op, SDValue Addr, Offset = CurDAG->getTargetConstant(0, MVT::i32); return true; } - if (Addr.getOpcode() == ISD::TargetExternalSymbol || + if (Addr.getOpcode() == ISD::TargetSymbol || Addr.getOpcode() == ISD::TargetGlobalAddress) return false; // direct calls. @@ -114,7 +114,7 @@ bool SparcDAGToDAGISel::SelectADDRri(SDValue Op, SDValue Addr, bool SparcDAGToDAGISel::SelectADDRrr(SDValue Op, SDValue Addr, SDValue &R1, SDValue &R2) { if (Addr.getOpcode() == ISD::FrameIndex) return false; - if (Addr.getOpcode() == ISD::TargetExternalSymbol || + if (Addr.getOpcode() == ISD::TargetSymbol || Addr.getOpcode() == ISD::TargetGlobalAddress) return false; // direct calls. diff --git a/lib/Target/Sparc/SparcISelLowering.cpp b/lib/Target/Sparc/SparcISelLowering.cpp index d89b6d4..4584bf6 100644 --- a/lib/Target/Sparc/SparcISelLowering.cpp +++ b/lib/Target/Sparc/SparcISelLowering.cpp @@ -407,11 +407,11 @@ static SDValue LowerCALL(SDValue Op, SelectionDAG &DAG) { // If the callee is a GlobalAddress node (quite common, every direct call is) // turn it into a TargetGlobalAddress node so that legalize doesn't hack it. - // Likewise ExternalSymbol -> TargetExternalSymbol. + // Likewise Symbol -> TargetSymbol. if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) Callee = DAG.getTargetGlobalAddress(G->getGlobal(), MVT::i32); - else if (ExternalSymbolSDNode *E = dyn_cast<ExternalSymbolSDNode>(Callee)) - Callee = DAG.getTargetExternalSymbol(E->getSymbol(), MVT::i32); + else if (SymbolSDNode *S = dyn_cast<SymbolSDNode>(Callee)) + Callee = DAG.getTargetSymbol(S->getSymbol(), MVT::i32, S->getLinkage()); std::vector<MVT> NodeTys; NodeTys.push_back(MVT::Other); // Returns a chain |