[LLVMdev] What may I assume about MachineFunctions.

Jeff Kunkel jdkunk3 at gmail.com
Mon Aug 30 04:37:54 PDT 2010


Upon writing my register allocation algorithm, I am concerned that a load
may be skipped due to a branch.

For instance consider the psudocode

int x = 1
...
if( false )
  load x
  y = 3*x
else
  y = 4*x
...

The load happens in the false block because this is when the variable is
first seen. The load is not preformed in the else block because the register
allocator may see it loaded already.

Do I need to be concerned about cases like this?

Thanks,
Jeff Kunkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100830/8f24b716/attachment.html>


More information about the llvm-dev mailing list