@@ -925,15 +925,14 @@ void X86AsmBackend::finishLayout(MCAssembler const &Asm,
925925 // the align directive. This is purely about human understandability
926926 // of the resulting code. If we later find a reason to expand
927927 // particular instructions over others, we can adjust.
928- MCFragment *FirstChangedFragment = nullptr ;
929928 unsigned RemainingSize = OrigSize;
930929 while (!Relaxable.empty () && RemainingSize != 0 ) {
931930 auto &RF = *Relaxable.pop_back_val ();
932931 // Give the backend a chance to play any tricks it wishes to increase
933932 // the encoding size of the given instruction. Target independent code
934933 // will try further relaxation, but target's may play further tricks.
935934 if (padInstructionEncoding (RF, Asm.getEmitter (), RemainingSize))
936- FirstChangedFragment = &RF ;
935+ Sec. setHasLayout ( false ) ;
937936
938937 // If we have an instruction which hasn't been fully relaxed, we can't
939938 // skip past it and insert bytes before it. Changing its starting
@@ -946,13 +945,6 @@ void X86AsmBackend::finishLayout(MCAssembler const &Asm,
946945 }
947946 Relaxable.clear ();
948947
949- if (FirstChangedFragment) {
950- // Make sure the offsets for any fragments in the effected range get
951- // updated. Note that this (conservatively) invalidates the offsets of
952- // those following, but this is not required.
953- Layout.invalidateFragmentsFrom (FirstChangedFragment);
954- }
955-
956948 // BoundaryAlign explicitly tracks it's size (unlike align)
957949 if (F.getKind () == MCFragment::FT_BoundaryAlign)
958950 cast<MCBoundaryAlignFragment>(F).setSize (RemainingSize);
0 commit comments