<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>

 
 
 
Hi Eli,<br><br>
I want to disable optimizations because, i'm going to implement a framework in JAVA for educational purposes.<br>
<br>
I have planned to do followings:<br><br>    1) Create LLVM-IR and export it as Assembly (without optimizing the source-code)<br>   
2) Transform the LLVM-Assembly to a data-structure, similar to LLVM
data structure (Module, Function, BB ...) but implemented in Java<br>    3) Optimizing the code  (should be performed by students :-)  )<br>    4) Transform my data-structure to LLVM-Assembly.<br>    5) Generate machine code using "llvm-as"<br><br>Could you list me the other optimizations, which are performed by front-end?<br><br>Raad<br><br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Eli Friedman <eli.friedman@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> LLVM Developers Mailing List <llvmdev@cs.uiuc.edu><br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, November 27, 2008 10:39:21 PM<br><b><span style="font-weight:
 bold;">Subject:</span></b> Re: [LLVMdev] Disable optimization<br></font><br>
On Thu, Nov 27, 2008 at 6:14 AM, RAAD B <<a ymailto="mailto:raad_7007@yahoo.com" href="mailto:raad_7007@yahoo.com">raad_7007@yahoo.com</a>> wrote:<br>> Hello together,<br>><br>> although i use the "-O0" flag as follow, the llvm perform dead code<br>> elimination.<br>> How can i disable optimizing completely?<br><br>Sorry, it's not possible; the gcc front-end does some optimizations<br>which the LLVM backend can't do anything about, and dead code<br>elimination can arise naturally out of the approach LLVM uses for code<br>generation.  Note that -O0 really means "generate code as quickly as<br>possible, and don't do any optimizations which reduce the quality of<br>debug symbols".<br><br>Why exactly do you want to disable dead code elimination anyway?  I<br>can't see any reason why you'd want dead code in the generated<br>program, unless you're abusing asm statements or something like
 that.<br><br>-Eli<br>_______________________________________________<br>LLVM Developers mailing list<br><a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></div></div><br>

      </body></html>