Re: hard-reg constraints: Question about materialization

2025-07-21 Thread Stefan Schulze Frielinghaus via Gcc
On Mon, Jul 21, 2025 at 03:30:08PM +0200, Georg-Johann Lay wrote: > The recently pushed hreg-constraints (HRCs) feature has this in > the docs: > > > register asm may not only be clobbered by function calls but also by inline > asm in conjunction with hard register constraints. For example, in th

hard-reg constraints: Question about materialization

2025-07-21 Thread Georg-Johann Lay via Gcc
The recently pushed hreg-constraints (HRCs) feature has this in the docs: register asm may not only be clobbered by function calls but also by inline asm in conjunction with hard register constraints. For example, in the following register int x asm ("r5") = 42; int y; asm ("" : "={r5}" (y))

Re: Question about GCC license for commercial use

2025-07-17 Thread Richard Kenner via Gcc
> AFAIU, having the shared libraries in separate files means they are > not "combined" with the program's code. That's how I understand what > RMS told me back then, in the quote that I brought up. Nothing in the GCC Runtime Exception says that the "Target Code" consists of a single file.

Re: Question about GCC license for commercial use

2025-07-17 Thread Eli Zaretskii via Gcc
> Date: Thu, 17 Jul 2025 05:23:50 -0700 (PDT) > Cc: gcc@gcc.gnu.org, jwakely@gmail.com, qifan.z...@xpeedic.com > From: ken...@adacore.com (Richard Kenner) > > > I don't see how distributing in the same tarball would solve the > > problem. > > > > Suppose I'd decide to distribute a Windows bui

Re: Question about GCC license for commercial use

2025-07-17 Thread Richard Kenner via Gcc
> I don't see how distributing in the same tarball would solve the > problem. > > Suppose I'd decide to distribute a Windows build of Emacs together > with GNU Grep (e.g., because MS-Windows systems don't come with Grep > OOTB, whereas Emacs users need Grep for several of its features). I > would

Re: Question about GCC license for commercial use

2025-07-17 Thread Eli Zaretskii via Gcc
> Date: Thu, 17 Jul 2025 03:43:29 -0700 (PDT) > Cc: gcc@gcc.gnu.org, jwakely@gmail.com, qifan.z...@xpeedic.com > From: ken...@adacore.com (Richard Kenner) > > > > Yes, but the discussion wasn't about "as a separate file", but as a file > > > that's part of the distribution of another program.

Re: Question about GCC license for commercial use

2025-07-17 Thread Richard Kenner via Gcc
> > Yes, but the discussion wasn't about "as a separate file", but as a file > > that's part of the distribution of another program. > > A shared library is always a separate file. Yes, of course. What I meant is that it's not *being distributed separately*. For example, it can be in the same t

Re: Question about GCC license for commercial use

2025-07-17 Thread Eli Zaretskii via Gcc
> Date: Thu, 17 Jul 2025 02:28:36 -0700 (PDT) > Cc: gcc@gcc.gnu.org, jwakely@gmail.com, qifan.z...@xpeedic.com > From: ken...@adacore.com (Richard Kenner) > > > That's not what RMS told me when I asked him some time ago. He said > > that, since libgcc DLL and libstdc++ DLL are basically separ

Re: Question about GCC license for commercial use

2025-07-17 Thread Richard Kenner via Gcc
> That's not what RMS told me when I asked him some time ago. He said > that, since libgcc DLL and libstdc++ DLL are basically separate files > and thus separate builds of the libraries, the run-time exception you > pointed to is not applicable to them. Quoting his response back then: > > Ther

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> Date: Wed, 16 Jul 2025 19:03:21 +0200 > Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org > From: David Brown > > >> Well they didn't ask about distributing the DLLs :-) > > > > They did, indirectly: programs compiled by MinGW GCC are linked > > against libgcc and libstdc++ import libraries, and thu

Re: Question about GCC license for commercial use

2025-07-16 Thread David Brown via Gcc
On 16/07/2025 17:37, Eli Zaretskii via Gcc wrote: From: Jonathan Wakely Date: Wed, 16 Jul 2025 16:12:01 +0100 Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org On Wed, 16 Jul 2025 at 15:59, Eli Zaretskii wrote: Please stop giving bad advice and direct people to read the appropriate documentation.

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> Date: Wed, 16 Jul 2025 17:44:41 +0200 > From: Dennis Luehring via Gcc > > Am 16.07.2025 um 17:37 schrieb Eli Zaretskii via Gcc: > > Unless the Windows loader can find them on > > the end-user's machine, it will refuse to run the program. > > the initial q

Re: Question about GCC license for commercial use

2025-07-16 Thread Dennis Luehring via Gcc
Am 16.07.2025 um 17:37 schrieb Eli Zaretskii via Gcc: Unless the Windows loader can find them on the end-user's machine, it will refuse to run the program. the initial question was: do they fall under GPL when just using gcc - how complex or error prone their distribution concepts get

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> From: Jonathan Wakely > Date: Wed, 16 Jul 2025 16:12:01 +0100 > Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org > > On Wed, 16 Jul 2025 at 15:59, Eli Zaretskii wrote: > > > > > Please stop giving bad advice and direct people to read the > > > appropriate documentation. > > > > Why the animosity?

Re: Question about GCC license for commercial use

2025-07-16 Thread Jonathan Wakely via Gcc
On Wed, 16 Jul 2025 at 15:59, Eli Zaretskii wrote: > > > From: Jonathan Wakely > > Date: Wed, 16 Jul 2025 15:08:50 +0100 > > Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org > > > > > > AFAIU, this is accurate if libgcc and libstdc++ are linked statically, > > > > but not if the program is linked to t

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> From: Jonathan Wakely > Date: Wed, 16 Jul 2025 15:08:50 +0100 > Cc: qifan.z...@xpeedic.com, gcc@gcc.gnu.org > > > > AFAIU, this is accurate if libgcc and libstdc++ are linked statically, > > > but not if the program is linked to their DLL versions (and therefore > > > the DLLs must be distribut

Re: Question about GCC license for commercial use

2025-07-16 Thread Jonathan Wakely via Gcc
On Wed, 16 Jul 2025 at 15:06, Jonathan Wakely wrote: > > On Wed, 16 Jul 2025 at 13:21, Eli Zaretskii wrote: > > > > > Date: Wed, 16 Jul 2025 11:12:44 +0100 > > > Cc: gcc , gcc-help > > > From: Jonathan Wakely via Gcc > > > > > > On Wed, 16 Jul 2025 at 10:06, Qifan.Zhou via Gcc wrote: > > > > >

Re: Question about GCC license for commercial use

2025-07-16 Thread Jonathan Wakely via Gcc
On Wed, 16 Jul 2025 at 13:21, Eli Zaretskii wrote: > > > Date: Wed, 16 Jul 2025 11:12:44 +0100 > > Cc: gcc , gcc-help > > From: Jonathan Wakely via Gcc > > > > On Wed, 16 Jul 2025 at 10:06, Qifan.Zhou via Gcc wrote: > > > > > > Dear GCC Team, > > > > Please don't email both gcc@gcc.gnu.org and

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> Date: Wed, 16 Jul 2025 06:49:23 -0700 (PDT) > Cc: gcc@gcc.gnu.org, jwakely@gmail.com, qifan.z...@xpeedic.com > From: ken...@adacore.com (Richard Kenner) > > > Not if we are talking about Windows binaries intended to be used by > > people who don't have GCC installed. (The OP asked about Min

Re: Question about GCC license for commercial use

2025-07-16 Thread Richard Kenner via Gcc
> Not if we are talking about Windows binaries intended to be used by > people who don't have GCC installed. (The OP asked about MinGW, which > is why I bring up this case.) These DLLs are part of the MinGW GCC > installation, but do not come with the OS OOTB. But then what the OP could do is to

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> Date: Wed, 16 Jul 2025 06:20:42 -0700 (PDT) > Cc: gcc@gcc.gnu.org, jwakely@gmail.com, qifan.z...@xpeedic.com > From: ken...@adacore.com (Richard Kenner) > > > AFAIU, this is accurate if libgcc and libstdc++ are linked statically, > > but not if the program is linked to their DLL versions (an

Re: Question about GCC license for commercial use

2025-07-16 Thread Richard Kenner via Gcc
> AFAIU, this is accurate if libgcc and libstdc++ are linked statically, > but not if the program is linked to their DLL versions (and therefore > the DLLs must be distributed with the resulting program). In the > latter case, the LGPL exception doesn't apply, and distributing these > DLLs falls u

Re: Question about GCC license for commercial use

2025-07-16 Thread Eli Zaretskii via Gcc
> Date: Wed, 16 Jul 2025 11:12:44 +0100 > Cc: gcc , gcc-help > From: Jonathan Wakely via Gcc > > On Wed, 16 Jul 2025 at 10:06, Qifan.Zhou via Gcc wrote: > > > > Dear GCC Team, > > Please don't email both gcc@gcc.gnu.org and gcc-h...@gcc.gnu.org, pick > the appropriate one. You're not discussin

Re: Question about GCC license for commercial use

2025-07-16 Thread Jonathan Wakely via Gcc
On Wed, 16 Jul 2025 at 10:06, Qifan.Zhou via Gcc wrote: > > Dear GCC Team, Please don't email both gcc@gcc.gnu.org and gcc-h...@gcc.gnu.org, pick the appropriate one. You're not discussing development of GCC so this belongs on the gcc-help list. Anyway ... > I hope this message finds you well.

Question about GCC license for commercial use

2025-07-16 Thread Qifan.Zhou via Gcc
Dear GCC Team, I hope this message finds you well. I'm writing to seek official clarification regarding the use of GCC compilers in our proprietary, closed-source commercial software development. Our specific use case involves: 1. Using GCC executables (gcc.exe, g++.exe, etc.

Re: Question for maintainers: ARCv3 port feasibility

2025-05-19 Thread Claudiu Zissulescu Ianculescu via Gcc
> > >> I'm currently doing a feasibility study and effort estimate for > >> upstreaming the existing ARCv3 out-of-tree port [1]. > >> > >> Question: Is there likely to be any objection to adding a new "arc64" > >> port in addition t

Re: Question for maintainers: ARCv3 port feasibility

2025-05-16 Thread Andrew Stubbs
On 15/05/2025 17:55, Richard Biener wrote: On Thu, May 15, 2025 at 6:43 PM Andrew Stubbs wrote: Dear GCC Maintainers and Steering Committee, I'm currently doing a feasibility study and effort estimate for upstreaming the existing ARCv3 out-of-tree port [1]. Question: Is there likely

Re: Question for maintainers: ARCv3 port feasibility

2025-05-16 Thread Andrew Stubbs
sting ARCv3 out-of-tree port [1]. Question: Is there likely to be any objection to adding a new "arc64" port in addition to the existing "arc" port? At this point, I would like to check that the general approach is likely to be accepted at the end of the project. Or, at least n

Re: Question for maintainers: ARCv3 port feasibility

2025-05-15 Thread Paul Koning via Gcc
; upstreaming the existing ARCv3 out-of-tree port [1]. >> >> Question: Is there likely to be any objection to adding a new "arc64" >> port in addition to the existing "arc" port? >> >> At this point, I would like to check that the general approach

Re: Question for maintainers: ARCv3 port feasibility

2025-05-15 Thread Oleg Endo via Gcc
Hi, On Thu, 2025-05-15 at 17:41 +0100, Andrew Stubbs wrote: > Dear GCC Maintainers and Steering Committee, > > I'm currently doing a feasibility study and effort estimate for > upstreaming the existing ARCv3 out-of-tree port [1]. > > Question: Is there likely to be an

Re: Question for maintainers: ARCv3 port feasibility

2025-05-15 Thread Richard Biener via Gcc
On Thu, May 15, 2025 at 6:43 PM Andrew Stubbs wrote: > > Dear GCC Maintainers and Steering Committee, > > I'm currently doing a feasibility study and effort estimate for > upstreaming the existing ARCv3 out-of-tree port [1]. > > Question: Is there likely to be any object

Question for maintainers: ARCv3 port feasibility

2025-05-15 Thread Andrew Stubbs
Dear GCC Maintainers and Steering Committee, I'm currently doing a feasibility study and effort estimate for upstreaming the existing ARCv3 out-of-tree port [1]. Question: Is there likely to be any objection to adding a new "arc64" port in addition to the existing "arc&qu

Question About GPU-Powered Parallel Compilation in GCC

2025-05-14 Thread Basile Starynkevitch
> Nikhil Patil asked > > I'm fairly new to the world of compilers and trying to understand how they > > work in more depth. Recently, I started exploring the idea of *parallelizing > > the internal steps of compilation* — such as parsing, code generation, and > > optimization — instead of the u

Re: Question About GPU-Powered Parallel Compilation in GCC

2025-05-13 Thread Richard Biener via Gcc
On Tue, May 13, 2025 at 12:51 PM Andrew Stubbs wrote: > > On 12/05/2025 15:27, Nikhil Patil via Gcc wrote: > > Hi Richard, > > > > Thank you so much for the reply! > > > > You're absolutely right about using CPU threads. I’m just really curious > > about whether GPU acceleration could somehow be e

Re: Question About GPU-Powered Parallel Compilation in GCC

2025-05-13 Thread Andrew Stubbs
On 12/05/2025 15:27, Nikhil Patil via Gcc wrote: Hi Richard, Thank you so much for the reply! You're absolutely right about using CPU threads. I’m just really curious about whether GPU acceleration could somehow be explored for compilation, even if it’s not traditionally well-suited. I know it

Re: Question About GPU-Powered Parallel Compilation in GCC

2025-05-12 Thread Dmitry Mikushin
Hi Nikhil, While today's compilers are still largely very intricate code for Turing machines, this will certainly change during your career. It seems you'll be using GPUs for AI-assisted construction of optimal program graphs and immediately testing the performance of code fragments instead of rel

Re: Question About GPU-Powered Parallel Compilation in GCC

2025-05-12 Thread Nikhil Patil via Gcc
Hi Richard, Thank you so much for the reply! You're absolutely right about using CPU threads. I’m just really curious about whether GPU acceleration could somehow be explored for compilation, even if it’s not traditionally well-suited. I know it might not be practical, but I wanted to understand

Re: Question About GPU-Powered Parallel Compilation in GCC

2025-05-12 Thread Richard Biener via Gcc
On Mon, May 12, 2025 at 2:55 PM Nikhil Patil via Gcc wrote: > > Hi GCC Team, > > I'm fairly new to the world of compilers and trying to understand how they > work in more depth. Recently, I started exploring the idea of *parallelizing > the internal steps of compilation* — such as parsing, code ge

Question About GPU-Powered Parallel Compilation in GCC

2025-05-12 Thread Nikhil Patil via Gcc
Hi GCC Team, I'm fairly new to the world of compilers and trying to understand how they work in more depth. Recently, I started exploring the idea of *parallelizing the internal steps of compilation* — such as parsing, code generation, and optimization — instead of the usual serial approach, and p

Re: git gcc-verify question

2025-02-14 Thread Jonathan Wakely via Gcc
On Fri, 14 Feb 2025 at 05:01, Jerry D via Gcc wrote: > > Does anyone know what this is about? > > $ git gcc-verify > Checking 918fcaf0cbf833063c45805ef893cfa2c9ebc875: OK N.B. it works fine, the line above is the expected output. It just lets you know that something was ignored in the asynchronou

git gcc-verify question

2025-02-13 Thread Jerry D via Gcc
Does anyone know what this is about? $ git gcc-verify Checking 918fcaf0cbf833063c45805ef893cfa2c9ebc875: OK Exception ignored in: Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/git/cmd.py", line 563, in __del__ File "/usr/lib/python3.13/site-packages/git/cmd.py",

Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
Hi Florian, Thank you very much for your reply. This is not related to ELF. What I am trying to do is simply obtain the 'Derived' type node from the parameter that is retrieved via the '__dynamic_cast' call. I believe this should be a relatively simple coding problem. However, I am not very fami

Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Florian Weimer via Gcc
* Hanke Zhang via Gcc: > I have recently been delving into optimizing dynamic_cast calls in C++ > within the context of GIMPLE code. In particular, for scenarios > involving single inheritance, I'm aiming to convert the following > code: > > _1 = __dynamic_cast (obj_1(D), &_ZTI7Base, &_ZTI10Derive

Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
Hi, I have recently been delving into optimizing dynamic_cast calls in C++ within the context of GIMPLE code. In particular, for scenarios involving single inheritance, I'm aiming to convert the following code: _1 = __dynamic_cast (obj_1(D), &_ZTI7Base, &_ZTI10Derived, 0); if (_1!= 0B) into a mo

Re: Question regarding riscv_valid_lo_sum_p vs strict-align

2025-01-01 Thread Andrew Waterman via Gcc
IIRC, the reason is that, under strict alignment, it can be assumed that accessing subfields of an aligned datatype won't cross a boundary that would cause the high part to change, thus requiring a different LUI instruction for the subfield access. Under non-strict alignment, this assumption doesn

Question regarding riscv_valid_lo_sum_p vs strict-align

2024-12-31 Thread Xi Ruoyao via Gcc
Hi, When -mstrict-align was added for RISC-V, there was a change for riscv_valid_lo_sum_p: @@ -726,7 +733,8 @@ riscv_valid_lo_sum_p (enum riscv_symbol_type sym_type, enum machine_mode mode) /* We may need to split multiword moves, so make sure that each word can be accessed without indu

Question about http://gcc.gnu.org/wiki/Atomic

2024-10-20 Thread Olive Clinton via Gcc
Hello I’m Olive and I run an advanced AI service called ZeroGPT's Citation Generator : https://www.ZeroGPT.com/Citation-Generator ZeroGPT's Word Counter is a Free and revolutionary tool to an innovative tool designed to effortlessly track and analyze word usage in your documents. With its us

Re: Question about creating clones of ipcp clones

2024-10-16 Thread Martin Jambor
Hello, On Wed, Sep 11 2024, Prachi Godbole via Gcc wrote: > Hi, > > I am trying to generate out-of-line clones of ipcp clones for an IPA > pass that runs after IPA inline, where the new clone has same function > body and same updated signature as the ipcp clone. This fails or > asserts based on ho

Re: Educational question on compiling (analyzing) the C programming language

2024-10-10 Thread Andreas Schwab via Gcc
On Okt 10 2024, Florian Weimer wrote: > * Laurent Cimon via Gcc: > >> I realize that compilers have evolved with time, and that many >> things required the use of function prototypes, but my question is, >> what is the historical reason that a function defined further do

Re: Educational question on compiling (analyzing) the C programming language

2024-10-10 Thread Florian Weimer
* Laurent Cimon via Gcc: > I realize that compilers have evolved with time, and that many > things required the use of function prototypes, but my question is, > what is the historical reason that a function defined further down > in a C file cannot be used without a function prototyp

Educational question on compiling (analyzing) the C programming language

2024-10-08 Thread Laurent Cimon via Gcc
assmates, so this is an opportunity to settle the question for many people. I realize that compilers have evolved with time, and that many things required the use of function prototypes, but my question is, what is the historical reason that a function defined further down in a C file cannot be u

Question about creating clones of ipcp clones

2024-09-11 Thread Prachi Godbole via Gcc
Hi, I am trying to generate out-of-line clones of ipcp clones for an IPA pass that runs after IPA inline, where the new clone has same function body and same updated signature as the ipcp clone. This fails or asserts based on how the clone is created: 1. If param_adjustments and tree_map are n

Re: Question about enabling additional flags in Ofast

2024-07-13 Thread Andrew Pinski via Gcc
On Sat, Jul 13, 2024 at 9:38 AM Hanke Zhang via Gcc wrote: > > Hi, > > I'm attempting to enable more flags in Ofast, but I've encountered some > issues. I suspect you need to handle this in the driver specs instead of in opts.cc. Since -flto-partition=one is more of a global flag rather than an

Question about enabling additional flags in Ofast

2024-07-13 Thread Hanke Zhang via Gcc
Hi, I'm attempting to enable more flags in Ofast, but I've encountered some issues. For instance, if I want to add -flto-partition=one to Ofast, here is the modification I made to opts.cc /* -Ofast adds optimizations to -O3. */ { OPT_LEVELS_FAST, OPT_ffast_math, NULL, 1 }, { OPT_LEVELS_FAST, OP

Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Hanke Zhang via Gcc
Hi Richard, Thanks for your reply. I'm looking forward to hearing from Honza! But I still have a small question about the IPA passes. If I want to make such a conversion (sum += foo[i].add == add ? add (1,2) : foo[i].add (1,2);), I definitely need to change the function's body. But t

Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Richard Biener via Gcc
On Wed, Jun 12, 2024 at 11:57 AM Hanke Zhang wrote: > > Richard Biener 于2024年5月24日周五 14:39写道: > > > > On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > > > > > Hi, > > > I got a question about optimizing function pointers for direct &g

Re: Question about optimizing function pointers for direct function calls

2024-06-12 Thread Hanke Zhang via Gcc
Richard Biener 于2024年5月24日周五 14:39写道: > > On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > > > Hi, > > I got a question about optimizing function pointers for direct > > function calls in C. > > > > Consider the following scenario: one of t

Re: Question about generating vpmovzxbd instruction without using the interfaces in immintrin.h

2024-05-31 Thread Richard Biener via Gcc
On Fri, May 31, 2024 at 4:59 AM Hanke Zhang via Gcc wrote: > > Hi, > I've recently been trying to hand-write code to trigger automatic > vectorization optimizations in GCC on Intel x86 machines (without > using the interfaces in immintrin.h), but I'm running into a problem > where I can't seem to

Re: Question about generating vpmovzxbd instruction without using the interfaces in immintrin.h

2024-05-30 Thread Hongtao Liu via Gcc
On Fri, May 31, 2024 at 10:58 AM Hanke Zhang via Gcc wrote: > > Hi, > I've recently been trying to hand-write code to trigger automatic > vectorization optimizations in GCC on Intel x86 machines (without > using the interfaces in immintrin.h), but I'm running into a problem > where I can't seem to

Question about generating vpmovzxbd instruction without using the interfaces in immintrin.h

2024-05-30 Thread Hanke Zhang via Gcc
Hi, I've recently been trying to hand-write code to trigger automatic vectorization optimizations in GCC on Intel x86 machines (without using the interfaces in immintrin.h), but I'm running into a problem where I can't seem to get the concise `vpmovzxbd` or similar instructions. My requirement is

Re: Question about the SLP vectorizer failed to perform automatic vectorization in one case

2024-05-27 Thread Hanke Zhang via Gcc
Hi Biener, Thanks for your help! I have already open a bugreport here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115252. Thanks Hanke Zhang Richard Biener 于2024年5月27日周一 21:14写道: > > On Sat, May 25, 2024 at 3:08 PM Hanke Zhang via Gcc wrote: > > > > Hi, > > I'm trying to studing the automati

Re: Question about the SLP vectorizer failed to perform automatic vectorization in one case

2024-05-27 Thread Richard Biener via Gcc
On Sat, May 25, 2024 at 3:08 PM Hanke Zhang via Gcc wrote: > > Hi, > I'm trying to studing the automatic vectorization optimization in GCC, > but I found one case that SLP vectorizer failed to do such things. > > Here is the sample code: (also a simplification version of a function > from the 625/

Question about the SLP vectorizer failed to perform automatic vectorization in one case

2024-05-25 Thread Hanke Zhang via Gcc
Hi, I'm trying to studing the automatic vectorization optimization in GCC, but I found one case that SLP vectorizer failed to do such things. Here is the sample code: (also a simplification version of a function from the 625/525.x264 source code in SPEC CPU 2017) void pixel_sub_wxh(int16_t *diff,

Re: Question about optimizing function pointers for direct function calls

2024-05-24 Thread Jeff Law via Gcc
On 5/23/24 9:51 PM, Hanke Zhang via Gcc wrote: Hi, I got a question about optimizing function pointers for direct function calls in C. Consider the following scenario: one of the fields of a structure is a function pointer, and all its assignments come from the same function. Can all its

Re: Question about optimizing function pointers for direct function calls

2024-05-23 Thread Richard Biener via Gcc
On Fri, May 24, 2024 at 5:53 AM Hanke Zhang via Gcc wrote: > > Hi, > I got a question about optimizing function pointers for direct > function calls in C. > > Consider the following scenario: one of the fields of a structure is a > function pointer, and all its assignmen

Question about optimizing function pointers for direct function calls

2024-05-23 Thread Hanke Zhang via Gcc
Hi, I got a question about optimizing function pointers for direct function calls in C. Consider the following scenario: one of the fields of a structure is a function pointer, and all its assignments come from the same function. Can all its uses be replaced by direct calls to this function? So

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-30 Thread Iain Sandoe
> On 30 Apr 2024, at 08:33, Iain Sandoe wrote: > > Hi, > >> On 30 Apr 2024, at 00:39, Andrew Pinski via Gcc wrote: >> >> On Mon, Apr 29, 2024 at 4:26 PM Lucier, Bradley J via Gcc >> wrote: >>> >>> The question: How to interpr

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-30 Thread Iain Sandoe
Hi, > On 30 Apr 2024, at 00:39, Andrew Pinski via Gcc wrote: > > On Mon, Apr 29, 2024 at 4:26 PM Lucier, Bradley J via Gcc > wrote: >> >> The question: How to interpret scheduling info with the compiler listed >> below. >> >> Specifically, a tight

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-29 Thread Andrew Pinski via Gcc
On Mon, Apr 29, 2024 at 4:26 PM Lucier, Bradley J via Gcc wrote: > > The question: How to interpret scheduling info with the compiler listed below. > > Specifically, a tight loop that was reported to be scheduled in 23 cycles (as > I understand it) actually executes in a little ov

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-29 Thread Lucier, Bradley J via Gcc
That should be 4 cycles per loop, sorry. > On Apr 29, 2024, at 7:24 PM, Lucier, Bradley J wrote: > > Specifically, a tight loop that was reported to be scheduled in 23 cycles (as > I understand it) actually executes in a little over 2 cycles per loop

Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-29 Thread Lucier, Bradley J via Gcc
The question: How to interpret scheduling info with the compiler listed below. Specifically, a tight loop that was reported to be scheduled in 23 cycles (as I understand it) actually executes in a little over 2 cycles per loop, as I interpret two separate experiments. Am I misinterpreting

Re: Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Richard Biener via Gcc
On Tue, Apr 9, 2024 at 4:42 AM Hanke Zhang via Gcc wrote: > > Hi Marc, > > Thanks for your reply. > > I want to create a new type similar to this one `(const __m256i_u * > {ref-all})` indeed. And I try to create it via these calls: > > tree type = build_vector_type_for_mode (intDI_type_node, V4DIm

Re: Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Hanke Zhang via Gcc
Hi Marc, Thanks for your reply. I want to create a new type similar to this one `(const __m256i_u * {ref-all})` indeed. And I try to create it via these calls: tree type = build_vector_type_for_mode (intDI_type_node, V4DImode); tree type_p = build_pointer_type_for_mode(type, VOIDmode, true); Bu

Re: Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Marc Glisse via Gcc
On Mon, 8 Apr 2024, Hanke Zhang via Gcc wrote: Hi, I've been working on strengthening auto-vectorization on intel CPUs recently. I tried to do it in the GIMPLE pass. And I noticed that some vector types in the GIMPLE code are confusing to me. The example code is here: _1 = MEM[(const __m256i_u

Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Hanke Zhang via Gcc
Hi, I've been working on strengthening auto-vectorization on intel CPUs recently. I tried to do it in the GIMPLE pass. And I noticed that some vector types in the GIMPLE code are confusing to me. The example code is here: _1 = MEM[(const __m256i_u * {ref-all})_2]; I wondered how I could construct

Re: [GSoC] Application RFC + Question - GENERIC dump

2024-04-05 Thread Thor Preimesberger via Gcc
> On Tue, Apr 2, 2024 at 11:14 AM Thor Preimesberger via Gcc > >> wrote: > >> > > >> > Forgot to CC the mailing list - mea culpa. > >> > > >> > -- Forwarded message - > >> > From: Thor Preimesberger > &g

Re: [GSoC] Application RFC + Question - GENERIC dump

2024-04-05 Thread Martin Jambor
pa. >> > >> > -- Forwarded message - >> > From: Thor Preimesberger >> > Date: Tue, Apr 2, 2024 at 5:57 PM >> > Subject: Re: [GSoC] Application RFC + Question - GENERIC dump >> > To: Richard Biener >> > >> > >> > Tha

Re: [GSoC] Application RFC + Question - GENERIC dump

2024-04-05 Thread Richard Biener via Gcc
> > Date: Tue, Apr 2, 2024 at 5:57 PM > > Subject: Re: [GSoC] Application RFC + Question - GENERIC dump > > To: Richard Biener > > > > > > Thanks for the quick feedback, especially on such short notice - I'll > > get the actual GSoC application in, within

Re: [GSoC] Application RFC + Question - GENERIC dump

2024-04-02 Thread Richard Biener via Gcc
On Tue, Apr 2, 2024 at 11:14 AM Thor Preimesberger via Gcc wrote: > > Forgot to CC the mailing list - mea culpa. > > -- Forwarded message - > From: Thor Preimesberger > Date: Tue, Apr 2, 2024 at 5:57 PM > Subject: Re: [GSoC] Application RFC + Question - GENER

Fwd: [GSoC] Application RFC + Question - GENERIC dump

2024-04-02 Thread Thor Preimesberger via Gcc
Forgot to CC the mailing list - mea culpa. -- Forwarded message - From: Thor Preimesberger Date: Tue, Apr 2, 2024 at 5:57 PM Subject: Re: [GSoC] Application RFC + Question - GENERIC dump To: Richard Biener Thanks for the quick feedback, especially on such short notice - I&#x

Re: [GSoC] Application RFC + Question - GENERIC dump

2024-04-02 Thread Richard Biener via Gcc
the application I've written is below. Thank you for the interest in this project. > A quick question before though: > > - What would the expected use cases of the proposed > -fdump-generic-nodes option be, in addition to, presumably, writing > front ends into gcc?

Question about Stripe activity at your end at your site

2024-01-26 Thread Frank Kruse
Hello, I'm reaching out because I've got a major issue. There's this unexpected charge on my credit card, and it turns out, it's linked to a transaction on your service. Now, get this: I talked to Stripe Processing, and they were like, "Yep, the payment went through our site, and you've got to

Re: Question about creating global varaiable during IPA PASS.

2023-12-20 Thread Hanke Zhang via Gcc
Hi Thomas! Thanks for your reply. That's exactly what I'm missing. When I add varpool_node::finalize_decl() to my code, everything works fine! Thomas Schwinge 于2023年12月16日周六 01:15写道: > > Hi Hanke! > > On 2023-12-13T17:04:57+0800, Hanke Zhang via Gcc wrote: > > Hi, I'm trying to create a global

Re: Question about creating global varaiable during IPA PASS.

2023-12-15 Thread Thomas Schwinge
Hi Hanke! On 2023-12-13T17:04:57+0800, Hanke Zhang via Gcc wrote: > Hi, I'm trying to create a global variable in my own PASS which > located at the LATE_IPA_PASSES. (I'm using GCC 10.3.0.) I can't comment on IPA aspects, or whether something was different on oldish GCC 10 (why using that one, b

Question about creating global varaiable during IPA PASS.

2023-12-13 Thread Hanke Zhang via Gcc
Hi, I'm trying to create a global variable in my own PASS which located at the LATE_IPA_PASSES. (I'm using GCC 10.3.0.) And after creating it, I added the attributes like the following. // 1. create the var tree new_name = get_identifier (xx); tree new_type = build_pointer_type (xx); tree new_var

Question about creating an outermost loop

2023-11-20 Thread Hanke Zhang via Gcc
Hi, I'm working on loop tiling recently. I want to add this optimization to GCC. But I have encoutered some problems here and ask for help. For the code below as an example: for (int i = 0; i < 12; i++) { for (int j = 0; j < arr.length; j++) { // arr.length may be huge // do something with

Question about vectorization optimization during RTL-PASS

2023-11-12 Thread Hanke Zhang via Gcc
Hi, I've been working on vectorization-related optimization lately. GCC seems to have some optimization vulnerabilities. I would like to ask if it can be solved. For example, for the following program using AVX2: #include // reg->node2[i].state is an unsigned long long variable // reg->size is a

Question about the changing the default behavior of ipa-inline

2023-11-03 Thread Hanke Zhang via Gcc
Hi, I recently ran into an inline-related issue and would like to ask about it. This is about the ipa-inline. I'd like to make my function be inlined, but it trapped in the function 'want_inline_small_function_p', more specificly, in the conditional statement 'growth_positive_p (callee, e, growth)

Re: Question on GIMPLE shifts

2023-11-02 Thread Richard Biener via Gcc
On Wed, Nov 1, 2023 at 5:01 PM Andrew Pinski via Gcc wrote: > > On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > > > Hi! > > > > When investigating bit shifts I got an incomprehensible moment with > > the following example: > > > > int f(int x, int k) > > { > > int tmp = x >> k; > >

Re: Question about function Split with va_args

2023-11-02 Thread Richard Biener via Gcc
On Wed, Nov 1, 2023 at 11:12 AM Hanke Zhang via Gcc wrote: > > Hi > > I've been working on function splits recently, and I've noticed that > functions with va_args arguments won't be split, so why is that? I > tried to understand the comments in the source code, but I still don't > get the specifi

Re: Question on GIMPLE shifts

2023-11-01 Thread Andrew Pinski via Gcc
On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > Hi! > > When investigating bit shifts I got an incomprehensible moment with > the following example: > > int f(int x, int k) > { > int tmp = x >> k; > return (tmp & 1) << 10; > } > > If we would like to take a look into GIMPLE then

Question about function Split with va_args

2023-11-01 Thread Hanke Zhang via Gcc
Hi I've been working on function splits recently, and I've noticed that functions with va_args arguments won't be split, so why is that? I tried to understand the comments in the source code, but I still don't get the specific reason. At the same time, if I do want to split functions with va_args

Question on GIMPLE shifts

2023-11-01 Thread Daniil Frolov
Hi! When investigating bit shifts I got an incomprehensible moment with the following example: int f(int x, int k) { int tmp = x >> k; return (tmp & 1) << 10; } If we would like to take a look into GIMPLE then we'll get: int f (int x, int k) { int tmp; int D.2746; int _1; int _

Re: Question on replacing .MASK_STORE with ternary expressions

2023-10-25 Thread Hanke Zhang via Gcc
../../gcc/tree-if-conv.cc:3549 > > Richard Biener 于2023年10月25日周三 23:40写道: > > > > > > > > > Am 25.10.2023 um 17:25 schrieb Hanke Zhang via Gcc : > > > > > > Hi, I got a gimple relative question. > > > > > > I'm trying

Re: Question on replacing .MASK_STORE with ternary expressions

2023-10-25 Thread Hanke Zhang via Gcc
3d execute ../../gcc/tree-if-conv.cc:3549 Richard Biener 于2023年10月25日周三 23:40写道: > > > > > Am 25.10.2023 um 17:25 schrieb Hanke Zhang via Gcc : > > > > Hi, I got a gimple relative question. > > > > I'm trying to replace the .MASK_STORE with a ternary expres

Re: Question on replacing .MASK_STORE with ternary expressions

2023-10-25 Thread Richard Biener via Gcc
> Am 25.10.2023 um 17:25 schrieb Hanke Zhang via Gcc : > > Hi, I got a gimple relative question. > > I'm trying to replace the .MASK_STORE with a ternary expression in > pass_ifcvt like below: > > .MASK_STORE(addr, align, mask, value) => *addr = mask ? value

Question on replacing .MASK_STORE with ternary expressions

2023-10-25 Thread Hanke Zhang via Gcc
Hi, I got a gimple relative question. I'm trying to replace the .MASK_STORE with a ternary expression in pass_ifcvt like below: .MASK_STORE(addr, align, mask, value) => *addr = mask ? value : *addr; But when I do this, I'm stucked. The addr here is a SSA_NAME of course. When I t

Re: Question about the pass_fre about merging if blocks.

2023-10-21 Thread Richard Biener via Gcc
> Am 21.10.2023 um 16:39 schrieb Hanke Zhang : > > Richard Biener 于2023年10月21日周六 18:23写道: >> >> >> Am 21.10.2023 um 10:58 schrieb Hanke Zhang : >>> >>> Richard Biener 于2023年10月20日周五 23:27写道: >> Am 20.10.2023 um 16:33 schrieb Hanke Zhang : > > Richard

Re: Question about the pass_fre about merging if blocks.

2023-10-21 Thread Hanke Zhang via Gcc
Richard Biener 于2023年10月21日周六 18:23写道: > > > > > Am 21.10.2023 um 10:58 schrieb Hanke Zhang : > > > > Richard Biener 于2023年10月20日周五 23:27写道: > >> > >> > >> > Am 20.10.2023 um 16:33 schrieb Hanke Zhang : > >>> > >>> Richard Biener 于2023年10月20日周五 21:33写道: > > > On Fri, Oct 20, 2023

Re: Question about the pass_fre about merging if blocks.

2023-10-21 Thread Richard Biener via Gcc
> Am 21.10.2023 um 10:58 schrieb Hanke Zhang : > > Richard Biener 于2023年10月20日周五 23:27写道: >> >> >> Am 20.10.2023 um 16:33 schrieb Hanke Zhang : >>> >>> Richard Biener 于2023年10月20日周五 21:33写道: > On Fri, Oct 20, 2023 at 1:48 PM Hanke Zhang via Gcc > wrote: > >

  1   2   3   4   5   6   7   8   9   10   >