Displaying 20 results from an estimated 132 matches for "norecurse".
2017 Jun 04
3
Is every intrinsic norecurse?
Hi folks,
I've been measuring some devirtualization statistics and I found that when
barriers are introduced, the number of functions marked as norecurse is
lower.
The llvm.group.barrier is obviously norecursive and I've been thinking: is
every intrinsic norecurse?
I think it make sense to mark all of the intrinsics that can be considered
as norecursive this way, so it won't gonna stop the optimizer marking
functions as norecurse.
Best
Pio...
2016 Mar 21
3
Question about GlobalOpt
Hi,
GlobalOpt may not consider demoting globals to locals in the "main" function
when C is used. It used to consider "main" specifically prior to commit
r253168 , for both C and C++. Since r253168, the check for the norecurse
attribute may prevent "main" from being considered. This happens because
the Function Attributes pass will not add the norecurse attribute to
functions that have calls to library functions that aren't themselves marked
with the norecurse attribute, such as putchar. Even a call to
ll...
2016 Mar 22
3
Question about GlobalOpt
I think the conceptual issues have largely been sorted out, it is mostly
that it is *much* harder to deduce norecurse than it might seem like
superficially.
On Mon, Mar 21, 2016 at 4:02 PM Mehdi Amini <mehdi.amini at apple.com> wrote:
> On Mar 21, 2016, at 3:57 PM, Sanjin Sijaric via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> GlobalOpt may not consider demoting glob...
2016 Mar 22
1
Question about GlobalOpt
Hi Mehdi,
You are right – modifying the Function Attributes pass to mark “main” as norecurse would break the C standard (unless it has a similar statement regarding “main” that the C++ standard has – I cannot find it), so that’s a no-go. Looks like there was an attempt to bypass library calls in the Function Attributes pass for the purpose of detecting norecurse functions: http://reviews....
2017 Oct 20
2
Is every intrinsic norecurse?
Hi,
Also, I think there is a bigger problem lurking than just with
norecurse. I think that in general, functionattrs is not very good with
attributes when intrinsics are present.
E.g.
https://bugs.llvm.org/show_bug.cgi?id=34696
Here dbg.value prevents both norecurse and readnone from being deduced.
So, it would be nice to fix this for norecurse, but it would be even
ni...
2015 Nov 13
2
revision 252902
The test case that you added in this revision fails on several of the
power buildbots (for example,
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20127)
and also when I build it locally:
FAIL: Clang :: CodeGenCXX/main-norecurse.cpp (2951 of 27722)
******************** TEST 'Clang :: CodeGenCXX/main-norecurse.cpp'
FAILED ********************
Script:
--
/home/seurer/llvm/build/llvm-test/./bin/clang -cc1 -internal-isystem
/home/seurer/llvm/build/llvm-test/bin/../lib/clang/3.8.0/include
-nostdsysteminc -emit-llvm...
2017 Oct 18
2
Is every intrinsic norecurse?
...ch didn't get a lot of attention, so probably others does not
> consider it a huge deal. Anyway, if someone is willing to review this, I
> can pursue rebasing it.
Okay. We are interested in getting something akin to your patch delivered; at
least so that the dbg intrinsics gets marked as norecurse.
Unfortunately I'm not very familiar with more "esoteric" intrinsics, so I can't
bring anything special to the table when it comes to reviewing that the set of
exempted intrinsics is correct. Other than that I can gladly help in whatever
way to help this patch land.
(I rebased y...
2015 Nov 05
2
[PATCH] D14227: Add a new attribute: norecurse
> On 2015-Nov-05, at 08:31, Aaron Ballman <aaron at aaronballman.com> wrote:
>
> On Thu, Nov 5, 2015 at 11:26 AM, James Molloy <james at jamesmolloy.co.uk> wrote:
>> Ah I see.
>>
>> I can't think of a way that would help users in any particular way offhand.
>> I hadn't considered exposing it to clang users - do you think there is merit
2017 Nov 17
2
Ensuring that dead allocations from a custom allocator are killed by LLVM
...ould like to teach LLVM about its
semantics. In particular, I would like LLVM to kill allocations that are
"dead", similar to dead new in C++.
Consider this example:
; ModuleID = '<stdin>'
source_filename = "Module"
; Function Attrs: inaccessiblememonly noinline norecurse nounwind
declare i8* @alloc(i64) local_unnamed_addr #0
; Function Attrs: inaccessiblememonly noinline norecurse nounwind
declare void @useClosure(i8*) local_unnamed_addr #1
; Function Attrs: alwaysinline norecurse nounwind
define void @main() #1 {
entry:
%closure.raw = tail call noalias i8* @al...
2016 Mar 22
2
Question about GlobalOpt
Hi,
On my phone right now but I'll fish out the pertinent threads when I get to
the office. Keyword searches for 'norecurse' on llvm-dev will probably get
most of them.
Indeed, this correctness improvement caused a performance regression on
some programs. There is a way to revert to the old, broken behaviour:
'-mllvm -force-attribute=main:norecurse'. Given how many people run old C
code that rely on this pr...
2015 Nov 05
4
[PATCH] D14227: Add a new attribute: norecurse
[Adding llvm-dev and re-stating the situation for llvm-dev's benefit]
*RFC: A new attribute, "norecurse".*
In some cases, it is possible to demote global variables to local
variables. This is possible when the global is only used in one function,
and that function is known not to recurse (because if the function
recurses, a local variable cannot be equivalent to a global as the global
would hol...
2015 Nov 05
2
[PATCH] D14227: Add a new attribute: norecurse
...to many other attributes such as nocapture/nounwind, that are
> > exposed to users and can be set by users in exceptional circumstances but
> > are primarily inferred by the midend.
>
> Sorry, I was unclear. I meant to Clang users as a language-level
> attribute (e.g., [[clang::norecurse]]), not LLVM users as an IR-level
> attribute.
>
> ~Aaron
>
>
> >
> > James
> >
> > On Thu, 5 Nov 2015 at 16:03 Aaron Ballman <aaron at aaronballman.com>
> wrote:
> >>
> >> On Thu, Nov 5, 2015 at 10:44 AM, James Molloy via llvm-dev
&...
2015 Nov 05
2
[PATCH] D14227: Add a new attribute: norecurse
...Aaron Ballman <aaron at aaronballman.com> wrote:
> On Thu, Nov 5, 2015 at 10:44 AM, James Molloy via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > [Adding llvm-dev and re-stating the situation for llvm-dev's benefit]
> >
> > RFC: A new attribute, "norecurse".
> >
> > In some cases, it is possible to demote global variables to local
> variables.
> > This is possible when the global is only used in one function, and that
> > function is known not to recurse (because if the function recurses, a
> local
> > variabl...
2016 Jun 24
2
Strange opt result
...ntptr inbounds i8, i8* %2, i8 0
%4 = call [8 x i8] @12(i32 %1, i8* %3)
[...]
"
test_opt.ll:
"
; ModuleID = 'test_opt.bc'
@__mla__system.1 = global i32 0
@0 = internal global [12 x i8] zeroinitializer
@1 = internal unnamed_addr global [8 x i8] zeroinitializer
; Function Attrs: norecurse nounwind readnone
define internal fastcc [8 x i8] @2() unnamed_addr #0 {
ret [8 x i8] [i8 2, i8 0, i8 0, i8 0, i8 undef, i8 undef, i8 undef, i8
undef]
}
; Function Attrs: norecurse nounwind
define i32 @main() #1 {
%1 = tail call fastcc [8 x i8] @2()
store [8 x i8] %1, [8 x i8]* @1, align 1...
2020 Jul 11
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
...as the value of @g isn't changed, but it
is changed), and will cause function return wrong constant value '1',
instead of '%n' (the correct value) , like following:
****************************************************************************************
; Function Attrs: nofree norecurse nounwind writeonly
define i32 @bar(i32 %n) local_unnamed_addr #0 {
entry:
ret i32 1
}
attributes #0 = { nofree norecurse nounwind writeonly }
****************************************************************************************
And if remove the 'argmemonly' attribute, function @bar...
2019 Feb 25
3
Why is there still ineffective code after -o3 optimization?
...; preds =
%splittedblock21, %splittedblock19
ret void
splittedblock15: ; preds = %splittedblock36
ret void
splittedblock21: ; preds = %splittedblock38
%25 = xor i64 %6, %4
br label %splittedblock42
}
; Function Attrs: norecurse nounwind readnone
define <2 x double> @func_3701811888700380719897139(...)
local_unnamed_addr #1 {
entry:
ret <2 x double> <double 0xC00934F9D7726A00, double 0xFFCFDA8E9AFFB51D>
}
; Function Attrs: norecurse noreturn nounwind readnone
define { double, double } @func_00655594713...
2020 May 27
4
default behavior or
...emit ir like:
$cat a.ll
---------------------------------------
; ModuleID = 'a.c'
source_filename = "a.c"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: norecurse nounwind readnone uwtable
define dso_local float @foo(float %a, float %b) local_unnamed_addr #0 {
entry:
%add = fadd float %a, %b
ret float %add
}
attributes #0 = { norecurse nounwind readnone uwtable
"correctly-rounded-divide-sqrt-fp-math"="false"
"disable-tail-calls&...
2020 Jul 14
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
...39;t changed, but it
> is changed), and will cause function return wrong constant value '1',
> instead of '%n' (the correct value) , like following:
> ****************************************************************************************
>
> ; Function Attrs: nofree norecurse nounwind writeonly
> define i32 @bar(i32 %n) local_unnamed_addr #0 {
> entry:
> ret i32 1
> }
>
> attributes #0 = { nofree norecurse nounwind writeonly }
> ****************************************************************************************
>
>
> And if remove th...
2020 Jun 28
2
__restirct ignored when including headers like <cmath>
...viour in which Clang ignores __restirct when I
include some standard headers.
For example, this code:
void vec_add(int* __restrict a,
int* __restrict b,
int n) {
#pragma unroll 4
for(int i=0; i<n; ++i) {
a[i] += b[i];
}
}
results in:
; Function Attrs: nofree norecurse nounwind
define dso_local void @_Z7vec_addPiS_i(i32* noalias nocapture %a, i32*
noalias nocapture readonly %b, i32 %n) local_unnam
ed_addr #0 {
entry:
.
.
...
(note the noaliass before function arguments).
But this code:
#include <cmath>
void vec_add(int* __restrict a,
int*...
2020 Sep 09
3
constrained cosine rounding mode behavior
Hi:
I am trying to implement interval arithmetic through llvm. I have a problem with the rounding mode with llvm.experimental.constrained.cos
I have two pieces of codes:
; Function Attrs: norecurse nounwind readnone ssp uwtable
define double @cosine_down(double returned) local_unnamed_addr #0 {
; call the llvm intrinsic to perform downward cosine
%2 = call double @llvm.experimental.constrained.cos(double %0, metadata !"round.downward", metadata !"fpexcept.strict")
re...