mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Consistent use of 'override' for virtual methods in derived classes.
o Not all derived methods were marked 'override', but it is a great feature of C++11 that we should make use of. o While at it: touched header files got a -*- c++ -*- for emacs to provide support for that language. o use YS_OVERRIDE for all override keywords (though we should probably use the plain keyword going forward now that C++11 is established)
This commit is contained in:
		
							parent
							
								
									323f6f6f60
								
							
						
					
					
						commit
						3aa4484a3c
					
				
					 170 changed files with 414 additions and 416 deletions
				
			
		| 
						 | 
				
			
			@ -27,7 +27,7 @@ PRIVATE_NAMESPACE_BEGIN
 | 
			
		|||
 | 
			
		||||
struct ProcPass : public Pass {
 | 
			
		||||
	ProcPass() : Pass("proc", "translate processes to netlists") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +57,7 @@ struct ProcPass : public Pass {
 | 
			
		|||
		log("        executed in -ifx mode.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		std::string global_arst;
 | 
			
		||||
		bool ifxmode = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -203,7 +203,7 @@ restart_proc_arst:
 | 
			
		|||
 | 
			
		||||
struct ProcArstPass : public Pass {
 | 
			
		||||
	ProcArstPass() : Pass("proc_arst", "detect asynchronous resets") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -221,7 +221,7 @@ struct ProcArstPass : public Pass {
 | 
			
		|||
		log("        in the 'init' attribute on the net.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		std::string global_arst;
 | 
			
		||||
		bool global_arst_neg = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -143,7 +143,7 @@ void proc_clean(RTLIL::Module *mod, RTLIL::Process *proc, int &total_count)
 | 
			
		|||
 | 
			
		||||
struct ProcCleanPass : public Pass {
 | 
			
		||||
	ProcCleanPass() : Pass("proc_clean", "remove empty parts of processes") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -153,7 +153,7 @@ struct ProcCleanPass : public Pass {
 | 
			
		|||
		log("if it contains only empty structures.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		int total_count = 0;
 | 
			
		||||
		log_header(design, "Executing PROC_CLEAN pass (remove empty switches from decision trees).\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -370,7 +370,7 @@ void proc_dff(RTLIL::Module *mod, RTLIL::Process *proc, ConstEval &ce)
 | 
			
		|||
 | 
			
		||||
struct ProcDffPass : public Pass {
 | 
			
		||||
	ProcDffPass() : Pass("proc_dff", "extract flip-flops from processes") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -380,7 +380,7 @@ struct ProcDffPass : public Pass {
 | 
			
		|||
		log("d-type flip-flop cells.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		log_header(design, "Executing PROC_DFF pass (convert process syncs to FFs).\n");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -422,7 +422,7 @@ void proc_dlatch(proc_dlatch_db_t &db, RTLIL::Process *proc)
 | 
			
		|||
 | 
			
		||||
struct ProcDlatchPass : public Pass {
 | 
			
		||||
	ProcDlatchPass() : Pass("proc_dlatch", "extract latches from processes") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -432,7 +432,7 @@ struct ProcDlatchPass : public Pass {
 | 
			
		|||
		log("d-type latches.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		log_header(design, "Executing PROC_DLATCH pass (convert process syncs to latches).\n");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,7 +102,7 @@ void proc_init(RTLIL::Module *mod, RTLIL::Process *proc)
 | 
			
		|||
 | 
			
		||||
struct ProcInitPass : public Pass {
 | 
			
		||||
	ProcInitPass() : Pass("proc_init", "convert initial block to init attributes") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -113,7 +113,7 @@ struct ProcInitPass : public Pass {
 | 
			
		|||
		log("respective wire.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		log_header(design, "Executing PROC_INIT pass (extract init attributes).\n");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -382,7 +382,7 @@ void proc_mux(RTLIL::Module *mod, RTLIL::Process *proc, bool ifxmode)
 | 
			
		|||
 | 
			
		||||
struct ProcMuxPass : public Pass {
 | 
			
		||||
	ProcMuxPass() : Pass("proc_mux", "convert decision trees to multiplexers") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -396,7 +396,7 @@ struct ProcMuxPass : public Pass {
 | 
			
		|||
		log("        'case' expressions and 'if' conditions.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		bool ifxmode = false;
 | 
			
		||||
		log_header(design, "Executing PROC_MUX pass (convert decision trees to multiplexers).\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,7 +65,7 @@ void proc_rmdead(RTLIL::SwitchRule *sw, int &counter)
 | 
			
		|||
 | 
			
		||||
struct ProcRmdeadPass : public Pass {
 | 
			
		||||
	ProcRmdeadPass() : Pass("proc_rmdead", "eliminate dead trees in decision trees") { }
 | 
			
		||||
	virtual void help()
 | 
			
		||||
	void help() YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		//   |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
 | 
			
		||||
		log("\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@ struct ProcRmdeadPass : public Pass {
 | 
			
		|||
		log("This pass identifies unreachable branches in decision trees and removes them.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
	}
 | 
			
		||||
	virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
	{
 | 
			
		||||
		log_header(design, "Executing PROC_RMDEAD pass (remove dead branches from decision trees).\n");
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue