This is the mail archive of the gcc-bugs@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]

[Bug middle-end/11135] New: It ought to be possible to make PIC_OFFSET_TABLE_REGNUM a pseudo


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11135

           Summary: It ought to be possible to make PIC_OFFSET_TABLE_REGNUM
                    a pseudo
           Product: gcc
           Version: unknown
            Status: NEW
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P5
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rearnsha@gcc.gnu.org
                CC: gcc-bugs@gcc.gnu.org
OtherBugsDependingO 592
             nThis:

Currently the documentation says:

> @findex PIC_OFFSET_TABLE_REGNUM
> The register number of the register used to address a table of static
> data addresses in memory.  In some cases this register is defined by a
> processor's ``application binary interface'' (ABI)@.  When this macro
> is defined, RTL is generated for this register once, as with the stack
> pointer and frame pointer registers.  If this macro is not defined, it
> is up to the machine-dependent files to allocate such a register (if
> necessary).  Note that this register must be fixed when in use (e.g.@:
> when @code{flag_pic} is true).

This pessimizes code when the pic register is used in a leaf function, or when
there is only a single use (since the register is fixed for the entire
function).  It ought to be possible for a machine description to make the PIC
register a pseudo that is allocated as normal.  Then the register can be either
call-clobbered or call saved as appropriate and can even be spilled onto the
stack if that is preferable.


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