Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] disable insertion of unreachables"
2009 Sep 06
0
[LLVMdev] disable insertion of unreachables
What do you mean by "terminating function call"? Is it one with the
"noreturn" attribute? if so, the assembly language docs say that
program behavior is undefined if such a function ever returns. If
your function could possibly return, it needs to not have that
attribute.
On Sun, Sep 6, 2009 at 4:49 PM, Max
Stonebraker<max.stonebraker at gmail.com> wrote:
> Hello
2009 Sep 09
3
[LLVMdev] disable insertion of unreachables
> if so, the assembly language docs say that
> program behavior is undefined if such a function
> ever returns.
Yes, that's true, but for some static analysis applications such as control
dependence analysis for programs that have arbitrary interprocedural control
flow, one needs these additional non-executable control flow edges from
noreturn functions to their immediate CFG
2009 Sep 09
0
[LLVMdev] disable insertion of unreachables
On Tue, Sep 8, 2009 at 10:16 PM, Max
Stonebraker<max.stonebraker at gmail.com> wrote:
> Is there any way to avoid having the unreachables inserted in the first
> place?
If there's sensible control flow after a function returns, don't mark
it or calls to it noreturn. If in fact cannot return, the concept of
control flow after the function returns fundamentally makes no sense.
2009 Sep 21
1
[LLVMdev] disable insertion of unreachables
> If there's sensible control flow after a function returns, don't mark
> it or calls to it noreturn.
How do I prevent llvm-gcc from labelling a particular function with the
noreturn attribute so an unreachable is not inserted after a call to it?
Does llvm-gcc keep a list of functions somewhere that it thinks do not
return?
Max
On Tue, Sep 8, 2009 at 10:30 PM, Eli Friedman
2014 Apr 14
2
[LLVMdev] Emit code for 'unreachable'
I am not seeing this happening, at least not for unreachables that
follow calls to 'noreturn' functions.
On Apr 14, 2014, at 3:48 AM, Anton Korobeynikov <anton at korobeynikov.info> wrote:
> Hello
>
> x86 backend emits ud2 instruction in this case
>
> On Mon, Apr 14, 2014 at 1:46 PM, Vadim Chugunov <vadimcn at gmail.com> wrote:
>> Hi,
>> Is it
2014 Apr 14
3
[LLVMdev] Emit code for 'unreachable'
Hi,
Is it somehow possible to have LLVM emit machine code for the 'unreachable'
IR instruction, which would assert that it indeed never gets reached?
Vadim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140414/02108a74/attachment.html>
2013 Oct 24
2
[LLVMdev] Exploiting 'unreachable' for optimization purposes
Hi,
When clang/llvm compiles the following sample (with -O2) it optimizes
away the second comparison in test1 but not in test2. Is this handling
of 'unreachable' by purpose, or is this just a shortcoming of the
current optimization passes? GCC and MSVC (with the equivalent code
using the __assume intrinsic) both optimize away the comparison in test2.
void f1();
void f2();
void
2009 Sep 03
2
[LLVMdev] Non-local DSE optimization
Hi,
It looks like PDT.getRootNode() returns NULL for:
define fastcc void @c974001__lengthy_calculation.
1736(%struct.FRAME.c974001* nocapture %CHAIN.185) noreturn {
entry:
br label %bb
bb:
br label %bb
}
Isn't it a bug in PostDominatorTree?
Please note that this crashes:
opt -postdomtree -debug dom_crash.bc
I think this should be reported as a bug,
-Jakub
On Sep 3, 2009, at
2012 Nov 28
4
[LLVMdev] noreturn attribute on a call instruction vs noreturn on a function
Hi,
Building the following C code I get a call instruction that has no noreturn
attribute, while the function itself does have it.
void foo(void **b) {
__builtin_longjmp(b, 1);
}
define void @_Z3fooPPv(i8** %b) noreturn nounwind uwtable {
entry:
%0 = bitcast i8** %b to i8*
tail call void @llvm.eh.sjlj.longjmp(i8* %0)
2011 Aug 19
2
[LLVMdev] How to halt a program
Guys,
I would like to instrument the bytecode that LLVM produces with
assertions. I have written the instrumentation code manually, but I do not
know how to halt the program in case the assertion is false. I took a look
into the bytecode that LLVM produces for a program like:
#include <stdlib.h>
int main() {
exit(1);
}
And it is like this:
define i32 @main() nounwind {
entry:
2011 Aug 19
0
[LLVMdev] How to halt a program
Victor Campos wrote:
> Guys,
>
> I would like to instrument the bytecode that LLVM produces with
> assertions. I have written the instrumentation code manually, but I do
> not know how to halt the program in case the assertion is false. I took
> a look into the bytecode that LLVM produces for a program like:
>
> #include <stdlib.h>
> int main() {
>
2017 Nov 04
2
returns_twice / noreturn
Hello,
I am not sure about the semantic (if any) of returns_twice and noreturn
attributes.
int fork() __attribute__((returns_twice));
void join(int) __attribute__((noreturn));
int f(int n) {
int t = fork();
n++;
if (t != 0)
join(t);
return n;
}
Produces the following LLVM IR:
; Function Attrs: nounwind uwtable
define i32 @f(i32 %n) local_unnamed_addr #0 {
entry:
%call = call i32
2013 Oct 24
0
[LLVMdev] Exploiting 'unreachable' for optimization purposes
On Oct 24, 2013, at 5:22 AM, Stephan Tolksdorf <st at quanttec.com> wrote:
> Hi,
>
> When clang/llvm compiles the following sample (with -O2) it optimizes away the second comparison in test1 but not in test2. Is this handling of 'unreachable' by purpose, or is this just a shortcoming of the current optimization passes? GCC and MSVC (with the equivalent code using the
2009 Sep 06
0
[LLVMdev] Non-local DSE optimization
Jakub Staszak wrote:
> Hi,
>
> It looks like PDT.getRootNode() returns NULL for:
>
> define fastcc void @c974001__lengthy_calculation.
> 1736(%struct.FRAME.c974001* nocapture %CHAIN.185) noreturn {
> entry:
> br label %bb
>
> bb:
> br label %bb
> }
>
>
> Isn't it a bug in PostDominatorTree?
>
> Please note that this crashes:
>
2017 Apr 24
3
Debugging UNREACHABLE "Couldn't join subrange" in RegisterCoalescer (out-of-tree backend)
Hello,
I have a minimal testcase which crashes RegisterCoalescer in my out-of-tree target. It only crashes in Debug builds of llc---not in Release builds. Also, interesting to note that the x86 backend lowers this same testcase successfully. I did a quick search of bugs.llvm.org and found no matches.
This implies that the problem is in my backend and/or how my backend interacts with
2014 Apr 17
2
[LLVMdev] [PATCH] Seh exceptions on Win64
Hi,
On 15.04.2014 23:44, Vadim Chugunov wrote:
> Hi,
> I am curious - how does clang deal with epilogue-less functions that
> result from _Raise_Exception being marked 'noreturn'?
> I've also been playing with Kai's patch, and discovered that this tends
> to greatly confuse Windows stack unwinder in cases when noreturn call is
> at the end of a function, so
2019 Jun 04
2
is this a bug in PruneEH?
I have the following C source:
extern unsigned int donut;
void f1();
void f2();
void f1()
{
unsigned int *magic = &donut;
if (*magic != 286529877) {
f2();
}
}
void f2() {
/* Loop here forever if application is built with wrong version of ROM image */
while(1) {
;
}
}
The -O2 level PruneEH pass uses SimplifyFunction() which contains this code:
for
2017 Nov 04
2
returns_twice / noreturn
On Fri, Nov 3, 2017 at 5:39 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
> On 11/03/2017 07:20 PM, Alexandre Isoard via llvm-dev wrote:
>
> Hello,
>
> I am not sure about the semantic (if any) of returns_twice and noreturn
> attributes.
>
> int fork() __attribute__((returns_twice));
> void join(int) __attribute__((noreturn));
>
> int f(int n) {
> int
2009 Oct 08
1
Drop Call on ICMP Port Unreachable?
One of our users recently had a powerfail while connected to our meetme
gateway. (Asterisk 1.4.17 on debian 4.0)
Through the course of it, asterisk never hung up. His system came back
up, and started sending ICMP port unreachables, but the stream went on,
flooding him with "silence" media stream packets (there was nobody else in
the conference).
Is asterisk aware of ICMP
2010 Dec 01
2
[LLVMdev] RFC: Exception Handling Proposal Revised
On 01.12.2010 09:25, John McCall wrote:
>
> One problem I foresee is that it's possible for a dispatch block to become unreachable from its landing pad. If that block is then deleted, we'd lose information about what's supposed to unwind there. This could happen if, e.g., someone had a noreturn destructor. In languages that usefully allow throws from EH destructors (i.e. Ada)