[all-commits] [llvm/llvm-project] 84497c: [SimplifyCFG] Remove limitation on sinking of load...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 26 01:15:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84497c6f4f6c79b0d8c38da666724eed7e9e8db5
      https://github.com/llvm/llvm-project/commit/84497c6f4f6c79b0d8c38da666724eed7e9e8db5
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-08-26 (Mon, 26 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/X86/sink-common-code.ll

  Log Message:
  -----------
  [SimplifyCFG] Remove limitation on sinking of load/store of alloca (#104788)

This is a followup to https://github.com/llvm/llvm-project/pull/104579
to remove the limitation on sinking loads/stores of allocas entirely,
even if this would introduce a phi node.

Nowadays, SROA supports speculating load/store over select/phi.
Additionally, SimplifyCFG with sinking only runs at the end of the
function simplification pipeline, after SROA. I checked that the two
tests modified here still successfully SROA after the SimplifyCFG
transform.

We should, however, keep the limitation on lifetime intrinsics. SROA
does not have speculation support for these, and I've also found that
the way these are handled in the backend is very problematic
(https://github.com/llvm/llvm-project/issues/104776), so I think we
should leave them alone.



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