[LLVMdev] Opt pass for collecting static memory allocations (allocas and globals) to one big memory area.
Mikael Lepistö
mikael.lepisto at vincit.fi
Mon Mar 11 04:32:26 PDT 2013
Hi,
I'm doing llvm pass for OpenCL code which does some memory checking to
verify that code does not access memory outside of the programs own
statically allocated areas.
To make dynamic check generation easier, I would like to collect all
allocas and global variable definitions and create one big memory structure
(for each global, local and private) containing all the allocated memory
as contiguous form to be able to just to add checks to loads/sotres that
address is inside that memory structure.
Does anyone know if there already exist some pass which does something like
this (collects static allocations) or should I write this from the scratch
? Does the idea sound reasonable at all ?
Cheers, Mikael Lepistö
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130311/c5868a2f/attachment.html>
More information about the llvm-dev
mailing list