<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thank you all,<div><br></div><div>I solved my problem by writing my own shellscript with the sequence of call to clang>opt>llc>clang and used it as my compiler in the CC option of the ./configure script.<br><br><div><hr id="stopSpelling">Subject: Re: [LLVMdev] Pass sequence<br>From: atrick@apple.com<br>Date: Sun, 6 Oct 2013 18:28:40 -0700<br>CC: llvmdev@cs.uiuc.edu<br>To: koni10@hotmail.it<br><br><br><div><div>On Oct 5, 2013, at 9:17 PM, Niko Zarzani <<a href="mailto:koni10@hotmail.it">koni10@hotmail.it</a>> wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><div dir="ltr"><div style="padding:0px;font-size:12px;font-family:Helvetica;">Hi all,</div><div style="padding:0px;font-size:12px;font-family:Helvetica;min-height:14px;"><br></div><div style="padding:0px;font-size:12px;font-family:Helvetica;">I wrote 2 passes and I want to make run llvm run the passes in this order:</div><div style="padding:0px;font-size:12px;font-family:Helvetica;"> -mem2reg -load=…/mypass1.dylib -mypass1 -load=…/mypass2.dylib -mypass2 -O1 -O2 -O3</div><div style="padding:0px;font-size:12px;font-family:Helvetica;min-height:14px;"><br></div><div style="padding:0px;font-size:12px;font-family:Helvetica;">I know I can do this by manually passing them as an argument to opt.</div><div style="padding:0px;font-size:12px;font-family:Helvetica;min-height:14px;"><br></div><div style="padding:0px;font-size:12px;font-family:Helvetica;">Is there any way to force this sequence directly from clang?</div><div style="padding:0px;font-size:12px;font-family:Helvetica;min-height:14px;"><br></div><div style="padding:0px;font-size:12px;font-family:Helvetica;">I am asking this because I am trying to compile a program and I can specify in the ./configure the CC and CFLAGS options. So if there is an option to force the sequence directly from clang it would be the easiest thing to do.</div><div style="padding:0px;font-size:12px;font-family:Helvetica;min-height:14px;"><br></div><div style="padding:0px;font-size:12px;font-family:Helvetica;">If there is not, is there a way to specify this order by modifying the llvm code?</div><div style="padding:0px;font-size:12px;font-family:Helvetica;">I am new to the PassManager and PassRegistry and I am not sure if I should use them, therefore every detailed procedure will be appreciated.</div></div></div></blockquote><div><br></div>In answer to the last part of your question, maybe you're looking for PassManagerBuilder::populateModulePassManager.<br></div><div><br></div><div>-Andy</div><br></div></div> </div></body>
</html>