This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Remove FINALIZE_PIC.


Hi,

Attached is a patch to remove FINALIZE_PIC as nobody uses it anymore.

Tested on x86_64-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-07-06  Kazu Hirata  <kazu@codesourcery.com>

	* passes.c (rest_if_compilation): Don't use FINALIZE_PIC.
	* system.h: Poison FINALIZE_PIC.
	* doc/tm.texi (FINALIZE_PIC): Remove.

Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.96
diff -u -d -p -r2.96 passes.c
--- passes.c	30 Jun 2005 12:17:26 -0000	2.96
+++ passes.c	5 Jul 2005 14:18:44 -0000
@@ -1545,15 +1545,6 @@ rest_of_compilation (void)
      generation, which might create new sets.  */
   emit_initial_value_sets ();
 
-#ifdef FINALIZE_PIC
-  /* If we are doing position-independent code generation, now
-     is the time to output special prologues and epilogues.
-     We do not want to do this earlier, because it just clutters
-     up inline functions with meaningless insns.  */
-  if (flag_pic)
-    FINALIZE_PIC;
-#endif
-
   /* Copy any shared structure that should not be shared.  */
   unshare_all_rtl ();
 
Index: system.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/system.h,v
retrieving revision 1.260
diff -u -d -p -r1.260 system.h
--- system.h	29 Jun 2005 01:24:23 -0000	1.260
+++ system.h	5 Jul 2005 14:18:44 -0000
@@ -740,7 +740,7 @@ extern void fancy_abort (const char *, i
 	CASE_DROPS_THROUGH TARGET_BELL TARGET_BS TARGET_CR TARGET_DIGIT0   \
         TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT	   \
         LINK_LIBGCC_SPECIAL DONT_ACCESS_GBLS_AFTER_EPILOGUE		   \
-	TARGET_OPTIONS TARGET_SWITCHES EXTRA_CC_MODES
+	TARGET_OPTIONS TARGET_SWITCHES EXTRA_CC_MODES FINALIZE_PIC
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE	\
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.438
diff -u -d -p -r1.438 tm.texi
--- doc/tm.texi	29 Jun 2005 01:24:27 -0000	1.438
+++ doc/tm.texi	5 Jul 2005 14:18:45 -0000
@@ -6121,22 +6121,6 @@ Define this macro if the register define
 this macro if @code{PIC_OFFSET_TABLE_REGNUM} is not defined.
 @end defmac
 
-@defmac FINALIZE_PIC
-By generating position-independent code, when two different programs (A
-and B) share a common library (libC.a), the text of the library can be
-shared whether or not the library is linked at the same address for both
-programs.  In some of these environments, position-independent code
-requires not only the use of different addressing modes, but also
-special code to enable the use of these addressing modes.
-
-The @code{FINALIZE_PIC} macro serves as a hook to emit these special
-codes once the function is being compiled into assembly code, but not
-before.  (It is not done before, because in the case of compiling an
-inline function, it would lead to multiple PIC prologues being
-included in functions which used inline functions and were compiled to
-assembly language.)
-@end defmac
-
 @defmac LEGITIMATE_PIC_OPERAND_P (@var{x})
 A C expression that is nonzero if @var{x} is a legitimate immediate
 operand on the target machine when generating position independent code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]