Hi!<div>I'm new to LLVM and I'm planning to write a compiler, which would behave slighty different than all current tools.</div><div>As an input it will not get text but it will read a file (lets assume for a moment, that in this file there will be a graph structure).</div>
<div>Before generating IR code I want to be able to run optimalization and analysis passes on this graph and after these passes I want to run pass that will generate LLVM IR on top of previously gathered informations.</div>
<div>Additional I want to be able to chose pass which will produce IR code (if there will be more than one such pass).</div><div>Is it possible in LLVM? (can I generate IR inside a compilation pass and use passes in described way?)</div>
<div><br></div><div>If the above description will be not clear, concider following construction (uppercase letters are passes and lowercase letters are data consumed and produced by each pass respectlively)</div><div>A: file->b</div>
<div>B: b->c</div><div>C: b->d</div><div>I1: c -> IR</div><div>I2: d -> IR</div><div>... (other LLVM passes)</div><div><br></div><div>and now I could enable passes:</div><div>A,B and I1</div><div>or</div><div>
A,C and I2</div><div><br></div><div>(both of them generate IR code but differently).</div><div><br></div><div>I would be very thankfull if something like that  could be done in LLVM and if yes, any further materials will be very appreciated :)</div>
<div>Thank you!</div>