similar to: [LLVMdev] Is infinite empty loop dead code?

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Is infinite empty loop dead code?"

2012 Nov 14
6
[LLVMdev] Is infinite empty loop dead code?
I do some google, I cannot find the answer... I check C std, I cannot find answer either. Delete infinite empty loop is boring, but if C/C++ lawyers could tell it is safe to to so, it would obviate the need to prove a non-countable loop infinite or not before DCE can delete it. That is the answer I'm waiting for to delete a disgusting dead non-countable loop in my way. On 11/14/2012
2012 Nov 14
2
[LLVMdev] Is infinite empty loop dead code?
On Wed, Nov 14, 2012 at 03:32:53PM +0800, 陳韋任 (Wei-Ren Chen) wrote: > On Tue, Nov 13, 2012 at 11:23:02PM -0800, Shuxin Yang wrote: > > Hi, All: > > > > Is it legal to delete empty infinite loop like this : "while(1) {}"? > > It is interesting that both llvm and gcc keep the loop, however Open64 > > delete it. > > I think it's illegal
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On Tue, Nov 13, 2012 at 11:23:02PM -0800, Shuxin Yang wrote: > Hi, All: > > Is it legal to delete empty infinite loop like this : "while(1) {}"? > It is interesting that both llvm and gcc keep the loop, however Open64 > delete it. I think it's illegal to delete such infinite loop, perhapes you should file a bug report to open64. That's my 2 cents.
2012 Nov 14
1
[LLVMdev] Is infinite empty loop dead code?
Hi, dear Wenren: Thank you so much for sharing this info. I really appreciate it. Now I can move on deleting dead non-countable loops. Thank you again! Shuxin On 11/14/12 12:56 AM, 陳韋任 (Wei-Ren Chen) wrote: > On Wed, Nov 14, 2012 at 12:22:33AM -0800, Shuxin Yang wrote: >> I do some google, I cannot find the answer... >> I check C std, I cannot find answer either. >>
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On Wed, Nov 14, 2012 at 12:22:33AM -0800, Shuxin Yang wrote: > I do some google, I cannot find the answer... > I check C std, I cannot find answer either. > > Delete infinite empty loop is boring, but if C/C++ lawyers could tell it > is safe to to so, > it would obviate the need to prove a non-countable loop infinite or not > before > DCE can delete it. > > That
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On 11/14/2012 1:23 AM, Shuxin Yang wrote: > > Is it legal to delete empty infinite loop like this : "while(1) {}"? If the loop was reachable, the program will not terminate. If you delete the loop, where is the execution going to go after this point? You can't arbitrarily insert a branch to somewhere or instructions to execute. If the loop was unreachable, then it
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
Hi Shuxin, > Is it legal to delete empty infinite loop like this : "while(1) {}"? > It is interesting that both llvm and gcc keep the loop, however Open64 delete it. this is an endless source of discussion. I suggest you read the GCC and LLVM mailing list archives if you want to find out more about it. Ciao, Duncan. > If it is safe to delete this loop, it would be
2012 Nov 14
2
[LLVMdev] Is infinite empty loop dead code?
If the code is unreachable, such code is easy to be removed, and should be removed. If it is reachable, that is bit difficult to tell. Now that C std already give compiler such permit, perhaps we don't have to keep in sync with gcc. Otherwise, it is very difficult to delete dead non-countable loop. One might argue, do you see many dead non-countable loops? I don't know the answer, but
2012 Nov 14
2
[LLVMdev] Is infinite empty loop dead code?
Thank you all for the input. Seems that I have to prove a non-countable loop is finite before I can delete it. BTW, I think this draft is not clear as to what is "constant expr". The source code may use symbolic value, but later on the symbolic value could be proved to be constant. However, compiler could mistakenly delete the loop before that point. Thank you all for the input
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On 11/14/2012 12:07 PM, Shuxin Yang wrote: > > If it is reachable, that is bit difficult to tell. Now that C std > already give compiler such permit, perhaps we don't have to keep > in sync with gcc. From the C standard (well, draft): ---- 6.8.5 Iteration statements [...] An iteration statement whose controlling expression is not a constant expression, that performs no
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
Following loop (in asm) is often seen in embedded programs. It is used to delay for certain amount of time. If it were not written in asm, compiler would blindly delete the entire loop. How can compiler know such DCE betray program intention? for (i = 0; i < N; i++) { nop; nop; nop } I guess in the gray area, if programmer do not want compiler do something he doesn't expect, he/she
2012 Nov 22
2
[LLVMdev] Disable loop unroll pass
Hi, Gang: I remember there were different voices when you check-in the code. I agree with them although I didn't reply your mail in open64's mailing list. In the transformation you illustrate, it involves two operations: 1) promote WHILE-loop into DO-loop (i.e noncountable loop to countable loop) 2) get rid of trip-count dec/inc and compare. 1) is irrelevant to HW loop.
2012 Nov 22
3
[LLVMdev] Disable loop unroll pass
Hi Shuxin, Eli, On 22/11/2012 03:19, Shuxin Yang wrote: > Hi, Ivan: > > My $0.02. hasZeroCostLooping() disabling unrolling dose not seem > to be > appropriate for other architectures, at least the one I worked before. I appreciate your feed-back. Could you give an example where building a hw loop is not appropriate for your target? > > You mentioned: >
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On Wed, Nov 14, 2012 at 11:24 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > Thank you all for the input. Seems that I have to prove a non-countable loop > is finite before I can delete it. > > BTW, I think this draft is not clear as to what is "constant expr". The > source code may use symbolic value, > but later on the symbolic value could be proved to be
2013 Jul 17
2
[LLVMdev] [Proposal] Parallelize post-IPO stage.
On 7/17/13 12:35 PM, Diego Novillo wrote: > On Fri, Jul 12, 2013 at 3:49 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > >> 3. How to parallelize post-IPO stage >> ==================================== >> >> From 5k' high, the concept is very simple, just to >> step 1).divide the merged IR into small pieces, >> step 2).and compile
2012 Nov 22
2
[LLVMdev] Disable loop unroll pass
Hi, Gang: I don't want to discuss Open64 internal in LLVM mailing list. Let us only focus on the design per se. As your this mail and your previous mail combined give me a impression that : The only reason you introduce the specific operator for HW loop in Scalar Opt simply because you have hard time in figure out the trip count in CodeGen. This might be true for Open64's
2012 Nov 22
0
[LLVMdev] Disable loop unroll pass
I am the designer for open64 hwloop structure, but I am not a student. Hope the following helps: To transform a loop into hwloop, we need the help from optimizer. For example, while(k3>=10){ sum+=k1; k3 --; } into the form: zdl_loop(k3-9) { sum+=k1; } So, we introduce a new ZDLBR whirl(open64 optimizer intermediate) operator, which represents the loop in whirl as:
2012 Nov 14
0
[LLVMdev] Is infinite empty loop dead code?
On 11/14/2012 2:22 AM, Shuxin Yang wrote: > I do some google, I cannot find the answer... > I check C std, I cannot find answer either. The C++11 standard explicitly allows compilers to assume that all loops will eventually terminate: [intro.multithread] 24: The implementation may assume that any thread will eventually do one of the following: — terminate, — make a call to a library I/O
2012 Nov 22
0
[LLVMdev] Disable loop unroll pass
Hi shuxin, Promote while-loop to do-loop is the job of loop induction recognized, not this transformation. The scalar transform for hwloop in optimizer is for that it is a trouble to discriminate trip counting code with the real production code stuff and do the elimination in cg, we have to write customized code to handle this general stuff in ervey targets. So, we take the help from optimizer
2012 Nov 23
1
[LLVMdev] Disable loop unroll pass
Hi, Ivan: Sorry for deviating the topic a bit. As I told you before I'm a LLVM newbie, I cannot give you conclusive answer if the proposed interface is ok or not. My personal opinion on these two interface is summarized bellow: - hasZeroCostLoop() pro: it is clearly state the HW support. con: Having zero cost loop doesn't imply the benefit HW loop could achieve.