MCPcopy Create free account
hub / github.com/beefytech/Beef / AddEdge

Method AddEdge

IDEHelper/Backend/BeMCContext.cpp:932–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932void BeMCColorizer::AddEdge(int vreg0, int vreg1)
933{
934 int checkVRegIdx0 = mContext->GetUnderlyingVReg(vreg0);
935 int checkVRegIdx1 = mContext->GetUnderlyingVReg(vreg1);
936
937 if (checkVRegIdx0 == checkVRegIdx1)
938 return;
939
940 auto node0 = &mNodes[checkVRegIdx0];
941 auto node1 = &mNodes[checkVRegIdx1];
942
943 if ((node0->mWantsReg) && (node1->mWantsReg))
944 {
945 node0->mEdges.Add(checkVRegIdx1);
946 node1->mEdges.Add(checkVRegIdx0);
947 }
948}
949
950void BeMCColorizer::PropogateMemCost(const BeMCOperand & operand, int memCost)
951{

Callers 2

MarkLiveMethod · 0.80
MergeLiveRegsMethod · 0.80

Calls 2

GetUnderlyingVRegMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected