<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>My application generates some C code which I then compile using LLVM+Clang before running it. For the compilation side of things, I have a class which one of the methods (the </span>CompilerEngine::compileCode() method in <a href="https://raw.github.com/opencor/opencor/llvm_3.3/src/plugins/misc/Compiler/src/compilerengine.cpp">https://raw.github.com/opencor/opencor/llvm_3.3/src/plugins/misc/Compiler/src/compilerengine.cpp</a>) is based on the code from the <span lang=EN-US>clang-interpreter example (</span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?view=co">http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?view=co</a>). The idea is therefore to create an instance of the ‘compiler’ class and, among other things, use its compileCode() whenever needed.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All of this works perfectly fine using LLVM+Clang 3.2, but not with LLVM+Clang 3.3. At least, not out of the box. Basically, the first time I try to compile some C code, everything is fine. However, if I try to compile some other C code, then I will get the following error message:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-indent:36.0pt'><span lang=EN-US>clang: for the -vectorize-loops option: may only occur zero or one times! <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>FWIW, I use the -O3 option which I understand makes implicit use of the loop vectorizer, and that seems to be the problem. Indeed, if I disable the loop vectorizer (using the -fno-vectorize option), then everything is fine but I clearly don’t want to have to do that. So, right now, my solution consists of commenting out the test for the number of option occurrences in the Option::addOccurrence() method (<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?view=co">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?view=co</a>), but it is clearly not satisfactory either (even though it’s good enough for my particular purpose).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So, would anyone have any idea about what I might be missing, if anything?... <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers, Alan.<o:p></o:p></span></p></div></body></html>