diff -Naur gcc-4.3.0/gcc/gimple-pfbvdfa-driver.c gcc-4.3.0/gcc/gimple-pfbvdfa-driver.c
--- gcc-4.3.0/gcc/gimple-pfbvdfa-driver.c	2010-03-21 23:36:18.780219910 +0530
+++ gcc-4.3.0/gcc/gimple-pfbvdfa-driver.c	2009-08-29 22:17:02.000000000 +0530
@@ -308,13 +308,15 @@
 static void print_initial_dfi(void);
 static void print_final_dfi(int count);
 static void print_per_iteration_dfi(int iteration);
+static void print_iteration_number(int iteration);
 
 /************ Lower level functions to print the result of data flow analysis   ***********/
 
 static void dump_dfi(FILE * file, bool in_iterations);
-static void dump_basic_block_info(FILE * file, basic_block bb);
+static void dump_basic_block_info(FILE * file, basic_block bb, char * indent);
 static void dump_entity_list(FILE * file, dfvalue value);
 static void dump_entity_mapping(FILE * file);
+void dump_dfi_for_block(FILE * file, basic_block bb, bool change);
 
 
 /******************* End of the generic dfa driver    *******************/
@@ -354,13 +356,35 @@
 pfbv_dfi ** 
 gdfa_driver(struct gimple_pfbv_dfa_spec dfa_spec)
 {
+
         if (find_entity_size(dfa_spec) == 0)
                 return NULL;
 
+#if TEST_AVE_FOR_BLOCK_4
+	dfvalue in, gen, kill, out;
+	printf("entity count is %d\n", relevant_pfbv_entity_count);
+
+	gen = make_initialised_dfvalue(ZEROS);
+	kill = make_initialised_dfvalue(ONES);
+        RESET_BIT(kill,3);
+	in = make_initialised_dfvalue(ONES);
+
+	out = a_plus_b_minus_c(gen, in, kill);
+
+	printf("\ngen = ");
+        dump_entity_list(stdout,gen);
+	printf("\nkill = ");
+        dump_entity_list(stdout,kill);
+	printf("\nin = ");
+        dump_entity_list(stdout,in);
+	printf("\nout = ");
+        dump_entity_list(stdout,out);
+#endif
+
+
 	initialise_special_values(dfa_spec);
 
         create_dfi_space(); 
-
         local_dfa(dfa_spec); 
 
         traversal_order = dfa_spec.traversal_order; 
@@ -428,29 +452,37 @@
 
         do{        
                 iteration_number++;
+		print_iteration_number(iteration_number);
                 change = false;
                 FOR_EACH_BB_IN_SPECIFIED_TRAVERSAL_ORDER  
                 {         
                         bb = VARRAY_BB(dfs_ordered_basic_blocks,visit_bb);
+#if TEST_GLOBAL_ANALYSIS
+        	        printf ("\nBasic Block %d in outer loop. \n",find_index_bb(bb));
+#endif
+                	dump_basic_block_info(dump_file, bb, "\t");
                         if(bb)
                         {        
                                 if (traversal_order == FORWARD)
                                 {
                                         change_at_in = compute_in_info(bb);
                                         change_at_out = compute_out_info(bb);
+						dump_dfi_for_block(dump_file, bb, change_at_out || change_at_in);
                                         change = change || change_at_out || change_at_in;
                                 }
                                 else if ((traversal_order == BACKWARD) || (traversal_order == BIDIRECTIONAL))
                                 {
                                         change_at_out = compute_out_info(bb);
                                         change_at_in = compute_in_info(bb);
+					if (change_at_out || change_at_in)
+						dump_dfi_for_block(dump_file, bb, change_at_out || change_at_in);
                                         change = change || change_at_in || change_at_out;
                                 }
                                 else 
                                          report_dfa_spec_error ("Direction can only be FORWARD, BACKWARD, or BIDIRECTIONAL (Function perform_pfbvdfa)");
                         }
                 }
-		print_per_iteration_dfi(iteration_number);
+		//print_per_iteration_dfi(iteration_number);
         } while(change);
 
 	print_final_dfi(iteration_number);
@@ -472,6 +504,9 @@
                                      backward_node_flow(bb));
                             
         old = CURRENT_IN(bb);
+#if TEST_GLOBAL_ANALYSIS
+	dump_dfi_for_block(dump_file, bb, true);
+#endif
         change = is_new_info(temp,old);
         if (change)
         {
@@ -758,7 +793,13 @@
                 bb = VARRAY_BB(dfs_ordered_basic_blocks,iter);
                 if (bb)
                 {        
+#if TEST_LOCAL_ANALYSIS
+			 printf ("\n************* Computing Gen\n");
+#endif
                          GEN(current_pfbv_dfi,bb) = local_dfa_of_bb(gen_lps, bb);
+#if TEST_LOCAL_ANALYSIS
+			 printf ("\n************* Computing Kill\n");
+#endif
                          KILL(current_pfbv_dfi,bb) = local_dfa_of_bb(kill_lps, bb);
                 }
                 else
@@ -867,6 +908,10 @@
                 free_dfvalue_space(add_entities);
         if (remove_entities)
                 free_dfvalue_space(remove_entities);
+#if TEST_LOCAL_ANALYSIS
+		printf("Accumulated entities are ");
+        	dump_entity_list(stdout,accumulated_entities);
+#endif
         return accumulated_entities;
 }
 
@@ -1105,14 +1150,43 @@
 
         /* Find the expression and its variables occurring in stmt */
         expr = extract_expr(stmt); 
-        if (expr)
-        {
-                left_opd = extract_operand(expr,0);
-                right_opd = extract_operand(expr,1);
-
-                        left_opd_index = find_index_of_local_var(left_opd);
-                        right_opd_index = find_index_of_local_var(right_opd);
+        if (expr) 
+	{
+		/* 	I think we should to bring in tcc_binary etc. */
+		if ((TREE_CODE(expr) != VAR_DECL) && (TREE_CODE(expr) != INTEGER_CST))
+        	{
+                	left_opd = extract_operand(expr,0);
+                	right_opd = extract_operand(expr,1);
+
+	                left_opd_index = find_index_of_local_var(left_opd);
+                	right_opd_index = find_index_of_local_var(right_opd);
+		}
+		else if (TREE_CODE(expr) == VAR_DECL) 
+		{
+                	left_opd = expr;
+	                left_opd_index = find_index_of_local_var(left_opd);
+		}
+		else assert (TREE_CODE(expr) == INTEGER_CST);
+#if 0
+/* 	Need to bring in PARM_DECL */
+		if ((TREE_CODE(expr) == VAR_DECL) || (TREE_CODE(expr) == PARM_DECL)) 
+		{
+                	left_opd = expr;
+	                left_opd_index = find_index_of_local_var(left_opd);
+		}
+		else if (TREE_CODE(expr) == INTEGER_CST)
+			; /* ignore */
+		else
+        	{
+                	left_opd = extract_operand(expr,0);
+                	right_opd = extract_operand(expr,1);
+
+	                left_opd_index = find_index_of_local_var(left_opd);
+                	right_opd_index = find_index_of_local_var(right_opd);
+		}
+#endif
         }
+	
 
 #if TEST_LOCAL_ANALYSIS
         printf ("\n\nGiven Statement is ");
@@ -1135,8 +1209,14 @@
         print_generic_expr(stdout,expr,0);
         printf ("\t Its operands are :");
         print_generic_expr(stdout,left_opd,0);
+	printf("#%d",left_opd_index);
+	if (left_opd)
+		printf("@%d", TREE_CODE(left_opd));
         printf ("\t and :");
         print_generic_expr(stdout,right_opd,0);
+	printf("#%d",right_opd_index);
+	if (right_opd)
+		printf("@%d", TREE_CODE(right_opd));
 #endif
 
         
@@ -1200,11 +1280,14 @@
 dump_dfi(FILE * file, bool in_iterations)
 {
         basic_block bb;
+        int visit_bb=0;
 
 
-        FOR_EACH_BB(bb)
+        FOR_EACH_BB_IN_SPECIFIED_TRAVERSAL_ORDER  
         {         
-                dump_basic_block_info(file, bb);
+                 bb = VARRAY_BB(dfs_ordered_basic_blocks,visit_bb);
+	
+                dump_basic_block_info(file, bb, "");
 
                 /* DO not print GEN and KILL during iterations */
                 if (! in_iterations)
@@ -1260,25 +1343,39 @@
 
 
 static void
-dump_basic_block_info(FILE * file, basic_block bb)
+dump_basic_block_info(FILE * file, basic_block bb, char * indent)
 {
         VEC(edge, gc) *edge_vec;
         edge e;
         edge_iterator ei;
         basic_block pred_bb, succ_bb;
+	int bb_num, dfs_num;
+
+        if (!flag_gdfa_details)    
+		return;
 
-        fprintf (file, "\nBasic Block %d. Preds: ",find_index_bb(bb));
+        //fprintf (file, "\nBasic Block %d. Preds: ",find_index_bb(bb));
+        fprintf (file, "\n%sBasic Block ", indent);
+	bb_num = find_index_bb(bb);
+	dfs_num = find_dfs_number(bb);
+
+	if (bb == ENTRY_BLOCK_PTR)
+		fprintf (file, "ENTRY. DFS Number %d. Preds:",dfs_num);
+	else if (bb == EXIT_BLOCK_PTR)
+		fprintf (file, "EXIT. DFS Number %d. Preds:",dfs_num);
+	else
+		fprintf (file, "%d. DFS Number %d. Preds:",bb_num,dfs_num);
 
         edge_vec = bb->preds;
         if (!edge_vec)
-                fprintf (file, "None ");
+                fprintf (file, " None");
                 
         else
         {         
                 FOR_EACH_EDGE(e,ei,edge_vec)
                 {
                         pred_bb = e->src;
-                        if (pred_bb->index == 0)
+                        if (pred_bb == ENTRY_BLOCK_PTR)
                                 fprintf (file, " ENTRY");
                         else
                         fprintf (file, " %d",find_index_bb(pred_bb));
@@ -1287,14 +1384,14 @@
         fprintf (file, ". Succs: ");
         edge_vec = bb->succs;
         if (!edge_vec)
-                fprintf (file, "None ");
+                fprintf (file, " None");
                 
         else
         {         
                 FOR_EACH_EDGE(e,ei,edge_vec)
                 {
                         succ_bb = e->dest;
-                        if (succ_bb->index == 1)
+                        if (succ_bb == EXIT_BLOCK_PTR)
                                 fprintf (file, " EXIT");
                         else
                                 fprintf (file, " %d",find_index_bb(succ_bb));
@@ -1422,13 +1519,25 @@
 {
         if (flag_gdfa_details)    
         {
-               fprintf(dump_file, "\n Values after iteration %d *************\n",iteration);
+               fprintf(dump_file, "\n\nValues after iteration %d *************\n",iteration);
                dump_dfi(dump_file, true);
         }
 
 
 }
 
+static void 
+print_iteration_number(int iteration)
+{
+        if (flag_gdfa_details)    
+        {
+               fprintf(dump_file, "\n\nValues after iteration %d *************\n",iteration);
+        }
+
+
+}
+
+
 
 /******************* End of the generic dfa driver    *******************/
 
@@ -1454,3 +1563,40 @@
         }
 }
 
+void
+dump_dfi_for_block(FILE * file, basic_block bb, bool change)
+{
+
+        if (!flag_gdfa_details)    
+		return;
+
+	if (!change)
+	{
+                fprintf (file, "\n\t\tNo change");
+	}
+	else
+	{
+        	if (IN(current_pfbv_dfi,bb) == NULL)
+                	fprintf (stderr, "\nBasic Block %d: Null In value\n", find_index_bb(bb));
+        	else 
+        	{       
+                	fprintf (file, "\n\t\t------------------------------");
+                	fprintf (file, "\n\t\tIN Bit Vector:  ");
+                	dump_dfvalue(file,IN(current_pfbv_dfi,bb));
+                	fprintf (file, "\t\tIN Entities:      ");
+                	dump_entity_list(file,IN(current_pfbv_dfi,bb));
+        	}
+	
+        	if (OUT(current_pfbv_dfi,bb) == NULL)
+                	fprintf (stderr, "\nBasic Block %d: Null Out value\n", find_index_bb(bb));
+        	else 
+        	{       
+                	fprintf (file, "\n\t\t------------------------------");
+                	fprintf (file, "\n\t\tOUT Bit Vector: ");
+                	dump_dfvalue(file,OUT(current_pfbv_dfi,bb));
+                	fprintf (file, "\t\tOUT Entities:     ");
+                	dump_entity_list(file,OUT(current_pfbv_dfi,bb));
+                	fprintf (file, "\n\t\t------------------------------");
+        	}
+	}
+}
diff -Naur gcc-4.3.0/gcc/gimple-pfbvdfa.h gcc-4.3.0/gcc/gimple-pfbvdfa.h
--- gcc-4.3.0/gcc/gimple-pfbvdfa.h	2010-03-21 23:36:18.780219910 +0530
+++ gcc-4.3.0/gcc/gimple-pfbvdfa.h	2009-08-29 22:17:03.000000000 +0530
@@ -65,7 +65,7 @@
 
 #define FOR_EACH_BB_IN_SPECIFIED_TRAVERSAL_ORDER         \
         for( visit_bb = (traversal_order == FORWARD)?  0 :  number_of_nodes -1 ;\
-            (traversal_order == FORWARD)? visit_bb < number_of_nodes  -1 \
+            (traversal_order == FORWARD)? visit_bb < number_of_nodes  \
                                         : visit_bb >=0 ; \
             (traversal_order == FORWARD)? visit_bb++ \
                                         : visit_bb-- \
@@ -192,10 +192,12 @@
 dfvalue make_initialised_dfvalue(initial_value value);
 dfvalue make_uninitialised_dfvalue(void);
 void dump_dfvalue (FILE * file, dfvalue value);
+void dump_dfi_for_block(FILE * file, basic_block bb, bool change);
 
 /* helper functions */
 
 int find_index_bb(basic_block bb);
+int find_dfs_number(basic_block bb);
 void report_dfa_spec_error(const char * mesg);
 tree extract_expr(tree stmt);
 tree extract_lval(tree stmt);
diff -Naur gcc-4.3.0/gcc/gimple-pfbvdfa-support.c gcc-4.3.0/gcc/gimple-pfbvdfa-support.c
--- gcc-4.3.0/gcc/gimple-pfbvdfa-support.c	2010-03-21 23:36:18.784220210 +0530
+++ gcc-4.3.0/gcc/gimple-pfbvdfa-support.c	2009-08-29 22:17:04.000000000 +0530
@@ -151,6 +151,7 @@
 static var_scope type_of_var(tree var);
 static bool is_local_expr(tree expr);
 static bool is_valid_expr(tree expr);
+static bool is_simple_expr(tree expr);
 static char * extract_string(tree var);
 static defn_scope type_of_defn(tree defn);
 static bool is_valid_defn(tree stmt);
@@ -198,7 +199,7 @@
 static void 
 assign_indices_to_var(void)
 {
-        tree vars,list;
+        tree vars,list, decl;
         char * var_name,*position_ptr=NULL,*var_temp=NULL;
         size_t position=0;
 
@@ -214,6 +215,10 @@
                         local_var_list =(tree *) ggc_realloc(local_var_list,sizeof(tree )*v_old_size_local);
                 }
                 vars = TREE_VALUE (list);
+#if TEST_LOCAL_ANALYSIS
+		printf ("\nVariable in in unexpanded var list");
+		print_generic_expr(stdout, vars, 0);
+#endif
 
                 switch(type_of_var(vars))
                 {
@@ -252,8 +257,41 @@
                                        break; 
 
                 }
+#if TEST_LOCAL_ANALYSIS
+					printf (" #%d", ENTITY_INDEX(vars->decl_minimal) );
+					printf("@%d\n",TREE_CODE(vars));
+#endif
                 list = TREE_CHAIN(list);
         }
+#if 0
+
+	Removed for the time being..
+
+	/* Now assign indices to parameters */
+        decl = DECL_ARGUMENTS(cfun->decl);
+	while (decl)
+	{
+		if (TREE_CODE(decl) == PARM_DECL)
+		{
+#if TEST_LOCAL_ANALYSIS
+			printf ("\nVariable in parameter list");
+			print_generic_expr(stdout, decl, 0);
+#endif
+                	if(local_var_count == v_old_size_local)
+                	{
+                        	v_old_size_local += v_new_size_local;
+                        	local_var_list =(tree *) ggc_realloc(local_var_list,sizeof(tree )*v_old_size_local);
+                	}
+                        ENTITY_INDEX(decl->decl_minimal) = local_var_count;
+                        local_var_list[local_var_count++] = decl;
+#if TEST_LOCAL_ANALYSIS
+			printf (" #%d", ENTITY_INDEX(decl->decl_minimal) );
+			printf("@%d\n",TREE_CODE(decl));
+#endif
+		}
+                decl = TREE_CHAIN(decl);
+	}
+#endif
 }
 
 
@@ -443,7 +481,12 @@
                         logical_stmt_no++;
 
                         expr = extract_expr(stmt);
-                        if(expr)
+			/* 
+				Exclude simple right hand sides from being considered as expressions 
+   				Uday: 26 Aug 2009
+			*/
+                       /* if(expr) */
+        		if ((expr) && (TREE_CODE(expr) != VAR_DECL) && (TREE_CODE(expr) != INTEGER_CST))
                         {
                                 if(is_local_expr(expr))
                                         assign_indices_to_local_expr(expr);
@@ -642,12 +685,15 @@
         {
                 succ_bb = e->dest;
                 if(!visit_dfs[succ_bb->index])
-                dfs_numbering_of_bb_inner(succ_bb);
+                	dfs_numbering_of_bb_inner(succ_bb);
         }
-
         VARRAY_BB(dfs_ordered_basic_blocks,--dfs_num) = bb;
         bb->dfs_number = dfs_num;
 
+#if TEST_GLOBAL_ANALYSIS
+       printf ("\nBasic Block %d with dfs number %d from among %d\n",find_index_bb(bb), dfs_num, number_of_nodes);
+#endif
+
 }
 #endif
 
@@ -711,11 +757,24 @@
                 return nid;
 }
 
+int
+find_dfs_number(basic_block bb)
+{
+                int nid = -1;
+                if (bb->index >=0 && bb->index < n_basic_blocks)
+                         nid = bb->dfs_number;
+                else 
+	                report_dfa_spec_error ("Wrong index of basic block (Function find_index_bb)");
+                return nid;
+}
+
+
 
 /**  End of functions to perform depth first numbering of gimple cfg  **/
 
 /**  Accessor functions for entities in gimple IR **/
 
+#if 0
 static var_scope
 type_of_var(tree var)
 {
@@ -740,6 +799,58 @@
 	return uninteresting_var_type;
 
 }
+#endif
+
+static var_scope
+type_of_var(tree var)
+{
+      var_scope scope;
+
+      if(TREE_CODE(var) == VAR_DECL) 
+      {	
+#if TEST_LOCAL_ANALYSIS
+	printf ("\nVariable is ");
+	print_generic_expr(stdout, var, 0);
+#endif
+
+        if(var->decl_minimal.name == NULL)
+                scope = temporary_var;
+        else if (LOCALISED_VERSION(var)) 
+        { /*variable is local copy of some global variable or local copy of local variable. This includes versions such as c.0 for local var c also.
+		*/
+		scope = artificial_var;
+	}        
+	else if (is_global_var_grc(var))  
+		scope = globally_scoped_var;
+	else 	/* if not local version of global var and not temporary var then pure local variable*/
+		scope = locally_scoped_var;
+
+#if TEST_LOCAL_ANALYSIS
+	printf("with scope ");
+	switch (scope)
+	{
+		case temporary_var:
+			printf ("temporary");
+			break;
+		case artificial_var:
+			printf ("artificial");
+			break;
+		case globally_scoped_var:
+			printf ("global");
+			break;
+		case locally_scoped_var:
+			printf ("local");
+			break;
+	}
+#endif
+      }
+      else
+	scope = uninteresting_var_type;
+
+      return scope;
+
+}
+
 
 /* This function has given "grc" suffix, because is_global_var function is already provided by
  * GCC, but it return true on static_flag, which could be true for static local variables. */
@@ -800,8 +911,32 @@
 
         if (var)
         {        
-                if((TREE_CODE(var) == VAR_DECL) && (ENTITY_INDEX(*var) != -1 ))
-                        index = ENTITY_INDEX(*var);
+                if(
+			((TREE_CODE(var) == VAR_DECL) && (type_of_var(var) == locally_scoped_var)) 
+			/* 
+				Removed for the time being. 
+			|| (TREE_CODE(var) == PARM_DECL)
+			*/
+		  )
+		{
+                        index = ENTITY_INDEX(var->decl_minimal);
+#if TEST_LOCAL_ANALYSIS
+			printf("\n local variable in find_index");
+        		print_generic_expr(stdout,var,0);
+			printf("#%d",index);
+			printf("@%d\n",TREE_CODE(var));
+#endif
+		}
+		else
+		{
+#if TEST_LOCAL_ANALYSIS
+                        index = ENTITY_INDEX(var->decl_minimal);
+			printf("\n variable that is not a local variable in find_index");
+        		print_generic_expr(stdout,var,0);
+			printf("#%d",index);
+			printf("@%d\n",TREE_CODE(var));
+#endif
+		}
         }
         return index;
 }
@@ -811,7 +946,11 @@
 {       
         int index=-1;        
 
-        if (expr)
+/* 
+	Exclude simple right hand sides from being considered as expressions 
+   	Uday: 26 Aug 2009
+*/
+        if ((expr) && (TREE_CODE(expr) != VAR_DECL) && (TREE_CODE(expr) != INTEGER_CST))
         {        
                 if (is_local_expr(expr))
                         index = ENTITY_INDEX(*expr);
@@ -865,6 +1004,30 @@
         return valid;
 }
 
+static bool
+is_simple_expr(tree expr)
+{
+        bool valid;
+
+        switch(TREE_CODE(expr))
+        { 
+                case VAR_DECL:
+/*	
+	Removed for the time being.
+                case PARM_DECL:
+*/
+                case INTEGER_CST:
+                        valid = true;
+                        break;
+                default:
+                        valid = false;
+                        break;
+                                
+        }
+        return valid;
+}
+
+
 /**Arguments :variable pointer
 Checks to see that the var passed is not a temp var then,
   Returns : the string ie. name of the variable **/
@@ -952,22 +1115,43 @@
         {
                 case COND_EXPR:
                                 expr = extract_operand(stmt,0);
+#if TEST_LOCAL_ANALYSIS
+				printf ("\nConditional Statement is ");
+				print_generic_expr(stdout,stmt,0);
+				printf ("Condition is ");
+				print_generic_expr(stdout,expr,0);
+#endif
                                 break;
                 case MODIFY_EXPR:
                 case GIMPLE_MODIFY_STMT:
                                 lval = extract_operand(stmt,0);
                                 expr = extract_operand(stmt,1);
                                 
-                                /*Skip modify expressions of type a.0 = a*/
-                                if( TREE_CODE(expr) == VAR_DECL && ENTITY_INDEX(*lval) == ENTITY_INDEX(*expr) 
+                                /* Skip assignment statements of type a.0 = a*/
+                                if( TREE_CODE(expr) == VAR_DECL 
+					&& ENTITY_INDEX(lval->decl_minimal) == ENTITY_INDEX(expr->decl_minimal) 
+					&& (type_of_var(lval) == artificial_var)
                                    )
                                         expr = NULL;
+#if TEST_LOCAL_ANALYSIS
+				printf ("\nAssignment Statement is ");
+				print_generic_expr(stdout,stmt,0);
+				printf ("LHS is ");
+				print_generic_expr(stdout,lval,0);
+				printf ("RHS is ");
+				print_generic_expr(stdout,expr,0);
+#endif
                                 break;
                 default:
                                 expr = NULL;
         }
-        if(expr && is_valid_expr(expr))
-                return expr;
+        if(expr)
+	{	
+		if(is_simple_expr(expr) || is_valid_expr(expr))
+                	return expr;
+                else 
+			return NULL;
+	}	
         else 
                 return NULL;
         
