<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Playing with LLVM</title>
	<atom:link href="http://blog.reverberate.org/2009/01/12/playing-with-llvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.reverberate.org/2009/01/12/playing-with-llvm/</link>
	<description>parsing, performance, minimalism with C99</description>
	<lastBuildDate>Mon, 06 Feb 2012 23:44:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Andrew Pennebaker</title>
		<link>http://blog.reverberate.org/2009/01/12/playing-with-llvm/comment-page-1/#comment-1606</link>
		<dc:creator>Andrew Pennebaker</dc:creator>
		<pubDate>Sun, 06 Mar 2011 10:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2009/01/12/playing-with-llvm/#comment-1606</guid>
		<description>Oh, THAT&#039;S how to do a for loop in LLVM. I&#039;ve chosen LLVM as my first assembly language. Tutorials like this are a dire necessity; Assembly is hard enough without SSA.

Hello LLVM
http://www.yellosoft.us/hello-llvm</description>
		<content:encoded><![CDATA[<p>Oh, THAT&#8217;S how to do a for loop in LLVM. I&#8217;ve chosen LLVM as my first assembly language. Tutorials like this are a dire necessity; Assembly is hard enough without SSA.</p>
<p>Hello LLVM<br />
<a href="http://www.yellosoft.us/hello-llvm" rel="nofollow">http://www.yellosoft.us/hello-llvm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Korobeynikov</title>
		<link>http://blog.reverberate.org/2009/01/12/playing-with-llvm/comment-page-1/#comment-1479</link>
		<dc:creator>Anton Korobeynikov</dc:creator>
		<pubDate>Sat, 28 Nov 2009 14:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2009/01/12/playing-with-llvm/#comment-1479</guid>
		<description>As mentioned previously - you&#039;ll get SSA &#039;for free&#039;. Write everything in load/store manner, then run opt -std-compile-opts and it will try to optimize your bytecode hard (e.g. convert to ssa form with phi&#039;s, etc).</description>
		<content:encoded><![CDATA[<p>As mentioned previously &#8211; you&#8217;ll get SSA &#8216;for free&#8217;. Write everything in load/store manner, then run opt -std-compile-opts and it will try to optimize your bytecode hard (e.g. convert to ssa form with phi&#8217;s, etc).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blog.reverberate.org/2009/01/12/playing-with-llvm/comment-page-1/#comment-1276</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 03 Mar 2009 00:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2009/01/12/playing-with-llvm/#comment-1276</guid>
		<description>The pass Eugene mentioned is called &#039;mem2reg&#039;.

http://llvm.org/docs/tutorial/LangImpl7.html

Actually using this method saves a lot of efforts because it&#039;s not trivial to find where to insert these phi nodes.</description>
		<content:encoded><![CDATA[<p>The pass Eugene mentioned is called &#8216;mem2reg&#8217;.</p>
<p><a href="http://llvm.org/docs/tutorial/LangImpl7.html" rel="nofollow">http://llvm.org/docs/tutorial/LangImpl7.html</a></p>
<p>Actually using this method saves a lot of efforts because it&#8217;s not trivial to find where to insert these phi nodes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene O'neil</title>
		<link>http://blog.reverberate.org/2009/01/12/playing-with-llvm/comment-page-1/#comment-1169</link>
		<dc:creator>Eugene O'neil</dc:creator>
		<pubDate>Wed, 28 Jan 2009 15:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.reverberate.org/2009/01/12/playing-with-llvm/#comment-1169</guid>
		<description>Actually, LLVM has an infinite supply of registers: for example, current_i_value is a register. They just aren&#039;t rewritable. That&#039;s what &quot;static single assignment&quot; means.

An easy way to get around this limitation is to use loads and stores, as you have discovered, but the &quot;correct&quot; way is to use the mysterious and inscrutable phi instruction:

http://llvm.org/docs/LangRef.html#i_phi

This documentation even provides a simple example of how to write a counting loop, without loads and stores. 

There is an optimization pass that tries to convert the load-and-store method to the phi method, but it isn&#039;t in the register allocation phase.</description>
		<content:encoded><![CDATA[<p>Actually, LLVM has an infinite supply of registers: for example, current_i_value is a register. They just aren&#8217;t rewritable. That&#8217;s what &#8220;static single assignment&#8221; means.</p>
<p>An easy way to get around this limitation is to use loads and stores, as you have discovered, but the &#8220;correct&#8221; way is to use the mysterious and inscrutable phi instruction:</p>
<p><a href="http://llvm.org/docs/LangRef.html#i_phi" rel="nofollow">http://llvm.org/docs/LangRef.html#i_phi</a></p>
<p>This documentation even provides a simple example of how to write a counting loop, without loads and stores. </p>
<p>There is an optimization pass that tries to convert the load-and-store method to the phi method, but it isn&#8217;t in the register allocation phase.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

