MCPcopy Create free account
hub / github.com/csyonghe/Spire / AddInstrPhi

Method AddInstrPhi

Source/SpireCore/SpirVCodeGen.cpp:3132–3150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3130 }
3131
3132 int AddInstrPhi(ILOperand *op, int ID1, int Label1, int ID2, int Label2)
3133 {
3134 List<int> branches;
3135 branches.Add(ID1); branches.Add(Label1);
3136 branches.Add(ID2); branches.Add(Label2);
3137
3138 ++CurrentID;
3139 CodeGen.OpPhi(CurrentID, IDInfos[ID1]().GetTypeID(), branches);
3140
3141 IDInfos[CurrentID] =
3142 IDInfo::CreateIDInfoForValue(
3143 CurrentID,
3144 IDInfos[ID1]().GetILType(),
3145 op,
3146 IDInfos[ID1]().GetTypeID()
3147 );
3148 UpdateValue(op, CurrentID);
3149 return CurrentID;
3150 }
3151
3152 void AddInstrLoopMerge(int MergeLabel, int ContinueLabel)
3153 {

Callers 1

PrintSelectInstrMethod · 0.80

Calls 4

OpPhiMethod · 0.80
GetTypeIDMethod · 0.80
GetILTypeMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected