[all-commits] [llvm/llvm-project] 81c963: [MC] Recalculate fragment offsets after relaxation

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


  Branch: refs/heads/arcpatch-D76114
  Home:   https://github.com/llvm/llvm-project
  Commit: 81c9639ebafc42f90f6e0b83ec01e70d86558e06
      https://github.com/llvm/llvm-project/commit/81c9639ebafc42f90f6e0b83ec01e70d86558e06
  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.

Reviewers: jyknight, MaskRay, annita.zhang, reames, skan

Reviewed By: reames, skan

Subscribers: llozano, manojgupta, nickdesaulniers, hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list