public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Phase ordering in compiler
@ 2012-10-22  9:51 vikram1729
  2012-10-22 18:14 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: vikram1729 @ 2012-10-22  9:51 UTC (permalink / raw)
  To: gcc-help

Dear Sir,
	I want to understand the phase-ordering problem in compilers. My basic
doubt is what is the  difference between the pass and phase in compilers? As
for as I know, Pass something that scans to through the input code snippet
and does some transformation to it and whereas phases in the classicle
compiler are main components/modules which are Lexical Analysis, Parsing,
semantic analysis, IL code Generation, Code Optimization and code
Generation. 

When it comes to phase-ordering in compilers is it actually pass ordering or
phase-ordering? 
How the user can handle/alter phase-ordering in GCC? 
Is it only through changing the order of the optimization options fed to the
compiler or 
by tweaking the pass_manager? 
Will there be any impact of repeating optimization options or reordering the
optimization options in GCC?
Thanks in Advance,

VSP



--
View this message in context: http://gcc.1065356.n5.nabble.com/Phase-ordering-in-compiler-tp880744.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Phase ordering in compiler
  2012-10-22  9:51 Phase ordering in compiler vikram1729
@ 2012-10-22 18:14 ` Ian Lance Taylor
  2012-10-25 11:50   ` SANKAR
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2012-10-22 18:14 UTC (permalink / raw)
  To: vikram1729; +Cc: gcc-help

On Sun, Oct 21, 2012 at 11:47 PM, vikram1729 <vsp1729@gmail.com> wrote:
> Dear Sir,
>         I want to understand the phase-ordering problem in compilers. My basic
> doubt is what is the  difference between the pass and phase in compilers?

There is no significant difference.  One might think of a phase a
group of passes.  Still, it would be reasonable to describe the
phase-ordering problem as a pass-ordering problem.

> How the user can handle/alter phase-ordering in GCC?

You can edit the source code (gcc/passes.c) or you could write a
plugin but there is no way to change the ordering from the command
line.

> Will there be any impact of repeating optimization options or reordering the
> optimization options in GCC?

Yes.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Phase ordering in compiler
  2012-10-22 18:14 ` Ian Lance Taylor
@ 2012-10-25 11:50   ` SANKAR
  2012-10-25 21:51     ` Andrew Haley
  0 siblings, 1 reply; 4+ messages in thread
From: SANKAR @ 2012-10-25 11:50 UTC (permalink / raw)
  To: gcc-help

When there is an impact of repeating optimisation options or reordering the
optimisation options in GCC, is this pass ordering enabled through command
line? 

Sankar



--
View this message in context: http://gcc.1065356.n5.nabble.com/Phase-ordering-in-compiler-tp880744p881069.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Phase ordering in compiler
  2012-10-25 11:50   ` SANKAR
@ 2012-10-25 21:51     ` Andrew Haley
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Haley @ 2012-10-25 21:51 UTC (permalink / raw)
  To: SANKAR; +Cc: gcc-help

On 10/23/2012 06:21 AM, SANKAR wrote:
> When there is an impact of repeating optimisation options or reordering the
> optimisation options in GCC, is this pass ordering enabled through command
> line? 

Not usually, because passes often rely on changes made before them.
Sometimes a pass will work if reordered or duplicated, sometimes not.

Andrew.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-23  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22  9:51 Phase ordering in compiler vikram1729
2012-10-22 18:14 ` Ian Lance Taylor
2012-10-25 11:50   ` SANKAR
2012-10-25 21:51     ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).