Griffin Wright
2011-Jul-05 18:47 UTC
[LLVMdev] Instructions that access memory @ the IR level
Hello, I'm working with a pass that operates at the LLVM IR level. I need to run some statistics on instructions that access memory, and I'm wondering, at the IR level, which instructions aside from Load and Store access memory directly as a result of their operation? I know on an ISA level, this varies from arch to arch, but I'm wondering how LLVM has this set up at the IR level. Thank you, Griffin Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110705/d3aaa94f/attachment.html>
Eli Friedman
2011-Jul-05 19:49 UTC
[LLVMdev] Instructions that access memory @ the IR level
On Tue, Jul 5, 2011 at 11:47 AM, Griffin Wright <gwright215 at gmail.com> wrote:> Hello, > > I'm working with a pass that operates at the LLVM IR level. I need to run > some statistics on instructions that access memory, and I'm wondering, at > the IR level, which instructions aside from Load and Store access memory > > directly as a result of their operation? I know on an ISA level, this > varies from arch to arch, but I'm wondering how LLVM has this set up at the > IR level.If you're writing a pass, you probably want to use Instruction::mayReadFromMemory() and Instruction::mayWriteToMemory(). If you need something more specific, you can also take a look at their implementations (in lib/VMCore/Instruction.cpp). -Eli
Possibly Parallel Threads
- [LLVMdev] Instruction->mayReadFromMemory
- [LLVMdev] Instruction->mayReadFromMemory
- [LLVMdev] Issues with the llvm.stackrestore intrinsic - now LoopRotation handling of alloca
- [LLVMdev] LLVM IR Code Annotation
- [LLVMdev] Issues with the llvm.stackrestore intrinsic