title: llvm based code mutation for genetic programming?
body: <p>for a study on genetic programming, I would like to implement an evolutionary system on basis of llvm and apply code-mutations (possibly on IR level).</p>
  
  <p>I found <a href="http://eschulte.github.io/llvm-mutate/">llvm-mutate</a> which is quite useful executing point mutations.
  As far as I have understood, the instructions get count/numbered, one can then e.g. delete a numbered instruction.</p>
  
  <p>However, introduction of new instructions seems to be possible as one of the availeable statements in the code.
  Real mutation however would allow to insert any of the allowed IR instructions, irrespective of it beeing used in the code to be mutated.
  In addition, it should be possible to insert library function calls of linked libraries (not used in the current code, but possibly available, because the lib has been linked in clang).</p>
  
  <p>Did I overlook this in the llvm-mutate or is it really not possible so far?</p>
  
  <p>Are there any projects trying to /already have implement(ed) such mutations for llvm?</p>
  
  <p>llvm has lots of code analysis tools which should allow the implementation of the afore mentioned approach. llvm is huge, so I'm a bit disoriented. Any hints which tools could be helpful (e.g. getting  a list of available library functions etc.)?</p>
  
  <p>Thanks
  Alex</p>