summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-10-16 02:41:23 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-10-16 02:41:23 +0000
commit58fae7cf6bb3d76e8ee993abf1ddc485574b9ef7 (patch)
treedbdeca1b7edf4285c06abef3098f320324df1873 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
parent810a59d037dc4247ca52ab4e29f70ce611d574fc (diff)
downloadbcm5719-llvm-58fae7cf6bb3d76e8ee993abf1ddc485574b9ef7.tar.gz
bcm5719-llvm-58fae7cf6bb3d76e8ee993abf1ddc485574b9ef7.zip
[RS4GC] Dont' propagate call attrs related to patchable statepoints
The `"statepoint-id"` and `"statepoint-num-patch-bytes"` attributes are used solely to determine properties of the `gc.statepoint` being created. Once the `gc.statepoint` is in place, these should be removed. llvm-svn: 250491
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index de6e8b59d4f..ca92b14fd90 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1290,6 +1290,13 @@ static AttributeSet legalizeCallAttributes(AttributeSet AS) {
Attr.hasAttribute(Attribute::ReadOnly))
continue;
+ // These attributes control the generation of the gc.statepoint call /
+ // invoke itself; and once the gc.statepoint is in place, they're of no
+ // use.
+ if (Attr.hasAttribute("statepoint-num-patch-bytes") ||
+ Attr.hasAttribute("statepoint-id"))
+ continue;
+
Ret = Ret.addAttributes(
AS.getContext(), Index,
AttributeSet::get(AS.getContext(), Index, AttrBuilder(Attr)));
OpenPOWER on IntegriCloud