13#ifndef CIRCT_SUPPORT_LOWERINGOPTIONSPARSER_H
14#define CIRCT_SUPPORT_LOWERINGOPTIONSPARSER_H
18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/CommandLine.h"
30 bool parse(llvm::cl::Option &option, StringRef argName, StringRef argValue,
33 value.
parse(argValue, [&](Twine error) { failed = option.error(error); });
39 :
llvm::cl::opt<LoweringOptions, false, LoweringOptionsParser> {
44 "Style options. Valid flags include: "
45 "noAlwaysComb, exprInEventControl, disallowPackedArrays, "
46 "disallowPackedStructAssignments, "
47 "disallowLocalVariables, verifLabels, emittedLineLength=<n>, "
48 "maximumNumberOfTermsPerExpression=<n>, "
49 "explicitBitcast, emitReplicatedOpsToHeader, "
50 "locationInfoStyle={plain,wrapInAtSquareBracket,none}, "
51 "disallowPortDeclSharing, printDebugInfo, "
52 "wireSpillingHeuristic=<spillLargeTermsWithNamehints>, "
53 "wireSpillingNamehintTermLimit=<n>, "
54 "disallowExpressionInliningInPorts, disallowMuxInlining, "
55 "mitigateVivadoArrayIndexConstPropBug, "
56 "emitWireInPorts, emitBindComments, omitVersionComment, "
57 "caseInsensitiveKeywords, emitVerilogLocations, "
58 "fixUpEmptyModules, disallowClockedAssertions, "
59 "disallowDeclAssignments"),
60 llvm::cl::cat(cat), llvm::cl::value_desc(
"option")} {}
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
LoweringOptionsOption(llvm::cl::OptionCategory &cat)
Commandline parser for LoweringOptions.
LoweringOptionsParser(llvm::cl::Option &option)
bool parse(llvm::cl::Option &option, StringRef argName, StringRef argValue, LoweringOptions &value)
Options which control the emission from CIRCT to Verilog.
void parse(llvm::StringRef options, ErrorHandlerT callback)
Read in options from a string, overriding only the set options in the string.