<html 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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=en-CN link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi, ALL<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  As we know, the order of compiler passes has a great influence on the results of program optimization.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>  While I using llvm to compiler my test code, I changed the order of Loop Deletion pass and DSE pass(First time Loop Deletion is before DSE, the default order of FunctionSimplificationPipeline. Second time, I used DSE before Loop Deletion),  the compilation method of these two sequences has produced a big performance gap, because without DSE, a variable inside loop could not be optimized for the default order of FunctionSimplificationPipeline, but the second order(DSE before Loop Deletion) works well.  And I noticed that in  LTODefaultPipeline , DSE is before Loop Deletion.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>So , Why there is difference of passes order between FunctionSimplificationPipeline and LTODefaultPipeline?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>And why should use Loop Deletion before DSE(or other great optimization passes) as default?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Anyone’s answers are precious to me. Thank you all.<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>Peakulorain<o:p></o:p></span></p></div></body></html>