<?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: Squeezing a CS Research Idea</title>
	<atom:link href="http://blog.regehr.org/archives/537/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.regehr.org/archives/537</link>
	<description></description>
	<lastBuildDate>Sat, 18 May 2013 15:30:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: moo</title>
		<link>http://blog.regehr.org/archives/537/comment-page-1#comment-2605</link>
		<dc:creator>moo</dc:creator>
		<pubDate>Wed, 08 Jun 2011 00:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=537#comment-2605</guid>
		<description><![CDATA[By the way, I have the opposite opinion from Ben about manually-specified aliasing.  Its too costly and in many cases undecidable for the compiler to find the right places where &quot;restrict&quot; can be used.  As the programmer, I want the ability to declare to the compiler &quot;I promise this thing does not alias with anything else&quot;.  I also want other types of programmer-annotation, such as &quot;force-inline the called function at this specific call-site&quot; and &quot;assume this expression is true, and make whatever use of that you can to optimize&quot;.  Compilers cannot know all of the context that the programmer knows about how this code will be used.  For example, maybe you have a code generator that generates thousands of similar methods and minimizing their code size (through controlling which things get inlined and which things don&#039;t) is much more important to you than getting maximum speed out of them.  As a game developer, I want a smart compiler that will make the right choice most of the time, but sometimes I definitely need to override its code-generation choices--game consoles have a fixed amount of RAM.  (Its true that restrict has little effect on code size.  I&#039;ve seen cases where __assume can affect code size though, e.g. to eliminate NULL-checks generated by placement new)]]></description>
		<content:encoded><![CDATA[<p>By the way, I have the opposite opinion from Ben about manually-specified aliasing.  Its too costly and in many cases undecidable for the compiler to find the right places where &#8220;restrict&#8221; can be used.  As the programmer, I want the ability to declare to the compiler &#8220;I promise this thing does not alias with anything else&#8221;.  I also want other types of programmer-annotation, such as &#8220;force-inline the called function at this specific call-site&#8221; and &#8220;assume this expression is true, and make whatever use of that you can to optimize&#8221;.  Compilers cannot know all of the context that the programmer knows about how this code will be used.  For example, maybe you have a code generator that generates thousands of similar methods and minimizing their code size (through controlling which things get inlined and which things don&#8217;t) is much more important to you than getting maximum speed out of them.  As a game developer, I want a smart compiler that will make the right choice most of the time, but sometimes I definitely need to override its code-generation choices&#8211;game consoles have a fixed amount of RAM.  (Its true that restrict has little effect on code size.  I&#8217;ve seen cases where __assume can affect code size though, e.g. to eliminate NULL-checks generated by placement new)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moo</title>
		<link>http://blog.regehr.org/archives/537/comment-page-1#comment-2604</link>
		<dc:creator>moo</dc:creator>
		<pubDate>Tue, 07 Jun 2011 23:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=537#comment-2604</guid>
		<description><![CDATA[There&#039;s another flaw in this kind of analysis.  When programmers use restrict themselves, they tend to only place it in the small number of &quot;important&quot; places for their program (e.g. low-level function where a lot of time is spent, and disassembly shows that the compiler generates the wrong code without the restrict).  In this way, they extract a lot of the potential value of manually-placed restrict even though they only place it in a few extra places.  What I think this research really shows is that &quot;putting restrict everywhere it could possibly be put, gains almost nothing over manually putting it in a SMALL number of sensible places&quot;.

The rule for programmers should be &quot;don&#039;t use restrict unless you KNOW you need it, and be extremely careful when you do use it&quot;.]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s another flaw in this kind of analysis.  When programmers use restrict themselves, they tend to only place it in the small number of &#8220;important&#8221; places for their program (e.g. low-level function where a lot of time is spent, and disassembly shows that the compiler generates the wrong code without the restrict).  In this way, they extract a lot of the potential value of manually-placed restrict even though they only place it in a few extra places.  What I think this research really shows is that &#8220;putting restrict everywhere it could possibly be put, gains almost nothing over manually putting it in a SMALL number of sensible places&#8221;.</p>
<p>The rule for programmers should be &#8220;don&#8217;t use restrict unless you KNOW you need it, and be extremely careful when you do use it&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben L. Titzer</title>
		<link>http://blog.regehr.org/archives/537/comment-page-1#comment-2588</link>
		<dc:creator>Ben L. Titzer</dc:creator>
		<pubDate>Thu, 02 Jun 2011 20:28:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=537#comment-2588</guid>
		<description><![CDATA[The article was about a much wider point but my feeling on the aliasing issue is that annotations are a big step backwards in terms of progress. It puts the complexity in the wrong place, and (at least in the case of the C annotations) opens another wormhole through which compiler optimizations mysteriously influence the behavior of programs.

My opinion as a compiler writer is that a compiler that is sufficiently advanced to be perform the kinds of code motion made possible by alias analysis should be capable of actually doing the analysis.]]></description>
		<content:encoded><![CDATA[<p>The article was about a much wider point but my feeling on the aliasing issue is that annotations are a big step backwards in terms of progress. It puts the complexity in the wrong place, and (at least in the case of the C annotations) opens another wormhole through which compiler optimizations mysteriously influence the behavior of programs.</p>
<p>My opinion as a compiler writer is that a compiler that is sufficiently advanced to be perform the kinds of code motion made possible by alias analysis should be capable of actually doing the analysis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Owen</title>
		<link>http://blog.regehr.org/archives/537/comment-page-1#comment-2584</link>
		<dc:creator>Owen</dc:creator>
		<pubDate>Wed, 01 Jun 2011 22:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=537#comment-2584</guid>
		<description><![CDATA[I&#039;m not familiar with any code bases that use restrict heavily.  It&#039;s sort of a chicken-egg problem.

Compilers (except maybe MSVC) don&#039;t implement aggressive alias analysis because it&#039;s slow, and the efficient forms are patent encumbered.  Because of this, very few aliases of this can be disambiguated.  Thus it&#039;s not worthwhile trying to implement aggressive restructuring optimizations that depend on aggressive AA.  And then, since the compiler&#039;s not going to do much them anyways, nobody actually bothers to write restrict qualifiers.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m not familiar with any code bases that use restrict heavily.  It&#8217;s sort of a chicken-egg problem.</p>
<p>Compilers (except maybe MSVC) don&#8217;t implement aggressive alias analysis because it&#8217;s slow, and the efficient forms are patent encumbered.  Because of this, very few aliases of this can be disambiguated.  Thus it&#8217;s not worthwhile trying to implement aggressive restructuring optimizations that depend on aggressive AA.  And then, since the compiler&#8217;s not going to do much them anyways, nobody actually bothers to write restrict qualifiers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#8220;Squeezing a CS Research Idea&#8221; &#124; michael-mccracken.net</title>
		<link>http://blog.regehr.org/archives/537/comment-page-1#comment-2576</link>
		<dc:creator>&#8220;Squeezing a CS Research Idea&#8221; &#124; michael-mccracken.net</dc:creator>
		<pubDate>Fri, 27 May 2011 15:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=537#comment-2576</guid>
		<description><![CDATA[[...] Embedded in Academia : Squeezing a CS Research Idea. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Embedded in Academia : Squeezing a CS Research Idea. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
