[LLVMdev] Doubt in PHI node elimination

Sachin.Punyani at microchip.com Sachin.Punyani at microchip.com
Thu Jul 2 21:30:44 PDT 2009



In PHI node elimination pass to insert the copy in the predecessor
block, there is a check if terminator is not an invoke instruction then
place the copy there only. However for invoke terminator instruction a
safe position is located for copy insertion. 


My doubt is why is this safe location search done only for invoke
instruction and not for other terminators such as branch. 


For my target terminator is branch instruction and it uses the implicit
def (STATUS reg) from its predecessor instruction. PHI elimination pass
inserts the copy just between the branch and its predecessor. Copy
instruction on my target affects the same implicit def (STATUS reg),
hence giving improper information to branch.  If safe location search
for copy insertion is done for branch instruction also then this
dependency does not break. 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090702/220387ab/attachment.html>

More information about the llvm-dev mailing list