This is the mail archive of the
mailing list for the GCC project.
Abt code generation
- From: Mohamed Shafi <shafitvm at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Cc: ERES at il dot ibm dot com
- Date: Thu, 19 Oct 2006 00:21:40 -0700 (PDT)
- Subject: Abt code generation
For the code (20020611-1.c)
int p;int k;unsigned int n;
void x ()
unsigned int h; //line 1
h = n <= 30; //line 2
p = 1;
p = 0;
k = 1;
k = 0;
unsigned int n = 30;
if (p != 1 || k != 1)
By looking rtl dump generated with -dump-rtl-rnreg for code optimization Os, my target generates no code for line 1 and 2 .It generates code starting with checking CC value for if (h). For other optimization level, it generates proper code.
Again, if a printf statement is added below line 2 (commented in above example), then even for Optimization Os it generates proper code.
1. Can anyone suggest the probable areas for this kind of behaviour.
2. What part of Optimzation level Os deals with removing redundant codes or is there a way to disable them?
Thanks in advance.