[PATCH] D64609: [ORC] Add deprecation warnings to ORCv1 layers and utilities.

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 10:39:45 PDT 2019


sgraenitz added a comment.

A lot of complexity and maintenance overhead sticks around in the code due to ORCv1. It complicates and slows down ORCv2 development. I agree that it's time to let go.

> This is the fist time I’ve used the deprecation attribute, so I’ve just taken a stab at maintaining sanity here. To keep the tree building cleanly, since we still have tests and internal utilities using these classes, I have added the attribute to the constructors of classes being removed, and added new, non-warning constructors alongside, distinguished by a dummy argument at the start of the list. Adding ‘AcknowledgeORCv1Deprecation’ to the start of any call to a deprecated constructor thus removes the warning.

Interesting approach! The reason for it is also my question: Can we call something deprecated that we still use ourselves? The answer may vary for different parts of ORCv1.

`OrcMCJITReplacement` appears to be the pivotal point. It uses `LegacyIRCompileLayer`, `LazyEmittingLayer` and `LegacyRTDyldLinkingLayer`, but it's not marked deprecated itself. If they were removed, wouldn't `OrcMCJITReplacement` follow immediately?
What would that mean for the lit tests in `llvm/test/ExecutionEngine/OrcMCJIT`? We would probably discard a lot of them. Could some be moved to either `orc-lazy` or `mcjit`?
Should we deprecate lli's `orc-mcjit` mode?

And then I certainly won't miss:

- layers `LegacyObjectTransformLayer`, `RemoteObjectClient/ServerLayer`, `LegacyCompileOnDemandLayer`, `LegacyIRTransformLayer`
- utils like `LegacyCtorDtorRunner` or `LegacyLocalCXXRuntimeOverrides`

> I hope to have all this in-tree before we branch for LLVM 9.0.

ORCv1 should be deprecated sooner rather than later. Though, a decision for the scope proposed here should come with a plan for `OrcMCJITReplacement`.



================
Comment at: include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:277
+      "use "
+      "the ORCv2 LegacyCompileOnDemandLayer instead");
+
----------------
These look like clang-format artifacts.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64609/new/

https://reviews.llvm.org/D64609





More information about the llvm-commits mailing list