Displaying 10 results from an estimated 10 matches for "do_something_with".
2009 Sep 24
2
Access to conditioning variables (lattice)
...is a simple example that describes what I wish to do (the problem
lies with the commented line):
dataset <- data.frame(x = c(1,2), y = c(4,5), Type = factor(c("a","b")))
xyplot( y ~ x | Type, dataset,
panel = function(...) {
panel.xyplot(...)
# do_something_with(conditioning_variables[which.packet()])
})
The problem I am facing is that I do not know how to generically access
the conditioning variables within the panel function. In this simple
case, I can achieve what I want to do with the following call :
do_something_with(Type[which.packet()...
2011 Dec 13
1
[LLVMdev] Changing the operands in the CallInst
...owing:
1. Change the value of the argument if condition1 takes place
2. Change the type of the argument if condition2 takes place
3. Add addition argument/s if condition3 takes place
void argChange(CallInst * I)
{
for (unsigned index = 0; index < I->getNumOperands(); ++index) {
do_something_with (I->getOperand(index),condition);
}
}
I think that the 1. can be implemented using I->setOperand(index,newValue)
Can anyone advice me how 2. & 3. could be implemented.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pi...
2010 Jan 25
3
[LLVMdev] Deterministic iteration over llvm iterators
...nge) with the LLVM opt tool and my LLVM pass.
void Anders::id_gep_ce(Value *G){
assert(G);
//Check all GEP and bitcast ConstantExpr's using G.
for(Value::use_iterator it= G->use_begin(), ie= G->use_end(); it != ie;
++it){
ConstantExpr *E= dyn_cast<ConstantExpr>(*it);
do_something_with(E);
}
i.e. use_begin() and use_end() still works correctly such that iterates
through all the uses of G but the uses themselves are reordered. My question
is whether I can deterministically iterate through all the uses of G each
time run the analysis.
Currently this is what happens in principle:...
2010 Jul 01
0
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
...t;CallInst>(I) somewhere in "method".
>
It's example code to illustrate my concern. It doesn't exist anywhere.
Perhaps a more realistic example would be:
void
method (Instruction * I) {
for (unsigned index = 0; index < I->getNumOperands(); ++index) {
do_something_with (I->getOperand(index));
}
}
For example, code that computes a static backwards slice might do
something like the above. It doesn't care about operand order or what
type of instruction it is dealing with; it just wants to get the
incoming operands and do something with them.
This se...
2010 Jun 30
2
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
Am 30.06.2010 um 23:31 schrieb John Criswell:
>
> Stupid question: is making the getOperand() method of CallInst
> going to work? For example, if I have the following code:
>
> void
> method (Instruction * I) {
> I->getOperand(2);
> ...
> }
>
> void method2 (CallInst * CI) {
> method (CI);
> ...
> }
>
> Will method() still work
2014 Jun 26
2
[LLVMdev] Contributing the Apple ARM64 compiler backend
...(a < 0 && b == c || a > 0 && b == d)" - the first comparison of
> 'a' against zero is done twice, when the flag results of the first
> comparison could be used for the second comparison.
>
> * For a loop such as "for (i = 0; i < n; ++i)
> {do_something_with(&x[i]);}", GCC is using &x[i] as the loop induction
> variable where LLVM uses i and performs the calculation &x[i] on every
> iteration. This only creates one more add instruction but the loop we see
> it
> in only has 5 or so instructions.
>
> * The inline heu...
2011 Nov 21
1
[LLVMdev] ModulePass and Strings
Hi everybody,
I am writing an LLVM pass and I want to iterate over the whole module
(including global variables), that's why I use ModulePass instead of
FunctionPass. But I don't know how to do it. Using Module::iterator seams
to iterate only over functions. But I need to iterate over all the
Instructions in the module. How should I do such an iteration?
Also, I would like to find all the
2014 Jun 26
2
[LLVMdev] Contributing the Apple ARM64 compiler backend
...essure.
2. "if (a < 0 && b == c || a > 0 && b == d)" - the first comparison of
'a' against zero is done twice, when the flag results of the first
comparison could be used for the second comparison.
* For a loop such as "for (i = 0; i < n; ++i)
{do_something_with(&x[i]);}", GCC is using &x[i] as the loop induction
variable where LLVM uses i and performs the calculation &x[i] on every
iteration. This only creates one more add instruction but the loop we see it
in only has 5 or so instructions.
* The inline heuristics are way behind GCC...
2014 Jun 24
5
[LLVMdev] Contributing the Apple ARM64 compiler backend
Eric Christopher <echristo <at> gmail.com> writes:
>
> > The big pain issues I see merging from ARM64 to AArch64 are:
> > 1. Apple have created a fairly complete scheduling model already
for
> > ARM64, and we'd have to merge the partial? model in AArch64 and theirs.
We
> > risk regressing performance on Apple's targets here, and we can't
2014 Jun 27
3
[LLVMdev] Contributing the Apple ARM64 compiler backend
...a < 0 && b == c || a > 0 && b == d)" - the first comparison of
> 'a' against zero is done twice, when the flag results of the first
> comparison could be used for the second comparison.
>
> * For a loop such as "for (i = 0; i < n; ++i)
> {do_something_with(&x[i]);}", GCC is using &x[i] as the loop induction
> variable where LLVM uses i and performs the calculation &x[i] on every
> iteration. This only creates one more add instruction but the loop we see it
> in only has 5 or so instructions.
>
> * The inline heurist...