John Kåre Alsaker
4ecfd30a86
Use Freeze
for SourceFile.lines
2023-09-07 13:05:05 +02:00
Camille GILLOT
61a0b77e17
Use relative positions inside a SourceFile.
2023-09-03 12:56:10 +00:00
bjorn3
e8168ce8a3
Merge commit '1eded3619d0e55d57521a259bf27a03906fdfad0' into sync_cg_clif-2023-07-22
2023-07-22 13:32:34 +00:00
Nicholas Nethercote
9db001dfbb
Avoid unnecessary line lookup.
...
`lookup_debug_loc` calls `SourceMap::lookup_line`, which does a binary
search over the files, and then a binary search over the lines within
the found file. It then calls `SourceFile::line_begin_pos`, which redoes
the binary search over the lines within the found file.
This commit removes the second binary search over the lines, instead
getting the line starting pos directly using the result of the first
binary search over the lines.
(And likewise for `get_span_loc`, in the cranelift backend.)
2023-06-29 11:26:39 +10:00
David Wood
1cf9be98cd
ssa: implement #[collapse_debuginfo]
...
Debuginfo line information for macro invocations are collapsed by
default - line information are replaced by the line of the outermost
expansion site. Using `-Zdebug-macros` disables this behaviour.
When the `collapse_debuginfo` feature is enabled, the default behaviour
is reversed so that debuginfo is not collapsed by default. In addition,
the `#[collapse_debuginfo]` attribute is available and can be applied to
macro definitions which will then have their line information collapsed.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-09-07 13:54:51 +01:00
bjorn3
cfef0a4f8d
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
2022-08-24 18:40:58 +02:00
Joshua Nelson
b2ae24e6a1
Rename debugging_opts
to unstable_opts
...
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
2022-07-13 17:47:06 -05:00
bjorn3
d1904e5855
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
2022-03-20 16:55:21 +01:00
bjorn3
fb92375755
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
2021-07-07 11:14:20 +02:00
Andy Wang
e162eeb1f0
Use local and remapped paths where appropriate
2021-05-05 15:31:28 +01:00
Andy Wang
5de83e7bd1
Revamp RealFileName public methods
2021-05-05 15:31:03 +01:00
bjorn3
07968a001d
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
2021-03-29 10:45:09 +02:00
bjorn3
27886cd6b6
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
2021-03-05 19:12:59 +01:00
bjorn3
285c7c66dc
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01
2020-11-03 11:00:04 +01:00
bjorn3
c8699076f9
Document almost all modules
...
Fixes #1082
2020-09-23 15:13:49 +02:00
CohenArthur
4e685a512e
fmt: Run cargo fmt since it is available
2020-08-28 12:10:48 +02:00
bjorn3
a0580610b2
Use From::from
instead of as
where possible
2020-07-14 16:38:50 +02:00
bjorn3
eb5ce4e92a
Remove FunctionDebugContext
2020-06-13 17:03:34 +02:00
bjorn3
648b634e21
Rustup to rustc 1.45.0-nightly (56daaf669 2020-06-03)
2020-06-04 19:57:12 +02:00
bjorn3
47f0256d56
Update Cranelift
2020-05-25 13:04:36 +02:00
bjorn3
27cc90effa
Improvements for latest Cranelift
2020-05-05 12:16:28 +02:00
bjorn3
9d6f65ea14
Implement line debuginfo for AArch64
2020-04-25 17:29:09 +02:00
Kitsu
8c7a457753
Use md5 dwarf hash, only if all files has it
...
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2020-04-20 23:27:54 +03:00
Kitsu
fb709ede02
Simplify with make_file_info
2020-04-18 17:43:00 +03:00
Kitsu
0e837e3082
Simplify FileHash ctor
2020-04-18 16:33:01 +03:00
Kitsu
710da05af7
Dedup file hashing logic with type
2020-04-18 16:16:17 +03:00
Kitsu
5c0e34d7ab
Don`t include timestamp as debug file info
2020-04-18 16:02:02 +03:00
Kitsu
077209e565
Support file hashes in .debug_line
2020-04-18 14:56:04 +03:00
bjorn3
f288959c00
Limit publicness to crate where possible and remove unused imports
2020-03-27 12:14:45 +01:00
bjorn3
efe3d84ce4
Don't lookup span position when the span hasn't changed
...
This improves performance of FunctionDebugContext::define by ~60%
Fixes #807
2020-03-14 15:18:04 +01:00
bjorn3
660b5c33e7
Use byte offsets instead of char offsets in debuginfo
...
cc #807
2020-03-14 15:10:22 +01:00
bjorn3
092cae12f9
Dont single step into macros
...
Fixes #782
2020-03-14 14:48:04 +01:00
bjorn3
430f738392
Update Cranelift for basic blocks
2020-02-14 18:23:29 +01:00
bjorn3
fbe36ad68a
Revert "Use CachingSourceMapView::byte_pos_to_line_and_col instead of SourceMap::lookup_char_pos"
...
This reverts commit eb4fc45310c70513d73d893616cd6735465680ca.
It caused a panic while compiling simple-raytracer
2020-02-03 21:36:36 +01:00
bjorn3
eb4fc45310
Use CachingSourceMapView::byte_pos_to_line_and_col instead of SourceMap::lookup_char_pos
...
The former calculates byte offsets instead of char offsets. It is faster
to calculate byte offsets than char offsets. Also most DWARF producers
and consumers use byte offsets instead of char offsets.
2020-02-03 21:05:18 +01:00
bjorn3
09b44f5d25
Reduce visibility
2020-01-14 17:11:06 +01:00
bjorn3
29fafb44b1
Optimize .debug_line generation
...
This reduces the amount of time spent in .debug_line generation by about 50%
Fixes #807
2020-01-14 16:11:23 +01:00
bjorn3
6652f466ef
Rustup to rustc 1.42.0-nightly (bc1571cc3 2020-01-05)
2020-01-06 20:11:03 +01:00
bjorn3
7ff01a4d59
Use mir::SourceInfo again in FunctionCx.source_info_set
...
Fixes #800
2019-12-24 12:44:07 +01:00
bjorn3
399cada762
Directly depend on cranelift_{codegen,frontend}
...
Fixes #838
2019-12-24 12:43:20 +01:00
bjorn3
3e50a831e5
Optimize line_program_add_file
2019-12-16 13:23:41 +01:00
bjorn3
8edbbc45f7
Implement local reading for locals on stack
2019-12-16 12:04:34 +01:00
bjorn3
d8e9148c2e
Rustfmt debuginfo
2019-12-16 12:04:34 +01:00
bjorn3
c5c6ce87d2
Small change
2019-12-16 12:04:34 +01:00
bjorn3
beda7870fb
Split debuginfo/line_info.rs from debuginfo/mod.rs
2019-12-16 12:04:34 +01:00