<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Owen,<br>
<br>
First, to be sure we're on the same page, are we talking about
doFinalization() in a FunctionPass or the doFinalization() method
of another type of pass? I've been assuming that we're talking
about FunctionPasses.<br>
<br>
Second, according to the documentation,
FunctionPass::doInitialization() is allowed to modify the IR. The
documentation on doFinalization() does not say anything either way
on the matter.<br>
<br>
It sounds like there's a bug in the documentation. Would you like
me to file a bug report?<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<br>
On 5/6/15 12:45 PM, Owen Anderson wrote:<br>
</div>
<blockquote cite="mid:61392EAF-8FCC-41DF-832C-C91D1AC9581D@mac.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=windows-1252">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On May 6, 2015, at 7:28 AM, John Criswell <<a
moz-do-not-send="true" href="mailto:jtcriswel@gmail.com"
class="">jtcriswel@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span class="">My understanding is that
doInitialization() and doFinalization() are designed
specifically for modifying the LLVM IR (otherwise, why
would a mutable reference to the Function be provided)?</span><br
class="">
</div>
</blockquote>
</div>
<br class="">
<div class="">As the person whose use case motivated added them,
we definitely didn’t intend them to be used for modifying IR.</div>
<div class=""><br class="">
</div>
<div class="">—Owen</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>