Re: Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Richard Biener via Gcc
I'm stucked with another problem that, I want to call > `__builtin_ia32_pmovmskb256` in the GIMPLE pass. But I found that this > function is defined in `config/i386/i386-builtins.h`. And when I try > to include this header file, the error will occur during the > compilation. If you k

Re: Question about constructing vector types in GIMPLE pass

2024-04-08 Thread Hanke Zhang via Gcc
); But when I print the `type_p`, it shows `vector(4) long int * {ref-all}`. So I'm confused if they are the same type or can be transferred to each other. And I'm stucked with another problem that, I want to call `__builtin_ia32_pmovmskb256` in the GIMPLE pass. But I found that this f

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 __m2

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

Re: Different outputs in Gimple pass dump generated by two different architectures

2022-11-11 Thread Kevin Lee
On Fri, Nov 11, 2022 at 8:39 AM Andrew Pinski wrote: > > On Fri, Nov 11, 2022 at 12:57 AM Marc Glisse via Gcc wrote: > > > > On Thu, 10 Nov 2022, Kevin Lee wrote: > > > What would be causing the difference? Is this intended? Link > > > for details. Thank you! >

Re: Different outputs in Gimple pass dump generated by two different architectures

2022-11-11 Thread Andrew Pinski via Gcc
On Fri, Nov 11, 2022 at 12:57 AM Marc Glisse via Gcc wrote: > > On Thu, 10 Nov 2022, Kevin Lee wrote: > > > While looking at the failure for gcc.dg/uninit-pred-9_b.c, I observed that > > x86-64 and risc-v has a different output for the gimple pass since > > r12-4790-g

Re: Different outputs in Gimple pass dump generated by two different architectures

2022-11-11 Thread Marc Glisse via Gcc
On Thu, 10 Nov 2022, Kevin Lee wrote: While looking at the failure for gcc.dg/uninit-pred-9_b.c, I observed that x86-64 and risc-v has a different output for the gimple pass since r12-4790-g4b3a325f07acebf4 <https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4b3a325f07acebf4>. Probably

Different outputs in Gimple pass dump generated by two different architectures

2022-11-10 Thread Kevin Lee
Hello GCC, While looking at the failure for gcc.dg/uninit-pred-9_b.c, I observed that x86-64 and risc-v has a different output for the gimple pass since r12-4790-g4b3a325f07acebf4 <https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4b3a325f07acebf4>. What would be causing the difference? I

Re: GIMPLE pass - Assignment evaluation

2013-12-16 Thread Sandeep K Chaudhary
Thank you so much, Prof. Khedkar ! I will go through the slides and other resources that you pointed out. GRC workshops/tutorials are great. These helped me get started with GCC when I knew almost nothing about GCC internals. I will get back with specific queries (if any) after going through thes

Re: GIMPLE pass - Assignment evaluation

2013-12-16 Thread Uday P. Khedker
You may also want to go through the slides at http://www.cse.iitb.ac.in/grc/gcc-workshop-13/index.php?page=slides. In particular, http://www.cse.iitb.ac.in/grc/gcc-workshop-13/downloads/slides/Day1/gccw13-gimple-manipulation.pdf and http://www.cse.iitb.ac.in/grc/gcc-workshop-13/downloads/slid

Re: GIMPLE pass - Assignment evaluation

2013-12-16 Thread Sandeep K Chaudhary
Thank you so much for the reply, David ! I am not sure where exactly my pass gets invoked. I will try to find it. But the pass get invoked somewhere in the GIMPLE stage as shown in the GCC architecture[1]. How is it that one can dictate where the pass can be invoked? Can you please provide some po

Re: GIMPLE pass - Assignment evaluation

2013-12-16 Thread David Malcolm
On Mon, 2013-12-16 at 16:10 -0500, Sandeep K Chaudhary wrote: > Hi Guys, > > I am writing a GIMPLE pass in which I need to inspect the assignments. > For example, for the below statements, I need to find the value of the > second and third assignments which are '2' and &

GIMPLE pass - Assignment evaluation

2013-12-16 Thread Sandeep K Chaudhary
Hi Guys, I am writing a GIMPLE pass in which I need to inspect the assignments. For example, for the below statements, I need to find the value of the second and third assignments which are '2' and '7'. VAR1 = 1; VAR1++; VAR1 = VAR1 + 5; But the GIMPLE IR only has the foll

Re: Gimple Pass

2009-07-25 Thread Richard Guenther
On Sat, Jul 25, 2009 at 1:28 PM, pms wrote: > > Hi Nathan >   I looked into tree.def, I added a case in the new gimple pass to count > the number of integer variables in the c code. the following is the piece of > code. > Here, the first case is working, but I'm not gettin

Re: Gimple Pass

2009-07-25 Thread pms
Hi Nathan I looked into tree.def, I added a case in the new gimple pass to count the number of integer variables in the c code. the following is the piece of code. Here, the first case is working, but I'm not getting the second one. can u pls help in this regard. How to trace thru the

gimple pass

2009-07-24 Thread anandulle
Hello We want to know what are TREE_CODES and TREE_TYPES;we were trying to do the assignment in gimple pass, we got a code which checks the number of assignment statements but now we want to check the deceleration statements we browsed through the tree.def , tree.h and tree.c

Re: Gimple Pass

2009-07-24 Thread Nathan Froyd
On Fri, Jul 24, 2009 at 05:20:16AM -0700, pms wrote: > But I want to know what are the TREE_CODEs for other remaing constructs > viz declration stmt, conditions, count for constants and how to use them in > the gimple pass. Can anybody help in this regard The names are defined in

Gimple Pass

2009-07-24 Thread pms
Hi, I've written a gimple pass, which counts for the number of assignment statements in the c code. I've used the lval of the GIMPLE_MODIFY_STMT and checking for VAR_DECL condition. It is working But I want to know what are the TREE_CODEs for other remaing constructs viz declr

Lowering return statements in gimple pass

2005-11-09 Thread Olatunji Ruwase
Hi, I have a question concerning the lowering of return statements during the gimple pass. Shouldnt the TREE_BLOCK () of the representative return expr (which is moved to the end of the function) be updated to reflect its new scope ?. Or on the other hand is TREE_BLOCK () intended to be an