Displaying 20 results from an estimated 215 matches for "subexpression".
2010 Feb 01
5
regular expression submatch?
What is the simplest way to extract a matched subexpression?
Eg. in perl you can do
"hello world" =~ m/hello (.*)/
which would return 1(true) and set $1 to the matched subexpression "world".
--
View this message in context: http://n4.nabble.com/regular-expression-submatch-tp1459146p1459146.html
Sent from the R help mailing list a...
2008 Oct 16
1
[LLVMdev] Local common subexpression elimination
Hi all,
Is there any existing pass that performs fast local common subexpression
elimination?
The reason I'm asking is because global common subexpression elimination
(GVN or GVN-PRE) is too slow for my JIT purposes, but I see lots of value in
local CSE.
Thanks,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://l...
2006 Mar 25
7
Regexp subexpression
I can't get the PERL subexpression translated to R. Following, for example,
B. Ripley's
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/58984.html
I am using sub, but it looks like an ugly substitute. Assume I want to
extract the first alpha part and the first numeric part, but only if they
are in sequence.
Do I really have t...
2008 Mar 18
0
Subexpression usage in Asterisk Dialplan Regular Expressions
Hi,
I currently have these two lines in my dialplan to extract different parts
out of a variable and I'd like to do it in one line instead. Does anyone
know how to use regular expression subexpressions in the dialplan?
Outputting a comma separated list that can be sent to ARRAY() would be nice
too (tried that, didn't work -- only got the first subexpression).
;extract dialed number
exten => s,n,Set(dialed_num=$[ "${ARG1}" =~ "(.*)\\*" ])
;extract user specified calle...
2002 Aug 10
0
?subexpressions, D, deriv
...where expected via my
algebra and R but I have not yet done a detailed numerical
comparison (so I cannot be 100% sure of my algebra).
What I would like is for the output of D to look at least somewhat
similar to my hand algebra. It occurred to me that if expressions
could be constructed from subexpressions, I could get a more
readable result (from D), as opposed to
> fx2
-(invroot2pi/sigma) * (exp(-0.5 * (((x - mu)/sigma)^2)) * (0.5 *
(2 * (1/sigma * (1/sigma)))) - exp(-0.5 * (((x - mu)/sigma)^2)) *
(0.5 * (2 * (1/sigma * ((x - mu)/sigma)))) * (0.5 * (2 *
(1/sigma * ((x - mu)/sig...
[LLVMdev] A question about GetElementPtr common subexpression elimination/loop invariant code motion
2007 Jan 29
0
[LLVMdev] A question about GetElementPtr common subexpression elimination/loop invariant code motion
On Mon, 29 Jan 2007, Gil Dogon wrote:
> Now the problem with this code , is that the calculation of the address
> mat[i][j] which is done by the (two) getelementptr instructions
> is quite expensive (involving at least two multiplications and one
> addition) hence it actualy should have been moved out of the inner loop.
Right.
> and not twice. Anyway this is just a syptom of a
2016 Jun 27
1
Loop unrolling parameters
We've notice that when loops are unrolled there seems to be a limit of 64
subexpressions that can be assigned to registers. In our architecture we've
got a lot more registers available than just 64. Is there some parameter we
can change to the loop unroller that allows more subexpressions to be
assigned to a number of registers beyond 64?
Phil
-------------- next part -----------...
[LLVMdev] A question about GetElementPtr common subexpression elimination/loop invariant code motion
2007 Jan 29
2
[LLVMdev] A question about GetElementPtr common subexpression elimination/loop invariant code motion
Hello.
I have a problem which is quite basic for array optimization, amd I
wonder whether I am missing something, but I could not
find the LLVM pass that does it.
Consider the following code snippet:
int test()
{
int mat[7][7][7];
int i,j,k,sum=0;
for(i=0;i<7;i++){
for(j=0;j<7;j++){
for(k=0;k<7;k++){
sum+=mat[i][j][k]^mat[i][j][k^1];
}
}
}
return
2011 Dec 17
4
[LLVMdev] Stop MachineCSE on certain instructions
...lock (meaning: if
the first instruction is executed, all three have to be executed to
obtain the result, though not necessarily without other instructions in
between). Unfortunately, MachineCSE gets in the way sometimes and rips
it apart.
Is there a way to stop CSE from doing its thing (common subexpression
elimination) for certain instructions?
I've already tried glueing (gluing?) them together, but that doesn't
seem to make a difference.
Regards,
Johannes Birgmeier
2008 May 24
0
[LLVMdev] Advice on CFG pre-analysis
...x, Some y -> x + y
| Some n, None | None, Some n -> n
| None, None -> None
Here, the expressions like 'Some x' and 'None' are patterns, which
match different variants of the 'maybe int' type. 'Some x' and 'Some
y' additionally bind matched subexpressions to names. For the first
pattern, I chose to shadow the nullable parameters with the non-
nullable matched subexpressions.
More to your point, however, the analysis you're proposing seems
strongly something that should be done in your language's IR prior to
LLVM lowering. Several of...
2006 Oct 13
2
[LLVMdev] opt usage?
I'm new to the LLVM, so please forgive what might be a silly question.
I'd like to use the opt bytecode-to-bytecode optimizer, but when I try
running it to do, for example, dead code elimination (-dce) or global
common subexpression elimination (-gcse), nothing much seems to happen:
opt -gcse -dce -o bar-opt.bc bar.bc
llvm2cpp -o bar-opt.cpp bar-opt.bc
diff bar.bc bar-opt.bc
40c40
< Module* mod = new Module("bar.bc");
---
< Module* mod = new Module("...
2011 Aug 04
3
[LLVMdev] Multiple one-line bugs in LLVM
...Most of the problems are easy to fix, so I list them in here for trunk version.
Also few problems in clang code were found, I don't list them in here.
----
lib/Target/X86/X86ISelLowering.cpp:11689
!DAG.isKnownNeverZero(LHS) && !DAG.isKnownNeverZero(LHS))
Note that there are identical subexpressions '!DAG.isKnownNeverZero (LHS)' to
the left and to the right of the '&&' operator.
The second subexpression should probably be !DAG.isKnownNeverZero(RHS)).
----
lib/Transforms/Scalar/ObjCARC.cpp:1138
void clearBottomUpPointers() {
PerPtrTopDown.clear();
}
void clearTop...
2015 Jul 24
2
[LLVMdev] some superoptimizer results
...(assuming that an optimization exists within the subset).
> +1 - This sounds like a very interesting approach. I suspect it might also find
> cases which are easier to hand generalize, but that's just a guess.
this sounds like what my LLVM superoptimizer did: simplified expressions to
subexpressions that were already present in the original expression, for example
(x+y)-x -> y. Here the right-hand side "y" is a particularly simple
subexpression of the original :)
One big advantage is that you can process expressions very fast, typically
hundreds per second. The other advant...
2013 Apr 18
3
[LLVMdev] optimization in presence of floating point
an interesting problem occurs if you do interval arithmetic.
void foo() {
float XL, XU, Y, Z;
....
call_change_rounding_mode(lower);
XL = Y + Z; // lower bound
call_change_rounding_mode(upper);
XU = Y + Z;
}
Two issues here:
1) will the compiler mistakenly treat Y+Z as a common subexpression.
2) might it move the call_change_rounding_mode after the assignment to
XU since it seens no dependency.
This is actually to my previous mips16 ir post but is a question of more
wide interest.
2010 Jan 11
0
trouble with installing pbatR
...steady.f: In subroutine `dsteady':
steady.f:101:
Beta = -beta
^
Expression at (^) has incorrect data type or rank for its context
steady.f:101:
Beta = -beta
12
Arithmetic operator at (1) must operate on two scalar (not array)
subexpressions, two function invocations return
ing arithmetic scalars, or a combination of both -- but the subexpression at
(2) is an array
steady.f:106:
Beta = -beta
^
Expression at (^) has incorrect data type or rank for its context
steady.f:106:
Beta = -beta...
2008 May 21
2
[LLVMdev] Optimization passes organization and tradeoffs
...nd then make the "fp" operations have some sort of flags to
parameterize the optimizations allowed for them. This would allow us to
propagate down the equivalent of GCC's -ffast-math into the IR.
> What's the difference between GVN and GCSE, if they both perform common
> subexpression elimination?
GVN does more, and is a better algorithm. GCSE is basically deprecated
and should be removed at some point.
> So far LLVM is working great for me. I'm impressed by the overall
> architecture and the fair learning curve. I'm generating complex but
> well-optimized c...
2010 Jan 29
2
evaluating expressions with sub expressions
...ing this sub expression I was using the following to evaluate "mat"
sapply(mat, eval, vals)
Obviously I could manually substitute in 1/Tm for each g1 in the
definition of "mat", but the actual expression vector is much longer, and
the sub expression more complicated. Also, the subexpression is often
adjusted for different scenarios. Is there a simple way of changing this
or redefining "mat" so that I can define "g1" like a macro to be used in
the expression vector.
Thanks!
Jennifer
2012 Sep 21
2
[LLVMdev] mips16 puzzle
...forms which implicitly
take SP.
However, for store/load byte and store/load halfword, there is no such
instruction.
In such cases, if I were writing assembly language code, I would move SP
to a mips 16 register and then use it to do the store/load byte/haflword.
It also then becomes a common subexpression because there may be
multiple such accesses.
It's like a temporary register alias.
Add, Sub also have a way to reference memory using mips16 registers as a
base address, so various operators on stack data are simplified.
Any thoughts?
Many ways to do this but I like simple ways. :)
Tia....
2013 Apr 18
0
[LLVMdev] optimization in presence of floating point
...hmetic.
>
> void foo() {
> float XL, XU, Y, Z;
>
> ....
> call_change_rounding_mode(lower);
> XL = Y + Z; // lower bound
> call_change_rounding_mode(upper);
> XU = Y + Z;
>
> }
>
> Two issues here:
> 1) will the compiler mistakenly treat Y+Z as a common subexpression.
> 2) might it move the call_change_rounding_mode after the assignment
> to
> XU since it seens no dependency.
I have come across these issues myself as well. To be fair, Clang does not support the FENV_ACCESS pragma, and as I recall, the standard allows an implementation-defined default...
2014 Apr 08
2
[LLVMdev] Why "I = ++I" instead of "++I" in COFFDump.cpp ?
On Mon, Apr 7, 2014 at 12:09 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:
> On Mon, Apr 07, 2014 at 08:38:58AM -0600, Richard wrote:
> > Oops, meant to send this to the mailing list instead of to Reid
> > privately. (Why cc the mailing list instead of just sending to the
> > mailing list?)
> >
> > In article <CACs=
>