Join Randi's family group?

2022-06-01 Thread Google via Gcc

Family group invitation
Randi Amon wants you to join his family group

gcc@gcc.gnu.org <#>

Hi null,

You can join Randi's (randiam...@gmail.com <#>) family group to connect  
with your family on Google and share the apps and services that are right  
for you.


Anyone who joins a family group can see the name, email, and profile  
picture of current group members.
Accept invitation  


Bring your family together on Google
Set digital ground rules for kids

Help guide children and teens online with Family Link’s parental control  
features

Keep everyone on track

Stay organized at work and at home with a shared family calendar
Share entertainment

Subscribe to YouTube Premium and share a membership with the whole family
Connect with your family

Keep in touch using Google Assistant’s Tell my family, location sharing,  
and photo sharing features

Get more storage

Google One members can give family group members their own space to store  
personal files, emails, and photos

Share apps & purchases

Share hundreds of games and apps as a family with Play Family Library at no  
additional cost

Learn more 

You received this mandatory email service announcement to update you about  
important changes to your Google product or account.©2022 Google LLC,1600  
Amphitheatre Parkway, Mountain View, CA 94043, USA





[RISCV] RISC-V GNU Toolchain Biweekly Sync-up call (June 2, 2022)

2022-06-01 Thread jiawei
Hi all,

Here is the agenda for tomorrow's meeting. If you have topics to
discuss or share, please let me know and I can add them to the agenda.



Agenda:




- Handling profiles in the tools




https://lists.riscv.org/g/tech-toolchain-runtime/topic/handling_profiles_in_the/91372394?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,91372394,previd%3D1654070809335860277,nextid%3D1648044299026631381&previd=1654070809335860277&nextid=1648044299026631381





- RVV supports patches







https://gcc.gnu.org/pipermail/gcc-patches/2022-June/595953.html




- RISC-V sub-extension supports 

   

  ZFH supports status

  CMO supports status

  Zfinx updates




-  Open topics




Have a spike as default simulater for toolchain?





Wei Wu - PLCT Lab is inviting you to a scheduled Zoom meeting.


Topic: RISC-V GNU Toolchain Biweekly Sync-up
Time: June 1, 2022 11:00 PM Singapore


Please download and import the following iCalendar (.ics) files to your 
calendar system.


Weekly: 

https://zoom.us/meeting/tZ0ufuqurjsjH9XTthkNg3MffX-QsRBuVBET/ics?icsToken=98tyKuGhrTIpHNSVuRyGRpx5A4r4b-7ziGJEgvplqAvtCA5UMS7wMNoPA6FNMs3m



Join Zoom Meeting
https://zoom.us/j/89393600951?pwd=ZFpWMkZ6Tm1TbUFXT1hZZjZZMHhRQT09


Meeting ID: 893 9360 0951
Passcode: 899662


BEIJING, China
11:00pThu, June 02 2022


12:00aFri, June 02 2022


PST/PDT, Pacific Standard Time (US)
8:00aThu, June 02 2022
9:00aThu, June 02 2022

PHILADELPHIA, United States, Pennsylvania
11:00aThu, June 02 2022
12:00aThu, June 02 2022




Paris, France
17:00pThu, June 02 2022
18:00pThu, June 02 2022BEGIN:VCALENDAR
PRODID:-//zoom.us//iCalendar Event//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
CLASS:PUBLIC
BEGIN:VTIMEZONE
TZID:Asia/Singapore
LAST-MODIFIED:20201011T015911Z
TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Singapore
X-LIC-LOCATION:Asia/Singapore
BEGIN:STANDARD
TZNAME:+08
TZOFFSETFROM:+0800
TZOFFSETTO:+0800
DTSTART:19700101T00
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20220309T112636Z
DTSTART;TZID=Asia/Singapore:20220310T23
DTEND;TZID=Asia/Singapore:20220311T00
SUMMARY:RISC-V GNU Toolchain Biweekly Sync-up
RRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20220630T16;INTERVAL=2;BYDAY=TH
UID:ZOOM89393600951
TZID:Asia/Singapore
DESCRIPTION:Wei Wu - PLCT Lab is inviting you to a scheduled Zoom meeting
 .\n\nJoin Zoom Meeting\nhttps://us02web.zoom.us/j/89393600951?pwd=ZFpWMk
 Z6Tm1TbUFXT1hZZjZZMHhRQT09\n\nMeeting ID: 893 9360 0951\nPasscode: 89966
 2\nOne tap mobile\n+6531651065\,\,89393600951#\,\,\,\,*899662# Singapore
 \n+6531587288\,\,89393600951#\,\,\,\,*899662# Singapore\n\nDial by your 
 location\n+65 3165 1065 Singapore\n+65 3158 7288 Singapo
 re\n+1 669 900 9128 US (San Jose)\n+1 346 248 7799 US (H
 ouston)\n+1 253 215 8782 US (Tacoma)\n+1 312 626 6799 US
  (Chicago)\n+1 646 558 8656 US (New York)\n+1 301 715 85
 92 US (Washington DC)\nMeeting ID: 893 9360 0951\nPasscode: 899662\nFind
  your local number: https://us02web.zoom.us/u/kk9cyIPNJ\n\n
LOCATION:https://us02web.zoom.us/j/89393600951?pwd=ZFpWMkZ6Tm1TbUFXT1hZZj
 ZZMHhRQT09
BEGIN:VALARM
TRIGGER:-PT10M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR


Hoisting built-in call out of loop - LIM pass [tree-ssa-loop-im.c]

2022-06-01 Thread Shubham Narlawar via Gcc
Hello,

[1] I want to achieve hosting of a custom built-in call out of loop that
loads an immediate value.

for (int i = 0; i < 4000; i++) {
   _9 = (unsigned int) _1;
   slli_6 = _9 << 8;
   srli_36 = slli_6 >> 8;
   li_37 = __builtin_load_immediate (15);//I want to hoist this
out of loop which will cause hoisting of add_39 stmt also
   add_39 = srli_36 + li_37;
   _10 = __builtin_foo (add_39, 1, _9);
}

First 5 instructions in the above loop are being inserted by a custom
gimple plugin whenever it sees a __builtin_foo().

LICM pass () could hoist below instructions out of loop -

   _9 = (unsigned int) _1;
   slli_6 = _9 << 8;
   srli_36 = slli_6 >> 8;

I want to hoist below gimple statement out of loop

li_22 = __builtin_riscv_load_immediate(15);  //BUILTIN_MD

I am generating above builtin call using a custom GCC gimple plugin using -

  tree li_tmp_name = make_temp_ssa_name (integer_type_node,
NULL, "li");
  tree load = build_int_cst (unsigned_type_node, 15);

  gcall *li_stmt = gimple_build_call (decl,
1);  //where decl is function_decl
  gimple_call_set_lhs (li_stmt, li_tmp_name);
  gimple_call_set_arg (li_stmt, 0, load);
  gsi_insert_after (&gsi, li_stmt, GSI_NEW_STMT);

How do I make a GIMPLE function call as const such that loop invariant code
motion hoist it out of the loop.

[2] I tried below approaches to make it happen -

a. I made load_immediate decl as constant but that did not help
TREE_CONSTANT(decl) = 1

b. I teached licm pass to forcefull move out __builtin_load_immediate() by
introducing various checks but in the end, it alters function cfg and some
other pass like ""tree-ssa-loop-manip.c"" crashes here -

  /* We should have met DEF_BB along the way.  */
  gcc_assert (pred != ENTRY_BLOCK_PTR_FOR_FN (cfun));

>From above approaches, making changes in licm pass is proving to be costly
and inappropriate. Is there any other way I can achieve it? I am guessing
making it a constant gimple function call with no side effects will be
hoisted automatically by LICM.

If yes, how can I make a gimple call as constant so that it is hoisted out
by LICM. Also, please suggest any other approaches to achieve it.

Thanks and Regards,
Shubham


is_a<> with references

2022-06-01 Thread Aldy Hernandez via Gcc
Hi folks.

I rolled our own is_a<> implementation for vrange, because it was
trivial.  We needed it to work on references, and GCC's is-a.h
implementation is pointer-only. However, I now realize it confuses
gengtype when adding additional types:

template
struct vrange_traits
{
  // Default to something unusable.
  typedef void range_type;
};

template<>
struct vrange_traits
{
  typedef irange range_type;
};

template<>
struct vrange_traits
{
  typedef frange range_type;  <-- BOO! HISS!
};

build/gengtype  \
-S /home/aldyh/src/gcc/gcc -I gtyp-input.list -w
tmp-gtype.state
/home/aldyh/src/gcc/gcc/value-range.h:291: type `range_type' previously defined
/home/aldyh/src/gcc/gcc/value-range.h:285: previously defined here

Can some gengtype guru offer guidance?

Thanks.
Aldy



Re: is_a<> with references

2022-06-01 Thread Aldy Hernandez via Gcc
Issue resolved.  Typedef no longer needed.

Sorry for the noise.
Aldy

On Wed, Jun 1, 2022 at 4:29 PM Aldy Hernandez  wrote:
>
> Hi folks.
>
> I rolled our own is_a<> implementation for vrange, because it was
> trivial.  We needed it to work on references, and GCC's is-a.h
> implementation is pointer-only. However, I now realize it confuses
> gengtype when adding additional types:
>
> template
> struct vrange_traits
> {
>   // Default to something unusable.
>   typedef void range_type;
> };
>
> template<>
> struct vrange_traits
> {
>   typedef irange range_type;
> };
>
> template<>
> struct vrange_traits
> {
>   typedef frange range_type;  <-- BOO! HISS!
> };
>
> build/gengtype  \
> -S /home/aldyh/src/gcc/gcc -I gtyp-input.list -w
> tmp-gtype.state
> /home/aldyh/src/gcc/gcc/value-range.h:291: type `range_type' previously 
> defined
> /home/aldyh/src/gcc/gcc/value-range.h:285: previously defined here
>
> Can some gengtype guru offer guidance?
>
> Thanks.
> Aldy



GSoC: Getting started

2022-06-01 Thread Mir Immad via Gcc
HI everyone,

I'm Immad Mir -- one of the GSoC students this year. I'll be working on
adding static analysis support for POSIX file description APIs this summer.

The plan is to let the static analyzer know about the FD APIs through the
use of function attributes, although initially we might hardcode the logic
to get started working. I'm looking for the suggestions on this from the
people who have experience working with file-descriptors.

Thank you.
Immad


Re: GSoC: Getting started

2022-06-01 Thread David Malcolm via Gcc
On Wed, 2022-06-01 at 23:22 +0530, Mir Immad wrote:
> HI everyone,
> 
> I'm Immad Mir -- one of the GSoC students this year. I'll be working on
> adding static analysis support for POSIX file description APIs this
> summer.

Welcome Immad - I'm looking forward to helping you on this project.

For reference, I think you posted an initial prototype of this work
earlier this year here:
  https://gcc.gnu.org/pipermail/gcc/2022-January/238192.html
  https://gcc.gnu.org/pipermail/gcc/2022-February/238215.html

> 
> The plan is to let the static analyzer know about the FD APIs through
> the
> use of function attributes, although initially we might hardcode the
> logic
> to get started working. I'm looking for the suggestions on this from
> the
> people who have experience working with file-descriptors.

We talked about this off-list; I think next steps could be:

(1) get your initial prototype working again, hardcoding the names of
the functions for simplicity at first

(2) find a list of system calls (e.g. those implemented on Linux), and
see which ones relate to file descriptors e.g. acquiring them, using
them, releasing them, and duplicating them.  Look for patterns of usage
that could be expressed using function attributes.  Probably ignore
"ioctl" for now.

(3) probably talk to glibc's developers about this, since glibc
provides headers that wrap system calls, which would want to use the
attributes if we provide them

(4) implement the attributes, so that the analyzer doesn't have
hardcoded function names, and can instead rely on function attributes.
GCC's attributes are implemented in gcc/c-family/c-attribs.cc; see the
big c_common_attribute_table array, which associates the string names
of the attrbutes with properties, including a handler callback.  These
either set flags of a decl, or the attribute itself is appended to a
singly-linked list on that decl (for those things that don't directly
relate to fields of a decl).

I believe Siddhesh Poyarekar has been looking at attributes from the
glibc side of things, so I'm CCing him in case he has input on this.

I'm wondering if other people on this list have ideas for projects that
make heavy use of syscalls/file-descriptors that would benefit from
having this analyzer feature.  Maybe systemd?

Welcome again; hope this makes sense and is helpful
Dave