llvm-project/llvm/test/ThinLTO/X86
Shiva Chen 2c864551df [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
In order to set breakpoints on labels and list source code around
labels, we need collect debug information for labels, i.e., label
name, the function label belong, line number in the file, and the
address label located. In order to keep these information in LLVM
IR and to allow backend to generate debug information correctly.
We create a new kind of metadata for labels, DILabel. The format
of DILabel is

!DILabel(scope: !1, name: "foo", file: !2, line: 3)

We hope to keep debug information as much as possible even the
code is optimized. So, we create a new kind of intrinsic for label
metadata to avoid the metadata is eliminated with basic block.
The intrinsic will keep existing if we keep it from optimized out.
The format of the intrinsic is

llvm.dbg.label(metadata !1)

It has only one argument, that is the DILabel metadata. The
intrinsic will follow the label immediately. Backend could get the
label metadata through the intrinsic's parameter.

We also create DIBuilder API for labels to be used by Frontend.
Frontend could use createLabel() to allocate DILabel objects, and use
insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR.

Differential Revision: https://reviews.llvm.org/D45024

Patch by Hsiangkai Wang.

llvm-svn: 331841
2018-05-09 02:40:45 +00:00
..
Inputs [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
alias_import.ll Make internal/private GVs implicitly dso_local. 2018-01-11 22:15:05 +00:00
alias_resolution.ll
autoupgrade.ll Bitcode: Write the irsymtab to disk. 2017-06-27 23:50:11 +00:00
cache-config.ll
cache-icall.ll Fix thinlto cache key computation for cfi-icall. 2017-08-09 23:24:07 +00:00
cache-import-lists.ll
cache-typeid-resolutions.ll
cache.ll [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
callees-metadata.ll [ThinLTO] Add funtions in callees metadata to CallGraphEdges 2018-03-13 04:26:58 +00:00
cfi-icall.ll [ThinLTO/CFI] Include TYPE_ID summaries into GLOBALVAL_SUMMARY_BLOCK 2018-02-14 22:41:15 +00:00
crash_debuginfo.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
deadstrip.ll Reland r327041: [ThinLTO] Keep available_externally symbols live 2018-03-13 05:08:48 +00:00
debuginfo-compositetype-import.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
debuginfo-cu-import.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
diagnostic-handler-remarks-with-hotness.ll Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
diagnostic-handler-remarks.ll Emit only A Single Opt Remark When Inlining 2017-08-21 16:45:47 +00:00
dicompositetype-unique-alias.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
dicompositetype-unique.ll [LTO] Update tests for r320905 2017-12-16 02:40:20 +00:00
dicompositetype-unique2.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
distributed_import.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
distributed_indexes.ll [ThinLTO] Make distributed indexes test more robust 2017-12-18 18:00:32 +00:00
dot-dumper.ll [ThinLTO] Re-commit of dot dumper after test fix 2018-01-22 13:35:40 +00:00
drop-debug-info.ll
dsolocal_dllimport.ll [ThinLTO] Clear dllimport when setting dso_local. 2018-03-13 15:24:51 +00:00
emit_imports.ll
empty-module.ll Remove trailing whitespace 2017-12-16 02:12:35 +00:00
empty_module_with_cache.ll
export.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
funcimport-tbaa.ll
funcimport.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
funcimport2.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
globals-import-const-fold.ll [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
globals-import.ll [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
import_opaque_type.ll
internalize.ll [ThinLTO] - Stop internalizing and drop non-prevailing symbols. 2018-01-29 08:03:30 +00:00
lazyload_metadata.ll Irreducible loop metadata for more accurate block frequency under PGO. 2017-11-02 22:26:51 +00:00
linkonce_aliasee_ref_import.ll
linkonce_odr_unnamed_addr.ll [ThinLTO] Teach ThinLTO about auto hide symbols 2018-02-09 18:34:08 +00:00
linkonce_resolution_comdat.ll [ThinLTO] Teach ThinLTO about auto hide symbols 2018-02-09 18:34:08 +00:00
lit.local.cfg
llvm.used.ll
local_name_conflict.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
merge-triple.ll
module_asm2.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
module_asm_glob.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
module_summary_graph_traits.ll [ThinLTO] Add GraphTraits for FunctionSummaries 2018-02-19 15:14:50 +00:00
newpm-basic.ll [ThinLTO] Move -lto-use-new-pm to llvm-lto2, and change it to -use-new-pm. 2017-06-01 23:13:44 +00:00
noinline.ll [ThinLTO] Don't import functions with noinline attribute 2017-12-25 13:57:24 +00:00
personality-local.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
personality.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
prefix_replace.ll [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
reference_non_importable.ll [LTO] Make processing of combined module more consistent 2017-12-16 02:10:00 +00:00
referenced_by_constant.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
save_objects.ll
section.ll
tli-nobuiltin.ll
weak_resolution.ll
weak_resolution_single.ll