search for: __bitcode

Displaying 13 results from an estimated 13 matches for "__bitcode".

2020 Aug 15
2
Adding bitcode to an existing MachO object file
...x86 and arm assembly sources for some sources while the rest will be built with C. I do know that just adding `-fembed-bitcode` to a C sources would embed bitcode, but doing the same for the assembly files will not do that (at least, it will add the 1-byte `_LLVM,__asm` section, but not the `__LLVM,__bitcode` section). Furthermore, I do need the final output to contain bitcode for all files used. So, my question is if it is possible to add the `__LLVM,__bitcode` section later to the MachO object file. I tried to archive the bitcode using `xar` and run `llvm-objcopy main.o --add-section=__LLVM,__bitcod...
2019 Jan 18
2
Difference when compiling human readable IR vs bitcode with clang frontend
...macosx10.13.0 -emit-llvm-bc -fblocks -fencode-extended-block-signature -x ir test.ll -o test.bc clang -cc1 -triple x86_64-apple-macosx10.13.0 -emit-obj -fembed-bitcode=all -x ir test.bc -o test_bc.o # Extract and disassemble embedded bitcode from both scenarios. segedit test_bc.o -extract __LLVM __bitcode bc_bc.bc segedit test_ll.o -extract __LLVM __bitcode ll_bc.bc llvm-dis bc_bc.bc llvm-dis ll_bc.bc # Diff both IR files to show that only bc_bc.ll contains "llvm.compiler.used" diff bc_bc.ll ll_bc.ll - Dennis Frett -------------- next part -------------- A non-text attachment was scrubbe...
2019 Jan 20
2
Difference when compiling human readable IR vs bitcode with clang frontend
...-extended-block-signature -x ir test.ll -o test.bc >> clang -cc1 -triple x86_64-apple-macosx10.13.0 -emit-obj -fembed- >> bitcode=all -x ir test.bc -o test_bc.o >> >> # Extract and disassemble embedded bitcode from both scenarios. >> segedit test_bc.o -extract __LLVM __bitcode bc_bc.bc >> segedit test_ll.o -extract __LLVM __bitcode ll_bc.bc >> llvm-dis bc_bc.bc >> llvm-dis ll_bc.bc >> >> # Diff both IR files to show that only bc_bc.ll contains >> "llvm.compiler.used" >> diff bc_bc.ll ll_bc.ll >> >> - Denni...
2016 Feb 03
2
[cfe-dev] [RFC] Embedding Bitcode in Object Files
Hi Peter It is not currently related because we started the implementation before Thin-LTO gets proposed in the community but our "__LLVM, __bitcode" section is pretty much the same as ".llvmbc" section. Note ".llvmbc" doesn't really follow the section naming convention for MachO objects. I am hoping to unify them during the upstream of the implementation. Thanks Steven > On Feb 3, 2016, at 10:48 AM, Peter Co...
2016 Feb 03
4
[RFC] Embedding Bitcode in Object Files
...can still check the presence of the section to provide feedback if any of the object files participated in the linking is missing bitcode in a full bitcode build. 2. Bitcode Embedding: Several special sections are used by bitcode to mark the presence of the bitcode in the MachO file. "__LLVM, __bitcode" is used to store the optimized bitcode in the object file. It can have an 1-byte size as a marker to provide diagnostics in debug build. "__LLVM, __cmdline" is used to store the clang command-line options. There are few options that are not reflected in the bitcode that we would li...
2016 Apr 06
13
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...sed on common libraries). This can be done with a change to the intermediate object file format. We can represent object files as native code containing statically compiled functions and global data in the .text,. data, .rodata (etc.) sections, with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting Mach-O) containing bitcode for functions to be compiled at link time. In order to make this work, we need to make sure that references from link-time compiled functions to statically compiled functions work correctly in the case where the statically compiled function has inter...
2016 May 04
2
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
.... > > This can be done with a change to the intermediate object file format. We > can represent object files as native code containing statically compiled > functions and global data in the .text,. data, .rodata (etc.) sections, > with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting > Mach-O) containing bitcode for functions to be compiled at link time. > > > I was wondering why can't the "precompiled" function be embedded in the IR > instead of the bitcode embedded in the object file? > The codegen would still emit a single...
2016 Apr 07
2
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
.... > > This can be done with a change to the intermediate object file format. We > can represent object files as native code containing statically compiled > functions and global data in the .text,. data, .rodata (etc.) sections, > with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting > Mach-O) containing bitcode for functions to be compiled at link time. > > In order to make this work, we need to make sure that references from > link-time compiled functions to statically compiled functions work > correctly in the case where the statically com...
2016 Apr 07
4
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...aries). >> >> This can be done with a change to the intermediate object file format. We can represent object files as native code containing statically compiled functions and global data in the .text,. data, .rodata (etc.) sections, with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting Mach-O) containing bitcode for functions to be compiled at link time. >> >> In order to make this work, we need to make sure that references from link-time compiled functions to statically compiled functions work correctly in the case where the statically compiled...
2016 May 04
3
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...This can be done with a change to the intermediate object file format. We >> can represent object files as native code containing statically compiled >> functions and global data in the .text,. data, .rodata (etc.) sections, >> with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting >> Mach-O) containing bitcode for functions to be compiled at link time. >> >> >> I was wondering why can't the "precompiled" function be embedded in the >> IR instead of the bitcode embedded in the object file? >> The codegen w...
2016 Apr 07
2
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...>> >>>> This can be done with a change to the intermediate object file format. We can represent object files as native code containing statically compiled functions and global data in the .text,. data, .rodata (etc.) sections, with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting Mach-O) containing bitcode for functions to be compiled at link time. >>>> >>>> In order to make this work, we need to make sure that references from link-time compiled functions to statically compiled functions work correctly in the case where the stat...
2016 Apr 07
2
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...> >>>>> This can be done with a change to the intermediate object file format. We can represent object files as native code containing statically compiled functions and global data in the .text,. data, .rodata (etc.) sections, with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting Mach-O) containing bitcode for functions to be compiled at link time. >>>>> >>>>> In order to make this work, we need to make sure that references from link-time compiled functions to statically compiled functions work correctly in the case where...
2016 Apr 07
2
RFC [ThinLTO]: Promoting more aggressively in order to reduce incremental link time and allow sharing between linkage units
...>>> >>> This can be done with a change to the intermediate object file format. We can represent object files as native code containing statically compiled functions and global data in the .text,. data, .rodata (etc.) sections, with an .llvmbc section (or, I suppose, "__LLVM, __bitcode" when targeting Mach-O) containing bitcode for functions to be compiled at link time. >>> >>> In order to make this work, we need to make sure that references from link-time compiled functions to statically compiled functions work correctly in the case where the statically c...