diff options
author | Philip Reames <listmail@philipreames.com> | 2015-12-23 01:42:15 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2015-12-23 01:42:15 +0000 |
commit | ee8f0553273549b3ce6b6656a50beab3446300df (patch) | |
tree | d2f23bdbb207b6e6e81e61d8d4b406dcf7c7dbe9 /llvm/lib/Transforms/Scalar | |
parent | 7300afa36a60766834d9431a16896768d1d18305 (diff) | |
download | bcm5719-llvm-ee8f0553273549b3ce6b6656a50beab3446300df.tar.gz bcm5719-llvm-ee8f0553273549b3ce6b6656a50beab3446300df.zip |
[GC] Make GCStrategy::isGCManagedPointer a type predicate not a value predicate [NFC]
Reasons:
1) The existing form was a form of false generality. None of the implemented GCStrategies use anything other than a type. Its becoming more and more clear we're going to need some type of strong GC pointer in the type system and we shouldn't pretend otherwise at this point.
2) The API was awkward when applied to vectors-of-pointers. The old one could have been made to work, but calling isGCManagedPointer(Ty->getScalarType()) is much cleaner than the Value alternatives.
3) The rewriting implementation effectively assumes the type based predicate as well. We should be consistent.
llvm-svn: 256312
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 062fba5cdad..0a61d4b5da0 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -215,7 +215,7 @@ static void findLiveSetAtInst(Instruction *inst, GCPtrLivenessData &Data, StatepointLiveSetTy &out); // TODO: Once we can get to the GCStrategy, this becomes -// Optional<bool> isGCManagedPointer(const Value *V) const override { +// Optional<bool> isGCManagedPointer(const Type *Ty) const override { static bool isGCPointerType(Type *T) { if (auto *PT = dyn_cast<PointerType>(T)) |