@Override
			public boolean evaluateContext(VarnodeContext context, Instruction instr) {
				FlowType ftype = instr.getFlowType();
				// Check for a call with a restore in the delay slot
				//    Then it is a non-returning call (share the called function return
				if (o7CallReturnAnalysis && ftype.isCall()) {
					Address fallAddr = instr.getFallThrough();
					if (fallAddr == null) {
						return false;
					}
					Instruction delayInstr =
						instr.getProgram().getListing().getInstructionAfter(instr.getMaxAddress());
					if (delayInstr == null) {
						return false;
					}
					PcodeOp[] pcode = delayInstr.getPcode();
					for (PcodeOp pcodeOp : pcode) {
						Varnode output = pcodeOp.getOutput();
						if (output == null || !output.equals(context.getRegisterVarnode(linkReg))) {
							continue;
						}
						Varnode input = pcodeOp.getInput(0);
						if (input.isConstant()) {
							continue; // this is just assigning the return value after the call
						}
						instr.setFallThrough(null);
						Instruction fallInstr =
							instr.getProgram().getListing().getInstructionAt(fallAddr);
						if (fallInstr == null) {
							return false;
						}
						if (fallInstr.getReferenceIteratorTo().hasNext()) {
							return false;
						}
						ClearFlowAndRepairCmd cmd =
							new ClearFlowAndRepairCmd(fallAddr, false, false, true);
						cmd.applyTo(instr.getProgram(), monitor);
						
						break;
					}
				}
				return false;
			}
Analyze Sparc binaries for certain patterns of instructions.
Ghidra/Processors/Sparc/src/main/java/ghidra/app/plugin/core/analysis/SparcAnalyzer.java