[all-commits] [llvm/llvm-project] 51b13a: [gvn] CSE gc.relocates based on meaning, not spelling

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Mar 5 10:20:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51b13a7ea0b9123a405a51241763ed388d68a46f
      https://github.com/llvm/llvm-project/commit/51b13a7ea0b9123a405a51241763ed388d68a46f
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/test/Transforms/GVN/gc_relocate.ll

  Log Message:
  -----------
  [gvn] CSE gc.relocates based on meaning, not spelling

The last two operands to a gc.relocate represent indices into the associated gc.statepoint's gc bundle list. (Effectively, gc.relocates are projections from the gc.statepoints multiple return values.)

We can use this to recognize when two gc.relocates are equivalent (and can be CSEd), even when the indices are non-equal. This is particular useful when considering a chain of multiple statepoints as it lets us eliminate all duplicate gc.relocates in a single pass.

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

(Note: Part of the reviewed change was split and landed as f352463a)




More information about the All-commits mailing list