<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/05/2015 10:37 AM, Lu Mitnick
wrote:<br>
</div>
<blockquote
cite="mid:CAH1oQ8q+wWo3PtOGUFMx7m8upAwSR3ewhXZKWKvTcB-ODoMkYg@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">Hello all,<br>
<br>
I am using LLVM/Clang 3.5 to build a C++ extension. Such C++
extension contains a special function named "barrier", which
shouldn't be duplicated. So I add __attribute__((noduplicate))
on barrier declaration.<br>
<br>
For some reasons, I also add AlwaysInlineAttr attribute on each
function except main function. The generated LLVM IR what I
expect is only a main function with many LLVM IRs.<br>
<br>
However when I counts the number of barrier function call of the
output LLVM IR, I found the number is more than I used in source
code. I am wondering whether there is any known bug related to
NoDuplicate in LLVM/Clang 3.5?<br>
<br>
PS. To find out the problematic LLVM pass that may duplicate my
barrier function call. I also used -print-after-all to dump the
generated LLVM IR of each pass. But the main function is too
huge and the called pass is too much therefore it is not
feasible to debug in this way. Do you have any other debug tips
to find out the problematic LLVM pass?<br>
<br>
Any suggestion is welcomed.<br>
<br>
Thanks,<br>
Yi-Hong<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
You should be able to write a script that bugpoint can help reduce
for you. Write a lit test that checks for the repeated calls to
barrier and figure out the incantation necessary to get bugpoint to
run with it<br>
<br>
-Matt<br>
</body>
</html>