[all-commits] [llvm/llvm-project] b06e73: [MC] Speed up AttemptToFoldSymbolOffsetDifference ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri May 31 11:09:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b06e736982a3568fe2bcea8688550f9e393b7450
      https://github.com/llvm/llvm-project/commit/b06e736982a3568fe2bcea8688550f9e393b7450
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M llvm/lib/MC/MCExpr.cpp

  Log Message:
  -----------
  [MC] Speed up AttemptToFoldSymbolOffsetDifference in the absence of MCAsmLayout

The `FA < FB` check added by https://reviews.llvm.org/D153096 is slow.
Compute an informal layout order to speed up computation when
`AttemptToFoldSymbolOffsetDifference` is repeatedly called for the same
section.

Commit 9500a5d02e23f9b43294e5f662ac099f8989c0e4 ("[MC] Make UseAssemblerInfoForParsing mostly true")
exposed this performance pitfall, which was mitigated by
`setUseAssemblerInfoForParsing(false)` workarounds (e.g. commit
245491a9f384e4c53421196533c2a2b693efaf8d). The workaround can be removed
now.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list