From: Xinliang David Li <davidxl@google.com>
To: Sriraman Tallam <tmsriram@google.com>
Cc: Andrew Pinski <pinskia@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jan Hubicka <hubicka@ucw.cz>, Cary Coutant <ccoutant@google.com>,
Paul Pluzhnikov <ppluzhnikov@google.com>
Subject: Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538
Date: Mon, 20 Oct 2014 20:10:00 -0000 [thread overview]
Message-ID: <CAAkRFZJ8YgiytC-9HgkvtY_QKX4Xa1Eqv+Ls+5deavY4smdZAw@mail.gmail.com> (raw)
In-Reply-To: <CAAs8Hmydbuy_CWC2LSOQCL7fPfph1qi0uFzzGVWV_KoKzfgT-g@mail.gmail.com>
On Mon, Oct 20, 2014 at 11:59 AM, Sriraman Tallam <tmsriram@google.com> wrote:
> On Mon, Oct 20, 2014 at 10:51 AM, Andrew Pinski <pinskia@gmail.com> wrote:
>> 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.
>>
>> I think he is asking because TREE_STATIC (decl) || DECL_EXTERNAL
>> (decl) might be an issue for STRING_CSTs.
>
> TREE_STATIC is true for STRING_CSTs and DECL_EXTERNAL false, that looks ok.
The values for STRING_CST make sense, but it is not documented in
tree.h for use with STRING_CST. Maybe do this:
if (((TREE_CODE (decl) == VAR_DECL&& (TREE_STATIC (decl) ||
DECL_EXTERNAL (decl))
||TREE_CODE (decl) == STRING_CST)
&& ix86_in_large_data_p (decl))
which can be simplified to:
if ((TREE_CODE (decl) == VAR_DECL && is_global_var (decl) ||TREE_CODE
(decl) == STRING_CST)
&& ix86_in_large_data_p (decl))
...
David
>
> Thanks
> Sri
>
>>
>> Thanks,
>> Andrew
>>
>>
>>>
>>> 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
next prev parent reply other threads:[~2014-10-20 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 17:42 Sriraman Tallam
2014-10-20 17:46 ` Xinliang David Li
2014-10-20 17:51 ` Sriraman Tallam
2014-10-20 17:58 ` Andrew Pinski
2014-10-20 19:09 ` Sriraman Tallam
2014-10-20 20:10 ` Xinliang David Li [this message]
2014-10-20 20:46 ` Sriraman Tallam
2014-10-20 20:56 ` Xinliang David Li
2014-10-20 18:05 ` Xinliang David Li
2014-10-20 18:59 ` Sriraman Tallam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAkRFZJ8YgiytC-9HgkvtY_QKX4Xa1Eqv+Ls+5deavY4smdZAw@mail.gmail.com \
--to=davidxl@google.com \
--cc=ccoutant@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=pinskia@gmail.com \
--cc=ppluzhnikov@google.com \
--cc=tmsriram@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).