Where is liveness analysis pass?

<style id="sinamailpaperfilter">.sinamailpaper-0{cursor:text;}.sinamailpaper-0 td,.sinamailpaper-0 textarea,.sinamailpaper-0 input,.sinamailpaper-0 br,.sinamailpaper-0 div,.sinamailpaper-0 span{font-size:14px;font-family:"ËÎÌå",Verdana,Arial,Helvetica,sans-serif;line-height:1.5;}.sinamailpaper-0 p{/**margin:0.2em auto;*/margin:0px;}.sinamailpaper-0 img{border:0;}.sinamailpaper-0 pre{white-space:normal;}.sinamailpaper-0 form{margin:0;}body{font-size:14px;}p{margin:0px;}</style>Jin-Gu<BR><BR>Thanks&nbsp;for&nbsp;your&nbsp;suggestion.&nbsp;Using&nbsp;the&nbsp;liveness&nbsp;information&nbsp;for&nbsp;virtual&nbsp;register&nbsp;is&nbsp;a&nbsp;good&nbsp;idea,&nbsp;but&nbsp;what&nbsp;I&nbsp;working&nbsp;on&nbsp;is&nbsp;a&nbsp;source-to-source&nbsp;converter,&nbsp;so&nbsp;I'd&nbsp;rather&nbsp;not&nbsp;to&nbsp;use&nbsp;any&nbsp;MachineFunctionPass.&nbsp;<BR><BR>Actually&nbsp;Google&nbsp;has&nbsp;told&nbsp;me&nbsp;a&nbsp;<BR><BR>------------------------------------------------<BR>--Zhanglin<BR>-----&nbsp;Original&nbsp;Message&nbsp;-----<BR>From:&nbsp;Jin&nbsp;Gu&nbsp;Kang&nbsp;&lt;jaykang10@imrc.kist.re.kr&gt;<BR>To:&nbsp;Zhanglin&nbsp;Liu&nbsp;&lt;way_lzl@sina.com&gt;<BR>Subject:&nbsp;RE:&nbsp;[LLVMdev]&nbsp;Where&nbsp;is&nbsp;liveness&nbsp;analysis&nbsp;pass?<BR>Date:&nbsp;2011-1-13&nbsp;16:28:59<BR><BR>Hi&nbsp;Zhanglin.<BR><BR>First&nbsp;I&nbsp;suggest&nbsp;to&nbsp;read&nbsp;The LLVM Target-Independent Code Generator — LLVM 16.0.0git documentation)<BR><BR>I&nbsp;saw&nbsp;the&nbsp;basic&nbsp;processing&nbsp;order&nbsp;of&nbsp;Live&nbsp;interval&nbsp;in&nbsp;backend&nbsp;LLVM&nbsp;source&nbsp;code&nbsp;as&nbsp;following:<BR>1.&nbsp;LiveVariables::runOnMachineFunction()&nbsp;"lib/CodeGen/LiveVariables.cpp"<BR>--&gt;&nbsp;This&nbsp;pass&nbsp;computes&nbsp;live&nbsp;variable&nbsp;information&nbsp;for&nbsp;each&nbsp;virtual&nbsp;register&nbsp;and&nbsp;register&nbsp;allocatable&nbsp;physical&nbsp;register&nbsp;in&nbsp;the&nbsp;function.&nbsp;(Target&nbsp;dependent)<BR>2.&nbsp;SlotIndexes::runOnMachineFunction()&nbsp;"lib/CodeGen/SlotIndexe
s.cpp"<BR>--&gt;&nbsp;This&nbsp;pass&nbsp;assigns&nbsp;indexes&nbsp;to&nbsp;each&nbsp;instruction&nbsp;and&nbsp;basic&nbsp;blocks<BR>3.&nbsp;LiveIntervals::runOnMachineFunction()&nbsp;"lib/CodeGen/LiveIntervalAnalysis.cpp"<BR>--&gt;&nbsp;This&nbsp;pass&nbsp;computes&nbsp;live&nbsp;interval&nbsp;for&nbsp;live&nbsp;variables.<BR>4.&nbsp;SimpleRegisterCoalescing::runOnMachineFunction&nbsp;"lib/CodeGen/SimpleRegisterCoalescing.cpp"&nbsp;<BR>-&gt;&nbsp;After&nbsp;SimpleRegisterCoalescing,&nbsp;live&nbsp;intervals&nbsp;are&nbsp;merged.<BR><BR>As&nbsp;you&nbsp;know,&nbsp;liveness&nbsp;inforamtion&nbsp;in&nbsp;backend&nbsp;is&nbsp;target&nbsp;dependent.<BR>If&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;target&nbsp;independent&nbsp;liveness&nbsp;information,&nbsp;I&nbsp;suggest&nbsp;you&nbsp;to&nbsp;use&nbsp;live&nbsp;variable&nbsp;information&nbsp;for&nbsp;virtual&nbsp;register&nbsp;in&nbsp;"LiveVariables::runOnMachineFunction()"&nbsp;pass.<BR><BR>Best&nbsp;regards,<BR>Jin-Gu&nbsp;Kang<BR><BR><BR><BR><BR><BR><BR>________________________________________<BR>From:&nbsp;llvmdev-bounces@cs.uiuc.edu&nbsp;[llvmdev-bounces@cs.uiuc.edu]&nbsp;On&nbsp;Behalf&nbsp;Of&nbsp;Zhanglin&nbsp;Liu&nbsp;[way_lzl@sina.com]<BR>Sent:&nbsp;Thursday,&nbsp;January&nbsp;13,&nbsp;2011&nbsp;4:16&nbsp;PM<BR>To:&nbsp;llvmdev@cs.uiuc.edu<BR>Subject:&nbsp;[LLVMdev]&nbsp;Where&nbsp;is&nbsp;liveness&nbsp;analysis&nbsp;pass?<BR><BR>Hello&nbsp;all<BR><BR>Currently&nbsp;I&nbsp;want&nbsp;to&nbsp;use&nbsp;the&nbsp;accurate&nbsp;liveness&nbsp;information&nbsp;when&nbsp;writing&nbsp;a&nbsp;*target&nbsp;independent*&nbsp;FunctionPass&nbsp;based&nbsp;on&nbsp;LLVM.&nbsp;The&nbsp;one&nbsp;I&nbsp;can&nbsp;find&nbsp;is&nbsp;LiveValues,&nbsp;a&nbsp;FunctionPass.&nbsp;But&nbsp;it&nbsp;doesn't&nbsp;use&nbsp;classic&nbsp;dataflow&nbsp;equation&nbsp;and&nbsp;can&nbsp;only&nbsp;provide&nbsp;approximate&nbsp;and&nbsp;conservative&nbsp;result.&nbsp;The&nbsp;another&nbsp;one&nbsp;is&nbsp;LiveVariables&nbsp;which&nbsp;use&nbsp;classic&nbsp;data&nbsp;flow&nbsp;equation,&nbsp;but&nbs
p;it&nbsp;comes&nbsp;from&nbsp;Clang's&nbsp;analysis&nbsp;phase&nbsp;and&nbsp;only&nbsp;used&nbsp;in&nbsp;frontend.<BR><BR>My&nbsp;question&nbsp;is&nbsp;whether&nbsp;there&nbsp;is&nbsp;such&nbsp;a&nbsp;liveness&nbsp;analysis&nbsp;pass&nbsp;existed&nbsp;for&nbsp;FuntionPass?<BR><BR>Thanks&nbsp;for&nbsp;any&nbsp;suggestion.<BR>--------------------------------<BR>--Zhanglin