Skip to content

Commit adaeac7

Browse files
aus-inteligcbot
authored andcommitted
Move VC option parser into separate library
1 parent a0f7be0 commit adaeac7

File tree

10 files changed

+23
-10
lines changed

10 files changed

+23
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
add_subdirectory(Support)
1+
add_subdirectory(Options)

IGC/VectorCompiler/include/vc/Support/Options.h renamed to IGC/VectorCompiler/include/vc/Options/Options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum ID {
4545
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
4646
HELPTEXT, METAVAR, VALUES) \
4747
OPT_##ID,
48-
#include "vc/Support/Options.inc"
48+
#include "vc/Options/Options.inc"
4949
LastOption
5050
#undef OPTION
5151
};

IGC/VectorCompiler/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
add_subdirectory(GenXOpts)
22
add_subdirectory(GenXCodeGen)
3+
add_subdirectory(Options)
34
add_subdirectory(Support)
45

56
# Plugin support.

IGC/VectorCompiler/lib/GenXCodeGen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ target_link_libraries(VCCodeGen
8282
LLVMGenXIntrinsics
8383

8484
VCHeaders
85+
VCOptions
8586
VCTransforms
8687
VCTargetInfo
8788
VCSupport

IGC/VectorCompiler/lib/GenXCodeGen/GenXWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3434
#include "vc/GenXCodeGen/GenXWrapper.h"
3535
#include "vc/GenXOpts/GenXOpts.h"
3636
#include "vc/GenXOpts/Utils/KernelInfo.h"
37-
#include "vc/Support/Options.h"
37+
#include "vc/Options/Options.h"
3838
#include "vc/Support/Status.h"
39+
#include "llvm/GenXIntrinsics/GenXIntrOpts.h"
3940
#include "llvm/GenXIntrinsics/GenXIntrinsics.h"
4041
#include "llvm/GenXIntrinsics/GenXSPIRVReaderAdaptor.h"
41-
#include "llvm/GenXIntrinsics/GenXIntrOpts.h"
4242

4343
#include "llvm/ADT/SmallString.h"
4444
#include "llvm/ADT/SmallVector.h"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set(SUPPORT_SOURCES
2+
Options.cpp
3+
)
4+
5+
add_library(VCOptions ${SUPPORT_SOURCES})
6+
vc_get_llvm_targets(LLVM_LIBS
7+
LLVMOption
8+
)
9+
target_link_libraries(VCOptions
10+
VCHeaders
11+
12+
${LLVM_LIBS}
13+
)

IGC/VectorCompiler/lib/Support/Options.cpp renamed to IGC/VectorCompiler/lib/Options/Options.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
2525
======================= end_copyright_notice ==================================*/
2626

27-
#include "vc/Support/Options.h"
27+
#include "vc/Options/Options.h"
2828

2929
#include <llvm/Option/Option.h>
3030

3131
using namespace vc::options;
3232
using namespace llvm::opt;
3333

3434
#define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
35-
#include "vc/Support/Options.inc"
35+
#include "vc/Options/Options.inc"
3636
#undef PREFIX
3737

3838
static const OptTable::Info InfoTable[] = {
3939
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
4040
HELPTEXT, METAVAR, VALUES) \
4141
{PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, \
4242
PARAM, FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS, VALUES},
43-
#include "vc/Support/Options.inc"
43+
#include "vc/Options/Options.inc"
4444
#undef OPTION
4545
};
4646

@@ -51,7 +51,7 @@ class VCOptTable : public OptTable {
5151
OptTable &Opt = *this;
5252
(void)Opt;
5353
#define OPTTABLE_ARG_INIT
54-
#include "vc/Support/Options.inc"
54+
#include "vc/Options/Options.inc"
5555
#undef OPTTABLE_ARG_INIT
5656
}
5757
};

IGC/VectorCompiler/lib/Support/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
set(SUPPORT_SOURCES
22
Status.cpp
3-
Options.cpp
43
ShaderDump.cpp
54
)
65

76
add_library(VCSupport ${SUPPORT_SOURCES})
87
vc_get_llvm_targets(LLVM_LIBS
98
LLVMSupport
10-
LLVMOption
119
)
1210
target_link_libraries(VCSupport
1311
VCHeaders

0 commit comments

Comments
 (0)