[all-commits] [llvm/llvm-project] 048092: [Statepoint Lowering] Handle the case with several...

serguei-katkov via All-commits all-commits at lists.llvm.org
Thu Mar 11 03:53:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0480927712e41a5ba3b1a98d4bd150f1a4d6ab75
      https://github.com/llvm/llvm-project/commit/0480927712e41a5ba3b1a98d4bd150f1a4d6ab75
  Author: Serguei Katkov <serguei.katkov at azul.com>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M llvm/include/llvm/IR/Statepoint.h
    M llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
    A llvm/test/CodeGen/X86/statepoint-two-results.ll

  Log Message:
  -----------
  [Statepoint Lowering] Handle the case with several gc.result

Recently gc.result has been marked with readnone instead of readonly and
this opens a door for different optimization to duplicate gc.result.
Statepoint lowering is not ready to see several gc.results.
The problem appears when there are gc.results with one located in the same
basic block and another located in other basic block.
In this case we need both export VR and fill local setValue.

Note that this case is not sufficient optimization done before CodeGen.
It is evident that local gc.result dominates all other gc.results and it is handled
by GVN and EarlyCSE.

But anyway, even if IR is not optimal Backend should not crash on a valid IR.

Reviewers: reames, dantrushin
Reviewed By: dantrushin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D98393




More information about the All-commits mailing list