- /// which the LLVM IR can be modified.
- virtual bool initializeCustomLowering(Module &F);
- virtual bool performCustomLowering(Function &F);
- virtual bool findCustomSafePoints(GCFunctionInfo& FI, MachineFunction& MF);
+ /// which the LLVM IR can be modified. These methods apply mostly to
+ /// gc.root based implementations, but can be overriden to provide custom
+ /// barrier lowerings with gc.statepoint as well.
+ ///@{
+ virtual bool initializeCustomLowering(Module &F) {
+ // No changes made
+ return false;
+ }
+ virtual bool performCustomLowering(Function &F) {
+ llvm_unreachable("GCStrategy subclass specified a configuration which"
+ "requires a custom lowering without providing one");
+ }
+ ///@}
+ /// Called if customSafepoints returns true, used only by gc.root
+ /// implementations.
+ virtual bool findCustomSafePoints(GCFunctionInfo& FI, MachineFunction& MF) {
+ llvm_unreachable("GCStrategy subclass specified a configuration which"
+ "requests custom safepoint identification without"
+ "providing an implementation for such");
+ }