OpenASIP 2.2
Loading...
Searching...
No Matches
LLVMTCECmdLineOptions.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2020 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file LLVMTCECmdLineOptions.hh
26 *
27 * Declaration of LLVMTCECmdLineOptions class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2008
30 * @author Pekka Jääskeläinen 2010-2020
31 * @note rating: red
32 */
33
34#ifndef LLVM_TCE_CMD_LINE_OPTIONS_HH
35#define LLVM_TCE_CMD_LINE_OPTIONS_HH
36
37#include <set>
38#include <string>
40#include "Application.hh"
41#include "InterPassDatum.hh"
42#include "tce_config.h" // VERSION
43
44namespace TTAMachine {
45class AddressSpace;
46}
47/**
48 * Command line options class for the llvm-tce compiler CLI.
49 *
50 */
52
53public:
56
57 virtual FunctionNameList* primaryFunctions() const;
58
60 std::string standardEmulationLib() const;
61
62 bool isOptLevelDefined() const;
63 int optLevel() const;
64
65 bool isVerboseSwitchDefined() const;
66
67 bool debugFlag() const;
68
69 bool conservativePreRAScheduler() const;
70
71 bool saveBackendPlugin() const;
72
73 bool useBUScheduler() const;
74 bool useTDScheduler() const;
75 bool useBubbleFish2Scheduler() const;
76
77 bool useOldBackendSources() const;
78
79 bool disableDelaySlotFiller() const;
80
81 bool isWorkItemAAFileDefined() const;
82 std::string workItemAAFile() const;
83
84 bool analyzeInstructionPatterns() const;
85
86 std::string backendCacheDir() const;
87
88 TCEString tempDir() const;
89
90 virtual std::string getLLVMargv() const;
91
92 virtual bool dumpDDGsDot() const;
93 virtual bool dumpDDGsXML() const;
94 virtual bool disableLLVMAA() const;
95
96 bool useVectorBackend() const;
97
99 uint64_t initialStackPointerValue() const;
100
102 uint64_t dataStartAddress(TTAMachine::AddressSpace& aSpace) const;
103
104 bool printInlineAsmWarnings() const;
105 bool generatePluginOnly() const;
106 bool disableAddressSpaceAA() const;
107 bool disableHWLoops() const;
108 bool assumeADFStackAlignment() const;
109
110 virtual void printVersion() const {
111 std::cout
112 << "llvm-tce - TCE LLVM code generator "
114 << std::endl;
115 }
116
117private:
118 // Command line switches.
119 static const std::string SWL_EMULATION_LIB;
120 static const std::string SWS_EMULATION_LIB;
121 static const std::string SWL_DEBUG_FLAG;
122 static const std::string SWL_OPT_LEVEL;
123 static const std::string SWS_OPT_LEVEL;
124 static const std::string SWL_PRIMARY_FUNCTIONS;
125 static const std::string SWS_PRIMARY_FUNCTIONS;
126 static const std::string SWL_EXPERIMENTAL_REGALLOC;
127 /// Switch for verbose output listing scheduler modules
128 static const std::string VERBOSE_SWITCH;
129 static const std::string DISABLE_LLVMAA;
130 static const std::string CONSERVATIVE_PRE_RA_SCHEDULER;
131 static const std::string LLVM_USER_ARGS;
132 static const std::string DISABLE_DSF;
133 static const std::string DISABLE_ADDRESS_SPACE_AA;
134 static const std::string SWL_DUMP_DDGS_DOT;
135 static const std::string SWL_DUMP_DDGS_XML;
136 static const std::string SWL_SAVE_BACKEND_PLUGIN;
137 static const std::string SWL_BU_SCHEDULER;
138 static const std::string SWL_BUBBLEFISH2_SCHEDULER;
139 static const std::string SWL_TD_SCHEDULER;
140 static const std::string SWL_USE_OLD_BACKEND_SOURCES;
141 static const std::string SWL_TEMP_DIR;
142 static const std::string SWL_ENABLE_VECTOR_BACKEND;
143 static const std::string SWL_WORK_ITEM_AA_FILE;
144 static const std::string SWL_ANALYZE_INSTRUCTION_PATTERNS;
145 static const std::string SWL_BACKEND_CACHE_DIR;
146 static const std::string SWL_INIT_SP;
147 static const std::string SWL_DATA_START;
148 static const std::string USAGE;
149 static const std::string SWL_PRINT_INLINE_ASM_WARNINGS;
150 static const std::string SWL_GEN_PLUGIN_ONLY;
151 static const std::string SWL_DISABLE_HWLOOPS;
152 static const std::string SWL_ASSUME_ADF_STACKALIGNMENT;
153};
154
155#endif
static std::string TCEVersionString()
static const std::string DISABLE_ADDRESS_SPACE_AA
static const std::string SWL_INIT_SP
static const std::string SWL_EXPERIMENTAL_REGALLOC
static const std::string SWL_PRIMARY_FUNCTIONS
virtual bool disableLLVMAA() const
static const std::string DISABLE_DSF
static const std::string SWL_ENABLE_VECTOR_BACKEND
std::string standardEmulationLib() const
static const std::string SWL_GEN_PLUGIN_ONLY
static const std::string SWL_USE_OLD_BACKEND_SOURCES
uint64_t initialStackPointerValue() const
static const std::string SWL_ASSUME_ADF_STACKALIGNMENT
static const std::string CONSERVATIVE_PRE_RA_SCHEDULER
virtual bool dumpDDGsDot() const
static const std::string SWL_DEBUG_FLAG
static const std::string SWL_BACKEND_CACHE_DIR
static const std::string DISABLE_LLVMAA
static const std::string SWL_EMULATION_LIB
virtual bool dumpDDGsXML() const
static const std::string SWS_PRIMARY_FUNCTIONS
virtual void printVersion() const
static const std::string SWS_EMULATION_LIB
static const std::string SWL_DUMP_DDGS_XML
static const std::string SWL_SAVE_BACKEND_PLUGIN
std::string workItemAAFile() const
static const std::string SWL_PRINT_INLINE_ASM_WARNINGS
static const std::string VERBOSE_SWITCH
Switch for verbose output listing scheduler modules.
static const std::string SWL_BU_SCHEDULER
static const std::string SWL_DATA_START
static const std::string SWL_TEMP_DIR
static const std::string SWL_WORK_ITEM_AA_FILE
static const std::string SWL_DISABLE_HWLOOPS
static const std::string SWL_BUBBLEFISH2_SCHEDULER
static const std::string SWL_OPT_LEVEL
virtual std::string getLLVMargv() const
static const std::string LLVM_USER_ARGS
virtual FunctionNameList * primaryFunctions() const
std::string backendCacheDir() const
uint64_t dataStartAddress(TTAMachine::AddressSpace &aSpace) const
static const std::string SWS_OPT_LEVEL
static const std::string SWL_TD_SCHEDULER
static const std::string SWL_ANALYZE_INSTRUCTION_PATTERNS
static const std::string SWL_DUMP_DDGS_DOT
bool isDataStartAddressSet(TTAMachine::AddressSpace &aSpace) const
static const std::string USAGE