diff options
Diffstat (limited to 'llvm/utils')
19 files changed, 47 insertions, 82 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 305c28b..a5473f9 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -193,7 +193,7 @@ struct MarkerStyle { std::string Note; /// Does this marker indicate inclusion by -dump-input-filter=error? bool FiltersAsError; - MarkerStyle() {} + MarkerStyle() = default; MarkerStyle(char Lead, raw_ostream::Colors Color, const std::string &Note = "", bool FiltersAsError = false) : Lead(Lead), Color(Color), Note(Note), FiltersAsError(FiltersAsError) { diff --git a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp index 3f284ee..b63ce36 100644 --- a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp +++ b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp @@ -220,7 +220,7 @@ static void emitARMTargetDef(const RecordKeeper &RK, raw_ostream &OS) { ProfileLower + "'"); // Name of the object in C++ - const std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper); + std::string CppSpelling = ArchInfoName(Major, Minor, ProfileUpper); OS << "inline constexpr ArchInfo " << CppSpelling << " = {\n"; CppSpellings.push_back(std::move(CppSpelling)); diff --git a/llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp b/llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp index cd86646..ff89485 100644 --- a/llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp +++ b/llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp @@ -407,6 +407,8 @@ void CodeGenIntrinsic::setProperty(const Record *R) { hasSideEffects = true; else if (R->getName() == "IntrStrictFP") isStrictFP = true; + else if (R->getName() == "IntrNoCreateUndefOrPoison") + isNoCreateUndefOrPoison = true; else if (R->isSubClassOf("NoCapture")) { unsigned ArgNo = R->getValueAsInt("ArgNo"); addArgAttribute(ArgNo, NoCapture); diff --git a/llvm/utils/TableGen/Basic/CodeGenIntrinsics.h b/llvm/utils/TableGen/Basic/CodeGenIntrinsics.h index 2e86149..15e803c 100644 --- a/llvm/utils/TableGen/Basic/CodeGenIntrinsics.h +++ b/llvm/utils/TableGen/Basic/CodeGenIntrinsics.h @@ -114,6 +114,9 @@ struct CodeGenIntrinsic { // True if the intrinsic is marked as strictfp. bool isStrictFP = false; + // True if the intrinsic is marked as IntrNoCreateUndefOrPoison. + bool isNoCreateUndefOrPoison = false; + enum ArgAttrKind { NoCapture, NoAlias, diff --git a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp index 75dffb1..452d2b0 100644 --- a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp @@ -421,7 +421,8 @@ static bool compareFnAttributes(const CodeGenIntrinsic *L, return std::tie(I->canThrow, I->isNoDuplicate, I->isNoMerge, I->isNoReturn, I->isNoCallback, I->isNoSync, I->isNoFree, I->isWillReturn, I->isCold, I->isConvergent, I->isSpeculatable, - I->hasSideEffects, I->isStrictFP); + I->hasSideEffects, I->isStrictFP, + I->isNoCreateUndefOrPoison); }; auto TieL = TieBoolAttributes(L); @@ -446,7 +447,8 @@ static bool hasFnAttributes(const CodeGenIntrinsic &Int) { return !Int.canThrow || Int.isNoReturn || Int.isNoCallback || Int.isNoSync || Int.isNoFree || Int.isWillReturn || Int.isCold || Int.isNoDuplicate || Int.isNoMerge || Int.isConvergent || Int.isSpeculatable || - Int.isStrictFP || getEffectiveME(Int) != MemoryEffects::unknown(); + Int.isStrictFP || Int.isNoCreateUndefOrPoison || + getEffectiveME(Int) != MemoryEffects::unknown(); } namespace { @@ -605,6 +607,8 @@ static AttributeSet getIntrinsicFnAttributeSet(LLVMContext &C, unsigned ID) { addAttribute("Speculatable"); if (Int.isStrictFP) addAttribute("StrictFP"); + if (Int.isNoCreateUndefOrPoison) + addAttribute("NoCreateUndefOrPoison"); const MemoryEffects ME = getEffectiveME(Int); if (ME != MemoryEffects::unknown()) { diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index 469e27f..8237786 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -51,9 +51,9 @@ ASM_FUNCTION_AARCH64_RE = re.compile( ) ASM_FUNCTION_AMDGPU_RE = re.compile( - r"\.type\s+_?(?P<func>[^,\n]+),@function\n" + r"\.type\s+(_|\.L)?(?P<func>[^,\n]+),@function\n" r"(^\s*\.amdgpu_hsa_kernel (?P=func)\n)?" - r'^_?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n' + r'^(_|\.L)?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n' r"(?P<body>.*?)\n" # (body of the function) # This list is incomplete r"^\s*(\.Lfunc_end[0-9]+:\n|\.section)", @@ -576,6 +576,7 @@ def get_run_handler(triple): "armv7-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_IOS_RE), "armv7-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_DARWIN_RE), "armv7k-apple-watchos": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_DARWIN_RE), + "thumbv7k-apple-watchos": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_DARWIN_RE), "thumb": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_RE), "thumb-macho": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE), "thumbv5-macho": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE), diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn index f280f69..2f84999 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn @@ -32,6 +32,7 @@ static_library("bugprone") { "CopyConstructorInitCheck.cpp", "CrtpConstructorAccessibilityCheck.cpp", "DanglingHandleCheck.cpp", + "DefaultOperatorNewOnOveralignedTypeCheck.cpp", "DerivedMethodShadowingBaseMethodCheck.cpp", "DynamicStaticInitializersCheck.cpp", "EasilySwappableParametersCheck.cpp", diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn index 3ad0a83..ec642b6 100644 --- a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn +++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn @@ -16,7 +16,6 @@ static_library("cert") { ] sources = [ "CERTTidyModule.cpp", - "DefaultOperatorNewAlignmentCheck.cpp", "DontModifyStdNamespaceCheck.cpp", "FloatLoopCounter.cpp", "LimitedRandomnessCheck.cpp", diff --git a/llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn b/llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn index a42f781..b6c2f46 100644 --- a/llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn +++ b/llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn @@ -21,6 +21,7 @@ static_library("lib") { sources = [ "Breakpoint.cpp", "BreakpointBase.cpp", + "ClientLauncher.cpp", "CommandPlugins.cpp", "DAP.cpp", "DAPError.cpp", diff --git a/llvm/utils/gn/secondary/llvm/lib/CAS/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/CAS/BUILD.gn index 5590b27..1e0e918 100644 --- a/llvm/utils/gn/secondary/llvm/lib/CAS/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/CAS/BUILD.gn @@ -4,14 +4,17 @@ static_library("CAS") { "ActionCache.cpp", "ActionCaches.cpp", "BuiltinCAS.cpp", + "BuiltinUnifiedCASDatabases.cpp", "DatabaseFile.cpp", "InMemoryCAS.cpp", "MappedFileRegionArena.cpp", "ObjectStore.cpp", + "OnDiskCAS.cpp", "OnDiskCommon.cpp", "OnDiskDataAllocator.cpp", "OnDiskGraphDB.cpp", "OnDiskKeyValueDB.cpp", "OnDiskTrieRawHashMap.cpp", + "UnifiedOnDiskCache.cpp", ] } diff --git a/llvm/utils/gn/secondary/llvm/unittests/CAS/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/CAS/BUILD.gn index 2d9eb68..b10e0e6 100644 --- a/llvm/utils/gn/secondary/llvm/unittests/CAS/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/unittests/CAS/BUILD.gn @@ -9,8 +9,10 @@ unittest("CASTests") { ] sources = [ "ActionCacheTest.cpp", + "BuiltinUnifiedCASDatabasesTest.cpp", "CASTestConfig.cpp", "ObjectStoreTest.cpp", + "UnifiedOnDiskCacheTest.cpp", ] if (llvm_enable_ondisk_cas) { diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index 3176b1a..64148c6 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -462,16 +462,15 @@ def executeBuiltinMkdir(cmd, cmd_shenv): stderr = StringIO() exitCode = 0 for dir in args: - cwd = cmd_shenv.cwd - dir = to_unicode(dir) if kIsWindows else to_bytes(dir) - cwd = to_unicode(cwd) if kIsWindows else to_bytes(cwd) - if not os.path.isabs(dir): - dir = lit.util.abs_path_preserve_drive(os.path.join(cwd, dir)) + dir = pathlib.Path(dir) + cwd = pathlib.Path(to_unicode(cmd_shenv.cwd)) + if not dir.is_absolute(): + dir = lit.util.abs_path_preserve_drive(cwd / dir) if parent: - lit.util.mkdir_p(dir) + dir.mkdir(parents=True, exist_ok=True) else: try: - lit.util.mkdir(dir) + dir.mkdir(exist_ok=True) except OSError as err: stderr.write("Error: 'mkdir' command failed, %s\n" % str(err)) exitCode = 1 @@ -2411,7 +2410,7 @@ def _runShTest(test, litConfig, useExternalSh, script, tmpBase) -> lit.Test.Resu return out, err, exitCode, timeoutInfo, status # Create the output directory if it does not already exist. - lit.util.mkdir_p(os.path.dirname(tmpBase)) + pathlib.Path(tmpBase).parent.mkdir(parents=True, exist_ok=True) # Re-run failed tests up to test.allowed_retries times. execdir = os.path.dirname(test.getExecPath()) diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py index ce4c3c2..e4e031b 100644 --- a/llvm/utils/lit/lit/util.py +++ b/llvm/utils/lit/lit/util.py @@ -5,6 +5,7 @@ import itertools import math import numbers import os +import pathlib import platform import re import signal @@ -131,48 +132,17 @@ def abs_path_preserve_drive(path): # Since Python 3.8, os.path.realpath resolves sustitute drives, # so we should not use it. In Python 3.7, os.path.realpath # was implemented as os.path.abspath. + if isinstance(path, pathlib.Path): + return path.absolute() return os.path.abspath(path) else: # On UNIX, the current directory always has symbolic links resolved, # so any program accepting relative paths cannot preserve symbolic # links in paths and we should always use os.path.realpath. + if isinstance(path, pathlib.Path): + return path.resolve() return os.path.realpath(path) -def mkdir(path): - try: - if platform.system() == "Windows": - from ctypes import windll - from ctypes import GetLastError, WinError - - path = os.path.abspath(path) - # Make sure that the path uses backslashes here, in case - # python would have happened to use forward slashes, as the - # NT path format only supports backslashes. - path = path.replace("/", "\\") - NTPath = to_unicode(r"\\?\%s" % path) - if not windll.kernel32.CreateDirectoryW(NTPath, None): - raise WinError(GetLastError()) - else: - os.mkdir(path) - except OSError: - e = sys.exc_info()[1] - # ignore EEXIST, which may occur during a race condition - if e.errno != errno.EEXIST: - raise - - -def mkdir_p(path): - """mkdir_p(path) - Make the "path" directory, if it does not exist; this - will also make directories for any missing parent directories.""" - if not path or os.path.exists(path): - return - - parent = os.path.dirname(path) - if parent != path: - mkdir_p(parent) - - mkdir(path) - def listdir_files(dirname, suffixes=None, exclude_filenames=None, prefixes=None): """Yields files in a directory. diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir1.input/empty b/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir1.input/empty new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir1.input/empty diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir2.input/empty b/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir2.input/empty new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-glob/example_dir2.input/empty diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/glob-mkdir.txt b/llvm/utils/lit/tests/Inputs/shtest-glob/glob-mkdir.txt index d1329f5..7197241 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-glob/glob-mkdir.txt +++ b/llvm/utils/lit/tests/Inputs/shtest-glob/glob-mkdir.txt @@ -1,2 +1,7 @@ ## Tests glob pattern handling in the mkdir command. + +## This mkdir should fail because the `example_file*.input`s are regular files. # RUN: not mkdir %S/example_file*.input + +## This mkdir should succeed (so RUN should fail) because the `example_dir*.input`s that already exist are directories. +# RUN: not mkdir %S/example_dir*.input diff --git a/llvm/utils/lit/tests/shtest-glob.py b/llvm/utils/lit/tests/shtest-glob.py index ae90f31..aa4705b 100644 --- a/llvm/utils/lit/tests/shtest-glob.py +++ b/llvm/utils/lit/tests/shtest-glob.py @@ -1,12 +1,13 @@ ## Tests glob pattern handling in echo command. # RUN: not %{lit} -a -v %{inputs}/shtest-glob \ -# RUN: | FileCheck -dump-input=fail -match-full-lines %s -# +# RUN: | FileCheck -dump-input=fail -match-full-lines --implicit-check-not=Error: %s # END. # CHECK: UNRESOLVED: shtest-glob :: glob-echo.txt ({{[^)]*}}) # CHECK: TypeError: string argument expected, got 'GlobItem' -# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}) -# CHECK: # error: command failed with exit status: 1 +# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}) +# CHECK: # | Error: 'mkdir' command failed, {{.*}}example_file1.input' +# CHECK-NEXT: # | Error: 'mkdir' command failed, {{.*}}example_file2.input' +# CHECK: # error: command failed with exit status: 1 diff --git a/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py b/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py index 286fd3d..d81cde0 100644 --- a/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py +++ b/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py @@ -2,7 +2,7 @@ # ulimit does not work on non-POSIX platforms. # These tests are specific to options that Darwin does not support. -# UNSUPPORTED: system-windows, system-darwin, system-aix, system-solaris +# UNSUPPORTED: system-windows, system-cygwin, system-darwin, system-aix, system-solaris # RUN: not %{lit} -a -v %{inputs}/shtest-ulimit-nondarwin | FileCheck %s diff --git a/llvm/utils/profcheck-xfail.txt b/llvm/utils/profcheck-xfail.txt index 380b162..d7af3a7 100644 --- a/llvm/utils/profcheck-xfail.txt +++ b/llvm/utils/profcheck-xfail.txt @@ -530,32 +530,6 @@ Instrumentation/TypeSanitizer/swifterror.ll LTO/X86/diagnostic-handler-remarks-with-hotness.ll Other/optimization-remarks-auto.ll Other/X86/debugcounter-partiallyinlinelibcalls.ll -tools/llvm-objcopy/ELF/auto-remove-add-symtab-shndx.test -tools/UpdateTestChecks/update_analyze_test_checks/loop-access-analysis.test -tools/UpdateTestChecks/update_analyze_test_checks/loop-distribute.test -tools/UpdateTestChecks/update_test_checks/argument_name_reuse.test -tools/UpdateTestChecks/update_test_checks/basic.test -tools/UpdateTestChecks/update_test_checks/check_attrs.test -tools/UpdateTestChecks/update_test_checks/difile_absolute_filenames.test -tools/UpdateTestChecks/update_test_checks/filter_out_after.test -tools/UpdateTestChecks/update_test_checks/generated_funcs_prefix_reuse.test -tools/UpdateTestChecks/update_test_checks/generated_funcs.test -tools/UpdateTestChecks/update_test_checks/global_preserve_name.test -tools/UpdateTestChecks/update_test_checks/if_target.test -tools/UpdateTestChecks/update_test_checks/named_function_arguments_split.test -tools/UpdateTestChecks/update_test_checks/on_the_fly_arg_change.test -tools/UpdateTestChecks/update_test_checks/phi-labels.test -tools/UpdateTestChecks/update_test_checks/pre-process.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values2.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values3.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values4.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values5.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values6.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values_funcs.test -tools/UpdateTestChecks/update_test_checks/stable_ir_values.test -tools/UpdateTestChecks/update_test_checks/switch_case.test -tools/UpdateTestChecks/update_test_checks/tbaa-semantics-checks.test -tools/UpdateTestChecks/update_test_checks/various_ir_values_dbgrecords.test Transforms/AtomicExpand/AArch64/atomicrmw-fp.ll Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll Transforms/AtomicExpand/AArch64/pcsections.ll @@ -917,7 +891,6 @@ Transforms/InstCombine/select_frexp.ll Transforms/InstCombine/select.ll Transforms/InstCombine/select-min-max.ll Transforms/InstCombine/select-of-symmetric-selects.ll -Transforms/InstCombine/select-safe-transforms.ll Transforms/InstCombine/select-select.ll Transforms/InstCombine/select-with-extreme-eq-cond.ll Transforms/InstCombine/shift.ll @@ -1324,6 +1297,7 @@ Transforms/SimpleLoopUnswitch/trivial-unswitch.ll Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll Transforms/StackProtector/cross-dso-cfi-stack-chk-fail.ll Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll +Transforms/StructurizeCFG/callbr.ll Transforms/StructurizeCFG/hoist-zerocost.ll Transforms/StructurizeCFG/loop-break-phi.ll Transforms/StructurizeCFG/nested-loop-order.ll |
