summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-25 18:45:50 +0000
committerChris Lattner <sabre@nondot.org>2009-06-25 18:45:50 +0000
commit1af2231da64a14d638406d133c7912bfc1c8a9ce (patch)
treed85c3b5051d6a401ac0e98e31385d206b307eac3 /lib/CodeGen/SelectionDAG
parent7bba2333fbfa24e69da87987d84eb4b97e25f037 (diff)
downloadexternal_llvm-1af2231da64a14d638406d133c7912bfc1c8a9ce.zip
external_llvm-1af2231da64a14d638406d133c7912bfc1c8a9ce.tar.gz
external_llvm-1af2231da64a14d638406d133c7912bfc1c8a9ce.tar.bz2
start bringing targetoperand flags into isel, first up, ExternalSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8de2dfc..0b93e54 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -632,10 +632,13 @@ bool SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) {
case ISD::ExternalSymbol:
Erased = ExternalSymbols.erase(cast<ExternalSymbolSDNode>(N)->getSymbol());
break;
- case ISD::TargetExternalSymbol:
- Erased =
- TargetExternalSymbols.erase(cast<ExternalSymbolSDNode>(N)->getSymbol());
+ case ISD::TargetExternalSymbol: {
+ ExternalSymbolSDNode *ESN = cast<ExternalSymbolSDNode>(N);
+ Erased = TargetExternalSymbols.erase(
+ std::pair<std::string,unsigned char>(ESN->getSymbol(),
+ ESN->getTargetFlags()));
break;
+ }
case ISD::VALUETYPE: {
MVT VT = cast<VTSDNode>(N)->getVT();
if (VT.isExtended()) {
@@ -1108,16 +1111,19 @@ SDValue SelectionDAG::getExternalSymbol(const char *Sym, MVT VT) {
SDNode *&N = ExternalSymbols[Sym];
if (N) return SDValue(N, 0);
N = NodeAllocator.Allocate<ExternalSymbolSDNode>();
- new (N) ExternalSymbolSDNode(false, Sym, VT);
+ new (N) ExternalSymbolSDNode(false, Sym, 0, VT);
AllNodes.push_back(N);
return SDValue(N, 0);
}
-SDValue SelectionDAG::getTargetExternalSymbol(const char *Sym, MVT VT) {
- SDNode *&N = TargetExternalSymbols[Sym];
+SDValue SelectionDAG::getTargetExternalSymbol(const char *Sym, MVT VT,
+ unsigned char TargetFlags) {
+ SDNode *&N =
+ TargetExternalSymbols[std::pair<std::string,unsigned char>(Sym,
+ TargetFlags)];
if (N) return SDValue(N, 0);
N = NodeAllocator.Allocate<ExternalSymbolSDNode>();
- new (N) ExternalSymbolSDNode(true, Sym, VT);
+ new (N) ExternalSymbolSDNode(true, Sym, TargetFlags, VT);
AllNodes.push_back(N);
return SDValue(N, 0);
}