similar to: should we do this time-consuming transform in InstCombine?

Displaying 20 results from an estimated 1100 matches similar to: "should we do this time-consuming transform in InstCombine?"

2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi Roman, Thanks for your good idea. I think it can solve the abs issue very well. I can continue with my work now^-^. But if it is not abs and there is no select, %res = OP i32 %b, %a %sub = sub i32 0, %b %res2 = OP i32 %sub, %a theoretically, we can still do the following transform for the above pattern: %res2 = OP i32 %sub, %a ==> %res2 = sub i32 0, %res Not sure whether we can do it
2011 Jan 11
1
scaling to multiple data files
Hello, I have logging information for multiple machines, which I am trying to summarize and graph. So far, I process each host individually, but I would like to summarize the user count across multiple hosts. I want to answer the question "how many unique users logged in on a certain day across a group of machines"? I'm not quite sure how to scale the data frame and analysis to
2008 Nov 09
2
[LLVMdev] m_Not Pattern Question
I have a question about the pattern matching stuff that's used in the Instruction Combiner. If I have code like this: if (match(B, m_Select(m_Value(), m_ConstantInt(0), m_ConstantInt(-1)))) { if (match(C, m_Not(m_Value(B)))) return SelectInst::Create(cast<User>(B)->getOperand(0), D, A); and we match, the program fails during the
2017 Jul 13
2
failing to optimize boolean ops on cmps
We have several optimizations in InstCombine for bitwise logic ops (and/or/xor) that fail to handle compare patterns with the equivalent bitwise logic. Example: define i8 @or_and_not(i8 %a, i8 %b) { %nota = xor i8 %a, -1 %and = and i8 %nota, %b %res = or i8 %and, %a ret i8 %res } define i1 @or_and_cmp_not(i32 %a, i32 %b, i1 %c) { %cmp = icmp sgt i32 %a, %b %cmp_inv = icmp sle i32 %a,
2017 Jul 13
2
failing to optimize boolean ops on cmps
This can't be an instsimplify though? The values we want in these cases do not exist already: %res = or i8 %b, %a %res = or i1 %cmp, %c On Thu, Jul 13, 2017 at 5:10 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > On Thu, Jul 13, 2017 at 2:12 PM, Sanjay Patel <spatel at rotateright.com> > wrote: > >> We have several optimizations in InstCombine
2009 Jun 07
1
Must be a better way to collate sequenced data
I have data that looks like this time_stamp (seconds) user_id The data is (partial) ordered by time - in that sometimes transactions occur at the same timestamp. The output I want is collated by transaction time on a per user basis, normalized by the maximum number of transactions per user, and aggregated over each day. So, if the users have 50 transactions in the first day and 20 transactions
2008 May 17
2
[LLVMdev] More info, was Help needed after hiatus
Hi, I know my last question was very vague (i.e. "It stopped working, what went wrong?"), so here is a little more concrete example: If I run the optimizer (opt) on this code snippet with -std-compile-opts the optimizer hangs. ; ModuleID = 'test.ubc' target datalayout =
2019 Dec 31
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
Dear All, The InstCombine pass performs the following transformation. Z / (X / Y) => (Y * Z) / X This is performed only when operand Op1 ( (X/Y) in this case) has only one use in future. The code snippet is shown below. if (match(Op1, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) && (!isa<Constant>(Y) || !isa<Constant>(Op0))) { // Z / (X / Y) => (Y *
2008 May 17
0
[LLVMdev] More info, was Help needed after hiatus
On Sat, May 17, 2008 at 11:34 AM, Richard Pennington <rich at pennware.com> wrote: > If I run the optimizer (opt) on this code snippet with -std-compile-opts > the optimizer hangs. > > > ; ModuleID = 'test.ubc' > target datalayout = >
2014 Jul 08
1
[PATCH] nv50/ir: use unordered_set instead of list to keep our instructions in uses
This shortens runtime of piglit test fp-long-alu to ~22s No piglit regressions observed on nvc0! Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 6 +++--- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 7 ++++--- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
2020 Jan 03
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
A couple more general comments: 1. There shouldn't be any correctness issues removing one-use checks (the transform should be safe independently of use-counts). 2. Ideally, you can remove a m_OneUse() from the code and run 'make check' or similar, and you will see a regression test failure because we have a 'negative' test to cover that pattern. That should make it clear that
2012 Oct 30
2
[LLVMdev] Any plan to add MIN/MAX isd node?
Hi Duncan, To use select, usually, there is a compare before select. Presence of comparison will disable some opportunities to optimize some code. Select and Compare is not associative neither. Thanks, Yin -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Duncan Sands Sent: Tuesday, October 30, 2012
2010 Mar 03
5
[LLVMdev] folding x * 0 = 0
Hi! > sin/cos etc should already be handled by lib/Analysis/ConstantFolding.cpp. > Thanks for the hint and it works! Now I have a new Problem: I have this function: float foo(float a, float b) { float x = a * b * 0.0f; return cos(0.5) * sin(0.5) * x; }; after compiling it with clang (cpp mode) and renaming _ZSt3sinf to sin and _ZSt3cosf to cos I get the following: define
2010 Mar 01
2
[LLVMdev] constant folding for standard math functions
Hi! I'd like to replace all calls to standard math functions (e.g. sin(0.5)) by their result. What strategy do you recommend? Should I write a pass that does only this or should I copy and modify the SCCP pass? A problem with an extra pass could be that that I need to alternate my pass and SCCP several times since the results of the math functions could be folded again. -Jochen
2010 Mar 01
0
[LLVMdev] constant folding for standard math functions
On Mar 1, 2010, at 9:44 AM, Jochen Wilhelmy wrote: > Hi! > > I'd like to replace all calls to standard math functions (e.g. sin(0.5)) by > their result. > What strategy do you recommend? > Should I write a pass that does only this or should I copy and > modify the SCCP pass? > > A problem with an extra pass could be that that I need to alternate > my pass and
2009 Nov 16
3
Cluster analysis: hclust manipulation possible?
I am doing cluster analysis [hclust(Dist, method="average")] on data that potentially contains redundant objects. As expected, the inclusion of redundant objects affects the clustering result, i.e., the data a1, = a2, = a3, b, c, d, e1, = e2 is likely to cluster differently from the same data without the redundancy, i.e., a1, b, c, d, e1. This is apparent when the outcome is visualized
2020 Jan 06
2
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
Is your case the case mentioned in the subject or a different case? ~Craig On Sun, Jan 5, 2020 at 8:11 PM raghesh <raghesh.a at gmail.com> wrote: > Thanks Sanjay for your comments. > > So, if we want to add a transformation avoiding the one-use check, which > one is the ideal pass? Shall we do it in -aggressive-instcombine? I came > to know that if the pattern search
2019 Jul 23
2
[RFC] A new multidimensional array indexing intrinsic
Hi, I think I understand what the problem is. The return type will also be an untyped pointer, just like GEP. However, GEP needs to know what the size of one element is. Like it is now with overloadable intrinsics, we might derive it from the suffix. Another solution is that we pass the element and array sizes in bytes, instead of multiples of the element size. As a third options, we might change
2012 Oct 30
0
[LLVMdev] Any plan to add MIN/MAX isd node?
Hi Yin, > To use select, usually, there is a compare before select. > Presence of comparison will disable some opportunities to > optimize some code. Select and Compare is not associative > neither. at the IR level LLVM already has pattern matching helpers for identifying min/max idioms, here is part of a transform using this, from InstructionSimplify.cpp: // Signed variants
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got an error massage. Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : Group length is 0 but data length > 0 On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] < ml-node+s789695n4657196h87@n4.nabble.com> wrote: > Hi, > Try this: >