search for: idioms

Displaying 20 results from an estimated 1122 matches for "idioms".

2016 Feb 10
2
LoopIdiomRegognize vs Preserved
...duced-simplified.i8+.ll >> 1. Running pass 'Function Pass Manager' on module >> '../llvm/bugpoint-reduced-simplified.i8+.ll'. >> 2. Running pass 'Loop Pass Manager' on function '@set_array' >> 3. Running pass 'Recognize loop idioms' on basic block '%bb4' >> Abort >> >> /Mikael >> >> On 02/08/2016 05:50 PM, Haicheng Wu wrote: >>> Hi Mikael, >>> >>> What is your compilation command to trig the assert? I am trying to >>> reproduce your problem. >&g...
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 abs...
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
2018 Jun 02
2
LoopIdiomRecognize is not recognizing the ctpop idiom
...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
...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 have some cases like yours on Hexagon, where we > want to replace certain loops with Hexagon-specific intrinsics, and > the way we do it is that we have (in our own compiler) a separate pass >...
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 AJAX type forms? And, related, is there a way to ensure that hitting return in
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
2014 Dec 06
2
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
Hal, I appreciate the clarification. That was what I was expecting (that the transformation uses intrinsics), Intel compiler does the same thing internally, and like LLVM it is into an internal intrinsic, not a plain library call. Nevertheless, there are a huge number of ways (In machine code) to write "the best" memory copy or memory set sort of code if, as a programmer, you are able
2023 Jul 11
2
question about an R idiom: eval()ing a quoted block
In a few places in the R source code, such as the $initialize element of `family` objects, and in the body of power.t.test() (possibly other power.* functions), sets of instructions that will need to be run later are encapsulated by saving them as an expression and later 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
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 fo...
2014 Dec 05
2
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
There are a large number of ways to lose information in translating loops into memset/memcpy calls, alignment is one of them. As previously mentioned, loop-trip-count is another. Another is size of accesses. For example, the loop may have originally been using int64_t sized copies. This has definite impact on what the best memset/memcpy expansion is, because effectively, the loop knows that it
2017 Jul 06
2
GEP with a null pointer base
...specific (horrible :-) idiom. It makes sense to recognize this in the frontend, which is close to the idiom truth, rather than in the optimizer, which is run multiple times and sees code after being transformed. I see this as pretty similar to the analogous hacks we do to support broken offsetof idioms. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170706/adec292d/attachment.html>
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 <- trunc(runif(1E6, 1, 100)) >
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
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 permutation of seq(1,5). start[fit$pivot]
2014 Dec 05
3
[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer
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 in a dynamic library, so the >> call has additional overhead, which for small trip counts swamps the >> copy/set. >> > > I can't imagine
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 wo...