Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] Create a call to function malloc using LLVM API"
2020 Apr 15
2
question on the signature of malloc
Hi all,
consider the following function from Core.cpp in LLVM 9.0.0:
LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef B, LLVMTypeRef Ty,
const char *Name) {
Type* ITy = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext());
Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty));
AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy);
2014 Nov 05
3
[LLVMdev] How to lower the intrinsic function 'llvm.objectsize'?
Thanks for your reply.
I'm attempting to expand KLEE to support this intrinsic function.
That's why I need to handle this myself.
According to the reply, the correct implementation should first find the
definition of the object and then determine the
size of the object.
BTW, can I just refer to the implementation in InstCombineCalls.cpp.
On Wed, Nov 5, 2014 at 2:24 PM, Matt Arsenault
2014 Nov 05
3
[LLVMdev] How to lower the intrinsic function 'llvm.objectsize'?
The documentation of LLVM says that "The llvm.objectsize intrinsic is
lowered to a constant representing the size of the object concerned". I'm
attempting to lower this intrinsic function to a constant in a pass. Below
is the code snippet that I wrote:
for (BasicBlock::iterator i = b.begin(), ie = b.end();
(i != ie) && (block_split == false);) {
IntrinsicInst *ii =
2007 May 27
1
[LLVMdev] New LLVMBuilder api
>> On Sun, 27 May 2007, Aaron Gray wrote:
>>>> I just checked in a new LLVMBuilder class into
>>>> llvm/Support/LLVMBuilder.h,
>>> It does not seem to be on the LLVM cvsweb, is that still showing 1.9 or
>>> 2.0
>>> and not cvs ?
>>
>> It is there:
>>
2019 Jun 28
2
Instcombine Creating Illegal Code? (in LLVM 7)
Hi all,
I was playing around with LLVM 7 and I discovered something that seems to
me to be a bug -- or at least something that I don't understand.
Take the following valid simple program and run -instcombine on it
declare i8* @malloc(i64)
define void @caller() {
entry:
call void @callee()
ret void
}
define fastcc void @callee() {
entry:
%malloccall = call i8* @malloc(i64 9)
store
2013 Jan 22
4
Simple use of dcast (reshape2 package)
Suppose I have a small dataframe
> aa
Target Eaten ID
50 TPP 0 1
51 TPP 1 2
52 TPP 3 3
53 TPP 1 4
54 TPP 2 5
50.1 GPA 9 1
51.1 GPA 11 2
52.1 GPA 8 3
53.1 GPA 8 4
54.1 GPA 10 5
And I want to reshape it into
ID TPP GPA
1 1 0 9
2 2 1 11
3 3 3 8
4 4 1 8
5 5 2 10
I realise that
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
From: Sylvain Gault <sylvain.gault at gmail.com>
Some firmware implementations may need ExitBootServices to be called
twice. The second time with an updated memory map key.
Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
---
efi/main.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 64 insertions(+), 11 deletions(-)
diff --git
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
On Wed, 26 Aug 2015 05:54:04 +0200
celelibi--- via Syslinux <syslinux at zytor.com> wrote:
> From: Sylvain Gault <sylvain.gault at gmail.com>
>
> Some firmware implementations may need ExitBootServices to be called
> twice. The second time with an updated memory map key.
>
> Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
> ---
> efi/main.c |
2008 Aug 04
0
JACK / WaveInGetPosition: This function is not supported.
Hello,
I'm running wine-1.1.2 on Ubuntu 8.04.1 with JACKD 0.109.2.
I'm trying to run TPP, a small application that makes it possible to run Winamp DSP plugins without using Winamp. It takes the input from one sound device, does some processing on it and outputs it to another sound device.
When i try to run this in Wine (with JACK), i get a popup that says:
WaveInGetPosition:
This
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
2015-11-02 12:34 UTC+01:00, Gene Cumm <gene.cumm at gmail.com>:
> On Tue, Aug 25, 2015 at 11:54 PM, celelibi--- via Syslinux
> <syslinux at zytor.com> wrote:
>> From: Sylvain Gault <sylvain.gault at gmail.com>
>>
>> Some firmware implementations may need ExitBootServices to be called
>> twice. The second time with an updated memory map key.
>>
2009 Oct 20
1
[LLVMdev] Quick Question...
Hey Everyone,
I know that LLVM subscribes to the notion of "progress over
backwards compatibility." And in that spirit, maybe someone could
help me better understand the motivation behind removing the
MallocInst? Is there a design doc anywhere?
From a pragmatic sense, the IRBuilder's createMalloc, which was
returning a MallocInst, was doing a lot of messy work for
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
2015-11-03 11:24 UTC+01:00, Gene Cumm <gene.cumm at gmail.com>:
> On Mon, Nov 2, 2015 at 10:23 PM, Celelibi <celelibi at gmail.com> wrote:
>> 2015-11-02 12:34 UTC+01:00, Gene Cumm <gene.cumm at gmail.com>:
>>> On Tue, Aug 25, 2015 at 11:54 PM, celelibi--- via Syslinux
>>> <syslinux at zytor.com> wrote:
>>>> From: Sylvain Gault
2010 Sep 07
0
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 8:03 AM, F van der Meeren wrote:
> Hello,
>
> I have a question, what is wrong with the following code?
>
> declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
>
> ...
>
> call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
>
> ...
>
>
> According to the compiler this is the
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
On Tue, Aug 25, 2015 at 11:54 PM, celelibi--- via Syslinux
<syslinux at zytor.com> wrote:
> From: Sylvain Gault <sylvain.gault at gmail.com>
>
> Some firmware implementations may need ExitBootServices to be called
> twice. The second time with an updated memory map key.
>
> Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
> ---
> efi/main.c | 75
2015 May 14
1
[PATCH] When calling getline first time, initialize length to zero.
The man page for getline says:
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
[...]
If *lineptr is set to NULL and *n is set 0 before the call, then get‐
line() will allocate a buffer for storing the line. This buffer should
be freed by the user program even if getline() failed.
which seems to indicate that we must initialize both line and len to 0
before the first
2017 Sep 12
0
[PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
This adds two extra tests using QMP (the QEMU Monitor Protocol). This
allows us to get extra information about the qemu binary beyond what
is available from the version number or ‘qemu -help’.
---
lib/qemu.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 175 insertions(+), 2 deletions(-)
diff --git a/lib/qemu.c b/lib/qemu.c
index bdd9947a8..34775041f 100644
2017 Apr 30
2
allocsize: change from 3.9 to 4.0
Hi all,
I added support for the allocsize function attribute to our compiler
(LDC), thinking that that would enable removal of function calls when the
allocated memory is not used.
For example:
```
declare i8* @my_malloc(i32) allocsize(0)
define void @test_malloc() {
%1 = call i8* @my_malloc(i32 100)
ret void
}
```
I thought the my_alloc call in test_malloc would be removed, but `opt -O3`
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
On Mon, Nov 2, 2015 at 10:23 PM, Celelibi <celelibi at gmail.com> wrote:
> 2015-11-02 12:34 UTC+01:00, Gene Cumm <gene.cumm at gmail.com>:
>> On Tue, Aug 25, 2015 at 11:54 PM, celelibi--- via Syslinux
>> <syslinux at zytor.com> wrote:
>>> From: Sylvain Gault <sylvain.gault at gmail.com>
>>>
>>> Some firmware implementations may need
1998 May 25
0
AIX: Urgent!
RS/6000 machine
AIX V.4.2 OS
SAMBA 1.9.18p4
AIX/NT4.0 -win95 WSs
Problem:
We cannot seem to browse our NT 4.0 server, or any of our shared WS's,
resources, etc... remotely. Locally, everything works great.
I have run through all 10 tests, with positive results.
Below is a copy of our SMB.CONF file:
*************************************************
2010 Sep 07
4
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
Hello,
I have a question, what is wrong with the following code?
declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
...
call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
...
According to the compiler this is the error, but I seem to miss where exactly my fault is.
Intrinsic prototype has incorrect number of arguments!
void (i64*,