<div dir="ltr">Hi,<div><br></div><div style>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.</div><div style>
<br></div><div style>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.</div>
<div style><br></div><div style>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 ? </div>
<div style><br></div><div style>Cheers, Mikael Lepistö</div></div>