<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/5/13 11:17 PM, Niko Zarzani
wrote:<br>
</div>
<blockquote cite="mid:DUB116-W6952A421067A804D92C809B1120@phx.gbl"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">
<p style="font-size: 12px; font-family: Helvetica; ">Hi all,</p>
<p style="font-size: 12px; font-family: Helvetica; min-height:
14px; "><br>
</p>
<p style="font-size: 12px; font-family: Helvetica; ">I wrote 2
passes and I want to make run llvm run the passes in this
order:</p>
<p style="font-size: 12px; font-family: Helvetica; "> -mem2reg
-load=…/mypass1.dylib -mypass1 -load=…/mypass2.dylib -mypass2
-O1 -O2 -O3</p>
<p style="font-size: 12px; font-family: Helvetica; min-height:
14px; "><br>
</p>
<p style="font-size: 12px; font-family: Helvetica; ">I know I
can do this by manually passing them as an argument to opt.</p>
<p style="font-size: 12px; font-family: Helvetica; min-height:
14px; "><br>
</p>
<p style="font-size: 12px; font-family: Helvetica; ">Is there
any way to force this sequence directly from clang?</p>
</div>
</blockquote>
<br>
To the best of my knowledge, no, there is no mechanism in LLVM that
does this for two optimization passes. You can do it, however, if
mypass1 is an analysis pass that does not modify the bitcode and
mypass2 is either an analysis pass or an optimization pass. The
LLVM PassManager should run all required prerequisite analysis
passes before an optimization pass that requires them in
getAnalysisUsage().<br>
<br>
-- John T.<br>
<br>
</body>
</html>