aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorCampbell Suter <znix@znix.xyz>2023-01-25 17:12:19 +0300
committerDenis Antrushin <dantrushin@gmail.com>2023-01-25 20:47:16 +0300
commit7092dae032290dd4cdc99d7573e02687f2ab0c76 (patch)
treef33c643308f43fff04593e91702f5809fa3edf40 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent7564a9ad30d3c03d0b4d0693908c00d1b85c98d4 (diff)
downloadllvm-7092dae032290dd4cdc99d7573e02687f2ab0c76.zip
llvm-7092dae032290dd4cdc99d7573e02687f2ab0c76.tar.gz
llvm-7092dae032290dd4cdc99d7573e02687f2ab0c76.tar.bz2
[RS4GC] Remove the hardcoded GC strategy names (v2)
Previously, RewriteStatepointsForGC had a hardcoded list of GC strategies for which it would run, and using it with a custom strategy required patching LLVM. The logic for selecting the variables that are considered managed was also hardcoded to use pointers in address space 1, rather than delegating to GCStrategy::isGCManagedPointer. This patch fixes both of these flaws: this pass now applies to all functions whose GCStrategy returns true for useStatepoints, and checking if a pointer is managed or not is also now done by the strategy. One potentially questionable design decision in this change: the pass will be enabled for all GC strategies that use statepoints. It seems unlikely this would be a problem - consumers that don't use this pass probably aren't adding it to the pass manager anyway - but if you had two different GC strategies and only one wants this pass enabled then that'd need a new flag in GCStrategy, which I can add if anyone thinks it's necessary. This is an updated version of D140458, rebased to account for LLVM's changes since D140504 (required by this patch) landed. Reviewed By: dantrushin Differential Revision: https://reviews.llvm.org/D141110
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions