summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BuiltinGCs.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2018-11-11 21:13:09 +0000
committerPhilip Reames <listmail@philipreames.com>2018-11-11 21:13:09 +0000
commit18945d6c994cb9976a3907508c2da4fad8636a4b (patch)
tree505fb10defff64e153d6127edef4296ce1805c33 /llvm/lib/CodeGen/BuiltinGCs.cpp
parentd345e9cff5a4bfe259e2318765f5d9fe6b959a00 (diff)
downloadbcm5719-llvm-18945d6c994cb9976a3907508c2da4fad8636a4b.tar.gz
bcm5719-llvm-18945d6c994cb9976a3907508c2da4fad8636a4b.zip
[GCRoot] Remove some unneccessary complexity
The GCStrategy provides three configuration options were are largely redundant. 1) Support for conditionally lowering gcread and gcwrite to loads and stores. This is redundant since any GC which wished to use these abstractions would lower them out of existance before the built in lowering anyways. As such, there's no need to have the lowering being conditional. 2) Conditional initialization for allocas marked via gcroot. Semantically, roots have to be initialized before first potential use. Arguably, the frontend really should have responsibility for that, but the old API allowed the frontend to ignore this detail. Only one builtin GC used the non-initializing mode. Since no one to my knowledge actually uses the ErlangGC strategy, I decide the slight pessimization was worth the simplicity. If that turns out to be problematic, we can always improve the insertion algorithm to detect more existing initializing stores. llvm-svn: 346621
Diffstat (limited to 'llvm/lib/CodeGen/BuiltinGCs.cpp')
-rw-r--r--llvm/lib/CodeGen/BuiltinGCs.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BuiltinGCs.cpp b/llvm/lib/CodeGen/BuiltinGCs.cpp
index 8b33b50943a..1b1b683904b 100644
--- a/llvm/lib/CodeGen/BuiltinGCs.cpp
+++ b/llvm/lib/CodeGen/BuiltinGCs.cpp
@@ -28,7 +28,6 @@ namespace {
class ErlangGC : public GCStrategy {
public:
ErlangGC() {
- InitRoots = false;
NeededSafePoints = 1 << GC::PostCall;
UsesMetadata = true;
CustomRoots = false;
@@ -57,7 +56,6 @@ public:
class ShadowStackGC : public GCStrategy {
public:
ShadowStackGC() {
- InitRoots = true;
CustomRoots = true;
}
};
@@ -74,7 +72,6 @@ public:
UseStatepoints = true;
// These options are all gc.root specific, we specify them so that the
// gc.root lowering code doesn't run.
- InitRoots = false;
NeededSafePoints = 0;
UsesMetadata = false;
CustomRoots = false;
@@ -108,7 +105,6 @@ public:
UseStatepoints = true;
// These options are all gc.root specific, we specify them so that the
// gc.root lowering code doesn't run.
- InitRoots = false;
NeededSafePoints = 0;
UsesMetadata = false;
CustomRoots = false;
OpenPOWER on IntegriCloud