[all-commits] [llvm/llvm-project] 6a38e0: [MC] Recalculate fragment offsets after relaxation

Jian Cai via All-commits all-commits at lists.llvm.org
Tue Mar 17 14:49:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a38e0e4f518d06543bb25ad4ea6116a5f1f38cc
      https://github.com/llvm/llvm-project/commit/6a38e0e4f518d06543bb25ad4ea6116a5f1f38cc
  Author: Jian Cai <caij2003 at gmail.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M llvm/lib/MC/MCAssembler.cpp
    A llvm/test/MC/X86/relax-offset.s

  Log Message:
  -----------
  [MC] Recalculate fragment offsets after relaxation

Summary:
The current relaxation implementation is not correctly adjusting the
size and offsets of fragements in one section based on changes in size
of another if the layout order of the two happened to be such that the
former was visited before the later. Therefore, we need to invalidate
the fragments in all sections after each iteration of relaxation, and
possibly further relax some of them in the next ieration. This fixes
PR#45190.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list