similar to: [LLVMdev] Allocate memory for a class

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Allocate memory for a class"

2013 Apr 25
0
[LLVMdev] Allocate memory for a class
Thank you! It works like a charm Regards 2013/4/25 Tim Northover <t.p.northover at gmail.com> > On Thu, Apr 25, 2013 at 3:14 PM, B B <blackbox.dev.ml at gmail.com> wrote: > > > %call = call noalias i8* @_Znwm(i64 ptrtoint(%class.A* > getelementptr(%class.A* null, i32 1) to i64)) > > Yes, by "dynamically" I meant at IR code generation time. So if I
2013 Apr 25
1
[LLVMdev] Allocate memory for a class
Hi! When I allocate memory for a structure, in _Znwm (operator new) function I need to specify size. How can I determine this information dynamically? ; ModuleID = '/tmp/webcompile/_12211_0.bc' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple =
2010 Nov 09
2
[LLVMdev] Next round of DWARF issues/questions
On Mon, Nov 8, 2010 at 9:56 AM, Devang Patel <dpatel at apple.com> wrote: > > On Nov 6, 2010, at 7:35 PM, Talin wrote: > > After to speaking to Devang and a number of other people at the developer's > conference, I was able to make some forward progress on getting debugging to > work. I'm now able to actually single-step through my program and set > breakpoints,
2010 Nov 09
0
[LLVMdev] Next round of DWARF issues/questions
On Nov 8, 2010, at 10:52 PM, Talin <viridia at gmail.com> wrote: > On Mon, Nov 8, 2010 at 9:56 AM, Devang Patel <dpatel at apple.com> wrote: > > On Nov 6, 2010, at 7:35 PM, Talin wrote: > >> After to speaking to Devang and a number of other people at the developer's conference, I was able to make some forward progress on getting debugging to work. I'm now
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
2010 Nov 07
3
[LLVMdev] Next round of DWARF issues/questions
After to speaking to Devang and a number of other people at the developer's conference, I was able to make some forward progress on getting debugging to work. I'm now able to actually single-step through my program and set breakpoints, and examine function parameters. However, I'm also seeing a lot of new problems which weren't exposed before. After spending the better part of two
2009 Oct 21
1
[LLVMdev] A few more questions about DIFactory and source-level debugging.
Well, I am much happier now that I understand about dsymutil, and can actually step through my program in gdb. However, there are still some issues that are puzzling me. 1) First off, the debugger appears to stop at odd points. The IR for my main function looks correct to me: define i32 @"main(tart.core.Array[tart.core.String])->int"(%"tart.core.Array[tart.core.String]"*
2010 Nov 26
3
[LLVMdev] Next round of DWARF issues/questions
On Tue, Nov 9, 2010 at 9:04 AM, Devang Patel <dpatel at apple.com> wrote: > > > On Nov 8, 2010, at 10:52 PM, Talin <viridia at gmail.com> wrote: > > On Mon, Nov 8, 2010 at 9:56 AM, Devang Patel < <dpatel at apple.com> > dpatel at apple.com> wrote: > >> >> On Nov 6, 2010, at 7:35 PM, Talin wrote: >> >> After to speaking to Devang
2010 Nov 08
0
[LLVMdev] Next round of DWARF issues/questions
On Nov 6, 2010, at 7:35 PM, Talin wrote: > After to speaking to Devang and a number of other people at the developer's conference, I was able to make some forward progress on getting debugging to work. I'm now able to actually single-step through my program and set breakpoints, and examine function parameters. > > However, I'm also seeing a lot of new problems which
2001 Sep 24
4
part of files in another file after crash
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 because of strange reasons my notebook sometimes crashes short after startup (but that's not ext3's fault, maybe mem?, when i wait several minutes it works without problems) the problem is that after 3 crashes at startup, when my notebook finally worked i got the msg: Sep 23 23:29:17 blackbox kernel: EXT3-fs warning (device ide0(3,3)):
2015 Nov 11
2
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
On Wed, Nov 11, 2015 at 10:41 AM, Daniel Berlin <dberlin at dberlin.org> wrote: > On Wed, Nov 11, 2015 at 10:32 AM, Reid Kleckner <rnk at google.com> wrote: > >> I think the idea is to model the intrinsic as a normal external function >> call: >> > - Can read/write escaped memory >> > - Escapes pointer args >> - Functionattrs cannot infer
2015 Nov 11
5
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
On Wed, 11 Nov 2015 11:13:43 -0800, Daniel Berlin via llvm-dev wrote: <snip for gmane> > Heck, i could even reason about inline asm if i wanted to ;-). > > My point is that this call is super special compared to all other > calls, > and literally everything in LLVM has to understand that. > The liklihood of subtle bugs being introduced in functionality (IE >
2018 Jul 14
2
Lowering a reasonably complex struct seems to create over complex and invalid assembly fixups on some targets
When I compile this LLVM IR…. @0 = private constant [19 x i8] c"V4main10Brightness\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip" @1 = private constant [9 x i8] c"Vs5UInt8\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip" @2 = private constant [18 x i8] c"currentBrightness\00", section "__TEXT,__swift3_reflstr,
2003 Jul 07
1
embedding characters
i seem to be having trouble with certain characters in machine names and passwords. specifically, there is a hyphen in on of the server's names. this entry in the fstab file fails to connect with the following error: # mount /root/it-blackbox/c\$/ Password: Anonymous login successful 18867: tree connect failed: ERRDOS - ERRnoaccess (Access denied.) SMB connection failed the line from fstab
2009 Sep 23
2
[LLVMdev] DebugFactory
On Sep 22, 2009, at 4:49 PM, Talin wrote: > > // Calculate the size of the specified LLVM type. > Constant * DebugInfoBuilder::getSize(const Type * type) { > Constant * one = ConstantInt::get(Type::Int32Ty, 1); > return ConstantExpr::getPtrToInt( > ConstantExpr::getGetElementPtr( > ConstantPointerNull::get(PointerType::getUnqual(type)), >
2013 Jan 20
5
[LLVMdev] Sizeof a type?
Is there a way to get the sizeof a type? Say I've created a struct type without any explicit attribtues, and I want to call malloc() to allocate space for it. Can I get the size as an llvm::Constant* (or other llvm::Value*) given an llvm::StructType* or other llvm::Type*? TIA, -- Rick
2007 Mar 19
1
Trying to get a cdwriter to write to loop device
I'm trying to use a shareware program called PowerISO to extract a .daa cd image to a raw iso9660 format so that I can view the contents. PowerISO runs like this: ________________ [nate@blackbox ~/.wine/drive_c/Program Files/PowerISO]$ sudo wine cdburn.exe Password: Usage: cdburn <drive> -erase [image [options]] cdburn <drive> image [options] Options:
2015 Nov 11
2
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
I think the idea is to model the intrinsic as a normal external function call: - Can read/write escaped memory - Escapes pointer args - Functionattrs cannot infer anything about it - Returns a pointer which may alias any escaped data It's obvious how this works at the IR level, but I'm not sure what would happen in the backend. If you compile the intrinsic to nothing but a virtual
2012 Feb 22
5
[LLVMdev] Size of structs & arrays
I'm trying to work out the size of a struct so that I can pass this to the 'llvm.memcpy' intrinsic. It's easy to find out how I'm supposed to do this, as I keep seeing the following: %Size = getelementptr %T* null, int 1 %SizeI = cast %T* %Size to uint But I'm unsure how I actually do this in the C++ API. Is the 'null' here a llvm::ConstantPointerNull? Any help
2015 Nov 10
2
[RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations
One thing that volatile doesn't do is escape results that have been written to memory. The proposed blackbox intrinsic is modeled as reading and writing any pointed to memory, which is useful. I also think blackbox will be a lot easier for people to use than empty volatile inline asm and volatile loads and stores. That alone seems worth something. :) On Mon, Nov 9, 2015 at 6:04 PM, Daniel