Google Groups Home
Help | Sign in
Code selection trade-offs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Tim Frink  
View profile
 More options May 12, 3:37 pm
Newsgroups: comp.compilers
From: Tim Frink <plfr...@yahoo.de>
Date: 12 May 2008 19:37:20 GMT
Local: Mon, May 12 2008 3:37 pm
Subject: Code selection trade-offs
Hi,

Do you know of any works where profiling information/ static program
analysis is used as a heuristic to control code selection, i.e. the
(profiling) execution counts of particular code structures are
influencing the choice of instructions used to translate the source
code into assembler?

I want to leave the issue open how the execution counts are
gained. This might happen by translating the source code one into
machine code, perform profiling and than transform the profiling data
back into the source code.  Or, as an alternative, a static program
analysis could be performed to extract information about the execution
frequency of the high-level code constructs.

I'm curious if you can imagine a case where this would make sense. I
assume that this must be a case for a trade-off where you produce
either slower and smaller code for the frequently executed code
sections or some specialized code that increases the code size but
leads to a shorted overall code execution time.

Regards,
Tim


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Björn Franke  
View profile
 More options May 15, 2:29 pm
Newsgroups: comp.compilers
From: Björn Franke <bfra...@inf.ed.ac.uk>
Date: Thu, 15 May 2008 19:29:50 +0100
Local: Thurs, May 15 2008 2:29 pm
Subject: Re: Code selection trade-offs
Hi Tim,

> Do you know of any works where profiling information/ static program
> analysis is used as a heuristic to control code selection, i.e. the
> (profiling) execution counts of particular code structures are
> influencing the choice of instructions used to translate the source
> code into assembler?

This may be a little off-topic, but in this paper a technique is used
that uses profiling based basic block execution counts to guide the
generation of new instructions for extensible processor cores that
allow you to define your own application-specific instruction set
extensions:

Richard Bennett, Alastair Murray, Bjvrn Franke, and Nigel Topham.
Combining Source-to-Source Transformations and Processor Instruction Set
Extension for the Automated Design-Space Exploration of Embedded Systems.
Proceedings of ACM SIGPLAN/SIGBED 2007 Conference on Languages
Compilers, and Tools for Embedded Systems (LCTES  07), June 2007, San
Diego, USA.

Cheers,

    Bjoern


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
IndianTechie  
View profile
 More options May 23, 5:47 am
Newsgroups: comp.compilers
From: IndianTechie <kama...@gmail.com>
Date: Fri, 23 May 2008 02:47:06 -0700 (PDT)
Local: Fri, May 23 2008 5:47 am
Subject: Re: Code selection trade-offs
On May 13, 12:37 am, Tim Frink <plfr...@yahoo.de> wrote:

> Do you know of any works where profiling information/ static program
> analysis is used as a heuristic to control code selection, i.e. the
> (profiling) execution counts of particular code structures are
> influencing the choice of instructions used to translate the source
> code into assembler?

I know of things done the other way, i.e. collect information at
execution time to modify generated code to be more optimal.

> I want to leave the issue open how the execution counts are
> gained. This might happen by translating the source code one into
> machine code, perform profiling and than transform the profiling data
> back into the source code.  Or, as an alternative, a static program

HP's profile based optimization does something similar except that it
doesn't convert anything back to source code. It just generates a
profile which is used to improve execution speed at the next run.
[This technique was disallowed when measuring performance of HP
systems for the SPEC benchmarks].

refer optimization level +O4 at:-

http://docs.hp.com/en/8/optimize.htm

> analysis could be performed to extract information about the execution
> frequency of the high-level code constructs.

This is analysis of the frequency of machine-code/3 address form which
can be extended to function/basic block level. Why would it matter
whether we are dealing with basic blocks composed of machine code or
source code?

> I'm curious if you can imagine a case where this would make sense. I
> assume that this must be a case for a trade-off where you produce
> either slower and smaller code for the frequently executed code
> sections or some specialized code that increases the code size but
> leads to a shorted overall code execution time.

yes the latter is what is done i.e. stubs are put into generated code,
and they do stuff at runtime. A list of publications related to this
can be found at:-

http://dynopt.dtc.umn.edu/

Trace based optimization is the one closest to what I am referring to.

regards
-kamal


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Walter Banks  
View profile
 More options May 24, 5:30 pm
Newsgroups: comp.compilers
From: Walter Banks <wal...@bytecraft.com>
Date: Sat, 24 May 2008 17:30:07 -0400
Local: Sat, May 24 2008 5:30 pm
Subject: Re: Code selection trade-offs

Tim Frink wrote:
> Do you know of any works where profiling information/ static program
> analysis is used as a heuristic to control code selection, i.e. the
> (profiling) execution counts of particular code structures are
> influencing the choice of instructions used to translate the source
> code into assembler? ...

There are some embedded applications where profiling can be
significant in code generation. The real implementation problem is the
evaluation of when to ignore the profile information. In cases where
in some code sections information from profiling shows that little can
be gained also identifies the area where performance may be further
sacrificed in exchange for performance in a critical section.

Regards

--
Walter Banks
Byte Craft Limited
Tel. (519) 888-6911
http://www.bytecraft.com
wal...@bytecraft.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google