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]

Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538


On Mon, Oct 20, 2014 at 10:59 AM, Xinliang David Li <davidxl@google.com> wrote:
> Perhaps explicitly allowing STRING_CST to go through the large data
> check, instead of removing the var-decl check? Do you see other
> opcodes that need to be handled too?

I do not see any other opcodes explicitly but the code in
ix86_in_large_data_p seemingly handles all opcodes other than
FUNCTION_DECL through:

if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
    {
        <blah>
    }
else {
    <blah>
  }


However, I have modified the patch to explicitly check for STRING_CST
and I cannot think of any other case where the constant goes into
rodata but is not accessed via a VAR_DECL. Also note that TREE_STATIC
(decl) is true for STRING_CST.

Thanks
Sri




>
> David
>
> On Mon, Oct 20, 2014 at 10:46 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>> On Mon, Oct 20, 2014 at 10:42 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> Why removing the tree_code check?
>>
>> The actual problem happens because STRING_CSTs (end up in .lrodata)
>> are not set a far address as they dont match the VAR_DECL check here.
>> Futher,  "ix86_in_large_data_p" call has the TREE_CODE check to do the
>> right thing so this seems unnecessary & buggy here.
>>
>> Thanks
>> Sri
>>
>>>
>>> David
>>>
>>> On Mon, Oct 20, 2014 at 10:35 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>>>> Hi,
>>>>
>>>>    This patch is under review for trunk GCC :
>>>> https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01638.html.
>>>>
>>>>     In the mean time, is this ok for google/gcc-4_9 branch?  Without
>>>> this, -mcmodel=medium is unusable if .lrodata goes beyond the 2G
>>>> boundary.
>>>>
>>>> Thanks
>>>> Sri

Attachment: pr63538.txt
Description: Text document


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