[GC] Make GCStrategy::isGCManagedPointer a type predicate not a value predicate ...
authorPhilip Reames <listmail@philipreames.com>
Wed, 23 Dec 2015 01:42:15 +0000 (01:42 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 23 Dec 2015 01:42:15 +0000 (01:42 +0000)
commit5ac888a993be99cc889709f5513148451d2f32eb
tree7a4de51bd0310a927b7e787e613aad883d7c3296
parent20aab1c40d741b3c36e9ed8c0f801c61d5a2857a
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256312 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GCStrategy.h
lib/CodeGen/CoreCLRGC.cpp
lib/CodeGen/SelectionDAG/StatepointLowering.cpp
lib/CodeGen/StatepointExampleGC.cpp
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp