<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello,</div><div><br></div><div>I am using mem2reg to provide SSA form. However, I found that it also do some optimization work, e.g., remove some unnecessary code. May I ask is it possible to use mem2reg only to generate SSA form without any other changes to the code? Because the originial code is important to me. </div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">I have integrated a PromotePass pass to clang backend when generating IR, and need this to achieve the above goal, but I am not sure whether it is feasible to modify the source code of PromoteMemoryToRegister.cpp or Mem2Reg.cpp in llvm/Transforms/Utils directory.</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">Thanks!</span></div><div>Padefic</div></div>