@Override
	public void configure(DecompInterface decompiler) {
		decompiler.toggleCCode(false);
		decompiler.toggleSyntaxTree(false); // only recovering the calling convention, no syntax tree needed
		decompiler.setSimplificationStyle("paramid");

		// Set decompiler up with default options for now and any grabbed from the program.
		// TODO: this should use the options from the tool somehow.
		//       unfortunately what is necessary is not here.
		DecompileOptions opts = new DecompileOptions();

		// turn off elimination of dead code, switch could be there.
		opts.setEliminateUnreachable(false);
		opts.grabFromProgram(program);
		decompiler.setOptions(opts);
	}
A configurer for performing calling convention analysis.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/analysis/ConventionAnalysisDecompileConfigurer.java