<div dir="ltr">Hi, <div><br></div><div>I just started working with llvm, I am trying to test and improve the constant propagation pass (-constprop),</div><div><br></div><div style>I have two main questions,</div><div style>

<br></div><div style>1. I wrote my own test file, which has something like</div><div style>   int a = 1</div><div style>   int b = a + 2;</div><div style>   int c = b + 3;</div><div style>   print c</div><div style><br></div>

<div style>    However, non of the instruction was killed according to -stat. I think it might due to the fact the llvm instructions generated was a bit convoluted, but overall, I am not sure why this simple test case has no instruction killed? Shouldn't c be just 6 and show at least two instructions killed?</div>

<div style><br></div><div style>2. The description states that this pass is very simple. Can anyone point me to a few directions that might be interesting to improve it? I am not sure about why is it labeled "simple" ? </div>

<div style><br></div><div style>Thanks</div><div style><br></div><div style>Yunming</div></div>