mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -344,7 +344,7 @@ static void AddNodeIDNode(FoldingSetNodeID &ID, SDNode *N) {
|
||||
break;
|
||||
case ISD::TargetConstantFP:
|
||||
case ISD::ConstantFP: {
|
||||
ID.AddAPFloat(cast<ConstantFPSDNode>(N)->getValueAPF());
|
||||
ID.Add(cast<ConstantFPSDNode>(N)->getValueAPF());
|
||||
break;
|
||||
}
|
||||
case ISD::TargetGlobalAddress:
|
||||
@@ -724,7 +724,7 @@ SDOperand SelectionDAG::getConstant(const APInt &Val, MVT::ValueType VT, bool is
|
||||
unsigned Opc = isT ? ISD::TargetConstant : ISD::Constant;
|
||||
FoldingSetNodeID ID;
|
||||
AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0);
|
||||
ID.AddAPInt(Val);
|
||||
ID.Add(Val);
|
||||
void *IP = 0;
|
||||
SDNode *N = NULL;
|
||||
if ((N = CSEMap.FindNodeOrInsertPos(ID, IP)))
|
||||
@@ -763,7 +763,7 @@ SDOperand SelectionDAG::getConstantFP(const APFloat& V, MVT::ValueType VT,
|
||||
unsigned Opc = isTarget ? ISD::TargetConstantFP : ISD::ConstantFP;
|
||||
FoldingSetNodeID ID;
|
||||
AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0);
|
||||
ID.AddAPFloat(V);
|
||||
ID.Add(V);
|
||||
void *IP = 0;
|
||||
SDNode *N = NULL;
|
||||
if ((N = CSEMap.FindNodeOrInsertPos(ID, IP)))
|
||||
|
||||
Reference in New Issue
Block a user