<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Hi Tim,<div><br></div><div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">Assume a store instruction. Store has 2 Operands. I can use the store->getOperand(0) and store->getOperand(1) methods to access these operands in form of Value *. </div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">Very likely that the operands are stack variables or formal variables or global variables. It is also possible that these operands are LLVM virtual-registers. Is there a way to determine if a given operand is a virtual-register or memory-related-on.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">I hope this clarifies my question.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">BR/Nizam</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><br></div><br><hr id="zwchr"><b>From: </b>"Tim Northover" <t.p.northover@gmail.com><br><b>To: </b>nizam@cse.iitm.ac.in<br><b>Cc: </b>"Sean Silva" <chisophugis@gmail.com>, "llvmdev" <llvmdev@cs.uiuc.edu><br><b>Sent: </b>Monday, February 3, 2014 3:42:29 PM<br><b>Subject: </b>Re: [LLVMdev] LoadInst result<br><br>Hi Nizam,<br><br>> Is there a simple way to check if a given instruction operand (represented<br>> by Value *) is a virtual register or otherwise? Context: I am creating a<br>> ModulePass for pointer Analysis.<br><br>Values exist before any distinction is made between virtual and<br>physical registers (they only get introduced after or, in rare cases<br>at lowering to MachineInstrs). Or did you mean some distinction other<br>than virtual/physical? What would you expect the Value to be if it's<br>not a virtual register?<br><br>Cheers.<br><br>Tim.<br></div></div></body></html>