llvm.org GIT mirror llvm / 0b9a8d8
Reorganize libLTO C API header lto.h (NFC) This just makes it easier to follow the Doxygen blocks git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299814 91177308-0d34-0410-b5e6-96231b3b80d8 Mehdi Amini 2 years ago
1 changed file(s) with 87 addition(s) and 91 deletion(s). Raw diff Collapse all Expand all
550550 lto_bool_t ShouldEmbedUselists);
551551
552552 /**
553 * @}
553 * @} // endgoup LLVMCLTO
554554 * @defgroup LLVMCTLTO ThinLTO
555555 * @ingroup LLVMC
556556 *
668668 lto_codegen_model);
669669
670670 /**
671 * @}
671 * Sets the path to a directory to use as a storage for temporary bitcode files.
672 * The intention is to make the bitcode files available for debugging at various
673 * stage of the pipeline.
674 *
675 * \since LTO_API_VERSION=18
676 */
677 extern void thinlto_codegen_set_savetemps_dir(thinlto_code_gen_t cg,
678 const char *save_temps_dir);
679
680 /**
681 * Set the path to a directory where to save generated object files. This
682 * path can be used by a linker to request on-disk files instead of in-memory
683 * buffers. When set, results are available through
684 * thinlto_module_get_object_file() instead of thinlto_module_get_object().
685 *
686 * \since LTO_API_VERSION=21
687 */
688 void thinlto_set_generated_objects_dir(thinlto_code_gen_t cg,
689 const char *save_temps_dir);
690
691 /**
692 * Sets the cpu to generate code for.
693 *
694 * \since LTO_API_VERSION=18
695 */
696 extern void thinlto_codegen_set_cpu(thinlto_code_gen_t cg, const char *cpu);
697
698 /**
699 * Disable CodeGen, only run the stages till codegen and stop. The output will
700 * be bitcode.
701 *
702 * \since LTO_API_VERSION=19
703 */
704 extern void thinlto_codegen_disable_codegen(thinlto_code_gen_t cg,
705 lto_bool_t disable);
706
707 /**
708 * Perform CodeGen only: disable all other stages.
709 *
710 * \since LTO_API_VERSION=19
711 */
712 extern void thinlto_codegen_set_codegen_only(thinlto_code_gen_t cg,
713 lto_bool_t codegen_only);
714
715 /**
716 * Parse -mllvm style debug options.
717 *
718 * \since LTO_API_VERSION=18
719 */
720 extern void thinlto_debug_options(const char *const *options, int number);
721
722 /**
723 * Test if a module has support for ThinLTO linking.
724 *
725 * \since LTO_API_VERSION=18
726 */
727 extern lto_bool_t lto_module_is_thinlto(lto_module_t mod);
728
729 /**
730 * Adds a symbol to the list of global symbols that must exist in the final
731 * generated code. If a function is not listed there, it might be inlined into
732 * every usage and optimized away. For every single module, the functions
733 * referenced from code outside of the ThinLTO modules need to be added here.
734 *
735 * \since LTO_API_VERSION=18
736 */
737 extern void thinlto_codegen_add_must_preserve_symbol(thinlto_code_gen_t cg,
738 const char *name,
739 int length);
740
741 /**
742 * Adds a symbol to the list of global symbols that are cross-referenced between
743 * ThinLTO files. If the ThinLTO CodeGenerator can ensure that every
744 * references from a ThinLTO module to this symbol is optimized away, then
745 * the symbol can be discarded.
746 *
747 * \since LTO_API_VERSION=18
748 */
749 extern void thinlto_codegen_add_cross_referenced_symbol(thinlto_code_gen_t cg,
750 const char *name,
751 int length);
752
753 /**
754 * @} // endgoup LLVMCTLTO
672755 * @defgroup LLVMCTLTO_CACHING ThinLTO Cache Control
673756 * @ingroup LLVMCTLTO
674757 *
733816 unsigned expiration);
734817
735818 /**
736 * @}
737 */
738
739 /**
740 * Sets the path to a directory to use as a storage for temporary bitcode files.
741 * The intention is to make the bitcode files available for debugging at various
742 * stage of the pipeline.
743 *
744 * \since LTO_API_VERSION=18
745 */
746 extern void thinlto_codegen_set_savetemps_dir(thinlto_code_gen_t cg,
747 const char *save_temps_dir);
748
749 /**
750 * Set the path to a directory where to save generated object files. This
751 * path can be used by a linker to request on-disk files instead of in-memory
752 * buffers. When set, results are available through
753 * thinlto_module_get_object_file() instead of thinlto_module_get_object().
754 *
755 * \since LTO_API_VERSION=21
756 */
757 void thinlto_set_generated_objects_dir(thinlto_code_gen_t cg,
758 const char *save_temps_dir);
759
760 /**
761 * Sets the cpu to generate code for.
762 *
763 * \since LTO_API_VERSION=18
764 */
765 extern void thinlto_codegen_set_cpu(thinlto_code_gen_t cg, const char *cpu);
766
767 /**
768 * Disable CodeGen, only run the stages till codegen and stop. The output will
769 * be bitcode.
770 *
771 * \since LTO_API_VERSION=19
772 */
773 extern void thinlto_codegen_disable_codegen(thinlto_code_gen_t cg,
774 lto_bool_t disable);
775
776 /**
777 * Perform CodeGen only: disable all other stages.
778 *
779 * \since LTO_API_VERSION=19
780 */
781 extern void thinlto_codegen_set_codegen_only(thinlto_code_gen_t cg,
782 lto_bool_t codegen_only);
783
784 /**
785 * Parse -mllvm style debug options.
786 *
787 * \since LTO_API_VERSION=18
788 */
789 extern void thinlto_debug_options(const char *const *options, int number);
790
791 /**
792 * Test if a module has support for ThinLTO linking.
793 *
794 * \since LTO_API_VERSION=18
795 */
796 extern lto_bool_t lto_module_is_thinlto(lto_module_t mod);
797
798 /**
799 * Adds a symbol to the list of global symbols that must exist in the final
800 * generated code. If a function is not listed there, it might be inlined into
801 * every usage and optimized away. For every single module, the functions
802 * referenced from code outside of the ThinLTO modules need to be added here.
803 *
804 * \since LTO_API_VERSION=18
805 */
806 extern void thinlto_codegen_add_must_preserve_symbol(thinlto_code_gen_t cg,
807 const char *name,
808 int length);
809
810 /**
811 * Adds a symbol to the list of global symbols that are cross-referenced between
812 * ThinLTO files. If the ThinLTO CodeGenerator can ensure that every
813 * references from a ThinLTO module to this symbol is optimized away, then
814 * the symbol can be discarded.
815 *
816 * \since LTO_API_VERSION=18
817 */
818 extern void thinlto_codegen_add_cross_referenced_symbol(thinlto_code_gen_t cg,
819 const char *name,
820 int length);
819 * @} // endgroup LLVMCTLTO_CACHING
820 */
821821
822822 #ifdef __cplusplus
823823 }
824824 #endif
825825
826 /**
827 * @}
828 */
829
830826 #endif /* LLVM_C_LTO_H */