annotate polly/test/lit.site.cfg.in @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
1 @LIT_SITE_CFG_IN_HEADER@
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
2
150
anatofuz
parents:
diff changeset
3 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
anatofuz
parents:
diff changeset
4 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
5 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
6 config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
150
anatofuz
parents:
diff changeset
7 config.polly_obj_root = "@POLLY_BINARY_DIR@"
anatofuz
parents:
diff changeset
8 config.polly_lib_dir = "@POLLY_LIB_DIR@"
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
9 config.target_triple = "@LLVM_TARGET_TRIPLE@"
150
anatofuz
parents:
diff changeset
10 config.enable_gpgpu_codegen = "@GPU_CODEGEN@"
anatofuz
parents:
diff changeset
11 config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
anatofuz
parents:
diff changeset
12 config.targets_to_build = "@TARGETS_TO_BUILD@"
anatofuz
parents:
diff changeset
13 config.extra_paths = "@POLLY_TEST_EXTRA_PATHS@".split(";")
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 ## Check the current platform with regex
anatofuz
parents:
diff changeset
16 import re
anatofuz
parents:
diff changeset
17 EAT_ERR_ON_X86 = ' '
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
18 if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') == None) :
150
anatofuz
parents:
diff changeset
19 EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 for arch in config.targets_to_build.split():
anatofuz
parents:
diff changeset
22 config.available_features.add(arch.lower() + '-registered-target')
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
anatofuz
parents:
diff changeset
25 # subdirectories contain auxiliary inputs for various tests in their parent
anatofuz
parents:
diff changeset
26 # directories.
anatofuz
parents:
diff changeset
27 config.excludes = ['Inputs']
anatofuz
parents:
diff changeset
28
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
29 commonOpts = ' -polly-process-unprofitable ' \
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
30 + ' -polly-remarks-minimal ' \
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
31 + ' -polly-use-llvm-names ' \
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
32 + ' -polly-import-jscop-dir=%S ' \
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
33 + ' -polly-codegen-verify '
150
anatofuz
parents:
diff changeset
34 if config.llvm_polly_link_into_tools == '' or \
anatofuz
parents:
diff changeset
35 config.llvm_polly_link_into_tools.lower() == '0' or \
anatofuz
parents:
diff changeset
36 config.llvm_polly_link_into_tools.lower() == 'n' or \
anatofuz
parents:
diff changeset
37 config.llvm_polly_link_into_tools.lower() == 'no' or \
anatofuz
parents:
diff changeset
38 config.llvm_polly_link_into_tools.lower() == 'off' or \
anatofuz
parents:
diff changeset
39 config.llvm_polly_link_into_tools.lower() == 'false' or \
anatofuz
parents:
diff changeset
40 config.llvm_polly_link_into_tools.lower() == 'notfound' or \
anatofuz
parents:
diff changeset
41 config.llvm_polly_link_into_tools.lower() == 'llvm_polly_link_into_tools-notfound':
anatofuz
parents:
diff changeset
42 config.substitutions.append(('%loadPolly', '-load '
anatofuz
parents:
diff changeset
43 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
44 + commonOpts ))
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
45 config.substitutions.append(('%loadNPMPolly', '-load-pass-plugin '
150
anatofuz
parents:
diff changeset
46 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
47 + commonOpts ))
150
anatofuz
parents:
diff changeset
48 else:
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
49 config.substitutions.append(('%loadPolly', commonOpts ))
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
50 config.substitutions.append(('%loadNPMPolly', commonOpts ))
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
51
150
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 if config.enable_gpgpu_codegen == 'TRUE' :
anatofuz
parents:
diff changeset
54 config.available_features.add('pollyacc')
anatofuz
parents:
diff changeset
55
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
56 import lit.llvm
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
57 lit.llvm.initialize(lit_config, config)
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
58
150
anatofuz
parents:
diff changeset
59 # Let the main config do the real work.
anatofuz
parents:
diff changeset
60 lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")