search for: infinite

Displaying 20 results from an estimated 2296 matches for "infinite".

2010 Nov 23
5
[LLVMdev] how to eliminate dead infinite loops?
...t appears that the following code in LoopDeletion.cpp:152 is the culprit: ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); const SCEV *S = SE.getMaxBackedgeTakenCount(L); if (isa<SCEVCouldNotCompute>(S)) return Changed; So, LoopDeletion thinks my loops might be infinite so it does not delete them - even if they do not write to any of the function return values. Is there a way to flag a loop as non-infinite? Or will I need to create my own modified loop deletion pass that can eliminate potentially infinite loops. Is it correct just to remove the above code t...
2015 Jun 28
5
[LLVMdev] readonly and infinite loops
> You dropped some context... > A daemon program wouldn't be readonly. An infinite loop can be. Right. To prevent miscommunication, here is a quick analysis of a problematic (IMO) example: We start with ``` define void @infloop(i1 %c) { entry: br i1 %c, label %l, label %e l: br label %l e: ret void } define void @main_func() { entry: call void @infloop(i1 1)...
2010 Nov 24
0
[LLVMdev] how to eliminate dead infinite loops?
...eletion.cpp:152 > is the culprit: > > ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); > const SCEV *S = SE.getMaxBackedgeTakenCount(L); > if (isa<SCEVCouldNotCompute>(S)) > return Changed; > > So, LoopDeletion thinks my loops might be infinite so it does not delete > them - even if they do not write to any of the function return values. > Is there a way to flag a loop as non-infinite? Or will I need to create > my own modified loop deletion pass that can eliminate potentially > infinite loops. Is it correct just to remove t...
2012 Nov 14
8
[LLVMdev] Is infinite empty loop dead code?
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. If it is safe to delete this loop, it would be lot easier to delete non-obvious dead loop like following as compiler doesn't need to prove if the loop in question...
2010 Nov 25
3
[LLVMdev] how to eliminate dead infinite loops?
...the culprit: >> >> ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); >> const SCEV *S = SE.getMaxBackedgeTakenCount(L); >> if (isa<SCEVCouldNotCompute>(S)) >> return Changed; >> >> So, LoopDeletion thinks my loops might be infinite so it does not delete >> them - even if they do not write to any of the function return values. >> Is there a way to flag a loop as non-infinite? Or will I need to create >> my own modified loop deletion pass that can eliminate potentially >> infinite loops. Is it correct...
2010 Nov 24
0
[LLVMdev] how to eliminate dead infinite loops?
...LoopDeletion.cpp:152 > is the culprit: > > ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); > const SCEV *S = SE.getMaxBackedgeTakenCount(L); > if (isa<SCEVCouldNotCompute>(S)) > return Changed; > > So, LoopDeletion thinks my loops might be infinite so it does not delete > them - even if they do not write to any of the function return values. > Is there a way to flag a loop as non-infinite? Or will I need to create > my own modified loop deletion pass that can eliminate potentially > infinite loops. Is it correct just to rem...
2012 Nov 14
1
[LLVMdev] Is infinite empty loop dead code?
...-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. >> >> 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 &...
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 to delete such infinite loop, perhapes you should > file a bug report to open64. That's my 2 cents. The re...
2010 Nov 24
2
[LLVMdev] how to eliminate dead infinite loops?
...culprit: >> >> ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); >> const SCEV *S = SE.getMaxBackedgeTakenCount(L); >> if (isa<SCEVCouldNotCompute>(S)) >> return Changed; >> >> So, LoopDeletion thinks my loops might be infinite so it does not delete >> them - even if they do not write to any of the function return values. >> Is there a way to flag a loop as non-infinite? Or will I need to create >> my own modified loop deletion pass that can eliminate potentially >> infinite loops. Is it correct...
2010 Nov 26
0
[LLVMdev] how to eliminate dead infinite loops?
...;> ScalarEvolution& SE = getAnalysis<ScalarEvolution>(); >>> const SCEV *S = SE.getMaxBackedgeTakenCount(L); >>> if (isa<SCEVCouldNotCompute>(S)) >>> return Changed; >>> >>> So, LoopDeletion thinks my loops might be infinite so it does not delete >>> them - even if they do not write to any of the function return values. >>> Is there a way to flag a loop as non-infinite? Or will I need to create >>> my own modified loop deletion pass that can eliminate potentially >>> infinite loops....
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 is the answer I'm waiting for to delete a disgusting dead > non-countable lo...
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/201...
2015 Jun 28
2
[LLVMdev] readonly and infinite loops
On Sat, Jun 27, 2015 at 2:46 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > In C, dunno, but in LLVM, it means they aren't readonly :) In that case, -functionattrs needs to be fixed: define void @infloop() { entry: br label %l l: br label %l } == opt -functionattrs ==> ; Function Attrs: readnone define void @infloop() #0 { entry: br label %l l:
2015 Jun 27
2
[LLVMdev] readonly and infinite loops
Running -early-cse on declare void @rn() readnone nounwind define void @f() { entry: call void @rn() ret void } removes the call to @rn(). But @rn() could have had an infinite loop in it in which case @f() went from being a non-terminating program to an terminating no-op. Is this intentional? The only way I can see this transform being legal is if infinite loops are declared to have undefined behavior, but I could not find anything in the LLVM specification that mentio...
2015 Jul 16
2
[LLVMdev] [RFC] Defining Infinite Loops
...--- Original Message ----- > From: "Chandler Carruth" <chandlerc at google.com> > To: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Dev" <llvmdev at cs.uiuc.edu> > Sent: Thursday, July 16, 2015 1:00:05 AM > Subject: Re: [LLVMdev] [RFC] Defining Infinite Loops > > > FWIW, I'm very much in favor of having a firm and clear answer to > these questions. > > I also agree that it is an absolute requirement that LLVM have *some* > mechanism for supporting both languages with defined behavior for > infinite loops and a langua...
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. Regards, chenwj -- Wei-Ren Che...
2020 Sep 10
2
[RFC] Introducing the maynotprogress IR attribute
...hought I'd send over a friendly ping. Have they? Atmn On Wed, Sep 9, 2020 at 1:08 AM Johannes Doerfert <johannesdoerfert at gmail.com> wrote: > > > On 9/8/20 9:08 PM, Hal Finkel wrote: > > There is another thing that I would like for us to document: do > > infinite loops have any relationship to thread synchronization? As I > > recall, this issue came up in the past when we discussed the deletion, > > or not, of infinite loops. If a thread writes a value to memory, and > > then enters an infinite loop, is that value eventually visible to...
2019 Jul 09
2
[LLVM] Infinite loop during LLVM InstructionCombining pass optimization
If you're able to reproduce the infinite loop with -O3 then you should be able to dump out the IR that causes `opt -instcombine` to infloop, unless the bug is truly esoteric (e.g. only caused by a specific use-list ordering). Maybe take a closer look at the output from `opt -print-before-all -O3`? Alternatively you can use bugpoint to m...
2015 Jul 16
10
[LLVMdev] [RFC] Defining Infinite Loops
Hello everyone, The topic of whether or not LLVM allows for infinite loops has come up a lot recently (several times this week already). Regarding motivation, there are two important facts: 1. Some languages, such as Java, have well-defined infinite loops. See: http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-...
2008 May 29
7
how to write spec for infinite loop?
Hi, I''ve got trouble when describe infinite loop. code snippet: def start_loop while true data = self.server.handle_client if data self.manager.dispatch(data) end end end without the loop, it is easy to test the logic. but how can I describe it to tell the developer ( me :-) ) that there should be an...