宛先を変更して新しいエッジを挿入し、ソースと宛先で別のエッジを削除できますか? 言い換えれば、エッジの基本ブロック宛先を別のものに置き換えて、CFG を変更することはできますか?
getEdge()
で関数を試しましProfileInfo
たが、うまくいきませんでした:
// to replace the basic block
Bb->getTerminator()->replaceUsesOfWith((*SI), (*rit));
// trying to set the new basic block as a new destination
xx = ProfileInfo::getEdge(Bb,(*rit));