diff options
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 2 | ||||
| -rw-r--r-- | llvm/utils/TableGen/X86RecognizableInstr.cpp | 1 | ||||
| -rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 25 | ||||
| -rwxr-xr-x | llvm/utils/git/code-format-helper.py | 2 | ||||
| -rw-r--r-- | llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn | 6 | ||||
| -rw-r--r-- | llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py | 8 | ||||
| -rw-r--r-- | llvm/utils/lit/tests/Inputs/test-data/dummy_format.py | 8 | ||||
| -rw-r--r-- | llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py | 8 | ||||
| -rw-r--r-- | llvm/utils/lit/tests/shtest-ulimit-nondarwin.py | 2 | ||||
| -rw-r--r-- | llvm/utils/profcheck-xfail.txt | 7 | ||||
| -rwxr-xr-x | llvm/utils/update_test_checks.py | 8 |
11 files changed, 40 insertions, 37 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index e1f2f06..9f18a11 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -4164,7 +4164,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { OS << " MII.getDeprecatedInfo(Inst, getSTI(), Info)) {\n"; OS << " SMLoc Loc = ((" << Target.getName() << "Operand &)*Operands[0]).getStartLoc();\n"; - OS << " getParser().Warning(Loc, Info, std::nullopt);\n"; + OS << " getParser().Warning(Loc, Info, {});\n"; OS << " }\n"; } diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index a006888..44b76ae 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -1141,7 +1141,6 @@ OperandType RecognizableInstr::typeFromString(StringRef Str, bool hasREX_W, .Case("vz64mem", TYPE_MVSIBZ) .Case("BNDR", TYPE_BNDR) .Case("TILE", TYPE_TMM) - .Case("TILEPair", TYPE_TMM_PAIR) .Default(TYPE_NONE); // clang-format on diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index b6b80ea..119303c 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -607,7 +607,7 @@ MARCH_ARG_RE = re.compile(r"-march[= ]([^ ]+)") DEBUG_ONLY_ARG_RE = re.compile(r"-debug-only[= ]([^ ]+)") IS_DEBUG_RECORD_RE = re.compile(r"^(\s+)#dbg_") -IS_SWITCH_CASE_RE = re.compile(r"^\s+i\d+ \d+, label %\w+") +IS_SWITCH_CASE_RE = re.compile(r"^\s+i\d+ \d+, label %\S+") SCRUB_LEADING_WHITESPACE_RE = re.compile(r"^(\s+)") SCRUB_WHITESPACE_RE = re.compile(r"(?!^(| \w))[ \t]+", flags=re.M) @@ -1123,6 +1123,8 @@ class FunctionTestBuilder: ##### Generator of LLVM IR CHECK lines SCRUB_IR_COMMENT_RE = re.compile(r"\s*;.*") +# Comments to indicate the predecessors of a block in the IR. +SCRUB_PRED_COMMENT_RE = re.compile(r"\s*; preds = .*") SCRUB_IR_FUNC_META_RE = re.compile(r"((?:\!(?!dbg\b)[a-zA-Z_]\w*(?:\s+![0-9]+)?)\s*)+") # TODO: We should also derive check lines for global, debug, loop declarations, etc.. @@ -1361,7 +1363,7 @@ def make_ir_generalizer(version, no_meta_details): ] prefix = r"(\s*)" - suffix = r"([,\s\(\)\}]|\Z)" + suffix = r"([,\s\(\)\}\]]|\Z)" # values = [ # nameless_value @@ -1877,6 +1879,7 @@ def generalize_check_lines( *, unstable_globals_only=False, no_meta_details=False, + ignore_all_comments=True, # If False, only ignore comments of predecessors ): if unstable_globals_only: regexp = ginfo.get_unstable_globals_regexp() @@ -1904,8 +1907,12 @@ def generalize_check_lines( line, ) break - # Ignore any comments, since the check lines will too. - scrubbed_line = SCRUB_IR_COMMENT_RE.sub(r"", line) + if ignore_all_comments: + # Ignore any comments, since the check lines will too. + scrubbed_line = SCRUB_IR_COMMENT_RE.sub(r"", line) + else: + # Ignore comments of predecessors only. + scrubbed_line = SCRUB_PRED_COMMENT_RE.sub(r"", line) # Ignore the metadata details if check global is none if no_meta_details: scrubbed_line = SCRUB_IR_FUNC_META_RE.sub(r"{{.*}}", scrubbed_line) @@ -2083,6 +2090,7 @@ def add_checks( global_tbaa_records_for_prefixes={}, preserve_names=False, original_check_lines: Mapping[str, List[str]] = {}, + check_inst_comments=True, ): # prefix_exclusions are prefixes we cannot use to print the function because it doesn't exist in run lines that use these prefixes as well. prefix_exclusions = set() @@ -2280,6 +2288,8 @@ def add_checks( global_tbaa_records, preserve_names, original_check_lines=original_check_lines.get(checkprefix), + # IR output might require comments checks, e.g., print-predicate-info, print<memssa> + ignore_all_comments=not check_inst_comments, ) # This could be selectively enabled with an optional invocation argument. @@ -2299,8 +2309,9 @@ def add_checks( if func_line.strip() == "": is_blank_line = True continue - # Do not waste time checking IR comments. - func_line = SCRUB_IR_COMMENT_RE.sub(r"", func_line) + if not check_inst_comments: + # Do not waste time checking IR comments unless necessary. + func_line = SCRUB_IR_COMMENT_RE.sub(r"", func_line) # Skip blank lines instead of checking them. if is_blank_line: @@ -2342,6 +2353,7 @@ def add_ir_checks( global_vars_seen_dict, global_tbaa_records_for_prefixes, is_filtered, + check_inst_comments=False, original_check_lines={}, ): assert ginfo.is_ir() @@ -2368,6 +2380,7 @@ def add_ir_checks( global_tbaa_records_for_prefixes, preserve_names, original_check_lines=original_check_lines, + check_inst_comments=check_inst_comments, ) diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py index dff7f78..f6b28f4 100755 --- a/llvm/utils/git/code-format-helper.py +++ b/llvm/utils/git/code-format-helper.py @@ -486,8 +486,6 @@ def hook_main(): if fmt.has_tool(): if not fmt.run(args.changed_files, args): failed_fmts.append(fmt.name) - if fmt.comment: - comments.append(fmt.comment) else: print(f"Couldn't find {fmt.name}, can't check " + fmt.friendly_name.lower()) diff --git a/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn index 3c523ae..03e5294 100644 --- a/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn @@ -132,18 +132,12 @@ copy("Headers") { "amdgpuintrin.h", "ammintrin.h", "amxavx512intrin.h", - "amxbf16transposeintrin.h", "amxcomplexintrin.h", - "amxcomplextransposeintrin.h", "amxfp16intrin.h", - "amxfp16transposeintrin.h", "amxfp8intrin.h", "amxintrin.h", "amxmovrsintrin.h", - "amxmovrstransposeintrin.h", "amxtf32intrin.h", - "amxtf32transposeintrin.h", - "amxtransposeintrin.h", "andes_vector.h", "arm64intr.h", "arm_acle.h", diff --git a/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py b/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py index b400083..27b738e 100644 --- a/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py +++ b/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py @@ -1,9 +1,5 @@ import os - -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser +import configparser import lit.formats import lit.Test @@ -16,7 +12,7 @@ class DummyFormat(lit.formats.FileBasedTest): source_path = test.getSourcePath() - cfg = ConfigParser.ConfigParser() + cfg = configparser.ConfigParser() cfg.read(source_path) # Create the basic test result. diff --git a/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py b/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py index 30bd181..b4c1b92 100644 --- a/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py +++ b/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py @@ -1,9 +1,5 @@ import os - -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser +import configparser import lit.formats import lit.Test @@ -16,7 +12,7 @@ class DummyFormat(lit.formats.FileBasedTest): source_path = test.getSourcePath() - cfg = ConfigParser.ConfigParser() + cfg = configparser.ConfigParser() cfg.read(source_path) # Create the basic test result. diff --git a/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py b/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py index efac0b5..43da097 100644 --- a/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py +++ b/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py @@ -1,9 +1,5 @@ import os - -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser +import configparser import lit.formats import lit.Test @@ -16,7 +12,7 @@ class DummyFormat(lit.formats.FileBasedTest): source_path = test.getSourcePath() - cfg = ConfigParser.ConfigParser() + cfg = configparser.ConfigParser() cfg.read(source_path) # Create the basic test result. diff --git a/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py b/llvm/utils/lit/tests/shtest-ulimit-nondarwin.py index 893270e..286fd3d 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 +# UNSUPPORTED: system-windows, 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 aef7c09..380b162 100644 --- a/llvm/utils/profcheck-xfail.txt +++ b/llvm/utils/profcheck-xfail.txt @@ -517,8 +517,11 @@ Instrumentation/TypeSanitizer/alloca-only.ll Instrumentation/TypeSanitizer/anon.ll Instrumentation/TypeSanitizer/basic.ll Instrumentation/TypeSanitizer/basic-nosan.ll +Instrumentation/TypeSanitizer/basic_outlined.ll +Instrumentation/TypeSanitizer/basic_verify_outlined.ll Instrumentation/TypeSanitizer/byval.ll Instrumentation/TypeSanitizer/globals.ll +Instrumentation/TypeSanitizer/globals_outlined.ll Instrumentation/TypeSanitizer/invalid-metadata.ll Instrumentation/TypeSanitizer/memintrinsics.ll Instrumentation/TypeSanitizer/nosanitize.ll @@ -729,6 +732,7 @@ Transforms/ExpandVariadics/expand-va-intrinsic-split-simple.ll Transforms/ExpandVariadics/intrinsics.ll Transforms/FixIrreducible/basic.ll Transforms/FixIrreducible/bug45623.ll +Transforms/FixIrreducible/callbr.ll Transforms/FixIrreducible/nested.ll Transforms/FixIrreducible/switch.ll Transforms/GCOVProfiling/atomic-counter.ll @@ -1106,6 +1110,7 @@ Transforms/LoopSimplifyCFG/update_parents.ll Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll Transforms/LoopUnroll/peel-last-iteration-with-guards.ll Transforms/LoopUnroll/peel-last-iteration-with-variable-trip-count.ll +Transforms/LoopUnroll/runtime-loop-multiple-exits.ll Transforms/LoopVersioning/add-phi-update-users.ll Transforms/LoopVersioning/basic.ll Transforms/LoopVersioning/bound-check-partially-known.ll @@ -1317,8 +1322,6 @@ Transforms/SimpleLoopUnswitch/pr60736.ll Transforms/SimpleLoopUnswitch/trivial-unswitch-freeze-individual-conditions.ll Transforms/SimpleLoopUnswitch/trivial-unswitch.ll Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll -Transforms/SimplifyCFG/RISCV/switch-of-powers-of-two.ll -Transforms/SimplifyCFG/X86/switch-of-powers-of-two.ll Transforms/StackProtector/cross-dso-cfi-stack-chk-fail.ll Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll Transforms/StructurizeCFG/hoist-zerocost.ll diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py index 42227b2..74e87787 100755 --- a/llvm/utils/update_test_checks.py +++ b/llvm/utils/update_test_checks.py @@ -197,6 +197,7 @@ def update_test(ti: common.TestInfo): global_tbaa_records_for_prefixes, is_filtered=builder.is_filtered(), original_check_lines=original_check_lines.get(func, {}), + check_inst_comments=args.check_inst_comments, ), ) ) @@ -230,6 +231,7 @@ def update_test(ti: common.TestInfo): global_tbaa_records_for_prefixes, is_filtered=builder.is_filtered(), original_check_lines=original_check_lines.get(func_name, {}), + check_inst_comments=args.check_inst_comments, ) ) is_in_function_start = False @@ -363,6 +365,12 @@ def main(): help="Check global entries (global variables, metadata, attribute sets, ...) for functions", ) parser.add_argument( + "--check-inst-comments", + action="store_true", + default=False, + help="Check the generated comments describing instructions (e.g., -print-predicate-info/print<memssa>)", + ) + parser.add_argument( "--reset-variable-names", action="store_true", help="Reset all variable names to correspond closely to the variable names in IR. " |
