Displaying 20 results from an estimated 1000 matches similar to: "question on the signature of malloc"
2015 Jan 27
2
[LLVMdev] Create a call to function malloc using LLVM API
Hi, I encountered an issue when attempting to create a call to function
malloc.
I just want to do a simple thing, suppose there is a variable p, if p is a
pointer
then allocate memory to p.
Source code:
int *p;
p = (int *) malloc(sizeof(*p));
Try to generate LLVM IR for it:
Type *tp = p->getType();
AllocaInst* arg_alloc = builder.CreateAlloca(tp);//builder is IRBuilder
2015 Jul 13
2
[LLVMdev] Problem with InsertPointGuard ABI?
Hi,
I have problem with IRBuilderBase::InsertPointGuard class that simply does
not work in the release build of my project. The class does not restore the
IRBuilder's insert point correctly when NDEBUG macro is set. It happens on
OSX system only, trunk version of the LLVM built with brew.
I suspect it is the ABI problem. InsertPointGuard uses AssertingVT for
debug builds.
LLDB gets confused
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 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 |
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`
2016 Feb 07
3
[PATCH] strlen -> strnlen optimization
This addition converts strlen() calls to strnlen() when the result is
compared to a constant. For example, the following:
strlen(s) < 5
Becomes:
strnlen(s, 5) < 5
That way, we don't have to walk through the entire string. There is the
added overhead of maintaining a counter when using strnlen(), but I
thought I'd start with the general case. It may make sense to only use
this
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
2015 Sep 25
2
Error compiling libc++ for ARMv6
Hi,
I was compiling libc++ with a recent TOT (248571) and when I got to the
ARMv6, I got a code generation error in memory.cpp:
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex
ecc: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 3.8.0 (trunk)
It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance()
function is
2018 Apr 04
1
Call printf with new args
Hello,
My code: (CallInst *CI, IRBuilder<> &B)
SmallVector<Value *, 8> args;
Value *v = B.CreateGlobalString("hi", "str");
args.push_back(v);
SmallVector<Type*, 8> params;
params.push_back(v->getType());
Module *M = B.GetInsertBlock()->getParent()->getParent();
FunctionType *printfType =
2015 Sep 26
2
Error compiling libc++ for ARMv6
On Fri, Sep 25, 2015 at 2:17 PM, JF Bastien <jfb at google.com> wrote:
> Looks like this was caused by r248294. Author CC'ed.
>
> On Fri, Sep 25, 2015 at 1:46 PM, Richard Pennington via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>>
>> Hi,
>>
>> I was compiling libc++ with a recent TOT (248571) and when I got to the
>> ARMv6, I got a
2016 May 21
1
[PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7.
Since Linux 4.7, the process umask is available in /proc/<pid>/status.
See:
https://github.com/torvalds/linux/commit/3e42979e65dace1f9268dd5440e5ab096b8dee59
Use this value if available, else fall back to the existing codepath
for Linux <= 4.6 and other Unix.
---
src/umask.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 78 insertions(+), 8
2013 Jan 02
0
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Hi Duncan & Tobi,
Thanks a lot for your interest, and for pointing out differences in GIMPLE
I missed.
Attached is simplified test case. Is it good?
Tobi, regarding runtime alias analysis: in KernelGen we already do it along
with runtime values substitution. For example:
<------------------ __kernelgen_main_loop_17: compile started
--------------------->
Integer args substituted:
2008 May 18
1
[LLVMdev] Duplicate wrapper function in LLVM-C.
Hi (Gordon).
There appears to be two wrapper functions for
DerivedType::refineAbstractTypeTo() in llvm-c (Core.h, Core.cpp):
void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType){
DerivedType *Ty = unwrap<DerivedType>(AbstractType);
Ty->refineAbstractTypeTo(unwrap(ConcreteType));
}
void LLVMRefineType(LLVMTypeRef AbstractTy, LLVMTypeRef ConcreteTy) {
2020 Apr 12
2
Optimization generate super long function definition
Hi all,
sorry to have sent the same question around. I am quite desperately looking for a solution to this problem and I figured the mailing list is the best bet.
In my code, I generate the following function:
define i32 @gl.qi([500 x i32] %x, i32 %i) {
entry:
%x. = alloca [500 x i32]
%i. = alloca i32
%0 = alloca [500 x i32]
store [500 x i32] %x, [500 x i32]* %x.
store i32 %i, i32*
2015 Aug 26
5
[PATCH] Call ExitBootServices twice
From: Sylvain Gault <sylvain.gault at gmail.com>
On some architecture, including my hardware, the function ExitBootServices may
need to be called twice in order to successfully exit the boot services. As
stated by the UEFI spec, the first call to ExitBootServices may perform a
partial shutdown of the services. It seems that during this partial shutdown,
the memory map can be modified, thus
2018 Feb 16
2
Missing attribute inference cases
Maybe we could list some of these as a GSoC project?
Seems like a self-contained task that can be simple as desired and as hard
as the student wants it to be.
Nuno
-----Original Message-----
From: Philip Reames via llvm-dev
Sent: Friday, February 16, 2018 6:48 PM
To: llvm-dev
Subject: Re: [llvm-dev] Missing attribute inference cases
On 02/16/2018 10:29 AM, Philip Reames via llvm-dev wrote:
2015 Sep 15
1
[PATCH] daemon: initrd: print return value from failing process
If either zcat or cpio fails when spawned in initrd-list, pclose will
return the actual return value of it, but reply_with_perror still uses
errno regardless; thus, the reported error is:
libguestfs: error: initrd_list: pclose: Success
which is not much helpful.
Instead, when pclose returns > 0, extract the actual return value of the
subprocess, and print that. Thus now we get for example:
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
2018 Feb 16
0
Missing attribute inference cases
On 02/16/2018 10:29 AM, Philip Reames via llvm-dev wrote:
>
> This email is just to summarize a bit of digging I did last night into
> our attribute inference. Unfortunately, I'm not going to have time to
> implement any of the gaps I noticed, but I figured someone else out
> there might be interested.
>
> *Missing Attributes*
>
> argmemonly - influences AA,
2018 Feb 17
2
Missing attribute inference cases
Sure, but is anyone willing to mentor? I don't have time. I can
advise, but only infrequently.
Philip
On 02/16/2018 03:47 PM, Davide Italiano wrote:
> Yes, I agree with you this sounds like a great GSoC.
>
> On Fri, Feb 16, 2018 at 3:42 PM, Nuno Lopes via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Maybe we could list some of these as a GSoC project?