<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi All,</div><div>I am new to LLVM and now involved into a problem, would it be possible to get some help?</div><div><br></div><div>I want to insert a new basic block into a program by writing a pass. For example, there are block A and B in the original block where A jumps to B:</div><div>A -> B.</div><div><br></div><div>For now I want to insert a block C bewteen them:</div><div>A -> C -> B.</div><div><br></div><div>However, if the branch instruction from A to C or from C to B is created, an error message occurs:</div><div>bb->getName() = C</div><div> "<span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">The basic block does not exist in the map.</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">"=</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">The basic block does not exist in the map.</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">So, how can I add the new block C to the original map?</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Thank you very much!</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Song</span></div><div><br></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Research Intern in Dept. of Computer Science, Stanford University</div><div><span style="font-size: 10pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">Email: songy92@stanford.edu,</span><span style="font-size: 10pt; line-height: 1.5; background-color: window;"> </span><a href="mailto:yaosong1992@gmail.com" style="font-size: 10pt; line-height: 1.5; background-color: window;">yaosong1992@gmail.com</a><span style="font-size: 10pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"> </span></div><div><br></div></div></span></div>
</body></html>