Displaying 16 results from an estimated 16 matches similar to: "[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines"
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
On Thu, Oct 31, 2013 at 11:39 PM, sumeeth kc <sumeethkc at gmail.com> wrote:
> Hello,
>
> I would like to have your opinions on this.
>
> *Problem:*
>
> Currently, there are no ways to perform hypercalls into LLVM (they
> transfer execution from the program being executed to the LLVM
> infrastructure to perform compilation). The goal of this project is to
>
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
Hi Sumeeth,
I'm not sure I understand what your new mechanism is supposed to add. You can already call functions defined in the host program from generated code. The Kaleidoscope tutorial does this. If the function you want to call is defined in a module that is dynamically loaded and you are using the default memory manager all you need to do is declare a prototype for the function in
2008 Nov 11
7
music on hold
hii guys:
i get the message from the asterisk:
Started music on hold, class 'default', on Local/s at skype-web-callback-dial-263to263-1775,1
[2008-11-11 14:32:41] WARNING[1781]: format_wav.c:156 check_header: Unexpected freqency 11025
[2008-11-11 14:32:41] WARNING[1781]: file.c:322 fn_wrapper: Unable to open format wav
[2008-11-11 14:32:41] WARNING[1781]:
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list,
I am trying to implement a publish-subscribe mechanism in for an embedded
R interpreter. But somehow my registered closures seem to get collected by
the GC, even though I have protected them. I have reducted my code to the
following sample. Sorry if it is a little verbose.
The first couple of call of calls still work, but at some point one of the
callbacks (callback1 in my
2018 Mar 19
2
MIR YAML deserialisation failure
Hello,
I am trying to isolate an assertion failure in if-converter (on PPC) and I
generated a textual debuglog with:
```
LLVM_ARGS=-print-before-all -print-module-scope
-filter-print-funcs=japi1__require_7687
```
and after splicing out the the MIR before the if-converter pass
I would like to run `llc -march=ppc64le -run-pass=if-converter input.mir`
so that I can start minimising the MIR.
This
2018 Mar 20
0
MIR YAML deserialisation failure
Hello Valentin,
To generate a mir test case i think the process is to first create an IR
file by passing '-S -emit-llvm' to clang, then you can feed that file into
llc and use stop-before to get the mir just before the if-converter pass,
eg: `llc -stop-before=if-converter -simplify-mir -o test.mir test.ll`.
Also there is a MIR language reference:
https://llvm.org/docs/MIRLangRef.html
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
Hi Kenneth,
> By that I mean an optimization pass (or a combination of them) that turns:
...
> With that transform in place, lots of inlining becomes possible, and
> direct function calls replace indirect function calls if inlining
> isn't appropriate. If this transform is combined with argpromotion
> and scalarrepl, it can be used for devirtualization of C++ virtual
>
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
When I used -std-compile-opts -disable-inlining, my transform didn't
happen. I think in your test, the inline of UseCallback into foo
automatically made the function pointer into a constant, which turned
it into a direct call that was then inlined.
If UseCallback is too big to inline and uses the callback parameter
inside a loop, this transform is potentially valuable, particularly if
2018 Mar 20
2
MIR YAML deserialisation failure
Valentin,
in terms of limitations as Sean pointed out, an important one is that .mir
doesn't have MachineFunctionInfo which may result in failure on accesses to
global variables due to use of register X2. The verifier considers it an
undefined register.
Also, it's probably easier to reduce test cases using bugpoint starting
from an IR test case. With the code you provided, I get a
2018 Mar 20
0
MIR YAML deserialisation failure
Thank you both!
I was running into the issue that bugpoint was reducing my test-case into
other failures and I hadn't managed yet to find the right point in the
Julia pass pipeline to insert the module to reproduce the issue reliably
from llc and that's why I started looking at using the MIR.
I will go back at looking at the pass pipeline and the IR and get a
reproducer that way!
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
By that I mean an optimization pass (or a combination of them) that turns:
void useCallback(void (*callbackfn)())
{
// Do something
callbackfn();
// Do something else
}
void myCallback()
{
// Respond one way
}
void myOtherCallback()
{
// Respond another way
}
void foo()
{
useCallback(myCallback);
useCallback(myOtherCallback);
}
into:
// Keep the original; it'll get removed
// by other
2018 Mar 22
0
MIR YAML deserialisation failure
In our fork of LLVM we often need to reduce a crash testcase for a
specific assertion. After writing lots of "only give me this specific
assertion" scripts like the above I decided to write a script that
automates all this for me:
<https://github.com/CTSRD-CHERI/clang/blob/master/utils/creduce_crash_testcase.py>.
(It's called creduce_crash_test.py but it will actually use
2018 Mar 20
2
MIR YAML deserialisation failure
I'm not sure if this helps, but here it is in case it does.
I typically use bugpoint in a way as to keep the actual failure that I'm
after. For example, with the test case you've pasted, I was looking for a
specific assert. So I used bugpoint this way:
$ cat reduceme.sh
#!/bin/bash
llc -filetype=obj $1 2>&1 | grep 'Cannot lower calls with arbitrary operand
bundles'
2008 Feb 04
8
AGI: Not getting answers from get_data in a call-file call
I have the following situation: I drop a call-file into the Asterisk
spool directory and I get called back. That all works.
And I have this script:
#!/usr/bin/perl -w
use Asterisk::AGI;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$AGI->answer();
my $i;
$i = $AGI->channel_status();
$AGI->say_digits($i);
$i =
2013 Apr 24
1
[LLVMdev] JIT pass runtime struct on to subroutines
Hi
For a research project at my university, I'm working on incorporating JIT in Prolog, which is basically an interpreted virtual machine.
The VM uses logical units of functionality called 'predicates' which are composed of bytecode that represents the machine instructions the VM supports.
At execution time, the VM infinitately loops over these bytecodes and, using a giant switch
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
It should be relatively simple to write a pass that turns each call
that has constant argument(s) into a call to specialized version of
the callee. To devirtualize C++ calls it needs to be smarter, since
the argument is not a constant, but a pointer to a struct that points
to a constant. However, the trick here is
1) Knowing when to perform specialization. If the call was not inlined
the function