search for: lto_module_create_from_memory

Displaying 9 results from an estimated 9 matches for "lto_module_create_from_memory".

2013 Nov 13
2
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...into the first > 3) delete the second module > 4) while there are more source modules, goto 1 I'll describe how the darwin linker uses the LTO interface. It may be amenable to earlier module deletion. 1) The darwin linker mmap()s each input file. If it is a bitcode file, it calls lto_module_create_from_memory() then lto_module_get_num_symbols() and lto_module_get_symbol_*() to discover what the module provides and needs. 2) After all object files are loaded (which means no undefined symbols are left), the linker then calls: lto_codegen_create() and then in a for-loop calls lto_codegen_add_module() on...
2013 Nov 14
0
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
> It sounds like the linker could call lto_module_dispose() right after > lto_codegen_add_module() to help reduce the memory footprint. That would be > a simple linker change. A slightly larger linker change would be to > immediately call lto_codegen_add_module() right after > lto_module_create_from_memory(), then lto_module_dispose(). That is, never > have any unmerged modules laying around. > > I have no idea is these sort of changes work for the gold plugin. The gold plugin calls lto_codegen_add_module/lto_module_dispose early. So it looks like Chandler's idea would be a win for gol...
2013 Nov 13
0
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
On Tue, Nov 12, 2013 at 6:07 PM, Manman Ren <manman.ren at gmail.com> wrote: > Hi Chandler, > > I don't quite get why you think sharing is not buying us anything... > It reduces the memory footprint of the source modules (there is sharing > among the source modules) and the number of MDNodes created for the > destination module (we do not need to re-create the MDNodes
2008 Feb 23
5
[LLVMdev] new LTO C interface
...// // loads an object file from disk // returns NULL on error (check lto_get_error_message() for details) // extern lto_module_t lto_module_create(const char* path); // // loads an object file from memory // returns NULL on error (check lto_get_error_message() for details) // extern lto_module_t lto_module_create_from_memory(const uint8_t* mem, size_t length); // // frees all memory for a module // upon return the lto_module_t is no longer valid // extern void lto_module_release(lto_module_t mod); // // returns triplet string which the object module was compiled under // extern const char* lto_module_get_target_tri...
2008 Feb 25
0
[LLVMdev] new LTO C interface
..._in_memory(const uint8_t* mem, size_t > length); > > extern bool > lto_module_is_object_file_in_memory_for_target(const uint8_t* mem, > size_t length, > const char* > target_triplet_prefix); > > extern lto_module_t > lto_module_create_from_memory(const uint8_t* mem, size_t length); Why not void*? Saves casting. > // > // generates code for all added modules into one object file > // On sucess returns a pointer to a generated mach-o buffer and > // length set to the buffer size. Client must free() the buffer > // when done....
2013 Nov 13
2
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
On Tue, Nov 12, 2013 at 4:59 PM, Chandler Carruth <chandlerc at google.com>wrote: > On Tue, Nov 12, 2013 at 4:46 PM, Manman Ren <manman.ren at gmail.com> wrote: > >> >> >> >> On Tue, Nov 12, 2013 at 4:38 PM, Chandler Carruth <chandlerc at google.com>wrote: >> >>> >>> On Tue, Nov 12, 2013 at 4:29 PM, Manman Ren <manman.ren
2008 Feb 26
2
[LLVMdev] new LTO C interface
...>> length); >> >> extern bool >> lto_module_is_object_file_in_memory_for_target(const uint8_t* mem, >> size_t length, >> const char* >> target_triplet_prefix); >> >> extern lto_module_t >> lto_module_create_from_memory(const uint8_t* mem, size_t length); > > Why not void*? Saves casting. Fixed. >> // >> // generates code for all added modules into one object file >> // On sucess returns a pointer to a generated mach-o buffer and >> // length set to the buffer size. Client must free...
2013 Nov 14
4
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...the linker could call lto_module_dispose() right after > > lto_codegen_add_module() to help reduce the memory footprint. That > would be > > a simple linker change. A slightly larger linker change would be to > > immediately call lto_codegen_add_module() right after > > lto_module_create_from_memory(), then lto_module_dispose(). That is, > never > > have any unmerged modules laying around. > > > > I have no idea is these sort of changes work for the gold plugin. > > The gold plugin calls lto_codegen_add_module/lto_module_dispose early. > So it looks like Chandler...
2008 Feb 25
0
[LLVMdev] new LTO C interface
...on error (check lto_get_error_message() for details) > // > extern lto_module_t > lto_module_create(const char* path); > > > // > // loads an object file from memory > // returns NULL on error (check lto_get_error_message() for details) > // > extern lto_module_t > lto_module_create_from_memory(const uint8_t* mem, size_t length); > > > // > // frees all memory for a module > // upon return the lto_module_t is no longer valid > // > extern void > lto_module_release(lto_module_t mod); > > > // > // returns triplet string which the object module was compil...