python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
# Check that we can inject commands at the beginning of a ShTest. # RUN: %{lit} -j 1 %{inputs}/shtest-inject/test-empty.txt --show-all | FileCheck --check-prefix=CHECK-TEST1 %s # # CHECK-TEST1: Script: # CHECK-TEST1: -- # CHECK-TEST1: echo "THIS WAS" # CHECK-TEST1: echo "INJECTED" # CHECK-TEST1: -- # # CHECK-TEST1: TH...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/shtest-inject.py
# Test features related to formats which support reporting additional test data. # RUN: %{lit} -j 1 -v %{inputs}/test-data > %t.out # RUN: FileCheck < %t.out %s # CHECK: -- Testing: # CHECK: PASS: test-data :: metrics.ini # CHECK-NEXT: *** TEST 'test-data :: metrics.ini' RESULTS *** # CHECK-NEXT: value0: 1 # CHECK-N...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/test-data.py
# UNSUPPORTED: system-windows # Test overall lit timeout (--max-time). # # RUN: %{lit} %{inputs}/max-time --max-time=5 2>&1 | FileCheck %s # CHECK: reached timeout, skipping remaining tests # CHECK: Skipped: 1 # CHECK: Passed : 1
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/max-time.py
# RUN: %{python} %s %{inputs}/unparsed-requirements import sys from lit.Test import Result, Test, TestSuite from lit.TestRunner import parseIntegratedTestScript from lit.TestingConfig import TestingConfig config = TestingConfig(None, "config", [".txt"], None, [], [], False, sys.argv[1], sys.argv[1], [], [], True) sui...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/unparsed-requirements.py
# Check the various features of the GoogleTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/googletest-upstream-format > %t.out # RUN: FileCheck < %t.out %s # # END. # CHECK: -- Testing: # CHECK: PASS: googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA # CHECK: FAIL: googletest-upstr...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/googletest-upstream-format.py
# Check the lit adaption to run under unittest. # # RUN: %{python} %s %{inputs}/unittest-adaptor 2> %t.err # RUN: FileCheck < %t.err %s # # CHECK-DAG: unittest-adaptor :: test-two.txt ... FAIL # CHECK-DAG: unittest-adaptor :: test-one.txt ... ok import sys import unittest import lit.LitTestCase input_path = sys.argv...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/unittest-adaptor.py
# Check the various features of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-output-printing > %t.out # RUN: FileCheck --input-file %t.out %s # # END. # CHECK: -- Testing: # CHECK: FAIL: shtest-output-printing :: basic.txt # CHECK-NEXT: *** TEST 'shtest-output-printing :: basic.txt' FAILED *** # CH...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/shtest-output-printing.py
# Test the --show-<result-code> {pass,unsupported,xfail,...} options. # # RUN: not %{lit} %{inputs}/show-result-codes | FileCheck %s --check-prefix=NONE # RUN: not %{lit} %{inputs}/show-result-codes --show-unsupported | FileCheck %s --check-prefix=ONE # RUN: not %{lit} %{inputs}/show-...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/show-result-codes.py
# UNSUPPORTED: system-windows # Test lit.main.add_result_category() extension API. # RUN: not %{lit} -j 1 %{inputs}/custom-result-category | FileCheck %s # CHECK: CUSTOM_PASS: custom-result-category :: test1.txt # CHECK: CUSTOM_FAILURE: custom-result-category :: test2.txt # CHECK-NOT: My Passed Tests (1) # CHECK-NOT...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/custom-result-category.py
# Check the env command # # RUN: not %{lit} -j 1 -a -v %{inputs}/shtest-env \ # RUN: | FileCheck -match-full-lines %s # # END. # Make sure env commands are included in printed commands. # CHECK: -- Testing: 16 tests{{.*}} # CHECK: FAIL: shtest-env :: env-args-last-is-assign.txt ({{[^)]*}}) # CHECK: $ "env" "FOO=1" #...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/shtest-env.py
# REQUIRES: shell # Check xunit output # RUN: rm -rf %t.xunit.xml # RUN: not %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output # If xmllint is installed verify that the generated xml is well-formed # RUN: sh -c 'if command -v xmllint 2>/dev/null; then xmllint --noout %t.xunit.xml; fi' # RUN: FileCheck < %t...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/xunit-output.py
# Basic sanity check for `--help` and `--version` options. # # RUN: %{lit} --help | FileCheck %s --check-prefix=HELP # RUN: %{lit} --version 2>&1 | FileCheck %s --check-prefix=VERSION # # HELP: usage: lit [-h] # VERSION: lit {{[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9]*}}
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/usage.py
# Check that --show-used-features works correctly. # # RUN: %{lit} %{inputs}/show-used-features --show-used-features | FileCheck %s # CHECK: my-require-feature-1 my-require-feature-2 my-require-feature-3 # CHECK: my-unsupported-feature-1 my-unsupported-feature-2 my-unsupported-feature-3 # CHECK: my-xfail-feature-1 my-x...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/show-used-features.py
# Check that the config.recursiveExpansionLimit is picked up and will cause # lit substitutions to be expanded recursively. # RUN: %{lit} -j 1 %{inputs}/shtest-recursive-substitution/substitutes-within-limit --show-all | FileCheck --check-prefix=CHECK-TEST1 %s # CHECK-TEST1: PASS: substitutes-within-limit :: test.py #...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/shtest-recursive-substitution.py
# RUN: %{python} %s import unittest from lit.ShUtil import Command, Pipeline, Seq, ShLexer, ShParser class TestShLexer(unittest.TestCase): def lex(self, str, *args, **kwargs): return list(ShLexer(str, *args, **kwargs).lex()) def test_basic(self): self.assertEqual(self.lex('a|b>c&d<e;f'), ...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/unit/ShUtil.py
# RUN: %{python} %s # # END. import os.path import platform import unittest import lit.discovery import lit.LitConfig import lit.Test as Test from lit.TestRunner import ParserKind, IntegratedTestKeywordParser, \ parseIntegratedTestScript class TestIntegratedTestKeywordParser(unittest.Tes...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/unit/TestRunner.py
#!/usr/bin/env python import print_environment print_environment.execute()
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-not/pass.py
from __future__ import print_function import os def execute(): for name in ['FOO', 'BAR']: print(name, '=', os.environ.get(name, '[undefined]'))
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-not/print_environment.py
#!/usr/bin/env python import print_environment import sys print_environment.execute() sys.exit(1)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-not/fail.py
# ALLOW_RETRIES: not-an-integer # RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/allow-retries/not-a-valid-integer.py
# ALLOW_RETRIES: 3 # RUN: false
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/allow-retries/does-not-succeed-within-limit.py
# ALLOW_RETRIES: 5 # RUN: "%python" "%s" "%counter" import sys import os counter_file = sys.argv[1] # The first time the test is run, initialize the counter to 1. if not os.path.exists(counter_file): with open(counter_file, 'w') as counter: counter.write("1") # Succeed if this is the fourth time we're ...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/allow-retries/succeeds-within-limit.py
# ALLOW_RETRIES: 3 # ALLOW_RETRIES: 5 # RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/allow-retries/more-than-one-allow-retries-lines.py
# RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/negative-integer/test.py
# RUN: echo %rec2 %%s %%%%s
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/escaping/test.py
# RUN: echo %rec5
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/substitutes-within-limit/test.py
# RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/set-to-none/test.py
# RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/not-an-integer/test.py
# RUN: echo %rec5
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/does-not-substitute-no-limit/test.py
# RUN: echo %rec5
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-recursive-substitution/does-not-substitute-within-limit/test.py
import lit.util import os import sys main_config = sys.argv[1] main_config = os.path.realpath(main_config) main_config = os.path.normcase(main_config) config_map = {main_config : sys.argv[2]} builtin_parameters = {'config_map' : config_map} if __name__=='__main__': from lit.main import main main_config_dir =...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/config-map-discovery/driver.py
import os try: import ConfigParser except ImportError: import configparser as ConfigParser import lit.formats import lit.Test class DummyFormat(lit.formats.FileBasedTest): def execute(self, test, lit_config): # In this dummy format, expect that each test file is actually just a # .ini form...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/test-data/dummy_format.py
#!/usr/bin/env python import sys if len(sys.argv) != 2: raise ValueError("unexpected number of args") if sys.argv[1] == "--gtest_list_tests": print("""\ Running main() from gtest_main.cc FirstTest. subTestA subTestB ParameterizedTest/0. subTest ParameterizedTest/1. subTest""") sys.exit(0) elif no...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py
# RUN: "%python" "%s" "%counter" import sys import os counter_file = sys.argv[1] # The first time the test is run, initialize the counter to 1. if not os.path.exists(counter_file): with open(counter_file, 'w') as counter: counter.write("1") # Succeed if this is the fourth time we're being run. with open...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/test_retry_attempts/test.py
import os try: import ConfigParser except ImportError: import configparser as ConfigParser import lit.formats import lit.Test class DummyFormat(lit.formats.FileBasedTest): def execute(self, test, lit_config): # In this dummy format, expect that each test file is actually just a # .ini form...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/test-data-micro/dummy_format.py
# RUN: true
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/discovery/subdir/test-three.py
# 'sleep 60' in Python because Windows does not have a native sleep command. # # RUN: %{python} %s import time time.sleep(60)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/max-time/slow.py
import os try: import ConfigParser except ImportError: import configparser as ConfigParser import lit.formats import lit.Test class DummyFormat(lit.formats.FileBasedTest): def execute(self, test, lit_config): # In this dummy format, expect that each test file is actually just a # .ini form...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/xunit-output/dummy_format.py
import os import sys def execute(fileName): sys.stderr.write("error: external '{}' command called unexpectedly\n" .format(os.path.basename(fileName))); sys.exit(1)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/fake-externals/fake_external.py
# Load the discovery suite, but with a separate exec root. import os config.test_exec_root = os.path.dirname(__file__) config.test_source_root = os.path.join(os.path.dirname(config.test_exec_root), "discovery") lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg"))
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/py-config-discovery/lit.site.cfg.py
#!/usr/bin/env python import sys getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.") sys.stdout.flush()
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
#!/usr/bin/env python from __future__ import print_function import sys print("a line with \x1b[2;30;41mcontrol characters\x1b[0m.") sys.exit(1)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py
#!/usr/bin/env python from __future__ import print_function import os sorted_environment = sorted(os.environ.items()) for name,value in sorted_environment: print(name,'=',value)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-env/print_environment.py
#!/usr/bin/env python import sys sys.stdout.write("a line on stdout\n") sys.stdout.flush() sys.stderr.write("a line on stderr\n") sys.stderr.flush()
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py
#!/usr/bin/env python import sys sys.stderr.write("a line on stderr\n") sys.stderr.flush()
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py
#!/usr/bin/env python from __future__ import print_function import os import sys def check_path(argv): if len(argv) < 3: print("Wrong number of args") return 1 type = argv[1] paths = argv[2:] exit_code = 0 if type == 'dir': for idx, dir in enumerate(paths): ...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-shell/check_path.py
#!/usr/bin/env python import argparse import platform parser = argparse.ArgumentParser() parser.add_argument("--my_arg", "-a") args = parser.parse_args() answer = (platform.system() == "Windows" and args.my_arg == "/dev/null" and "ERROR") or "OK" print(answer)
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-shell/check_args.py
import lit import lit.formats CUSTOM_PASS = lit.Test.ResultCode('CUSTOM_PASS', 'My Passed', False) CUSTOM_FAILURE = lit.Test.ResultCode('CUSTOM_FAILURE', 'My Failed', True) class MyFormat(lit.formats.ShTest): def execute(self, test, lit_config): result = super(MyFormat, self).execute(test, lit_config) ...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/custom-result-category/format.py
#!/usr/bin/env python import sys if len(sys.argv) != 2: raise ValueError("unexpected number of args") if sys.argv[1] == "--gtest_list_tests": print("""\ FirstTest. subTestA subTestB ParameterizedTest/0. subTest ParameterizedTest/1. subTest""") sys.exit(0) elif not sys.argv[1].startswith("--gtest_...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py
# RUN: %{python} %s while True: pass
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py
# RUN: %{python} %s from __future__ import print_function print("short program")
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/shtest-timeout/short.py
#!/usr/bin/env python import sys import time if len(sys.argv) != 2: raise ValueError("unexpected number of args") if sys.argv[1] == "--gtest_list_tests": print("""\ T. QuickSubTest InfiniteLoopSubTest """) sys.exit(0) elif not sys.argv[1].startswith("--gtest_filter="): raise ValueError("unexpecte...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py
# REQUIRES: woof, quack # UNSUPPORTED: beta, gamma # XFAIL: bar, baz # RUN:
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/unparsed-requirements/test.py
#!/usr/bin/env python raise SystemExit("We are not a valid gtest executable!")
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py
from lit import Test class ManyTests(object): def __init__(self, N=10000): self.N = N def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig): for i in range(self.N): test_name = "test-%04d" % (i,) yield Test.Test(testSuite, path_in_suite + (tes...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/lit/examples/many-tests/ManyTests.py
#!/usr/bin/env python """Calls `gn` with the right --dotfile= and --root= arguments for LLVM.""" # GN normally expects a file called '.gn' at the root of the repository. # Since LLVM's GN build isn't supported, putting that file at the root # is deemed inappropriate, which requires passing --dotfile= and -root= to GN....
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/gn.py
#!/usr/bin/env python """Downloads a prebuilt gn binary to a place where gn.py can find it.""" from __future__ import print_function import io import os try: # In Python 3, we need the module urllib.reqest. In Python 2, this # functionality was in the urllib2 module. from urllib import request as urllib_r...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/get.py
#!/usr/bin/env python """Runs tablegen.""" import subprocess import sys # Prefix with ./ to run built binary, not arbitrary stuff from PATH. sys.exit(subprocess.call(['./' + sys.argv[1]] + sys.argv[2:]))
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/run_tablegen.py
#!/usr/bin/env python """Symlinks, or on Windows copies, an existing file to a second location. Overwrites the target location if it exists. Updates the mtime on a stamp file when done.""" import argparse import errno import os import sys def main(): parser = argparse.ArgumentParser(description=__doc__) pa...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/symlink_or_copy.py
#!/usr/bin/env python r"""Emulates the bits of CMake's configure_file() function needed in LLVM. The CMake build uses configure_file() for several things. This emulates that function for the GN build. In the GN build, this runs at build time instead of at generator time. Takes a list of KEY=VALUE pairs (where VALUE...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/write_cmake_config.py
#!/usr/bin/env python """Gets the current revision and writes it to VCSRevision.h.""" from __future__ import print_function import argparse import os import subprocess import sys THIS_DIR = os.path.abspath(os.path.dirname(__file__)) LLVM_DIR = os.path.dirname(os.path.dirname(os.path.dirname(THIS_DIR))) def which...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/write_vcsrevision.py
#!/usr/bin/env python """Helps to keep BUILD.gn files in sync with the corresponding CMakeLists.txt. For each BUILD.gn file in the tree, checks if the list of cpp files in it is identical to the list of cpp files in the corresponding CMakeLists.txt file, and prints the difference if not. Also checks that each CMakeL...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/sync_source_lists_from_cmake.py
#!/usr/bin/env python from __future__ import print_function import argparse import os import re import sys # FIXME: This should get outputs from gn. OUTPUT = """struct AvailableComponent { /// The name of the component. const char *Name; /// The name of the library for this component (or NULL). cons...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/build/write_library_dependencies.py
#!/usr/bin/env python #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/secondary/libcxx/utils/gen_link_script.py
#!/usr/bin/env python r"""Writes ExtensionDepencencies.inc.""" from __future__ import print_function import argparse import os import re import sys def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('-o', '--output', required=True, help='output file...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/secondary/llvm/tools/llvm-config/write_extension_dependencies.py
#!/usr/bin/env python from __future__ import print_function import argparse import os import sys def main(): parser = argparse.ArgumentParser() parser.add_argument('exts', nargs='*', help='list of supported extensions') parser.add_argument('-o', '--output', required=True, help='output file') args = p...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/UpdateTestChecks/__init__.py
from __future__ import print_function import re import sys from . import common if sys.version_info[0] > 2: class string: expandtabs = str.expandtabs else: import string # RegEx: this is where the magic happens. ##### Assembly parser ASM_FUNCTION_X86_RE = re.compile( r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/UpdateTestChecks/asm.py
from __future__ import print_function import copy import glob import re import subprocess import sys if sys.version_info[0] > 2: class string: expandtabs = str.expandtabs else: import string ##### Common utilities for update_*test_checks.py _verbose = False def parse_commandline_args(parser): parser.add...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/UpdateTestChecks/common.py
#!/usr/bin/env python from __future__ import print_function def analyze_match_table(path): # Extract the instruction table. data = open(path).read() start = data.index("static const MatchEntry MatchTable") end = data.index("\n};\n", start) lines = data[start:end].split("\n")[1:] # Parse the i...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/Target/ARM/analyze-match-table.py
#!/usr/bin/env python # Auto-generates an exhaustive and repetitive test for correct bundle-locked # alignment on x86. # For every possible offset in an aligned bundle, a bundle-locked group of every # size in the inclusive range [1, bundle_size] is inserted. An appropriate CHECK # is added to verify that NOP padding...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/testgen/mc-bundling-x86-gen.py
#!/usr/bin/env python from __future__ import print_function import re, string, sys, os, time DEBUG = 0 testDirName = 'llvm-test' test = ['compile', 'llc', 'jit', 'cbe'] exectime = ['llc-time', 'jit-time', 'cbe-time',] comptime = ['llc', 'jit-comptime', 'compile'] (tp, exp) = ('compileTime_', 'executeTim...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/release/findRegressions-nightly.py
#!/usr/bin/env python from __future__ import print_function import re, string, sys, os, time, math DEBUG = 0 (tp, exp) = ('compile', 'exec') def parse(file): f = open(file, 'r') d = f.read() # Cleanup weird stuff d = re.sub(r',\d+:\d', '', d) r = re.findall(r'TEST-(PASS|FAIL|RESULT.*?):\s+(.*?)\s+(.*?...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/release/findRegressions-simple.py
#!/usr/bin/env python3 # ===-- github-upload-release.py ------------------------------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/release/github-upload-release.py
#!/usr/bin/env python from __future__ import print_function import argparse import email.mime.multipart import email.mime.text import logging import os.path import pickle import re import smtplib import subprocess import sys from datetime import datetime, timedelta from phabricator import Phabricator # Setting up a ...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/Reviewing/find_interesting_reviews.py
#!/usr/bin/env python3 # # ======- pre-push - LLVM Git Help Integration ---------*- python -*--========# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # ==---------...
MDL-SDK-master
src/mdl/jit/llvm/dist/utils/git/pre-push.py
# -*- coding: utf-8 -*- # # LLVM documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented...
MDL-SDK-master
src/mdl/jit/llvm/dist/docs/conf.py
#!/usr/bin/env python from __future__ import print_function class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.shfile = open(scriptname, 'w') self.timeFile = outputname self.shfile.wri...
MDL-SDK-master
src/mdl/jit/llvm/dist/examples/Kaleidoscope/MCJIT/complete/split-lib.py
#!/usr/bin/env python from __future__ import print_function import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w...
MDL-SDK-master
src/mdl/jit/llvm/dist/examples/Kaleidoscope/MCJIT/complete/genk-timing.py
#!/usr/bin/env python from __future__ import print_function class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.shfile = open(scriptname, 'w') self.timeFile = outputname self.shfile.wri...
MDL-SDK-master
src/mdl/jit/llvm/dist/examples/Kaleidoscope/MCJIT/cached/split-lib.py
#!/usr/bin/env python from __future__ import print_function import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w...
MDL-SDK-master
src/mdl/jit/llvm/dist/examples/Kaleidoscope/MCJIT/cached/genk-timing.py
#!/usr/bin/env python from __future__ import print_function import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w...
MDL-SDK-master
src/mdl/jit/llvm/dist/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py
#===- object.py - Python Object Bindings --------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/object.py
#===- disassembler.py - Python LLVM Bindings -----------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/disassembler.py
#===- enumerations.py - Python LLVM Enumerations -------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/enumerations.py
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/__init__.py
#===- core.py - Python LLVM Bindings -------------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/core.py
#===- common.py - Python LLVM Bindings -----------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===---------------------------------...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/common.py
from .common import LLVMObject from .common import c_object_p from .common import get_library from . import enumerations from .core import MemoryBuffer from .core import Module from .core import OpCode from ctypes import POINTER from ctypes import byref from ctypes import c_char_p from ctypes import cast __all__ = ['p...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/bit_reader.py
from __future__ import print_function from .base import TestBase from ..core import OpCode from ..core import MemoryBuffer from ..core import PassRegistry from ..core import Context from ..core import Module from ..bit_reader import parse_bitcode class TestBitReader(TestBase): def test_parse_bitcode(self): ...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/test_bitreader.py
from __future__ import print_function from .base import TestBase from ..core import MemoryBuffer from ..core import PassRegistry from ..core import Context from ..core import Module from ..core import Enums from ..core import OpCode from ..bit_reader import parse_bitcode class TestCore(TestBase): def test_enumera...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/test_core.py
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/__init__.py
from __future__ import print_function from .base import TestBase from ..disassembler import Disassembler, Option_UseMarkup class TestDisassembler(TestBase): def test_instantiate(self): Disassembler('i686-apple-darwin9') def test_basic(self): sequence = '\x67\xe3\x81' # jcxz -127 tri...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/test_disassembler.py
from numbers import Integral from .base import TestBase from ..object import ObjectFile from ..object import Relocation from ..object import Section from ..object import Symbol class TestObjectFile(TestBase): def get_object_file(self): source = self.get_test_binary() return ObjectFile(filename=sou...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/test_object.py
import os.path import sys import unittest POSSIBLE_TEST_BINARIES = [ 'libreadline.so.5', 'libreadline.so.6', ] POSSIBLE_TEST_BINARY_PATHS = [ '/usr/lib/debug', '/lib', '/usr/lib', '/usr/local/lib', '/lib/i386-linux-gnu', ] class TestBase(unittest.TestCase): if sys.version_info.major ...
MDL-SDK-master
src/mdl/jit/llvm/dist/bindings/python/llvm/tests/base.py
#!/usr/bin/env python #***************************************************************************** # Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
MDL-SDK-master
src/mdl/jit/generator_jit/gen_libbsdf.py
#!/usr/bin/env python #***************************************************************************** # Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
MDL-SDK-master
src/mdl/jit/generator_jit/gen_libdevice.py
#!/bin/env python #***************************************************************************** # Copyright (c) 2013-2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # *...
MDL-SDK-master
src/mdl/jit/generator_jit/gen_intrinsic_func.py
#!/bin/env python #***************************************************************************** # Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # *...
MDL-SDK-master
src/mdl/jit/generator_jit/gen_user_modules_runtime_header.py
#!/usr/bin/env python #***************************************************************************** # Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
MDL-SDK-master
src/mdl/jit/generator_jit/gen_libmdlrt.py