[all-commits] [llvm/llvm-project] ad2905: [BOLT] Skip optimization of functions with alt ins...

Maksim Panchenko via All-commits all-commits at lists.llvm.org
Tue Jun 18 12:33:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad2905e52c2016a7de02ace59e33c3ca6ab53cd9
      https://github.com/llvm/llvm-project/commit/ad2905e52c2016a7de02ace59e33c3ca6ab53cd9
  Author: Maksim Panchenko <maks at fb.com>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M bolt/lib/Rewrite/LinuxKernelRewriter.cpp
    M bolt/test/X86/linux-alt-instruction.s

  Log Message:
  -----------
  [BOLT] Skip optimization of functions with alt instructions (#95172)

Alternative instructions in the Linux kernel may modify control flow in
a function. As such, it is unsafe to optimize functions with alternative
instructions until we properly support CFG alternatives.

Previously, we marked functions with alt instructions before the
emission, but that could be too late if we remove or replace
instructions with alternatives. We could have marked functions as
non-simple immediately after reading .altinstructions, but it's nice to
be able to view functions after CFG is built. Thus assign the non-simple
status after building CFG.



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