You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can use visit_instr_mut to easily replace one instruction with another instruction. But how to replace the instruction with a block? It seems there is no direct way of creating InstrSeqBuilder, and I need to use FunctionBuilder and dangling_instr_seq. The following code compiles, but got a runtime error. Any help?
Summary
We can use
visit_instr_mut
to easily replace one instruction with another instruction. But how to replace the instruction with a block? It seems there is no direct way of creatingInstrSeqBuilder
, and I need to useFunctionBuilder
anddangling_instr_seq
. The following code compiles, but got a runtime error. Any help?[Update] I can create a new function, and replace the instruction to call the new function. Is this an expected pattern, or there is a better way?
Additional Details
The text was updated successfully, but these errors were encountered: