Displaying 20 results from an estimated 1136 matches for "idiom".
Did you mean:
idioms
2016 Feb 10
2
LoopIdiomRegognize vs Preserved
Hi,
On 02/10/2016 01:23 AM, haicheng at codeaurora.org wrote:
> Thank you, Mikael. I can reproduce what you saw and am looking into it.
Great!
> Just curious, why do you run loop-deletion before licm and loop-idiom?
As part of our internal testing we use Csmith to generate C-programs and
then we run the compiler with random generated compiler flags on that
input.
This bug was triggered in one of those runs, so the options to opt are
not something we use in our normal pipeline, but used to find faults.
/...
2015 May 01
2
[LLVMdev] [RFC][PATCH] Adding absd/hadd/sad intrinsics
Hi All,
I would like to introduce intrinsics to generate efficient codes for 'absolute differences', 'horizontal add'
and 'sum of absolute differences' Idioms used by user programs.
Identifying these idioms at lower level (Codegen) is complex. These idioms can be identified in LV/SLP
and vectorized using above intrinsics to generate better code.
Proposal:
1. Add intrinsics for 'absolute differences', 'horizontal add' and 'sum of ab...
2014 Dec 02
7
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
Hi,
In feedback from game studios a common issue is the replacement of
loops with calls to memcpy/memset. These loops are often
hand-optimised, and highly-efficient and the developers strongly want
a way to control the compiler (i.e. leave my loop alone).
The culprit is of course the loop-idiom recognizer. This replaces any
loop that looks like a memset/memcpy with calls. This affects loops
with both a variable and a constant trip-count. The question is, does
this make sense in all cases? Also, should the compiler provide a way
to turn it off for certain types of loop, or on a loop in...
2018 Jun 02
2
LoopIdiomRecognize is not recognizing the ctpop idiom
...(a) {
c++;
//... // both a & c would be used multiple times in or out of
//loop
a &= a - 1;
//...
}
return c;
}
Is there any good paper discussing this type of loop idiom recognitions? I found only
a vaguely related paper: "Automatic Recognition of Performance Idioms in Scientific
Applications", IPDPS 2011 (http://www.sdsc.edu/~allans/ipdps11.pdf).
Thank you very much,
Alex
2017 Jan 13
4
Loop identification
On 01/13/2017 10:19 AM, Krzysztof Parzyszek via llvm-dev wrote:
> Hi Catello,
>
> LLVM does have a "loop idiom recognition" pass which, in principle,
> does exactly that kind of a thing: it recognizes loops that perform
> memcpy/memset operations. It does not recognize any target-specific
> idioms though and there isn't really much in it that would make such
> recognition easier. We...
2005 Nov 22
3
Idiom for submit button?
What is the rails idiom for submit buttons on forms?
All other field types have helpers, but button_to creates its
own form, so should not be used. I''ve looked in "Agile Web Dev. with
Rails" but can''t see what I should do instead.
Is this "difficult" because it runs counter to AJ...
2009 Jun 23
2
an idiom to handle i'th element of a set of lists simultaneously
Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all
the lists simultaneously. If it were a single list I could use lapply, but
for more than one list I'm using a for loop. Is there an idiom that would
let me use something like lapply, but the function specified to lappy would
have access to an element from each list? (In Python, I would have used for
a,b,c in zip(x,y,z): ...)
Thanks,
--
Rajarshi Guha
[[alternative HTML version deleted]]
2014 Dec 06
2
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
...ough the front-end.
Kevin
-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov]
Sent: Friday, December 05, 2014 5:45 PM
To: Smith, Kevin B
Cc: LLVM Developers Mailing List; Philip Reames; David Chisnall; Robert Lougher
Subject: Re: [LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
----- Original Message -----
> From: "Kevin B Smith" <kevin.b.smith at intel.com>
> To: "Philip Reames" <listmail at philipreames.com>, "David Chisnall" <david.chisnall at cl.cam.ac.uk>, "Robert Lougher"
> <rob.loughe...
2023 Jul 11
2
question about an R idiom: eval()ing a quoted block
...applying
eval(), rather than as a function. This seems weird to me; the only
reason I can think of for doing it this way is to avoid having to pass
back multiple objects and assign them in the calling environment (since
R doesn't have a particularly nice form of Python's tuple-unpacking idiom).
Am I missing something?
cheers
Ben
https://github.com/r-devel/r-svn/blob/eac72e66a4d2c2aba50867bd80643b978febf5a3/src/library/stats/R/power.R#L38-L52
https://github.com/r-devel/r-svn/blob/master/src/library/stats/R/family.R#L166-L171
2015 May 04
2
[LLVMdev] [RFC][PATCH] Adding absd/hadd/sad intrinsics
...ct: [LLVMdev] [RFC][PATCH] Adding absd/hadd/sad intrinsics
> >
> > Hi All,
> >
> > I would like to introduce intrinsics to generate efficient codes for
> 'absolute
> > differences', 'horizontal add'
> > and 'sum of absolute differences' Idioms used by user programs.
> >
> > Identifying these idioms at lower level (Codegen) is complex. These
> idioms
> > can be identified in LV/SLP and vectorized using above intrinsics to
> generate
> > better code.
> >
> > Proposal:
> > 1. Add intrinsics f...
2014 Dec 05
2
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
...-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Philip Reames
Sent: Friday, December 05, 2014 10:08 AM
To: David Chisnall; Robert Lougher
Cc: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
On 12/04/2014 11:46 PM, David Chisnall wrote:
> On 3 Dec 2014, at 23:36, Robert Lougher <rob.lougher at gmail.com> wrote:
>
>> On 2 December 2014 at 22:18, Alex Rosenberg <alexr at leftfield.org> wrote:
>>> Our C library amplifies this problem by being...
2017 Jul 06
2
GEP with a null pointer base
...rely opposed to solution #3. As I said, my concern is that there are cases it would miss.
For instance, if I had some code like this:
char *get_ptr(char *base, intptr_t offset) {
return base + offset;
}
char *convert_to_ptr(intptr_t ptr_val) {
return get_ptr((char*)0, ptr_val);
}
There the idiom would only appear after inlining, so the front end couldn’t handle it. The current glibc code is implemented with a couple of layers of macros that have a logical branch that could theoretically result in the null coming in via a PHI, but some early investigation makes it look like the choice betw...
2007 Oct 01
2
Idioms for empty dataframes
...me(bob=c(100))
> order(t$bob)
[1] 1
> t1 <- t[t$bob < 50]
> order(t1$bob)
Error in order(na.last, decreasing, ...) :
argument 1 is not a vector
I'd expect c() as a result, not an error.
So I have two questions --
Is there something important I'm misunderstanding?
What idioms do experts use to deal with this? Just calling nrow to
handle the 0 case? Something cleaner?
Thanks,
Ranjan
2008 Aug 21
1
x[order(x)] vs sort(x)?
Hi
I have a question (which may be an obvious one). It is about an idiom which I have seen quite often:
o <- order(x); <- x[o]
vs. the alternative
x <- sort(x)
I am just wondering as to the rationale behind the order/reindex idiom vs sorting. Especially as there seems to be a marked performance difference (especially for integer vectors):
> x <- trun...
2017 Aug 17
3
[cfe-dev] Disable memset synthesis
My concern wasn't a phylosophical one but a pragmatic one. Learning about
poor choices when lowering memset is probably quite useful. Having a flag
that just turns off idiom recognition for it may just work around the
problem. But the problem may still exist.
In any case, I'm not fundamentally against such a flag but it just seems
like something that could
1. Hide a problem
2. Get a bit unwieldy - today it's memset, maybe tomorrow memcpy, etc. And
then does a s...
1999 Apr 30
1
Question on the idiom: start <- coef; start[fit$pivot] <- coef
I wonder if someone could explain how the following R idiom works (it's
used in
glm.fit).
start <- coef
start[fit$pivot] <- coef
coef is a vector of coefficients, set by .Fortran("dqrls", ...).
fit$pivot is a vector of integer indexes (indicating how dqrls permuted
the columns
of x). If coef has n elements, fit$pivot is a per...
2014 Dec 05
3
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
...nts swamps the
>> copy/set.
>>
>
> I can't imagine we're the only platform (now or in the future) that
> has comparatively slow library calls. We had discussed some sort of
> platform flag (has slow library calls) but this would be too late to
> affect the loop-idiom. However, it could affect lowering. Following
> on from Reid's earlier idea to lower short memcpys to an inlined,
> slightly widened loop, we could expand into a guarded loop for small
> values and a call?
I think the bug is not that we are recognising that the loop is memcpy, it...
2009 Apr 20
2
The assign(paste(...,i),...) idiom
Judging from the traffic on this mailing list, a lot of R beginners
are trying to write things like
assign( paste( "myvar", i), ...)
where they really should probably be writing
myvar[i] <- ...
Do we have any idea where this bizarre habit comes from?
-s
2014 Dec 06
3
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
On Sat, Dec 06, 2014 at 07:06:31AM -0600, Hal Finkel wrote:
> - Direction (should the memory be traversed forward or backward)
I don't think that this makes sense for memset and memcpy. It does
matter for memmove.
Joerg
2016 Nov 10
2
array fill idioms
...t.
There's probably something clever you can do with vector instructions too, in many cases.
--paulr
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Ryan Taylor via llvm-dev
Sent: Thursday, November 10, 2016 2:08 PM
To: Bagel; llvm-dev
Subject: Re: [llvm-dev] array fill idioms
Like a list initializer, but will do partials/slices?
Are you just looking to create an intrinsic that will generate a jump to a lib routine?
On Thu, Nov 10, 2016 at 5:02 PM, Bagel via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Yes, I know this w...