Remove gc.root's performCustomLowering
authorPhilip Reames <listmail@philipreames.com>
Wed, 28 Jan 2015 19:28:03 +0000 (19:28 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 28 Jan 2015 19:28:03 +0000 (19:28 +0000)
commit23cf2e2f9712e1f9e129e195bc859ac58f29c423
tree2b2fcff127eb64e711144fa172272742a60725ce
parent2265acf39e120290f11c73bf7e3fb4a0cf5419bc
Remove gc.root's performCustomLowering

This is a refactoring to restructure the single user of performCustomLowering as a specific lowering pass and remove the custom lowering hook entirely.

Before this change, the LowerIntrinsics pass (note to self: rename!) was essentially acting as a pass manager, but without being structured in terms of passes. Instead, it proxied calls to a set of GCStrategies internally. This adds a lot of conceptual complexity (i.e. GCStrategies are stateful!) for very little benefit. Since there's been interest in keeping the ShadowStackGC working, I extracting it's custom lowering pass into a dedicated pass and just added that to the pass order. It will only run for functions which opt-in to that gc.

I wasn't able to find an easy way to preserve the runtime registration of custom lowering functionality. Given that no user of this exists that I'm aware of, I made the choice to just remove that. If someone really cares, we can look at restoring it via dynamic pass registration in the future.

Note that despite the large diff, none of the lowering code actual changes. I added the framing needed to make it a pass and rename the class, but that's it.

Differential Revision: http://reviews.llvm.org/D7218

llvm-svn: 227351
llvm/docs/GarbageCollection.rst
llvm/include/llvm/CodeGen/GCStrategy.h
llvm/include/llvm/CodeGen/Passes.h
llvm/include/llvm/InitializePasses.h
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/GCRootLowering.cpp
llvm/lib/CodeGen/Passes.cpp
llvm/lib/CodeGen/ShadowStackGC.cpp
llvm/lib/CodeGen/ShadowStackGCLowering.cpp [new file with mode: 0644]