[PATCH] Add a GCStrategy for CoreCLR
Sanjoy Das
sanjoy at playingwithpointers.com
Thu May 14 11:07:25 PDT 2015
Minor nit inline that can be fixed post-commit. Otherwise I don't see any issues with this change, but I'll wait for @reames to take a look.
================
Comment at: lib/Transforms/Scalar/PlaceSafepoints.cpp:509
@@ -507,2 +508,3 @@
const std::string StatepointExampleName("statepoint-example");
- return StatepointExampleName == F.getGC();
+ const std::string CoreCLRName("coreclr");
+ return (StatepointExampleName == FunctionGCName) ||
----------------
In a later change, I think we can change both "statepoint-example" and "coreclr" to be `llvm::StringRef`s and not `std::string`s to avoid allocation and deallocation on each call to `shouldRewriteFunction`.
================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1933
@@ -1932,1 +1932,3 @@
+ const char *FunctionGCName = F.getGC();
const std::string StatepointExampleName("statepoint-example");
+ const std::string CoreCLRName("coreclr");
----------------
Same comment w.r.t. `std::string` vs. `llvm::StringRef` here.
http://reviews.llvm.org/D9767
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list