<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi All, 
<div><br>
</div>
<div>When I use llvm, I encounter a problem like "unable to schedule pass A required by C"</div>
<div>I investigated deeper. It's like:</div>
<div>I have three passes, say A, B, C(all are on function level)</div>
<div>A would modify IR code. (change instruction order)</div>
<div><br>
</div>
<div>For pass B, </div>
<div>I would use the result of pass A, I use addRequired<B>(), and &getAnalysis<B>(), it works. </div>
<div><br>
</div>
<div>void getAnalysisUsage(AU){</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>AU.addRequired<A>();</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div>For pass C, it will use the results of pass A and B. </div>
<div>I use the way as used for pass B, but it failed, even for LoopInfo analysis pass(which is the built-in analysis pass).</div>
<div>void getAnalysisUsage(AU){</div>
<div><span style="font-size: 10pt;"><span class="Apple-tab-span" style="white-space:pre"></span>AU.addRequired<A>();</span></div>
<div><span style="font-size: 10pt;"><span class="Apple-tab-span" style="white-space:pre"></span>AU.addRequired<B>();</span></div>
<div><span style="font-size: 10pt;">}</span></div>
<div><br>
</div>
<div><br>
</div>
<div>It seems because A would modify IR code, so for pass C, I need first load pass A then pass B, otherwise it will be invalidated. </div>
<div>However, when I change the using order, I still got error "unable to schedule pass A required by C".</div>
<div><br>
</div>
<div>Does anyone encounter the same problem before and have a solution?</div>
<div>Any help is appreciated. </div>
<div><br>
</div>
<div>Best,</div>
<div>Yuxi</div>
</div>
</body>
</html>