Re: [PATCH] Mass rename of C++ .c files to .cc suffix

2022-01-12 Thread Martin Liška

On 1/11/22 17:16, Jakub Jelinek wrote:

On Tue, Jan 11, 2022 at 05:03:34PM +0100, Martin Liška wrote:

On 1/11/22 16:56, Jakub Jelinek wrote:

While e.g. libcpp or gcc are in C++.


Which means I should rename .c files under libcpp, right?
Is there any other folder from gcc/ and libcpp/ that would need that as well?


 From the directories that use .c files for C++, I think that is all.
c++tools/, libcody/, libitm/, libsanitizer/, libstdc++-v3/ already
use .cc or .cpp.


All right, I've included libcpp folder in the renaming effort.

Please take a look at V2 of the series here:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=log;h=refs/users/marxin/heads/cc-renaming

Now I filled up complete ChangeLog entries and I'm asking for a patchset 
approval.

Cheers,
Martin



Jakub





Re: GCC GSoC 2022: Call for project ideas and mentors

2022-01-12 Thread Martin Jambor
On Thu, Jan 06 2022, Martin Jambor wrote:
>
[...]
>
> I will update you as more details about GSoC 2022 become available.
>

The official timeline has been published at
https://developers.google.com/open-source/gsoc/timeline

I do not know how the "standard coding period" and "extended deadlines"
will exactly work, I suppose mentors and contributors will together
simply pick which one of the two to follow.

I intend to file our application around February 8th, so it would be
great to have our "selected ideas list" ready with all the details by
then.

Thanks,

Martin


Re: GCC and OpenACC

2022-01-12 Thread Mikel Mendizabal via Gcc
Dear Richard,

Thanks a lot for the fast response. Here I send you a self contained example. I 
took it from openACC tutorial in [1]. I modified the code and added a dummy 
vector of size 1, lines 140-160 in the attached file (jsolvef_mikel.F90). The 
dummy vector (residual_v)  is the array form of the variable residual.

If the reduction clause (line 142) is commented both residual and residual_v 
give the same result. If in the reduction clause residual_v is given a 
compilation error appears, that the reduction clause does not support this 
variable datatype. In [2] I added the OpenACC 3.1 documentation. In section 
1.12 the changes from v2.6 to v2.7 are described. More precisely, in line 
612-613 the next is quoted:

"Arrays, subarrays and composite variables are now allowed in reduction 
clauses; see Sections 2.9.11 reduction clause and 2.5.14 reduction clause.”
I hope I could explain myself properly!
Thanks a lot :) 

Mikel Mendizabal


[1] 
https://github.com/OpenACCUserGroup/openacc-users-group/blob/master/Contributed_Sample_Codes/Tutorial1/solver/jsolvef.F90
 

 
[2] 
https://www.openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.1-final.pdf
 

 



> On 11. Jan 2022, at 14:26, Richard Biener  wrote:
> 
> On Tue, Jan 11, 2022 at 1:52 PM Mikel Mendizabal via Gcc
> mailto:gcc@gcc.gnu.org>> wrote:
>> 
>> Dear GCC developers,
>> 
>> In the past year we started the offload of our software to GPUs. We decided 
>> to go with OpenACC. The program we are trying to offload is Millepede2 
>> (MP2),  a tracker alignment software used to align the CMS experiment 
>> tracker at the large hadron collider.
>> 
>> We are using gcc as our main compiler. However, we found a major 
>> inconvenience with OpenACC 2.6, the REDUCTION clause does not accept arrays. 
>> Thus, it not possible for us to parallelise our largest loops due to array 
>> dependencies. We managed to offload MP2 for small datasets, we worked around 
>> the reduction issue. Nonetheless, if our alignment campaign is large the 
>> workarounds are not useful anymore.
>> 
>> I went thought the new versions of OpenACC and I found that v2.7 accepts 
>> arrays for the REDUCTION clause. I was wondering if it is in your plans to 
>> include a newer version of OpenACC for the next releases.
> 
> Can you produce a self-contained example with an array for the
> REDUCTION clause that should be accepted with OpenACC v2.7?
> 
> Thanks,
> Richard.
> 
>> Sincerely,
>> Mikel Mendizabal



Re: GCC GSoC 2022: Call for project ideas and mentors

2022-01-12 Thread Martin Jambor
On Wed, Jan 12 2022, Martin Jambor wrote:
> On Thu, Jan 06 2022, Martin Jambor wrote:
>>
> [...]
>>
>> I will update you as more details about GSoC 2022 become available.
>>
>
> The official timeline has been published at
> https://developers.google.com/open-source/gsoc/timeline
>
> I do not know how the "standard coding period" and "extended deadlines"
> will exactly work, I suppose mentors and contributors will together
> simply pick which one of the two to follow.
>
> I intend to file our application around February 8th,

apparently I have not had enough coffee today yet...  I wanted to write
February 15 (one week before the deadline).  It would be great to finish
our ideas list with all the details by February 15.

Sorry for the slight confusion,

Martin


Re: GCC and OpenACC

2022-01-12 Thread Tobias Burnus

Dear Mikel,

thanks for the example. I have now filled a tracking issue at
https://gcc.gnu.org/PR103988.

Currently, GCC only supports OpenACC 2.6.

As GCC mainline is in feature-freeze Stage 3, this feature will surely
miss GCC 12, unfortunately.

At the moment, the OpenACC work is mostly focusing on behind-the-scene
changes (like corner cases, performance, nvptx/GCN improvements etc.).
However, support for OpenACC 2.7 (and later) is planned.*

Thanks for the report,

Tobias

*Planned by us, that is. GCC is an open-source project with contributors
from several companies and also many individual developers (spare
time/hobby or paid), each with their own schedule and topical focus.
Besides waiting, one option would be that you implement the reduction
feature yourself in GCC – or find someone who does this for you, paid or
not. (I think it should also be also suitable for Google Summer of Code.)
The array part should be relatively simple as GCC supports it already
for OpenMP; the structure part is a bit more work as piggybacking is not
possible but should be also not that complicated, I think.


On 12.01.22 11:01, Mikel Mendizabal via Gcc wrote:

Dear Richard,

Thanks a lot for the fast response. Here I send you a self contained example. I 
took it from openACC tutorial in [1]. I modified the code and added a dummy 
vector of size 1, lines 140-160 in the attached file (jsolvef_mikel.F90). The 
dummy vector (residual_v)  is the array form of the variable residual.

If the reduction clause (line 142) is commented both residual and residual_v 
give the same result. If in the reduction clause residual_v is given a 
compilation error appears, that the reduction clause does not support this 
variable datatype. In [2] I added the OpenACC 3.1 documentation. In section 
1.12 the changes from v2.6 to v2.7 are described. More precisely, in line 
612-613 the next is quoted:

"Arrays, subarrays and composite variables are now allowed in reduction 
clauses; see Sections 2.9.11 reduction clause and 2.5.14 reduction clause.”
I hope I could explain myself properly!
Thanks a lot :)

Mikel Mendizabal


[1] 
https://github.com/OpenACCUserGroup/openacc-users-group/blob/master/Contributed_Sample_Codes/Tutorial1/solver/jsolvef.F90
 

[2] 
https://www.openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.1-final.pdf
 





On 11. Jan 2022, at 14:26, Richard Biener  wrote:

On Tue, Jan 11, 2022 at 1:52 PM Mikel Mendizabal via Gcc
mailto:gcc@gcc.gnu.org>> wrote:

Dear GCC developers,

In the past year we started the offload of our software to GPUs. We decided to 
go with OpenACC. The program we are trying to offload is Millepede2 (MP2),  a 
tracker alignment software used to align the CMS experiment tracker at the 
large hadron collider.

We are using gcc as our main compiler. However, we found a major inconvenience 
with OpenACC 2.6, the REDUCTION clause does not accept arrays. Thus, it not 
possible for us to parallelise our largest loops due to array dependencies. We 
managed to offload MP2 for small datasets, we worked around the reduction 
issue. Nonetheless, if our alignment campaign is large the workarounds are not 
useful anymore.

I went thought the new versions of OpenACC and I found that v2.7 accepts arrays 
for the REDUCTION clause. I was wondering if it is in your plans to include a 
newer version of OpenACC for the next releases.

Can you produce a self-contained example with an array for the
REDUCTION clause that should be accepted with OpenACC v2.7?

Thanks,
Richard.


Sincerely,
Mikel Mendizabal

-
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955


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

2022-01-12 Thread jiawei
Hi all,

There is an 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:
-  -misa-spec related issue:
- Bump default ISA spec to newer version, current default ISA spec
is 2.2, but it's already out-of-date for a long time
- The most impact is I ext. will bump to  2.1, which is
backward incompatible with 2.0,  I 2.1 has split csr instruction to
zicsr ext. and ifence.i  to zifencei ext., that might break some
existing build script.
- Discuss new scheme for -misa-spec or alternative scheme for
dealing with RISC-V profile

-  Interaction between -march and RISC-V profile[1].
- Introduce -mprofile option: -mprofile=rvm20 + -march=rv32gc
- Or extend syntax of -march option like -march=rvm20+mafdc?








-  RISC-V subextension  related implement progress

[1] Note: What is RISC-V Profile: https://github.com/riscv/riscv-profiles/

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

Topic: RISC-V GNU Toolchain Biweekly Sync-up

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

Meeting ID: 893 9360 0951
Passcode: 899662

BEIJING, China
11:00pThu, Jan 13 2022
12:00aFri, Jan 13 2022

PST/PDT, Pacific Standard Time (US)
7:00aThu, Jan 13 2022
8:00aThu, Jan 13 2022

PHILADELPHIA, United States, Pennsylvania
10:00aThu, Jan 13 2022
11:00aThu, Jan 13 2022




[PATCH] git-backport: support renamed .cc files in commit message.

2022-01-12 Thread Martin Liška

Hi.

There's a patch that enhances git-backport so that it updates commit
messages for files which name ends now with .cc and is still .c on a branch.

Example usage:

$ git show test
commit 8ed4b2cb9aa158c0ef418fd1ac66271664904604 (test)
Author: Martin Liska 
Date:   Wed Jan 12 16:08:13 2022 +0100

Fix file.

gcc/ChangeLog:

* ipa-icf.cc: Test me.

gcc/ada/ChangeLog:

* cal.c: aaa.

libcpp/ChangeLog:

* expr.cc: aaa.


$ git gcc-backport test
Auto-merging gcc/ada/cal.c
Auto-merging gcc/ipa-icf.c
Auto-merging libcpp/expr.c
[test2 ee40feb077e] Fix file.
 Date: Wed Jan 12 16:08:13 2022 +0100
 3 files changed, 3 insertions(+)
Commit message updated: 2 .cc file(s) changed.

$ git show test2
commit f59a1e736c1b68f07d83388a994df8d043e8aa6e (test2)
Author: Martin Liska 
Date:   Wed Jan 12 16:08:13 2022 +0100

Fix file.

gcc/ChangeLog:

* ipa-icf.c: Test me.

gcc/ada/ChangeLog:

* cal.c: aaa.

libcpp/ChangeLog:

* expr.c: aaa.

(cherry picked from commit 8ed4b2cb9aa158c0ef418fd1ac66271664904604)


MartinFrom 647a6dbaf8cde4ee07b95c4530a03f7774500914 Mon Sep 17 00:00:00 2001
From: Martin Liska 
Date: Wed, 12 Jan 2022 16:35:41 +0100
Subject: [PATCH] git-backport: support renamed .cc files in commit message.

The change can automatically update names for *.cc files that
are part of a backport.

contrib/ChangeLog:

	* git-backport.py: Support renaming of .cc files.
---
 contrib/git-backport.py | 50 +
 1 file changed, 50 insertions(+)

diff --git a/contrib/git-backport.py b/contrib/git-backport.py
index 2b8e4686719..627bbd9ee66 100755
--- a/contrib/git-backport.py
+++ b/contrib/git-backport.py
@@ -20,7 +20,32 @@
 # Boston, MA 02110-1301, USA.
 
 import argparse
+import os
 import subprocess
+import sys
+import tempfile
+
+script_folder = os.path.dirname(os.path.abspath(__file__))
+verify_script = os.path.join(script_folder,
+ 'gcc-changelog/git_check_commit.py')
+
+
+def replace_file_in_changelog(lines, filename):
+if not filename.endswith('.cc'):
+return
+
+# consider all componenets of a path: gcc/ipa-icf.cc
+while filename:
+for i, line in enumerate(lines):
+if filename in line:
+line = line.replace(filename, filename[:-1])
+lines[i] = line
+return
+parts = filename.split('/')
+if len(parts) == 1:
+return
+filename = '/'.join(parts[1:])
+
 
 if __name__ == '__main__':
 parser = argparse.ArgumentParser(description='Backport a git revision and '
@@ -63,3 +88,28 @@ if __name__ == '__main__':
 subprocess.check_output(cmd, shell=True)
 else:
 print('Please resolve all remaining file conflicts.')
+sys.exit(1)
+
+# Update commit message if change for a .cc file was taken
+r = subprocess.run(f'{verify_script} HEAD', shell=True, encoding='utf8',
+   stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+if r.returncode != 0:
+lines = r.stdout.splitlines()
+cmd = 'git show -s --format=%B'
+commit_message = subprocess.check_output(cmd, shell=True,
+ encoding='utf8').strip()
+commit_message = commit_message.splitlines()
+
+todo = [line for line in lines if 'unchanged file mentioned' in line]
+for item in todo:
+filename = item.split()[-1].strip('"')
+replace_file_in_changelog(commit_message, filename)
+
+with tempfile.NamedTemporaryFile('w', encoding='utf8',
+ delete=False) as w:
+w.write('\n'.join(commit_message))
+w.close()
+subprocess.check_output(f'git commit --amend -F {w.name}',
+shell=True, encoding='utf8')
+os.unlink(w.name)
+print(f'Commit message updated: {len(todo)} .cc file(s) changed.')
-- 
2.34.1



Re: [RISCV] RISC-V GNU Toolchain Biweekly Sync-up call (Jan 13, 2022)

2022-01-12 Thread Palmer Dabbelt

On Wed, 12 Jan 2022 05:48:41 PST (-0800), jia...@iscas.ac.cn wrote:

Hi all,

There is an 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.


We should also talk about the ABI spec, we've now got a handful of 
incompatibilites between it and the binaries we currently 
generate/accept.




Agenda:
-  -misa-spec related issue:
- Bump default ISA spec to newer version, current default ISA spec
is 2.2, but it's already out-of-date for a long time
- The most impact is I ext. will bump to  2.1, which is
backward incompatible with 2.0,  I 2.1 has split csr instruction to
zicsr ext. and ifence.i  to zifencei ext., that might break some
existing build script.
- Discuss new scheme for -misa-spec or alternative scheme for
dealing with RISC-V profile

-  Interaction between -march and RISC-V profile[1].
- Introduce -mprofile option: -mprofile=rvm20 + -march=rv32gc
- Or extend syntax of -march option like -march=rvm20+mafdc?








-  RISC-V subextension  related implement progress

[1] Note: What is RISC-V Profile: https://github.com/riscv/riscv-profiles/

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

Topic: RISC-V GNU Toolchain Biweekly Sync-up

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

Meeting ID: 893 9360 0951
Passcode: 899662

BEIJING, China
11:00pThu, Jan 13 2022
12:00aFri, Jan 13 2022

PST/PDT, Pacific Standard Time (US)
7:00aThu, Jan 13 2022
8:00aThu, Jan 13 2022

PHILADELPHIA, United States, Pennsylvania
10:00aThu, Jan 13 2022
11:00aThu, Jan 13 2022