mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	peepopt: Remove broken -generate option
				
					
				
			This commit is contained in:
		
							parent
							
								
									aa9b86aeec
								
							
						
					
					
						commit
						5c0c8251c3
					
				
					 1 changed files with 0 additions and 18 deletions
				
			
		| 
						 | 
					@ -26,7 +26,6 @@ PRIVATE_NAMESPACE_BEGIN
 | 
				
			||||||
bool did_something;
 | 
					bool did_something;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "passes/pmgen/peepopt_pm.h"
 | 
					#include "passes/pmgen/peepopt_pm.h"
 | 
				
			||||||
#include "generate.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct PeepoptPass : public Pass {
 | 
					struct PeepoptPass : public Pass {
 | 
				
			||||||
	PeepoptPass() : Pass("peepopt", "collection of peephole optimizers") { }
 | 
						PeepoptPass() : Pass("peepopt", "collection of peephole optimizers") { }
 | 
				
			||||||
| 
						 | 
					@ -41,32 +40,15 @@ struct PeepoptPass : public Pass {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) override
 | 
						void execute(std::vector<std::string> args, RTLIL::Design *design) override
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		std::string genmode;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		log_header(design, "Executing PEEPOPT pass (run peephole optimizers).\n");
 | 
							log_header(design, "Executing PEEPOPT pass (run peephole optimizers).\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		size_t argidx;
 | 
							size_t argidx;
 | 
				
			||||||
		for (argidx = 1; argidx < args.size(); argidx++)
 | 
							for (argidx = 1; argidx < args.size(); argidx++)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (args[argidx] == "-generate" && argidx+1 < args.size()) {
 | 
					 | 
				
			||||||
				genmode = args[++argidx];
 | 
					 | 
				
			||||||
				continue;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		extra_args(args, argidx, design);
 | 
							extra_args(args, argidx, design);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!genmode.empty())
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			if (genmode == "shiftmul")
 | 
					 | 
				
			||||||
				GENERATE_PATTERN(peepopt_pm, shiftmul_right);
 | 
					 | 
				
			||||||
			else if (genmode == "muldiv")
 | 
					 | 
				
			||||||
				GENERATE_PATTERN(peepopt_pm, muldiv);
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
				log_abort();
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		for (auto module : design->selected_modules())
 | 
							for (auto module : design->selected_modules())
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			did_something = true;
 | 
								did_something = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue