Displaying 20 results from an estimated 5000 matches similar to: "returns_twice / noreturn"
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
2017 Nov 04
3
returns_twice / noreturn
On 11/03/2017 07:57 PM, Yichao Yu wrote:
> On Fri, Nov 3, 2017 at 8:54 PM, Alexandre Isoard via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> 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
2017 Nov 06
2
returns_twice / noreturn
> We do not implement that restricted semantics correctly either -- see
> https://bugs.llvm.org/show_bug.cgi?id=27190
Haha, I wondered for a minute whether I should bring up that bug...
We've seen pretty nasty crashes due to it and had to work around
it.....
One of my recent work has also uncovered another (I believe) invalid
handling of returns_twice functions....
2019 Feb 25
3
Why is there still ineffective code after -o3 optimization?
Hi,
I have some IR module from random generation (mostly ineffective
instructions).
It has a function with void return, and two function arguments where one
is a reference.
Therefore, I expect every instruction not altering the value at the 2nd
arguments address should be ineffective.
Here is the function definition (see below for full ll):
define void @_Z27entityMainDataInputCallbackdRd(double
2020 Jul 11
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
Hi all,
Let's see an example (from Alexandre Isoard) first:
****************************************************************************************
; RUN: opt -ipsccp -deadargelim -licm -O2 -S < %s
@g = internal global i32 0
; Function Attrs: argmemonly
define internal void @foo(i32* nonnull dereferenceable(4) %arg, i32 %val) #0
{
entry:
store i32 %val, i32* %arg
ret void
}
define
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
Hi,
I’ve come back and updated my llvm toolset with modern code (my branch was about 1-2 years old) and now the llvm IR files produced by my front end no longer compile with llc.
Here is a sample of llvm ir produced by my front end (it’s a standard version 3.1 build of swift from the swift.org open source website).
; ModuleID = 'main.ll'
source_filename = "main.ll"
target
2011 Sep 30
0
[LLVMdev] [patch] Add the returns_twice attribute
While I'd like to see support for hotpatching, the other Clang bugs
block it from being useful. If Mozilla is close to working, let them
have it.
Thanks for asking :).
-Austin
On Thu, Sep 29, 2011 at 21:39, Charles Davis <cdavis at mymail.mines.edu> wrote:
> Howdy Austin,
>
> I'm about to sacrifice the Hotpatch attribute (which I added a long time ago to start fixing
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
2020 Jul 15
2
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
On 7/14/20 4:34 PM, Hal Finkel via llvm-dev wrote:
>
> On 7/14/20 11:28 AM, Fangqing Du wrote:
>> Thank you Hal and Stefan!
>>
>> Bug report is filed: https://bugs.llvm.org/show_bug.cgi?id=46717
>> <https://bugs.llvm.org/show_bug.cgi?id=46717>
>>
>> And Stefan,
>> I think 'attributor' is a really nice pass, and can infer more
>>
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
That’s useful info, thanks.
I think it will be useful for me to understand the connection, why this type of pointer is being emitted now.
Do you have any suggestions where i can look to find the platform specific code that is making function pointers go into addrspace?
Carl
p.s. I am also working on passing the avr target flag to swift, but swift itself had (has?) limitations that make it
2020 Jul 14
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
Thank you Hal and Stefan!
Bug report is filed: https://bugs.llvm.org/show_bug.cgi?id=46717
And Stefan,
I think 'attributor' is a really nice pass, and can infer more precise and
useful attributes, which may give more opportunities for optimization.
But we shouldn't depend on 'attributor' to correct wrong function
attributes, because we cannot run 'attributor' after
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
Cool. That explains a lot!
Sorry if this is a total n00b question, but… how does the datalayout string get overridden?
in llvm/lib/Target/AVR/AVRTargetMachine.cpp I can see the code that determines the default datalayout for AVR…
static const char *AVRDataLayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8”;
However in the LLVM iR below, the target datalayout was present and
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)
2012 Nov 29
0
[LLVMdev] noreturn attribute on a call instruction vs noreturn on afunction
You can use CallInst::hasFnAttr(). It checks for attributes in the
instruction and in the function decl.
http://llvm.org/docs/doxygen/html/Instructions_8cpp_source.html#l00345
Nuno
----- Original Message -----
> 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)
2012 Nov 28
0
[LLVMdev] noreturn attribute on a call instruction vs noreturn on a function
Hi Kostya,
On 28/11/12 14:47, Kostya Serebryany wrote:
> 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*
2016 Mar 28
2
Ignoring coverage for noreturn decls
Hi all,
Recently I’ve noticed in coverage profiles that llvm_unreachable and the like are considered uncovered because there’s no special behavior in instrumentation to ‘ignore’ noreturn paths.
While I don’t necessarily think it’s ideal to ignore all noreturn decls, I think there’s definitely room for some heuristics around ignoring things like llvm_unreachable (perhaps opt-in?). I’m
2016 Mar 29
0
Ignoring coverage for noreturn decls
+ cfe-dev
> On Mar 28, 2016, at 1:23 PM, Harlan Haskins via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi all,
>
> Recently I’ve noticed in coverage profiles that llvm_unreachable and the like are considered uncovered because there’s no special behavior in instrumentation to ‘ignore’ noreturn paths.
FWIW, Daniel Dunbar and a few others have brought up the lack of a
2018 Aug 02
2
SCEVUDiv simplification
Hello,
I noticed that our SCEVUDiv does not simplify anything when the RHS is not
a constant.
Is that because there is a potential issue with division by zero being
simplified?
For instance, would it be okay to simplify:
((%i * %n)<nuw> /u %n)
into: %i
The way I see it, if %n is 0, then that division is undefined and we can
"define it", at will, as being %i.
Would that make
2016 May 12
3
Why LR is saved before calling a 'noreturn' function ?
Dear all,
I don't get how llvm handles functions with __attribute__((noreturn)).
It seems that LR register is backed up on the stack whilst it will never be used to return from a 'noreturn' function.
I have this problem with a home-made backend but it seems that ARM flavour of clang has same behaviour.
By the way, SP is also saved, I don't understand why.
Is there a syntax error
2013 Aug 01
2
[LLVMdev] can i avoid saving CSRs for functions with noreturn
hi, list,
i am making a llvm compiler for shader-like programs. as we known, shader
programs are short and have less function calls. i found that i have to
save/restore callee-saved register(CSR) in prolog and epilog. because I
can violate ABI from driver(c code) and shader, i plan to append the
attribute 'noreturn' to all shader functions.
in PrologEpilogInserter.cpp, you can find that