[LLVMdev] Getting the memory address of all operands on an expression

Duncan Sands baldrick at free.fr
Tue Jun 18 23:05:30 PDT 2013


On 18/06/13 19:31, Sean Silva wrote:
>
>
>
> On Mon, Jun 17, 2013 at 11:49 PM, Abhinash Jain <omnia at mailinator.com
> <mailto:omnia at mailinator.com>> wrote:
>
>     But before becoming part of the expressions, the registers will actually
>     fetch some value from memory, through Load operations.
>
> This is not true; the virtual registers need not be loaded from memory. You may
> find
> <http://llvm.org/docs/FAQ.html#what-api-do-i-use-to-store-a-value-to-one-of-the-virtual-registers-in-llvm-ir-s-ssa-representation>
> helpful.

If it is loaded from memory you may be able to get hold of the load instruction
using GetUnderlyingObject or GetUnderlyingObjects
(see include/llvm/Analysis/ValueTracking.h), as I think I mentioned already in
my first reply.

Ciao, Duncan.



More information about the llvm-dev mailing list