From a5a67ee666381b2716862dec6df2e85419c352bc Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 21 Aug 2021 19:01:37 -0700 Subject: maintain pre-annotation inlining properties this gets yaxpeax-x86 in no-inline configurations back to building as it did before, but is quite a blunt hammer. it seems that extra calls to `sink.record` trips the inlining thresholds for `read_with_annotation`, and then its caller, and its caller, even when one of them is just a delegation to its inner call. this is particularly unfortunate because yaxpeax-x86 is now making a decision about the inlining of a rather large function at the public edge of its API, but these attributes match the inlining decisions that LLVM was making before adding `DescriptionSink`. hopefully not too bad. not sure how to handle this in the future. --- src/long_mode/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index d68bb95..8ec2b7f 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -4163,6 +4163,7 @@ impl Decoder for InstDecoder { Ok(instr) } + #[inline(always)] fn decode_into::Address, ::Word>>(&self, instr: &mut Instruction, words: &mut T) -> Result<(), ::DecodeError> { self.decode_with_annotation(instr, words, &mut NullSink) } @@ -4171,6 +4172,7 @@ impl Decoder for InstDecoder { impl AnnotatingDecoder for InstDecoder { type FieldDescription = FieldDescription; + #[inline(always)] fn decode_with_annotation< T: Reader<::Address, ::Word>, S: DescriptionSink @@ -7446,6 +7448,7 @@ impl fmt::Display for FieldDescription { } } +#[inline(always)] fn read_with_annotations< T: Reader<::Address, ::Word>, S: DescriptionSink, -- cgit v1.1