[PATCH] D125000: [RS4GC] Cache BaseDefiningValueResult instead of BDV (NFC)

Dmitry Makogon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 03:49:10 PDT 2022


dmakogon created this revision.
dmakogon added reviewers: mkazantsev, reames, fhahn, sanjoy.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dmakogon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This refactors RS4GC to make use of the `BaseDefiningValueResult` struct returned by `findBaseDefiningValue`.
This struct stores a BDV and a `IsKnownBase` flag. However, we ignored the flag and only used the BDV.
To check whether a BDV is a known base we used a separate function `isKnownBaseResult`, which returned effectively the same value as the flag in the BaseDefiningValueResult struct.
With the patch we cache not only the BDV, but this BaseDefiningValueResult struct and instead of calling `isKnownBaseResult` we just check the flag.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125000

Files:
  llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125000.427258.patch
Type: text/x-patch
Size: 20559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220505/e203a24e/attachment.bin>


More information about the llvm-commits mailing list