Instruction::mayWriteToMemory() -- is there a logical equivalent for reads?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Instruction::mayWriteToMemory() -- is there a logical equivalent for reads?

Sarah Thompson-2
The Instruction::mayWriteToMemory() member function is quite useful (I'm
currently writing code that will break up basic blocks at read/write
instructions). Is there a safe way to do the same thing for reads from
memory? It's easy enough to check for the relevant instructions, but I
thought this might be a nice-to-have in a future version because it
separates code like mine from needing to know too much about the
instructions it is manipulating (which is a good thing from a future
portability point of view, as well as being logically cleaner).

[s]
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Instruction::mayWriteToMemory() -- is there a logical equivalent for reads?

Chris Lattner
On Wed, 25 Jul 2007, Sarah Thompson wrote:
> The Instruction::mayWriteToMemory() member function is quite useful (I'm
> currently writing code that will break up basic blocks at read/write
> instructions). Is there a safe way to do the same thing for reads from
> memory? It's easy enough to check for the relevant instructions, but I

Yep, the alias analysis interface will provide this information for you,

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev