<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Thank you, it was what I really was searching for :)<div><br></div><div>However, I don't know if I well understood. I've find this link in the second link which seemed what i was looking for: http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt .</div><div>If I put around the code block (inside my function with precondition (x>0 && y>0)) a contruct like that that use <span style="font-size: 10pt; ">__builtin_unreachable</span><span style="font-size: 10pt; ">:</span></div><div><br></div><div>int foo(int x, int y){</div><div><br></div><div>   if<span style="font-size: 10pt; ">(x>0 && y>0){</span></div><div><span style="font-size: 10pt; ">       ...function codeblock...</span></div><div><span style="font-size: 10pt; ">   }</span></div><div><span style="font-size: 10pt; ">   {</span></div><div><span style="font-size: 10pt; ">      </span><span style="font-size: 10pt; ">__builtin_unreachable ();</span><span style="font-size: 10pt; "> </span></div><div><span style="font-size: 10pt; ">   }</span></div><div><br></div><div>}<br><br>I can get the optimization without really having a branch jump in the machine code?</div><div>Thank you again,</div><div><br></div><div>Niko Zarzani<br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Mon, 22 Oct 2012 23:41:43 -0400<br>> From: xi.wang@gmail.com<br>> To: koni10@hotmail.it<br>> CC: llvmdev@cs.uiuc.edu<br>> Subject: Re: [LLVMdev] precondition suggestion to LLVM<br>> <br>> You may want to check this out:<br>> <br>> http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/053924.html<br>> <br>> and also<br>> <br>> http://llvm.org/PR810<br>> <br>> - xi<br>> <br>> On 10/22/12 6:05 PM, Niko Zarzani wrote:<br>> > Hi all,<br>> > Is there any way to tell LLVM some additional information about the <br>> > variables in the code in order to make better optimization?<br>> > For example, if my function has a certain precondition (such as x>0) <br>> > then it will be possible to better optimize the code given that <br>> > information (which the compiler does not know).<br>> > I am new in this field and I don't know if there are ways to tell the <br>> > compiler preconditions (such as by using some preprocessing directives).<br>> > Thank you in advance,<br>> > Niko Zarzani<br></div></div>                                    </div></body>
</html>