forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a different branch #26
Closed
boomanaiden154
wants to merge
33
commits into
boomanaiden154:main
from
llvm-ml:this-is-a-different-branch
Closed
This is a different branch #26
boomanaiden154
wants to merge
33
commits into
boomanaiden154:main
from
llvm-ml:this-is-a-different-branch
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nd out_value_result. Updating Cxx23Papers.csv too.
…nd adding testing for more iterators
…tion and updating docs.
…t_* tests (proxy iterators is failing currently).
…h to be weakly_incrementable for certain T (which we need to test ranges::iota). test_iterators.h is not formatted because a lot of the code outside of my changes would get reformatted and I don't want to overcomplicate the diff.
… modules are still not working locally
…s::borrowed_iterator_t which was missing from module builds. Not sure why this hasn't caused problems before
…s::begin because the module builds are complaining that it's missing
…checks around out_value_result tests.
…lvm#69766)" This commit relands 4aa12af. This was originally reverted as it caused fetch failures due to the usage of the wrong ref. I didn't catch this in testing as it was attempting to check the branch out from origin, where it didn't exist, but did on my fork as I never tested any cross-repo PRs.
boomanaiden154
force-pushed
the
this-is-a-different-branch
branch
from
November 2, 2023 07:53
c3823e9
to
85fd77a
Compare
boomanaiden154
force-pushed
the
this-is-a-different-branch
branch
from
November 2, 2023 07:56
85fd77a
to
233a3a2
Compare
boomanaiden154
force-pushed
the
this-is-a-different-branch
branch
from
November 2, 2023 20:43
16bba49
to
0ff167b
Compare
You can test this locally with the following command:darker --check --diff -r HEAD~388..HEAD lldb/test/API/functionalities/vtable/TestVTableValue.py mlir/test/python/dialects/gpu/module-to-binary-nvvm.py mlir/test/python/dialects/gpu/module-to-binary-rocdl.py clang-tools-extra/clang-tidy/tool/run-clang-tidy.py libcxx/utils/generate_feature_test_macro_components.py libcxx/utils/libcxx/test/features.py libcxx/utils/libcxx/test/format.py lldb/packages/Python/lldbsuite/test/lldbtest.py lldb/scripts/use_lldb_suite.py lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py lldb/test/API/use_lldb_suite.py llvm/utils/UpdateTestChecks/common.py llvm/utils/lit/lit/util.py llvm/utils/update_analyze_test_checks.py mlir/python/mlir/_mlir_libs/__init__.py mlir/python/mlir/dialects/transform/__init__.py mlir/python/mlir/dialects/transform/loop.py mlir/python/mlir/ir.py mlir/test/python/dialects/python_test.py mlir/test/python/dialects/transform.py mlir/test/python/dialects/transform_loop_ext.py mlir/test/python/ir/operation.py lldb/test/API/commands/register/register/aarch64_sme_z_registers/save_restore/TestSMEZRegistersSaveRestore.py lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/TestZAThreadedDynamic.py mlir/test/python/dialects/gpu/dialect.py View the diff from darker here.--- lldb/test/API/functionalities/vtable/TestVTableValue.py 2023-10-31 00:46:18.000000 +0000
+++ lldb/test/API/functionalities/vtable/TestVTableValue.py 2023-11-04 06:48:16.537280 +0000
@@ -5,10 +5,11 @@
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+
class TestVTableValue(TestBase):
# If your test case doesn't stress debug info, then
# set this to true. That way it won't be run once for
# each debug info format.
@@ -33,11 +34,11 @@
# Verify vtable address
vtable_addr = vtable.GetValueAsUnsigned(0)
expected_addr = self.expected_vtable_addr(shape)
self.assertEquals(vtable_addr, expected_addr)
- for (idx, vtable_entry) in enumerate(vtable.children):
+ for idx, vtable_entry in enumerate(vtable.children):
self.verify_vtable_entry(vtable_entry, vtable_addr, idx)
# Test a shape reference to make sure we get the vtable correctly.
shape = self.frame().FindVariable("shape_ref")
vtable = shape.GetVTable()
@@ -50,13 +51,12 @@
# Verify vtable address
vtable_addr = vtable.GetValueAsUnsigned(0)
expected_addr = self.expected_vtable_addr(shape)
self.assertEquals(vtable_addr, expected_addr)
- for (idx, vtable_entry) in enumerate(vtable.children):
+ for idx, vtable_entry in enumerate(vtable.children):
self.verify_vtable_entry(vtable_entry, vtable_addr, idx)
-
# Test we get the right vtable for the Rectangle instance.
rect = self.frame().FindVariable("rect")
vtable = rect.GetVTable()
self.assertEquals(vtable.GetName(), "vtable for Rectangle")
@@ -69,11 +69,11 @@
# Verify vtable address
vtable_addr = vtable.GetValueAsUnsigned()
expected_addr = self.expected_vtable_addr(rect)
self.assertEquals(vtable_addr, expected_addr)
- for (idx, vtable_entry) in enumerate(vtable.children):
+ for idx, vtable_entry in enumerate(vtable.children):
self.verify_vtable_entry(vtable_entry, vtable_addr, idx)
@skipUnlessPlatform(["linux", "macosx"])
def test_base_class_ptr(self):
self.build()
@@ -86,17 +86,15 @@
shape_ptr = self.frame().FindVariable("shape_ptr")
shape_ptr_vtable = shape_ptr.GetVTable()
self.assertEquals(shape_ptr_vtable.GetName(), "vtable for Rectangle")
self.assertEquals(shape_ptr_vtable.GetNumChildren(), 5)
- self.assertEquals(shape_ptr.GetValueAsUnsigned(0),
- rect.GetLoadAddress())
+ self.assertEquals(shape_ptr.GetValueAsUnsigned(0), rect.GetLoadAddress())
lldbutil.continue_to_source_breakpoint(
self, process, "Shape is Shape", lldb.SBFileSpec("main.cpp")
)
- self.assertEquals(shape_ptr.GetValueAsUnsigned(0),
- shape.GetLoadAddress())
+ self.assertEquals(shape_ptr.GetValueAsUnsigned(0), shape.GetLoadAddress())
self.assertEquals(shape_ptr_vtable.GetNumChildren(), 4)
self.assertEquals(shape_ptr_vtable.GetName(), "vtable for Shape")
@skipUnlessPlatform(["linux", "macosx"])
def test_no_vtable(self):
@@ -104,16 +102,20 @@
lldbutil.run_to_source_breakpoint(
self, "At the end", lldb.SBFileSpec("main.cpp")
)
var = self.frame().FindVariable("not_virtual")
- self.assertEqual(var.GetVTable().GetError().GetCString(),
- 'type "NotVirtual" doesn\'t have a vtable')
+ self.assertEqual(
+ var.GetVTable().GetError().GetCString(),
+ 'type "NotVirtual" doesn\'t have a vtable',
+ )
var = self.frame().FindVariable("argc")
- self.assertEqual(var.GetVTable().GetError().GetCString(),
- 'no language runtime support for the language "c"')
+ self.assertEqual(
+ var.GetVTable().GetError().GetCString(),
+ 'no language runtime support for the language "c"',
+ )
@skipUnlessPlatform(["linux", "macosx"])
def test_overwrite_vtable(self):
self.build()
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
@@ -135,12 +137,11 @@
data = str("\x01\x01\x01\x01\x01\x01\x01\x01")
error = lldb.SBError()
process.WriteMemory(vtable_addr, data, error)
scribbled_child = vtable.GetChildAtIndex(0)
- self.assertEquals(scribbled_child.GetValueAsUnsigned(0),
- 0x0101010101010101)
+ self.assertEquals(scribbled_child.GetValueAsUnsigned(0), 0x0101010101010101)
self.assertEquals(scribbled_child.GetSummary(), None)
def expected_vtable_addr(self, var: lldb.SBValue) -> int:
load_addr = var.GetLoadAddress()
read_from_memory_error = lldb.SBError()
@@ -151,17 +152,19 @@
return vtable_addr
def expected_vtable_entry_func_ptr(self, vtable_addr: int, idx: int):
vtable_entry_addr = vtable_addr + idx * self.process().GetAddressByteSize()
read_func_ptr_error = lldb.SBError()
- func_ptr = self.process().ReadPointerFromMemory(vtable_entry_addr,
- read_func_ptr_error)
+ func_ptr = self.process().ReadPointerFromMemory(
+ vtable_entry_addr, read_func_ptr_error
+ )
self.assertTrue(read_func_ptr_error.Success())
return func_ptr
- def verify_vtable_entry(self, vtable_entry: lldb.SBValue, vtable_addr: int,
- idx: int):
+ def verify_vtable_entry(
+ self, vtable_entry: lldb.SBValue, vtable_addr: int, idx: int
+ ):
"""Verify the vtable entry looks something like:
(double ()) [0] = 0x0000000100003a10 a.out`Rectangle::Area() at main.cpp:14
"""
@@ -176,11 +179,10 @@
sym_ctx = sb_addr.GetSymbolContext(lldb.eSymbolContextEverything)
# Make sure the type is the same as the function type
func_type = sym_ctx.GetFunction().GetType()
if func_type.IsValid():
- self.assertEquals(vtable_entry.GetType(),
- func_type.GetPointerType())
+ self.assertEquals(vtable_entry.GetType(), func_type.GetPointerType())
# The summary should be the address description of the function pointer
summary = vtable_entry.GetSummary()
self.assertEquals(str(sb_addr), summary)
--- llvm/utils/lit/lit/util.py 2023-10-31 20:23:05.000000 +0000
+++ llvm/utils/lit/lit/util.py 2023-11-04 06:48:17.593838 +0000
@@ -439,11 +439,11 @@
def addAIXVersion(target_triple):
"""Add the AIX version to the given target triple,
e.g. powerpc64-ibm-aix7.2.5.6
"""
- os_cmd = "oslevel -s | awk -F\'-\' \'{printf \"%.1f.%d.%d\", $1/1000, $2, $3}\'"
+ os_cmd = "oslevel -s | awk -F'-' '{printf \"%.1f.%d.%d\", $1/1000, $2, $3}'"
os_version = subprocess.run(os_cmd, capture_output=True, shell=True).stdout.decode()
return re.sub("aix", "aix" + os_version, target_triple)
def isMacOSTriple(target_triple):
--- mlir/python/mlir/dialects/transform/__init__.py 2023-10-31 09:36:40.000000 +0000
+++ mlir/python/mlir/dialects/transform/__init__.py 2023-11-04 06:48:17.852313 +0000
@@ -50,32 +50,32 @@
return self.regions[0].blocks[0]
@_ods_cext.register_operation(_Dialect, replace=True)
class GetParentOp(GetParentOp):
- def __init__(
- self,
- result_type: Type,
- target: Union[Operation, Value],
- *,
- isolated_from_above: bool = False,
- op_name: Optional[str] = None,
- deduplicate: bool = False,
- nth_parent: int = 1,
- loc=None,
- ip=None,
- ):
- super().__init__(
- result_type,
- _get_op_result_or_value(target),
- isolated_from_above=isolated_from_above,
- op_name=op_name,
- deduplicate=deduplicate,
- nth_parent=nth_parent,
- loc=loc,
- ip=ip,
- )
+ def __init__(
+ self,
+ result_type: Type,
+ target: Union[Operation, Value],
+ *,
+ isolated_from_above: bool = False,
+ op_name: Optional[str] = None,
+ deduplicate: bool = False,
+ nth_parent: int = 1,
+ loc=None,
+ ip=None,
+ ):
+ super().__init__(
+ result_type,
+ _get_op_result_or_value(target),
+ isolated_from_above=isolated_from_above,
+ op_name=op_name,
+ deduplicate=deduplicate,
+ nth_parent=nth_parent,
+ loc=loc,
+ ip=ip,
+ )
@_ods_cext.register_operation(_Dialect, replace=True)
class MergeHandlesOp(MergeHandlesOp):
def __init__(
--- mlir/test/python/dialects/transform.py 2023-10-31 09:36:40.000000 +0000
+++ mlir/test/python/dialects/transform.py 2023-11-04 06:48:18.312362 +0000
@@ -155,25 +155,25 @@
# CHECK: }
@run
def testGetParentOp():
- sequence = transform.SequenceOp(
- transform.FailurePropagationMode.Propagate, [], transform.AnyOpType.get()
- )
- with InsertionPoint(sequence.body):
- transform.GetParentOp(
- transform.AnyOpType.get(),
- sequence.bodyTarget,
- isolated_from_above=True,
- nth_parent=2,
- )
- transform.YieldOp()
- # CHECK-LABEL: TEST: testGetParentOp
- # CHECK: transform.sequence
- # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
- # CHECK: = get_parent_op %[[ARG1]] {isolated_from_above, nth_parent = 2 : i64}
+ sequence = transform.SequenceOp(
+ transform.FailurePropagationMode.Propagate, [], transform.AnyOpType.get()
+ )
+ with InsertionPoint(sequence.body):
+ transform.GetParentOp(
+ transform.AnyOpType.get(),
+ sequence.bodyTarget,
+ isolated_from_above=True,
+ nth_parent=2,
+ )
+ transform.YieldOp()
+ # CHECK-LABEL: TEST: testGetParentOp
+ # CHECK: transform.sequence
+ # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
+ # CHECK: = get_parent_op %[[ARG1]] {isolated_from_above, nth_parent = 2 : i64}
@run
def testMergeHandlesOp():
sequence = transform.SequenceOp(
--- mlir/test/python/dialects/transform_loop_ext.py 2023-10-31 09:36:40.000000 +0000
+++ mlir/test/python/dialects/transform_loop_ext.py 2023-11-04 06:48:18.371431 +0000
@@ -42,11 +42,13 @@
transform.FailurePropagationMode.Propagate,
[],
transform.OperationType.get("scf.for"),
)
with InsertionPoint(sequence.body):
- loop.LoopPeelOp(transform.AnyOpType.get(), transform.AnyOpType.get(), sequence.bodyTarget)
+ loop.LoopPeelOp(
+ transform.AnyOpType.get(), transform.AnyOpType.get(), sequence.bodyTarget
+ )
transform.YieldOp()
# CHECK-LABEL: TEST: loopPeel
# CHECK: = transform.loop.peel %
|
You can test this locally with the following command:git-clang-format --diff HEAD~388 HEAD -- clang/lib/Headers/lasxintrin.h clang/lib/Headers/lsxintrin.h clang/test/Analysis/issue-70464.cpp clang/test/CodeGen/LoongArch/abi-lp64d-empty-unions.c clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c clang/test/CodeGen/LoongArch/lasx/builtin-alias.c clang/test/CodeGen/LoongArch/lasx/builtin-error.c clang/test/CodeGen/LoongArch/lasx/builtin.c clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c clang/test/CodeGen/LoongArch/lsx/builtin-alias.c clang/test/CodeGen/LoongArch/lsx/builtin-error.c clang/test/CodeGen/LoongArch/lsx/builtin.c clang/test/Driver/check-time-trace-ParseDeclarationOrFunctionDefinition.cpp clang/test/Driver/loongarch-mlasx-error.c clang/test/Driver/loongarch-mlasx.c clang/test/Driver/loongarch-mlsx-error.c clang/test/Driver/loongarch-mlsx.c clang/test/SemaCXX/cxx2a-explicit-bool-deferred.cpp clang/test/SemaCXX/warn-unused-parameters-coroutine.cpp libcxx/include/__algorithm/out_value_result.h libcxx/include/__numeric/ranges_iota.h libcxx/test/libcxx/selftest/convenience_substitutions/verify.sh.cpp libcxx/test/std/algorithms/algorithms.results/out_value_result.pass.cpp libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp libcxx/test/std/numerics/numeric.ops/numeric.iota/ranges.iota.pass.cpp lldb/include/lldb/Core/ValueObjectVTable.h lldb/source/Core/ValueObjectVTable.cpp lldb/test/API/functionalities/vtable/main.cpp llvm/include/llvm/Transforms/Utils/LoopConstrainer.h llvm/lib/Transforms/Utils/LoopConstrainer.cpp llvm/test/tools/llvm-symbolizer/Inputs/symbols.h llvm/test/tools/llvm-symbolizer/Inputs/symbols.part1.cpp llvm/test/tools/llvm-symbolizer/Inputs/symbols.part2.cpp llvm/test/tools/llvm-symbolizer/Inputs/symbols.part3.c llvm/test/tools/llvm-symbolizer/Inputs/symbols.part4.c llvm/unittests/Target/TargetMachineOptionsTest.cpp mlir/include/mlir/Dialect/Vector/Transforms/SubsetOpInterfaceImpl.h mlir/include/mlir/Interfaces/SubsetOpInterface.h mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp mlir/lib/Dialect/Vector/Transforms/SubsetOpInterfaceImpl.cpp mlir/lib/Interfaces/SubsetOpInterface.cpp openmp/libomptarget/test/offloading/ctor_dtor.cpp openmp/libomptarget/test/offloading/generic_multiple_parallel_regions.c openmp/libomptarget/test/offloading/parallel_target_teams_reduction.cpp openmp/libomptarget/test/offloading/small_trip_count_thread_limit.cpp clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp clang-tools-extra/clangd/Hover.cpp clang-tools-extra/modularize/Modularize.cpp clang-tools-extra/modularize/ModularizeUtilities.cpp clang-tools-extra/pseudo/lib/Lex.cpp clang-tools-extra/test/clang-tidy/checkers/modernize/use-trailing-return-type-cxx20.cpp clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Attr.h clang/include/clang/AST/Decl.h clang/include/clang/AST/DeclBase.h clang/include/clang/AST/DeclCXX.h clang/include/clang/AST/DeclObjC.h clang/include/clang/AST/DeclOpenMP.h clang/include/clang/AST/Type.h clang/include/clang/AST/TypeLoc.h clang/include/clang/Basic/TargetInfo.h clang/include/clang/Driver/Distro.h clang/include/clang/Lex/Lexer.h clang/include/clang/Parse/Parser.h clang/include/clang/Sema/Sema.h clang/lib/ARCMigrate/ObjCMT.cpp clang/lib/AST/ASTContext.cpp clang/lib/AST/ASTImporter.cpp clang/lib/AST/ASTStructuralEquivalence.cpp clang/lib/AST/Decl.cpp clang/lib/AST/DeclBase.cpp clang/lib/AST/DeclCXX.cpp clang/lib/AST/DeclObjC.cpp clang/lib/AST/DeclOpenMP.cpp clang/lib/AST/DeclPrinter.cpp clang/lib/AST/ExprConstant.cpp clang/lib/AST/Interp/Floating.h clang/lib/AST/Interp/InterpBuiltin.cpp clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/JSONNodeDumper.cpp clang/lib/AST/ODRDiagsEmitter.cpp clang/lib/AST/ODRHash.cpp clang/lib/AST/QualTypeNames.cpp clang/lib/AST/ScanfFormatString.cpp clang/lib/AST/TextNodeDumper.cpp clang/lib/AST/Type.cpp clang/lib/AST/TypePrinter.cpp clang/lib/Basic/Module.cpp clang/lib/Basic/Targets/LoongArch.cpp clang/lib/Basic/Targets/LoongArch.h clang/lib/CodeGen/CGAtomic.cpp clang/lib/CodeGen/CGBlocks.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGExprConstant.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/CodeGen/CGObjC.cpp clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.h clang/lib/CodeGen/CGStmtOpenMP.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenPGO.cpp clang/lib/CodeGen/CoverageMappingGen.cpp clang/lib/CodeGen/ItaniumCXXABI.cpp clang/lib/CodeGen/Targets/AArch64.cpp clang/lib/CodeGen/Targets/LoongArch.cpp clang/lib/CodeGen/Targets/RISCV.cpp clang/lib/CodeGen/Targets/XCore.cpp clang/lib/Driver/Distro.cpp clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Arch/LoongArch.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/DragonFly.cpp clang/lib/Driver/ToolChains/FreeBSD.cpp clang/lib/Driver/ToolChains/Haiku.cpp clang/lib/Driver/ToolChains/NetBSD.cpp clang/lib/Driver/ToolChains/OpenBSD.cpp clang/lib/Driver/ToolChains/Solaris.cpp clang/lib/ExtractAPI/DeclarationFragments.cpp clang/lib/Format/TokenAnnotator.cpp clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp clang/lib/Frontend/Rewrite/RewriteObjC.cpp clang/lib/Index/USRGeneration.cpp clang/lib/Lex/DependencyDirectivesScanner.cpp clang/lib/Lex/Lexer.cpp clang/lib/Parse/Parser.cpp clang/lib/Sema/HLSLExternalSemaSource.cpp clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaCXXScopeSpec.cpp clang/lib/Sema/SemaCast.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaCoroutine.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaDeclObjC.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaExprObjC.cpp clang/lib/Sema/SemaInit.cpp clang/lib/Sema/SemaModule.cpp clang/lib/Sema/SemaObjCProperty.cpp clang/lib/Sema/SemaOpenMP.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaPseudoObject.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/SemaTemplateInstantiate.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/SemaType.cpp clang/lib/Sema/TreeTransform.h clang/lib/Serialization/ASTReaderDecl.cpp clang/lib/Serialization/ASTWriter.cpp clang/lib/Serialization/ASTWriterDecl.cpp clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp clang/test/AST/Interp/builtin-functions.cpp clang/test/CodeGen/LoongArch/abi-lp64d-empty-structs.c clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/vcreate.c clang/test/CodeGen/arm64_32-vaarg.c clang/test/CodeGen/builtins.c clang/test/CodeGen/memtag-globals-asm.cpp clang/test/OpenMP/amdgcn_target_codegen.cpp clang/test/OpenMP/amdgcn_target_device_vla.cpp clang/test/OpenMP/amdgcn_target_init_temp_alloca.cpp clang/test/OpenMP/amdgpu_target_with_aligned_attribute.c clang/test/OpenMP/assumes_include_nvptx.cpp clang/test/OpenMP/bug60602.cpp clang/test/OpenMP/declare_target_codegen.cpp clang/test/OpenMP/declare_target_codegen_globalization.cpp clang/test/OpenMP/declare_target_link_codegen.cpp clang/test/OpenMP/declare_variant_mixed_codegen.c clang/test/OpenMP/distribute_codegen.cpp clang/test/OpenMP/distribute_firstprivate_codegen.cpp clang/test/OpenMP/distribute_lastprivate_codegen.cpp clang/test/OpenMP/distribute_parallel_for_codegen.cpp clang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp clang/test/OpenMP/distribute_parallel_for_if_codegen.cpp clang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp clang/test/OpenMP/distribute_parallel_for_private_codegen.cpp clang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp clang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp clang/test/OpenMP/distribute_private_codegen.cpp clang/test/OpenMP/distribute_simd_codegen.cpp clang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp clang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp clang/test/OpenMP/distribute_simd_private_codegen.cpp clang/test/OpenMP/distribute_simd_reduction_codegen.cpp clang/test/OpenMP/nvptx_SPMD_codegen.cpp clang/test/OpenMP/nvptx_data_sharing.cpp clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp clang/test/OpenMP/nvptx_lambda_capturing.cpp clang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp clang/test/OpenMP/nvptx_nested_parallel_codegen.cpp clang/test/OpenMP/nvptx_parallel_codegen.cpp clang/test/OpenMP/nvptx_parallel_for_codegen.cpp clang/test/OpenMP/nvptx_target_codegen.cpp clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_proc_bind_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_reduction_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp clang/test/OpenMP/nvptx_target_printf_codegen.c clang/test/OpenMP/nvptx_target_simd_codegen.cpp clang/test/OpenMP/nvptx_target_teams_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_simd_codegen.cpp clang/test/OpenMP/nvptx_target_teams_generic_loop_codegen.cpp clang/test/OpenMP/nvptx_target_teams_generic_loop_generic_mode_codegen.cpp clang/test/OpenMP/nvptx_target_teams_ompx_bare_codegen.cpp clang/test/OpenMP/nvptx_teams_codegen.cpp clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp clang/test/OpenMP/ompx_attributes_codegen.cpp clang/test/OpenMP/openmp_offload_codegen.cpp clang/test/OpenMP/reduction_implicit_map.cpp clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c clang/test/OpenMP/remarks_parallel_in_target_state_machine.c clang/test/OpenMP/target_codegen_global_capture.cpp clang/test/OpenMP/target_firstprivate_codegen.cpp clang/test/OpenMP/target_map_codegen_03.cpp clang/test/OpenMP/target_map_member_expr_codegen.cpp clang/test/OpenMP/target_ompx_dyn_cgroup_mem_codegen.cpp clang/test/OpenMP/target_parallel_codegen.cpp clang/test/OpenMP/target_parallel_debug_codegen.cpp clang/test/OpenMP/target_parallel_for_codegen.cpp clang/test/OpenMP/target_parallel_for_debug_codegen.cpp clang/test/OpenMP/target_parallel_for_simd_codegen.cpp clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp clang/test/OpenMP/target_parallel_for_tl_codegen.cpp clang/test/OpenMP/target_parallel_generic_loop_codegen-1.cpp clang/test/OpenMP/target_parallel_generic_loop_codegen-2.cpp clang/test/OpenMP/target_parallel_generic_loop_codegen-3.cpp clang/test/OpenMP/target_parallel_generic_loop_codegen.cpp clang/test/OpenMP/target_parallel_generic_loop_depend_codegen.cpp clang/test/OpenMP/target_parallel_generic_loop_tl_codegen.cpp clang/test/OpenMP/target_parallel_generic_loop_uses_allocators_codegen.cpp clang/test/OpenMP/target_parallel_if_codegen.cpp clang/test/OpenMP/target_parallel_num_threads_codegen.cpp clang/test/OpenMP/target_parallel_tl_codegen.cpp clang/test/OpenMP/target_private_codegen.cpp clang/test/OpenMP/target_reduction_codegen.cpp clang/test/OpenMP/target_simd_tl_codegen.cpp clang/test/OpenMP/target_task_affinity_codegen.cpp clang/test/OpenMP/target_teams_codegen.cpp clang/test/OpenMP/target_teams_distribute_codegen.cpp clang/test/OpenMP/target_teams_distribute_collapse_codegen.cpp clang/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_codegen-1.cpp clang/test/OpenMP/target_teams_generic_loop_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_collapse_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_depend_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_if_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_order_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_private_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_reduction_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_uses_allocators_codegen.cpp clang/test/OpenMP/target_teams_map_codegen.cpp clang/test/OpenMP/target_teams_num_teams_codegen.cpp clang/test/OpenMP/target_teams_thread_limit_codegen.cpp clang/test/OpenMP/teams_codegen.cpp clang/test/Preprocessor/init-loongarch.c clang/test/Sema/constant-builtins-2.c clang/test/SemaTemplate/nested-deduction-guides.cpp clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp clang/tools/libclang/CIndex.cpp clang/unittests/AST/ASTImporterTest.cpp clang/unittests/Analysis/FlowSensitive/SolverTest.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.h clang/unittests/Format/TokenAnnotatorTest.cpp clang/unittests/Sema/SemaNoloadLookupTest.cpp clang/unittests/Serialization/SourceLocationEncodingTest.cpp clang/unittests/Support/TimeProfilerTest.cpp clang/utils/TableGen/ClangAttrEmitter.cpp compiler-rt/include/sanitizer/allocator_interface.h compiler-rt/include/sanitizer/asan_interface.h compiler-rt/include/sanitizer/common_interface_defs.h compiler-rt/include/sanitizer/coverage_interface.h compiler-rt/include/sanitizer/dfsan_interface.h compiler-rt/include/sanitizer/hwasan_interface.h compiler-rt/include/sanitizer/lsan_interface.h compiler-rt/include/sanitizer/memprof_interface.h compiler-rt/include/sanitizer/msan_interface.h compiler-rt/include/sanitizer/scudo_interface.h compiler-rt/include/sanitizer/tsan_interface.h compiler-rt/include/sanitizer/tsan_interface_atomic.h compiler-rt/include/sanitizer/ubsan_interface.h compiler-rt/lib/profile/InstrProfiling.c compiler-rt/lib/profile/InstrProfiling.h compiler-rt/lib/profile/InstrProfilingBuffer.c compiler-rt/lib/profile/InstrProfilingMerge.c compiler-rt/lib/profile/InstrProfilingWriter.c compiler-rt/test/builtins/Unit/compiler_rt_scalbn_test.c compiler-rt/test/builtins/Unit/compiler_rt_scalbnf_test.c compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c flang/include/flang/Evaluate/constant.h flang/include/flang/Evaluate/expression.h flang/include/flang/Evaluate/traverse.h flang/include/flang/Evaluate/type.h flang/include/flang/Parser/message.h flang/lib/Evaluate/characteristics.cpp flang/lib/Evaluate/formatting.cpp flang/lib/Evaluate/initial-image.cpp flang/lib/Evaluate/intrinsics.cpp flang/lib/Evaluate/type.cpp flang/lib/Lower/DirectivesCommon.h flang/lib/Lower/OpenACC.cpp flang/lib/Lower/PFTBuilder.cpp flang/lib/Optimizer/CodeGen/CodeGen.cpp flang/lib/Optimizer/Dialect/FIRType.cpp flang/lib/Parser/prescan.cpp flang/lib/Parser/prescan.h flang/lib/Parser/token-sequence.cpp flang/lib/Parser/token-sequence.h flang/lib/Semantics/check-acc-structure.cpp flang/lib/Semantics/check-acc-structure.h flang/lib/Semantics/check-declarations.cpp flang/lib/Semantics/mod-file.cpp flang/lib/Semantics/mod-file.h flang/lib/Semantics/resolve-directives.cpp flang/lib/Semantics/resolve-names.cpp flang/runtime/io-stmt.cpp flang/runtime/unit.cpp flang/runtime/unit.h flang/unittests/Optimizer/FIRTypesTest.cpp libc/src/__support/integer_to_string.h libc/src/stdio/printf_core/float_dec_converter.h libc/src/stdio/printf_core/writer.h libc/test/src/stdio/sprintf_test.cpp libc/utils/gpu/loader/amdgpu/Loader.cpp libcxx/include/__algorithm/ranges_clamp.h libcxx/include/__exception/operations.h libcxx/include/__utility/small_buffer.h libcxx/include/experimental/__simd/simd.h libcxx/include/experimental/__simd/simd_mask.h libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_notify_all.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/implicit_ctad.pass.cpp libunwind/test/signal_frame.pass.cpp lld/COFF/Chunks.h lld/COFF/DLL.cpp lld/COFF/Writer.cpp lld/ELF/LinkerScript.cpp lldb/include/lldb/API/SBValue.h lldb/include/lldb/Core/ValueObject.h lldb/include/lldb/Core/ValueObjectChild.h lldb/include/lldb/Interpreter/CommandObject.h lldb/include/lldb/Symbol/Type.h lldb/include/lldb/Symbol/TypeSystem.h lldb/include/lldb/Target/LanguageRuntime.h lldb/include/lldb/lldb-enumerations.h lldb/source/API/SBCommandInterpreter.cpp lldb/source/API/SBValue.cpp lldb/source/Commands/CommandObjectApropos.cpp lldb/source/Commands/CommandObjectApropos.h lldb/source/Commands/CommandObjectBreakpoint.cpp lldb/source/Commands/CommandObjectBreakpointCommand.cpp lldb/source/Commands/CommandObjectCommands.cpp lldb/source/Commands/CommandObjectDWIMPrint.cpp lldb/source/Commands/CommandObjectDWIMPrint.h lldb/source/Commands/CommandObjectDiagnostics.cpp lldb/source/Commands/CommandObjectDisassemble.cpp lldb/source/Commands/CommandObjectDisassemble.h lldb/source/Commands/CommandObjectExpression.cpp lldb/source/Commands/CommandObjectExpression.h lldb/source/Commands/CommandObjectFrame.cpp lldb/source/Commands/CommandObjectGUI.cpp lldb/source/Commands/CommandObjectGUI.h lldb/source/Commands/CommandObjectHelp.cpp lldb/source/Commands/CommandObjectHelp.h lldb/source/Commands/CommandObjectLanguage.h lldb/source/Commands/CommandObjectLog.cpp lldb/source/Commands/CommandObjectMemory.cpp lldb/source/Commands/CommandObjectMemoryTag.cpp lldb/source/Commands/CommandObjectPlatform.cpp lldb/source/Commands/CommandObjectPlugin.cpp lldb/source/Commands/CommandObjectProcess.cpp lldb/source/Commands/CommandObjectQuit.cpp lldb/source/Commands/CommandObjectQuit.h lldb/source/Commands/CommandObjectRegexCommand.cpp lldb/source/Commands/CommandObjectRegexCommand.h lldb/source/Commands/CommandObjectRegister.cpp lldb/source/Commands/CommandObjectScript.cpp lldb/source/Commands/CommandObjectScript.h lldb/source/Commands/CommandObjectSession.cpp lldb/source/Commands/CommandObjectSettings.cpp lldb/source/Commands/CommandObjectSource.cpp lldb/source/Commands/CommandObjectStats.cpp lldb/source/Commands/CommandObjectTarget.cpp lldb/source/Commands/CommandObjectThread.cpp lldb/source/Commands/CommandObjectThreadUtil.cpp lldb/source/Commands/CommandObjectThreadUtil.h lldb/source/Commands/CommandObjectTrace.cpp lldb/source/Commands/CommandObjectType.cpp lldb/source/Commands/CommandObjectVersion.cpp lldb/source/Commands/CommandObjectVersion.h lldb/source/Commands/CommandObjectWatchpoint.cpp lldb/source/Commands/CommandObjectWatchpointCommand.cpp lldb/source/Core/ValueObject.cpp lldb/source/DataFormatters/CXXFunctionPointer.cpp lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.cpp lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h lldb/source/Plugins/Process/elf-core/RegisterUtilities.h lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.h lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h lldb/source/Symbol/Symtab.cpp lldb/source/Symbol/Type.cpp lldb/unittests/Interpreter/TestCommandPaths.cpp llvm/bindings/ocaml/target/target_ocaml.c llvm/include/llvm-c/TargetMachine.h llvm/include/llvm/ADT/BitmaskEnum.h llvm/include/llvm/ADT/FoldingSet.h llvm/include/llvm/Analysis/AliasAnalysis.h llvm/include/llvm/Analysis/ConstantFolding.h llvm/include/llvm/Analysis/InlineCost.h llvm/include/llvm/Analysis/TargetTransformInfo.h llvm/include/llvm/Analysis/TargetTransformInfoImpl.h llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/CodeGen/CommandFlags.h llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h llvm/include/llvm/CodeGen/LiveVariables.h llvm/include/llvm/CodeGen/MachineInstr.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/CodeGen/TargetRegisterInfo.h llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h llvm/include/llvm/IR/Instruction.h llvm/include/llvm/IR/Value.h llvm/include/llvm/ProfileData/InstrProf.h llvm/include/llvm/ProfileData/InstrProfCorrelator.h llvm/include/llvm/ProfileData/InstrProfReader.h llvm/include/llvm/Support/SwapByteOrder.h llvm/include/llvm/TableGen/Record.h llvm/include/llvm/TargetParser/AArch64TargetParser.h llvm/include/llvm/TargetParser/SubtargetFeature.h llvm/include/llvm/Transforms/IPO/Attributor.h llvm/lib/Analysis/AliasAnalysis.cpp llvm/lib/Analysis/ConstantFolding.cpp llvm/lib/Analysis/InlineCost.cpp llvm/lib/Analysis/InstructionSimplify.cpp llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/Analysis/TargetTransformInfo.cpp llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp llvm/lib/CodeGen/GlobalISel/Legalizer.cpp llvm/lib/CodeGen/LiveVariables.cpp llvm/lib/CodeGen/MachineInstr.cpp llvm/lib/CodeGen/RegisterCoalescer.cpp llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/CodeGen/TargetLoweringBase.cpp llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp llvm/lib/DebugInfo/Symbolize/Symbolize.cpp llvm/lib/ExecutionEngine/JITLink/ELF_aarch32.cpp llvm/lib/ExecutionEngine/JITLink/ELF_ppc64.cpp llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp llvm/lib/IR/Attributes.cpp llvm/lib/IR/ConstantFold.cpp llvm/lib/IR/Metadata.cpp llvm/lib/IR/Verifier.cpp llvm/lib/ProfileData/InstrProf.cpp llvm/lib/ProfileData/InstrProfCorrelator.cpp llvm/lib/ProfileData/InstrProfReader.cpp llvm/lib/Target/AArch64/AArch64GlobalsTagging.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.h llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp llvm/lib/Target/AMDGPU/AMDGPU.h llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.cpp llvm/lib/Target/AMDGPU/GCNRegPressure.h llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp llvm/lib/Target/AMDGPU/SIISelLowering.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp llvm/lib/Target/ARM/ARMInstrInfo.cpp llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp llvm/lib/Target/DirectX/DXILResource.cpp llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/RISCV/RISCVISelLowering.h llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp llvm/lib/Target/RISCV/RISCVSubtarget.h llvm/lib/Target/SystemZ/SystemZISelLowering.cpp llvm/lib/Target/SystemZ/SystemZISelLowering.h llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp llvm/lib/Target/TargetMachine.cpp llvm/lib/Target/TargetMachineC.cpp llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp llvm/lib/Target/X86/AsmParser/X86Operand.h llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Target/X86/X86RegisterInfo.cpp llvm/lib/Target/X86/X86RegisterInfo.h llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp llvm/lib/Transforms/IPO/AttributorAttributes.cpp llvm/lib/Transforms/IPO/FunctionAttrs.cpp llvm/lib/Transforms/IPO/OpenMPOpt.cpp llvm/lib/Transforms/IPO/PartialInlining.cpp llvm/lib/Transforms/IPO/SampleProfileProbe.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp llvm/lib/Transforms/Instrumentation/MemProfiler.cpp llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp llvm/lib/Transforms/Scalar/JumpThreading.cpp llvm/lib/Transforms/Scalar/LICM.cpp llvm/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp llvm/lib/Transforms/Utils/CloneModule.cpp llvm/lib/Transforms/Utils/CodeExtractor.cpp llvm/lib/Transforms/Utils/LoopPeel.cpp llvm/lib/Transforms/Utils/SCCPSolver.cpp llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp llvm/lib/Transforms/Utils/SimplifyCFG.cpp llvm/lib/Transforms/Utils/SimplifyIndVar.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/lib/Transforms/Vectorize/VectorCombine.cpp llvm/tools/llvm-profdata/llvm-profdata.cpp llvm/tools/llvm-reduce/ReducerWorkItem.cpp llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp llvm/unittests/CodeGen/MachineInstrTest.cpp llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp llvm/unittests/ExecutionEngine/JITLink/StubsTests.cpp llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp llvm/unittests/ProfileData/MemProfTest.cpp llvm/unittests/TargetParser/TargetParserTest.cpp llvm/utils/TableGen/CodeGenRegisters.cpp llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp llvm/utils/TableGen/GlobalISelMatchTable.cpp llvm/utils/TableGen/GlobalISelMatchTable.h mlir/include/mlir/Analysis/SliceAnalysis.h mlir/include/mlir/Bytecode/BytecodeImplementation.h mlir/include/mlir/Bytecode/BytecodeWriter.h mlir/include/mlir/Conversion/LLVMCommon/MemRefBuilder.h mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h mlir/include/mlir/Dialect/LLVMIR/FunctionCallUtils.h mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h mlir/include/mlir/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.h mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h mlir/include/mlir/Dialect/OpenACC/OpenACC.h mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h mlir/include/mlir/Dialect/Tensor/Transforms/SubsetInsertionOpInterfaceImpl.h mlir/include/mlir/Dialect/Transform/Transforms/Passes.h mlir/include/mlir/IR/OpDefinition.h mlir/include/mlir/InitAllDialects.h mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h mlir/include/mlir/Transforms/LoopInvariantCodeMotionUtils.h mlir/include/mlir/Transforms/Passes.h mlir/lib/Analysis/Presburger/IntegerRelation.cpp mlir/lib/Analysis/Presburger/LinearTransform.cpp mlir/lib/Analysis/Presburger/MPInt.cpp mlir/lib/Analysis/Presburger/Matrix.cpp mlir/lib/Analysis/Presburger/PWMAFunction.cpp mlir/lib/Analysis/Presburger/PresburgerRelation.cpp mlir/lib/Analysis/Presburger/PresburgerSpace.cpp mlir/lib/Analysis/Presburger/Simplex.cpp mlir/lib/Analysis/Presburger/SlowMPInt.cpp mlir/lib/Analysis/Presburger/Utils.cpp mlir/lib/Analysis/SliceAnalysis.cpp mlir/lib/Bindings/Python/IRModule.cpp mlir/lib/Bindings/Python/RegisterEverything.cpp mlir/lib/Bytecode/Writer/BytecodeWriter.cpp mlir/lib/Bytecode/Writer/IRNumbering.cpp mlir/lib/Conversion/ArmSMEToSCF/ArmSMEToSCF.cpp mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRVPass.cpp mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp mlir/lib/Conversion/MemRefToLLVM/AllocLikeConversion.cpp mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp mlir/lib/Dialect/ArmSME/Transforms/LegalizeForLLVMExport.cpp mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp mlir/lib/Dialect/Bufferization/Transforms/EmptyTensorElimination.cpp mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp mlir/lib/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation.cpp mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp mlir/lib/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.cpp mlir/lib/Dialect/MemRef/Transforms/ResolveShapedTypeResultDims.cpp mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp mlir/lib/Dialect/SCF/IR/SCF.cpp mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.h mlir/lib/Dialect/SparseTensor/IR/Detail/TemplateExtras.h mlir/lib/Dialect/SparseTensor/IR/Detail/Var.h mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparsificationAndBufferizationPass.cpp mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp mlir/lib/Dialect/Tensor/Transforms/SubsetInsertionOpInterfaceImpl.cpp mlir/lib/Dialect/Transform/IR/TransformOps.cpp mlir/lib/Dialect/Vector/IR/VectorOps.cpp mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp mlir/lib/Interfaces/LoopLikeInterface.cpp mlir/lib/Interfaces/ValueBoundsOpInterface.cpp mlir/lib/Target/LLVMIR/DebugImporter.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp mlir/lib/Transforms/LoopInvariantCodeMotion.cpp mlir/lib/Transforms/Utils/LoopInvariantCodeMotionUtils.cpp mlir/test/lib/Dialect/Test/TestDialect.cpp mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp mlir/tools/mlir-opt/mlir-opt.cpp mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp openmp/libomptarget/DeviceRTL/include/Interface.h openmp/libomptarget/DeviceRTL/include/State.h openmp/libomptarget/DeviceRTL/src/Kernel.cpp openmp/libomptarget/DeviceRTL/src/Reduction.cpp openmp/libomptarget/DeviceRTL/src/State.cpp openmp/libomptarget/include/Environment.h openmp/libomptarget/include/omptarget.h openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h openmp/libomptarget/test/offloading/malloc_parallel.c lldb/test/API/commands/register/register/aarch64_sme_z_registers/save_restore/main.c lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/main.c mlir/test/lib/IR/TestBytecodeRoundtrip.cpp View the diff from clang-format here.diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 261a56c4b..0fe379e49 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -443,7 +443,9 @@ public:
NullOut = true;
}
- struct WithTemplateDepthOffset { unsigned Offset; };
+ struct WithTemplateDepthOffset {
+ unsigned Offset;
+ };
CXXNameMangler(ItaniumMangleContextImpl &C, raw_ostream &Out,
WithTemplateDepthOffset Offset)
: CXXNameMangler(C, Out) {
@@ -4476,15 +4478,14 @@ void CXXNameMangler::mangleRequirement(SourceLocation RequiresExprLoc,
// TODO: We can't mangle the result of a failed substitution. It's not clear
// whether we should be mangling the original form prior to any substitution
// instead. See https://lists.isocpp.org/core/2023/04/14118.php
- auto HandleSubstitutionFailure =
- [&](SourceLocation Loc) {
- DiagnosticsEngine &Diags = Context.getDiags();
- unsigned DiagID = Diags.getCustomDiagID(
- DiagnosticsEngine::Error, "cannot mangle this requires-expression "
- "containing a substitution failure");
- Diags.Report(Loc, DiagID);
- Out << 'F';
- };
+ auto HandleSubstitutionFailure = [&](SourceLocation Loc) {
+ DiagnosticsEngine &Diags = Context.getDiags();
+ unsigned DiagID = Diags.getCustomDiagID(
+ DiagnosticsEngine::Error, "cannot mangle this requires-expression "
+ "containing a substitution failure");
+ Diags.Report(Loc, DiagID);
+ Out << 'F';
+ };
switch (Req->getKind()) {
case Requirement::RK_Type: {
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 98a4f12c4..68ec5ec58 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -3400,7 +3400,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) {
case CC_SwiftAsync: return "swiftasynccall";
case CC_PreserveMost: return "preserve_most";
case CC_PreserveAll: return "preserve_all";
- case CC_M68kRTD: return "m68k_rtd";
+ case CC_M68kRTD:
+ return "m68k_rtd";
}
llvm_unreachable("Invalid calling convention.");
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 230a6c3db..c604cf1ea 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -72,7 +72,8 @@ unsigned CodeGenTypes::ClangCallConvToLLVMCallConv(CallingConv CC) {
case CC_PreserveAll: return llvm::CallingConv::PreserveAll;
case CC_Swift: return llvm::CallingConv::Swift;
case CC_SwiftAsync: return llvm::CallingConv::SwiftTail;
- case CC_M68kRTD: return llvm::CallingConv::M68k_RTD;
+ case CC_M68kRTD:
+ return llvm::CallingConv::M68k_RTD;
}
}
@@ -3450,7 +3451,7 @@ static llvm::Value *tryRemoveRetainOfSelf(CodeGenFunction &CGF,
// Look for a retain call.
llvm::CallInst *retainCall =
- dyn_cast<llvm::CallInst>(result->stripPointerCasts());
+ dyn_cast<llvm::CallInst>(result->stripPointerCasts());
if (!retainCall || retainCall->getCalledOperand() !=
CGF.CGM.getObjCEntrypoints().objc_retain)
return nullptr;
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index cc81a68b1..e7081e055 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3534,7 +3534,7 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject(
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
Emitter.finalize(GV);
- return ConstantAddress(GV, GV->getValueType(), Alignment);
+ return ConstantAddress(GV, GV->getValueType(), Alignment);
}
ConstantAddress CodeGenModule::GetWeakRefReference(const ValueDecl *VD) {
@@ -3594,8 +3594,7 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
!Global->hasAttr<CUDASharedAttr>() &&
!Global->getType()->isCUDADeviceBuiltinSurfaceType() &&
!Global->getType()->isCUDADeviceBuiltinTextureType() &&
- !(LangOpts.HIPStdPar &&
- isa<FunctionDecl>(Global) &&
+ !(LangOpts.HIPStdPar && isa<FunctionDecl>(Global) &&
!Global->hasAttr<CUDAHostAttr>()))
return;
} else {
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 7d6c69f22..55c2efeff 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -961,8 +961,7 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S,
unsigned Counter = (*RegionCounterMap)[S];
- llvm::Value *Args[] = {FuncNameVar,
- Builder.getInt64(FunctionHash),
+ llvm::Value *Args[] = {FuncNameVar, Builder.getInt64(FunctionHash),
Builder.getInt32(NumRegionCounters),
Builder.getInt32(Counter), StepV};
if (!StepV)
@@ -999,12 +998,10 @@ void CodeGenPGO::valueProfile(CGBuilderTy &Builder, uint32_t ValueKind,
auto BuilderInsertPoint = Builder.saveIP();
Builder.SetInsertPoint(ValueSite);
llvm::Value *Args[5] = {
- FuncNameVar,
- Builder.getInt64(FunctionHash),
+ FuncNameVar, Builder.getInt64(FunctionHash),
Builder.CreatePtrToInt(ValuePtr, Builder.getInt64Ty()),
Builder.getInt32(ValueKind),
- Builder.getInt32(NumValueSites[ValueKind]++)
- };
+ Builder.getInt32(NumValueSites[ValueKind]++)};
Builder.CreateCall(
CGM.getIntrinsic(llvm::Intrinsic::instrprof_value_profile), Args);
Builder.restoreIP(BuilderInsertPoint);
diff --git a/clang/lib/Driver/ToolChains/DragonFly.cpp b/clang/lib/Driver/ToolChains/DragonFly.cpp
index cced977bf..c41598261 100644
--- a/clang/lib/Driver/ToolChains/DragonFly.cpp
+++ b/clang/lib/Driver/ToolChains/DragonFly.cpp
@@ -164,8 +164,8 @@ void dragonfly::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lc");
if (Static || Args.hasArg(options::OPT_static_libgcc)) {
- CmdArgs.push_back("-lgcc");
- CmdArgs.push_back("-lgcc_eh");
+ CmdArgs.push_back("-lgcc");
+ CmdArgs.push_back("-lgcc_eh");
} else {
if (Args.hasArg(options::OPT_shared_libgcc)) {
CmdArgs.push_back("-lgcc_pic");
@@ -184,7 +184,7 @@ void dragonfly::Linker::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_r)) {
const char *crtend = nullptr;
if (Shared || Pie)
- crtend ="crtendS.o";
+ crtend = "crtendS.o";
else
crtend = "crtend.o";
diff --git a/clang/lib/Driver/ToolChains/Haiku.cpp b/clang/lib/Driver/ToolChains/Haiku.cpp
index 1df9c7b08..3690b4086 100644
--- a/clang/lib/Driver/ToolChains/Haiku.cpp
+++ b/clang/lib/Driver/ToolChains/Haiku.cpp
@@ -19,10 +19,10 @@ using namespace clang;
using namespace llvm::opt;
void haiku::Linker::ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const ArgList &Args,
- const char *LinkingOutput) const {
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const ArgList &Args,
+ const char *LinkingOutput) const {
const auto &ToolChain = static_cast<const Haiku &>(getToolChain());
const Driver &D = ToolChain.getDriver();
const llvm::Triple::ArchType Arch = ToolChain.getArch();
@@ -75,8 +75,10 @@ void haiku::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crti.o")));
CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtbeginS.o")));
if (!Shared)
- CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("start_dyn.o")));
- CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("init_term_dyn.o")));
+ CmdArgs.push_back(
+ Args.MakeArgString(ToolChain.GetFilePath("start_dyn.o")));
+ CmdArgs.push_back(
+ Args.MakeArgString(ToolChain.GetFilePath("init_term_dyn.o")));
}
Args.addAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
diff --git a/clang/lib/Driver/ToolChains/NetBSD.cpp b/clang/lib/Driver/ToolChains/NetBSD.cpp
index cfde8d40a..8a4ab9047 100644
--- a/clang/lib/Driver/ToolChains/NetBSD.cpp
+++ b/clang/lib/Driver/ToolChains/NetBSD.cpp
@@ -398,7 +398,8 @@ NetBSD::NetBSD(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
break;
case llvm::Triple::EABIHF:
case llvm::Triple::GNUEABIHF:
- getFilePaths().push_back(concat(getDriver().SysRoot, "/usr/lib/eabihf"));
+ getFilePaths().push_back(
+ concat(getDriver().SysRoot, "/usr/lib/eabihf"));
break;
default:
getFilePaths().push_back(concat(getDriver().SysRoot, "/usr/lib/oabi"));
@@ -493,12 +494,12 @@ void NetBSD::AddClangSystemIncludeArgs(
void NetBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const {
const std::string Candidates[] = {
- // directory relative to build tree
- concat(getDriver().Dir, "/../include/c++/v1"),
- // system install with full upstream path
- concat(getDriver().SysRoot, "/usr/include/c++/v1"),
- // system install from src
- concat(getDriver().SysRoot, "/usr/include/c++"),
+ // directory relative to build tree
+ concat(getDriver().Dir, "/../include/c++/v1"),
+ // system install with full upstream path
+ concat(getDriver().SysRoot, "/usr/include/c++/v1"),
+ // system install from src
+ concat(getDriver().SysRoot, "/usr/include/c++"),
};
for (const auto &IncludePath : Candidates) {
@@ -513,8 +514,8 @@ void NetBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const {
- addLibStdCXXIncludePaths(concat(getDriver().SysRoot, "/usr/include/g++"), "", "",
- DriverArgs, CC1Args);
+ addLibStdCXXIncludePaths(concat(getDriver().SysRoot, "/usr/include/g++"), "",
+ "", DriverArgs, CC1Args);
}
llvm::ExceptionHandling NetBSD::GetExceptionModel(const ArgList &Args) const {
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 1842a783d..9521f7160 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -371,28 +371,29 @@ static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall,
return true;
std::pair<unsigned, const char *> Builtins[] = {
- { Builtin::BI__builtin_add_overflow, "ckd_add" },
- { Builtin::BI__builtin_sub_overflow, "ckd_sub" },
- { Builtin::BI__builtin_mul_overflow, "ckd_mul" },
+ {Builtin::BI__builtin_add_overflow, "ckd_add"},
+ {Builtin::BI__builtin_sub_overflow, "ckd_sub"},
+ {Builtin::BI__builtin_mul_overflow, "ckd_mul"},
};
- bool CkdOperation = llvm::any_of(Builtins, [&](const std::pair<unsigned,
- const char *> &P) {
- return BuiltinID == P.first && TheCall->getExprLoc().isMacroID() &&
- Lexer::getImmediateMacroName(TheCall->getExprLoc(),
- S.getSourceManager(), S.getLangOpts()) == P.second;
- });
+ bool CkdOperation =
+ llvm::any_of(Builtins, [&](const std::pair<unsigned, const char *> &P) {
+ return BuiltinID == P.first && TheCall->getExprLoc().isMacroID() &&
+ Lexer::getImmediateMacroName(TheCall->getExprLoc(),
+ S.getSourceManager(),
+ S.getLangOpts()) == P.second;
+ });
auto ValidCkdIntType = [](QualType QT) {
// A valid checked integer type is an integer type other than a plain char,
// bool, a bit-precise type, or an enumeration type.
if (const auto *BT = QT.getCanonicalType()->getAs<BuiltinType>())
return (BT->getKind() >= BuiltinType::Short &&
- BT->getKind() <= BuiltinType::Int128) || (
- BT->getKind() >= BuiltinType::UShort &&
- BT->getKind() <= BuiltinType::UInt128) ||
- BT->getKind() == BuiltinType::UChar ||
- BT->getKind() == BuiltinType::SChar;
+ BT->getKind() <= BuiltinType::Int128) ||
+ (BT->getKind() >= BuiltinType::UShort &&
+ BT->getKind() <= BuiltinType::UInt128) ||
+ BT->getKind() == BuiltinType::UChar ||
+ BT->getKind() == BuiltinType::SChar;
return false;
};
@@ -421,13 +422,12 @@ static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall,
QualType Ty = Arg.get()->getType();
const auto *PtrTy = Ty->getAs<PointerType>();
- if (!PtrTy ||
- !PtrTy->getPointeeType()->isIntegerType() ||
+ if (!PtrTy || !PtrTy->getPointeeType()->isIntegerType() ||
(!ValidCkdIntType(PtrTy->getPointeeType()) && CkdOperation) ||
PtrTy->getPointeeType().isConstQualified()) {
S.Diag(Arg.get()->getBeginLoc(),
diag::err_overflow_builtin_must_be_ptr_int)
- << CkdOperation << Ty << Arg.get()->getSourceRange();
+ << CkdOperation << Ty << Arg.get()->getSourceRange();
return true;
}
}
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index a8bad12b6..94f715f07 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -12876,9 +12876,9 @@ QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl,
// Diagnose auto array declarations in C23, unless it's a supported extension.
if (getLangOpts().C23 && Type->isArrayType() &&
!isa_and_present<StringLiteral, InitListExpr>(Init)) {
- Diag(Range.getBegin(), diag::err_auto_not_allowed)
- << (int)Deduced->getContainedAutoType()->getKeyword()
- << /*in array decl*/ 23 << Range;
+ Diag(Range.getBegin(), diag::err_auto_not_allowed)
+ << (int)Deduced->getContainedAutoType()->getKeyword()
+ << /*in array decl*/ 23 << Range;
return QualType();
}
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index be79defbb..a3a592947 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -7843,17 +7843,17 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
: isa<CXXConstructorDecl>(MD))) &&
MD->isConstexpr() && !Constexpr &&
MD->getTemplatedKind() == FunctionDecl::TK_NonTemplate) {
- if (!MD->isConsteval() && RD->getNumVBases()) {
- Diag(MD->getBeginLoc(), diag::err_incorrect_defaulted_constexpr_with_vb)
- << CSM;
- for (const auto &I : RD->vbases())
- Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here);
- } else {
- Diag(MD->getBeginLoc(), MD->isConsteval()
- ? diag::err_incorrect_defaulted_consteval
- : diag::err_incorrect_defaulted_constexpr)
- << CSM;
- }
+ if (!MD->isConsteval() && RD->getNumVBases()) {
+ Diag(MD->getBeginLoc(), diag::err_incorrect_defaulted_constexpr_with_vb)
+ << CSM;
+ for (const auto &I : RD->vbases())
+ Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here);
+ } else {
+ Diag(MD->getBeginLoc(), MD->isConsteval()
+ ? diag::err_incorrect_defaulted_consteval
+ : diag::err_incorrect_defaulted_constexpr)
+ << CSM;
+ }
// FIXME: Explain why the special member can't be constexpr.
HadError = true;
}
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index ab7059460..859e9fd12 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2019,7 +2019,7 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
// from a different module; in that case, we rely on the module(s)
// containing the header to provide this information.
const HeaderFileInfo *HFI =
- HS.getExistingFileInfo(*File, /*WantExternal*/!Chain);
+ HS.getExistingFileInfo(*File, /*WantExternal*/ !Chain);
if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader))
continue;
@@ -2035,12 +2035,13 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) {
bool Included = PP->alreadyIncluded(*File);
- HeaderFileInfoTrait::key_type Key = {
- Filename, File->getSize(), getTimestampForOutput(*File)
- };
+ HeaderFileInfoTrait::key_type Key = {Filename, File->getSize(),
+ getTimestampForOutput(*File)};
HeaderFileInfoTrait::data_type Data = {
- *HFI, Included, HS.getModuleMap().findResolvedModulesForHeader(*File), {}
- };
+ *HFI,
+ Included,
+ HS.getModuleMap().findResolvedModulesForHeader(*File),
+ {}};
Generator.insert(Key, Data, GeneratorTrait);
++NumHeaderSearchEntries;
}
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp
index 0cbec5cf9..1e0b7a875 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -4981,7 +4981,7 @@ TEST_P(ASTImporterOptionSpecificTestBase,
`-CXXDeductionGuideDecl 0x1fe59c0 <col:36> col:36 implicit <deduction guide for A> 'auto (A<T>) -> A<T>'
`-ParmVarDecl 0x1fe5958 <col:36> col:36 'A<T>'
*/
-// clang-format on
+ // clang-format on
auto *FromD1 = FirstDeclMatcher<CXXDeductionGuideDecl>().match(
FromTU, cxxDeductionGuideDecl());
auto *FromD2 = LastDeclMatcher<CXXDeductionGuideDecl>().match(
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 98773a1b9..f7f9d6431 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -5285,7 +5285,7 @@ void DeclarationVisitor::Post(const parser::DerivedTypeStmt &x) {
std::optional<DerivedTypeSpec> extendsType{
ResolveExtendsType(name, extendsName)};
DerivedTypeDetails derivedTypeDetails;
- if (Symbol *typeSymbol{FindInScope(currScope(), name)}; typeSymbol &&
+ if (Symbol * typeSymbol{FindInScope(currScope(), name)}; typeSymbol &&
typeSymbol->has<DerivedTypeDetails>() &&
typeSymbol->get<DerivedTypeDetails>().isForwardReferenced()) {
derivedTypeDetails.set_isForwardReferenced(true);
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index a2a9c0163..749f78170 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -78,9 +78,8 @@ public:
virtual bool GetObjectDescription(Stream &str, Value &value,
ExecutionContextScope *exe_scope) = 0;
-
struct VTableInfo {
- Address addr; /// Address of the vtable's virtual function table
+ Address addr; /// Address of the vtable's virtual function table
Symbol *symbol; /// The vtable symbol from the symbol table
};
/// Get the vtable information for a given value.
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 34d01d759..8f6367da8 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -1038,9 +1038,9 @@ lldb::ValueObjectSP SBValue::GetSP(ValueLocker &locker) const {
// IsValid means that the SBValue has a value in it. But that's not the
// only time that ValueObjects are useful. We also want to return the value
// if there's an error state in it.
- if (!m_opaque_sp || (!m_opaque_sp->IsValid()
- && (m_opaque_sp->GetRootSP()
- && !m_opaque_sp->GetRootSP()->GetError().Fail()))) {
+ if (!m_opaque_sp || (!m_opaque_sp->IsValid() &&
+ (m_opaque_sp->GetRootSP() &&
+ !m_opaque_sp->GetRootSP()->GetError().Fail()))) {
locker.GetError().SetErrorString("No value");
return ValueObjectSP();
}
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index e1d1c5e42..fac728d15 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -603,8 +603,7 @@ protected:
// will track the load location of the library.
size_t num_modules_specified = m_options.m_modules.GetSize();
if (num_modules_specified == 1) {
- const FileSpec &file_spec =
- m_options.m_modules.GetFileSpecAtIndex(0);
+ const FileSpec &file_spec = m_options.m_modules.GetFileSpecAtIndex(0);
bp_sp = target.CreateAddressInModuleBreakpoint(
m_options.m_load_addr, internal, file_spec, m_options.m_hardware);
} else if (num_modules_specified == 0) {
diff --git a/lldb/source/Core/ValueObjectVTable.cpp b/lldb/source/Core/ValueObjectVTable.cpp
index 177ae4167..fb4dc7530 100644
--- a/lldb/source/Core/ValueObjectVTable.cpp
+++ b/lldb/source/Core/ValueObjectVTable.cpp
@@ -82,7 +82,6 @@ protected:
return false;
}
-
// Set our value to be the load address of the function pointer in memory
// and our type to be the function pointer type.
m_value.SetValueType(Value::ValueType::LoadAddress);
@@ -107,7 +106,7 @@ protected:
// the language from it correctly.
ValueObject *val = parent->GetParent();
auto type_system = target_sp->GetScratchTypeSystemForLanguage(
- val ? val->GetObjectRuntimeLanguage() : eLanguageTypeC_plus_plus);
+ val ? val->GetObjectRuntimeLanguage() : eLanguageTypeC_plus_plus);
if (type_system) {
m_value.SetCompilerType(
(*type_system)->CreateGenericFunctionPrototype().GetPointerType());
@@ -122,7 +121,7 @@ protected:
if (m_error.Success()) {
const bool thread_and_frame_only_if_stopped = true;
ExecutionContext exe_ctx(
- GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped));
+ GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped));
m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
}
SetValueDidChange(true);
@@ -257,7 +256,7 @@ bool ValueObjectVTable::UpdateValue() {
m_value.SetValueType(Value::ValueType::LoadAddress);
m_value.GetScalar() = parent->GetAddressOf();
auto type_system_or_err =
- target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC_plus_plus);
+ target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC_plus_plus);
if (type_system_or_err) {
m_value.SetCompilerType(
(*type_system_or_err)->GetBasicTypeFromAST(eBasicTypeUnsignedLong));
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 17c8b4357..eee70bf74 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -54,8 +54,9 @@ bool ItaniumABILanguageRuntime::CouldHaveDynamicValue(ValueObject &in_value) {
check_objc);
}
-TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
- ValueObject &in_value, const VTableInfo &vtable_info) {
+TypeAndOrName
+ItaniumABILanguageRuntime::GetTypeInfo(ValueObject &in_value,
+ const VTableInfo &vtable_info) {
if (vtable_info.addr.IsSectionOffset()) {
// See if we have cached info for this type already
TypeAndOrName type_info = GetDynamicTypeInfo(vtable_info.addr);
@@ -69,8 +70,7 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
LLDB_LOGF(log,
"0x%16.16" PRIx64
": static-type = '%s' has vtable symbol '%s'\n",
- in_value.GetPointerValue(),
- in_value.GetTypeName().GetCString(),
+ in_value.GetPointerValue(), in_value.GetTypeName().GetCString(),
symbol_name.str().c_str());
// We are a C++ class, that's good. Get the class name and look it
// up:
@@ -91,15 +91,15 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
ModuleSP module_sp = vtable_info.symbol->CalculateSymbolContextModule();
if (module_sp)
module_sp->FindTypes(ConstString(lookup_name), exact_match, 1,
- searched_symbol_files, class_types);
+ searched_symbol_files, class_types);
// If we didn't find a symbol, then move on to the entire module
// list in the target and get as many unique matches as possible
Target &target = m_process->GetTarget();
if (class_types.Empty())
target.GetImages().FindTypes(nullptr, ConstString(lookup_name),
- exact_match, UINT32_MAX,
- searched_symbol_files, class_types);
+ exact_match, UINT32_MAX,
+ searched_symbol_files, class_types);
lldb::TypeSP type_sp;
if (class_types.Empty()) {
@@ -112,13 +112,13 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
if (type_sp) {
if (TypeSystemClang::IsCXXClassType(
type_sp->GetForwardCompilerType())) {
- LLDB_LOGF(
- log,
- "0x%16.16" PRIx64
- ": static-type = '%s' has dynamic type: uid={0x%" PRIx64
- "}, type-name='%s'\n",
- in_value.GetPointerValue(), in_value.GetTypeName().AsCString(),
- type_sp->GetID(), type_sp->GetName().GetCString());
+ LLDB_LOGF(log,
+ "0x%16.16" PRIx64
+ ": static-type = '%s' has dynamic type: uid={0x%" PRIx64
+ "}, type-name='%s'\n",
+ in_value.GetPointerValue(),
+ in_value.GetTypeName().AsCString(), type_sp->GetID(),
+ type_sp->GetName().GetCString());
type_info.SetTypeSP(type_sp);
}
}
@@ -128,14 +128,13 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
for (i = 0; i < class_types.GetSize(); i++) {
type_sp = class_types.GetTypeAtIndex(i);
if (type_sp) {
- LLDB_LOGF(
- log,
- "0x%16.16" PRIx64
- ": static-type = '%s' has multiple matching dynamic "
- "types: uid={0x%" PRIx64 "}, type-name='%s'\n",
- in_value.GetPointerValue(),
- in_value.GetTypeName().AsCString(),
- type_sp->GetID(), type_sp->GetName().GetCString());
+ LLDB_LOGF(log,
+ "0x%16.16" PRIx64
+ ": static-type = '%s' has multiple matching dynamic "
+ "types: uid={0x%" PRIx64 "}, type-name='%s'\n",
+ in_value.GetPointerValue(),
+ in_value.GetTypeName().AsCString(), type_sp->GetID(),
+ type_sp->GetName().GetCString());
}
}
}
@@ -145,14 +144,13 @@ TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo(
if (type_sp) {
if (TypeSystemClang::IsCXXClassType(
type_sp->GetForwardCompilerType())) {
- LLDB_LOGF(
- log,
- "0x%16.16" PRIx64 ": static-type = '%s' has multiple "
- "matching dynamic types, picking "
- "this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
- in_value.GetPointerValue(),
- in_value.GetTypeName().AsCString(),
- type_sp->GetID(), type_sp->GetName().GetCString());
+ LLDB_LOGF(log,
+ "0x%16.16" PRIx64 ": static-type = '%s' has multiple "
+ "matching dynamic types, picking "
+ "this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
+ in_value.GetPointerValue(),
+ in_value.GetTypeName().AsCString(), type_sp->GetID(),
+ type_sp->GetName().GetCString());
type_info.SetTypeSP(type_sp);
}
}
@@ -187,7 +185,8 @@ llvm::Error ItaniumABILanguageRuntime::TypeHasVTable(CompilerType type) {
// Make sure this is a class or a struct first by checking the type class
// bitfield that gets returned.
if ((type.GetTypeClass() & (eTypeClassStruct | eTypeClassClass)) == 0) {
- return llvm::createStringError(std::errc::invalid_argument,
+ return llvm::createStringError(
+ std::errc::invalid_argument,
"type \"%s\" is not a class or struct or a pointer to one",
original_type.GetTypeName().AsCString("<invalid>"));
}
@@ -195,8 +194,8 @@ llvm::Error ItaniumABILanguageRuntime::TypeHasVTable(CompilerType type) {
// Check if the type has virtual functions by asking it if it is polymorphic.
if (!type.IsPolymorphicClass()) {
return llvm::createStringError(std::errc::invalid_argument,
- "type \"%s\" doesn't have a vtable",
- type.GetTypeName().AsCString("<invalid>"));
+ "type \"%s\" doesn't have a vtable",
+ type.GetTypeName().AsCString("<invalid>"));
}
return llvm::Error::success();
}
@@ -209,8 +208,8 @@ llvm::Error ItaniumABILanguageRuntime::TypeHasVTable(CompilerType type) {
// and is can pass in instances of classes which is not suitable for dynamic
// type detection, these cases should pass true for \a check_type.
llvm::Expected<LanguageRuntime::VTableInfo>
- ItaniumABILanguageRuntime::GetVTableInfo(ValueObject &in_value,
- bool check_type) {
+ItaniumABILanguageRuntime::GetVTableInfo(ValueObject &in_value,
+ bool check_type) {
CompilerType type = in_value.GetCompilerType();
if (check_type) {
@@ -228,8 +227,8 @@ llvm::Expected<LanguageRuntime::VTableInfo>
if (type.IsPointerOrReferenceType())
original_ptr = in_value.GetPointerValue(&address_type);
else
- original_ptr = in_value.GetAddressOf(/*scalar_is_load_address=*/true,
- &address_type);
+ original_ptr =
+ in_value.GetAddressOf(/*scalar_is_load_address=*/true, &address_type);
if (original_ptr == LLDB_INVALID_ADDRESS || address_type != eAddressTypeLoad)
return llvm::createStringError(std::errc::invalid_argument,
"failed to get the address of the value");
@@ -239,17 +238,19 @@ llvm::Expected<LanguageRuntime::VTableInfo>
process->ReadPointerFromMemory(original_ptr, error);
if (!error.Success() || vtable_load_addr == LLDB_INVALID_ADDRESS)
- return llvm::createStringError(std::errc::invalid_argument,
+ return llvm::createStringError(
+ std::errc::invalid_argument,
"failed to read vtable pointer from memory at 0x%" PRIx64,
original_ptr);
-;
+ ;
// Find the symbol that contains the "vtable_load_addr" address
Address vtable_addr;
if (!process->GetTarget().ResolveLoadAddress(vtable_load_addr, vtable_addr))
return llvm::createStringError(std::errc::invalid_argument,
- "failed to resolve vtable pointer 0x%"
- PRIx64 "to a section", vtable_load_addr);
+ "failed to resolve vtable pointer 0x%" PRIx64
+ "to a section",
+ vtable_load_addr);
// Check our cache first to see if we already have this info
{
@@ -272,8 +273,9 @@ llvm::Expected<LanguageRuntime::VTableInfo>
return info;
}
return llvm::createStringError(std::errc::invalid_argument,
- "symbol found that contains 0x%" PRIx64 " is not a vtable symbol",
- vtable_load_addr);
+ "symbol found that contains 0x%" PRIx64
+ " is not a vtable symbol",
+ vtable_load_addr);
}
bool ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(
@@ -348,8 +350,8 @@ bool ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(
// So the dynamic type is a value that starts at offset_to_top above
// the original address.
lldb::addr_t dynamic_addr = in_value.GetPointerValue() + offset_to_top;
- if (!m_process->GetTarget().ResolveLoadAddress(
- dynamic_addr, dynamic_address)) {
+ if (!m_process->GetTarget().ResolveLoadAddress(dynamic_addr,
+ dynamic_address)) {
dynamic_address.SetRawAddress(dynamic_addr);
}
return true;
@@ -671,11 +673,11 @@ ValueObjectSP ItaniumABILanguageRuntime::GetExceptionObjectForThread(
ValueObjectSP exception = ValueObject::CreateValueObjectFromData(
"exception", exception_isw.GetAsData(m_process->GetByteOrder()), exe_ctx,
voidstar);
- ValueObjectSP dyn_exception
- = exception->GetDynamicValue(eDynamicDontRunTarget);
+ ValueObjectSP dyn_exception =
+ exception->GetDynamicValue(eDynamicDontRunTarget);
// If we succeed in making a dynamic value, return that:
if (dyn_exception)
- return dyn_exception;
+ return dyn_exception;
return exception;
}
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
index 0f7e73cfe..04c1e7cce 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
@@ -47,7 +47,6 @@ public:
return runtime->isA(&ID);
}
-
llvm::Expected<LanguageRuntime::VTableInfo>
GetVTableInfo(ValueObject &in_value, bool check_type) override;
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 5f64e0e4a..6ed2dd78b 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -4720,14 +4720,13 @@ CompilerType TypeSystemClang::GetBasicTypeFromAST(lldb::BasicType basic_type) {
CompilerType TypeSystemClang::CreateGenericFunctionPrototype() {
clang::ASTContext &ast = getASTContext();
const FunctionType::ExtInfo generic_ext_info(
- /*noReturn=*/false,
- /*hasRegParm=*/false,
- /*regParm=*/0,
- CallingConv::CC_C,
- /*producesResult=*/false,
- /*noCallerSavedRegs=*/false,
- /*NoCfCheck=*/false,
- /*cmseNSCall=*/false);
+ /*noReturn=*/false,
+ /*hasRegParm=*/false,
+ /*regParm=*/0, CallingConv::CC_C,
+ /*producesResult=*/false,
+ /*noCallerSavedRegs=*/false,
+ /*NoCfCheck=*/false,
+ /*cmseNSCall=*/false);
QualType func_type = ast.getFunctionNoProtoType(ast.VoidTy, generic_ext_info);
return GetType(func_type);
}
diff --git a/lldb/test/API/functionalities/vtable/main.cpp b/lldb/test/API/functionalities/vtable/main.cpp
index 498a5765a..327128ffc 100644
--- a/lldb/test/API/functionalities/vtable/main.cpp
+++ b/lldb/test/API/functionalities/vtable/main.cpp
@@ -23,6 +23,7 @@ public:
// valid vtable from this object.
class NotVirtual {
Rectangle m_rect;
+
public:
NotVirtual() = default;
};
@@ -32,7 +33,7 @@ int main(int argc, const char **argv) {
Rectangle rect;
Shape *shape_ptr = ▭
Shape &shape_ref = shape;
- shape_ptr = &shape; // Shape is Rectangle
+ shape_ptr = &shape; // Shape is Rectangle
NotVirtual not_virtual; // Shape is Shape
- return 0; // At the end
+ return 0; // At the end
}
diff --git a/llvm/include/llvm/CodeGen/LiveVariables.h b/llvm/include/llvm/CodeGen/LiveVariables.h
index 5d7f9ff30..11adecbd1 100644
--- a/llvm/include/llvm/CodeGen/LiveVariables.h
+++ b/llvm/include/llvm/CodeGen/LiveVariables.h
@@ -294,8 +294,7 @@ public:
MachineBasicBlock *DomBB,
MachineBasicBlock *SuccBB);
- void addNewBlock(MachineBasicBlock *BB,
- MachineBasicBlock *DomBB,
+ void addNewBlock(MachineBasicBlock *BB, MachineBasicBlock *DomBB,
MachineBasicBlock *SuccBB,
std::vector<SparseBitVector<>> &LiveInSets);
};
diff --git a/llvm/include/llvm/IR/Instruction.h b/llvm/include/llvm/IR/Instruction.h
index b5ccdf020..07c9d3268 100644
--- a/llvm/include/llvm/IR/Instruction.h
+++ b/llvm/include/llvm/IR/Instruction.h
@@ -43,6 +43,7 @@ class Instruction : public User,
ilist_iterator_bits<true>> {
public:
using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>>;
+
private:
BasicBlock *Parent;
DebugLoc DbgLoc; // 'dbg' Metadata cache.
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 353cf733a..99ebe923b 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -227,8 +227,8 @@ Constant *FoldBitCast(Constant *C, Type *DestTy, const DataLayout &DL) {
return ConstantExpr::getBitCast(C, DestTy);
// Zero extend the element to the right size.
- Src = ConstantFoldCastOperand(Instruction::ZExt, Src, Elt->getType(),
- DL);
+ Src =
+ ConstantFoldCastOperand(Instruction::ZExt, Src, Elt->getType(), DL);
assert(Src && "Constant folding cannot fail on plain integers");
// Shift it to the right place, depending on endianness.
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 7096e06d9..fc40d417b 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -894,7 +894,8 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
CurrentSavings += InstrCost;
}
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(&I)) {
- if (isa_and_present<ConstantInt>(SimplifiedValues.lookup(SI->getCondition())))
+ if (isa_and_present<ConstantInt>(
+ SimplifiedValues.lookup(SI->getCondition())))
CurrentSavings += InstrCost;
} else if (Value *V = dyn_cast<Value>(&I)) {
// Count an instruction as savings if we can fold it.
diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index 51c268ab7..ad76cbd23 100644
--- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
@@ -1378,7 +1378,6 @@ void CombinerHelper::applyOptBrCondByInvertingCond(MachineInstr &MI,
Observer.changedInstr(*BrCond);
}
-
bool CombinerHelper::tryEmitMemcpyInline(MachineInstr &MI) {
MachineIRBuilder HelperBuilder(MI);
GISelObserverWrapper DummyObserver;
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 7c8099731..e4aaedf16 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2140,7 +2140,7 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs,
}
Check(!Attrs.hasAttrSomewhere(Attribute::Writable) ||
- isModSet(Attrs.getMemoryEffects().getModRef(IRMemLocation::ArgMem)),
+ isModSet(Attrs.getMemoryEffects().getModRef(IRMemLocation::ArgMem)),
"Attribute writable and memory without argmem: write are incompatible!",
V);
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 291f0c8c5..e74a55149 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4599,8 +4599,7 @@ static unsigned selectUmullSmull(SDValue &N0, SDValue &N1, SelectionDAG &DAG,
else
ZextOperand = N1.getOperand(0);
if (DAG.SignBitIsZero(ZextOperand)) {
- SDValue NewSext =
- DAG.getSExtOrTrunc(ZextOperand, DL, N0.getValueType());
+ SDValue NewSext = DAG.getSExtOrTrunc(ZextOperand, DL, N0.getValueType());
if (IsN0ZExt)
N0 = NewSext;
else
@@ -7479,10 +7478,10 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
TPIDR2ObjAddr);
OptimizationRemarkEmitter ORE(&MF.getFunction());
ORE.emit([&]() {
- auto R = CLI.CB ? OptimizationRemarkAnalysis("sme", "SMELazySaveZA",
- CLI.CB)
- : OptimizationRemarkAnalysis("sme", "SMELazySaveZA",
- &MF.getFunction());
+ auto R = CLI.CB
+ ? OptimizationRemarkAnalysis("sme", "SMELazySaveZA", CLI.CB)
+ : OptimizationRemarkAnalysis("sme", "SMELazySaveZA",
+ &MF.getFunction());
DescribeCallsite(R) << " sets up a lazy save for ZA";
if (CalleeAttrs.preservesZA())
R << ", but callee preserves ZA, so we request 0 slices to be saved";
@@ -7501,10 +7500,10 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
PStateSM = getPStateSM(DAG, Chain, CallerAttrs, DL, MVT::i64);
OptimizationRemarkEmitter ORE(&MF.getFunction());
ORE.emit([&]() {
- auto R = CLI.CB ? OptimizationRemarkAnalysis("sme", "SMETransition",
- CLI.CB)
- : OptimizationRemarkAnalysis("sme", "SMETransition",
- &MF.getFunction());
+ auto R = CLI.CB
+ ? OptimizationRemarkAnalysis("sme", "SMETransition", CLI.CB)
+ : OptimizationRemarkAnalysis("sme", "SMETransition",
+ &MF.getFunction());
DescribeCallsite(R) << " requires a streaming mode transition";
return R;
});
@@ -16639,8 +16638,7 @@ static SDValue performMulCombine(SDNode *N, SelectionDAG &DAG,
if (TrailingZeroes) {
// Conservatively do not lower to shift+add+shift if the mul might be
// folded into smul or umul.
- if (N0->hasOneUse() && (isSignExtended(N0, DAG) ||
- isZeroExtended(N0, DAG)))
+ if (N0->hasOneUse() && (isSignExtended(N0, DAG) || isZeroExtended(N0, DAG)))
return SDValue();
// Conservatively do not lower to shift+add+shift if the mul might be
// folded into madd or msub.
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index fc39e4b04..30434a302 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#include "AArch64ExpandImm.h"
#include "AArch64InstrInfo.h"
+#include "AArch64ExpandImm.h"
#include "AArch64FrameLowering.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64PointerAuth.h"
@@ -9160,12 +9160,9 @@ void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
if (TRI.isGeneralPurposeRegister(MF, Reg)) {
BuildMI(MBB, Iter, DL, get(AArch64::MOVZXi), Reg).addImm(0).addImm(0);
} else if (STI.hasSVE()) {
- BuildMI(MBB, Iter, DL, get(AArch64::DUP_ZI_D), Reg)
- .addImm(0)
- .addImm(0);
+ BuildMI(MBB, Iter, DL, get(AArch64::DUP_ZI_D), Reg).addImm(0).addImm(0);
} else {
- BuildMI(MBB, Iter, DL, get(AArch64::MOVIv2d_ns), Reg)
- .addImm(0);
+ BuildMI(MBB, Iter, DL, get(AArch64::MOVIv2d_ns), Reg).addImm(0);
}
}
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
index 7518387ae..4a70d977c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -1143,10 +1143,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
if (ST.hasSALUFloatInsts())
FCmpBuilder.legalForCartesianProduct({S32}, {S16, S32});
- FCmpBuilder
- .widenScalarToNextPow2(1)
- .clampScalar(1, S32, S64)
- .scalarize(0);
+ FCmpBuilder.widenScalarToNextPow2(1).clampScalar(1, S32, S64).scalarize(0);
// FIXME: fpow has a selection pattern that should move to custom lowering.
auto &ExpOps = getActionDefinitionsBuilder(G_FPOW);
@@ -5908,8 +5905,8 @@ bool AMDGPULegalizerInfo::legalizeBufferAtomic(MachineInstr &MI,
std::tie(VOffset, ImmOffset) = splitBufferOffsets(B, VOffset);
auto MIB = B.buildInstr(getBufferAtomicPseudo(IID))
- .addDef(Dst)
- .addUse(VData); // vdata
+ .addDef(Dst)
+ .addUse(VData); // vdata
if (IsCmpSwap)
MIB.addReg(CmpVal);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 375df2720..57c6ce70f 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -349,10 +349,10 @@ static cl::opt<bool> EnableRewritePartialRegUses(
cl::desc("Enable rewrite partial reg uses pass"), cl::init(false),
cl::Hidden);
-static cl::opt<bool> EnableHipStdPar(
- "amdgpu-enable-hipstdpar",
- cl::desc("Enable HIP Standard Parallelism Offload support"), cl::init(false),
- cl::Hidden);
+static cl::opt<bool>
+ EnableHipStdPar("amdgpu-enable-hipstdpar",
+ cl::desc("Enable HIP Standard Parallelism Offload support"),
+ cl::init(false), cl::Hidden);
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget() {
// Register the target
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index ea37cc5e8..f4e2e4c3f 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -6473,7 +6473,7 @@ SDValue SITargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op,
Parts[0], Parts[1], Parts[2], Parts[3]));
Hi = DAG.getBitcast(HiVT,
DAG.getNode(ISD::BUILD_VECTOR, SL, MVT::v4i64,
- Parts[4], Parts[5],Parts[6], Parts[7]));
+ Parts[4], Parts[5], Parts[6], Parts[7]));
}
EVT IdxVT = Idx.getValueType();
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 43dedbb03..6b7169cee 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -3377,10 +3377,10 @@ bool SIInstrInfo::FoldImmediate(MachineInstr &UseMI, MachineInstr &DefMI,
bool Is16Bit = OpSize == 2;
bool Is64Bit = OpSize == 8;
bool isVGPRCopy = RI.isVGPR(*MRI, DstReg);
- unsigned NewOpc = isVGPRCopy ? Is64Bit ? AMDGPU::V_MOV_B64_PSEUDO
- : AMDGPU::V_MOV_B32_e32
- : Is64Bit ? AMDGPU::S_MOV_B64_IMM_PSEUDO
- : AMDGPU::S_MOV_B32;
+ unsigned NewOpc =
+ isVGPRCopy ? Is64Bit ? AMDGPU::V_MOV_B64_PSEUDO : AMDGPU::V_MOV_B32_e32
+ : Is64Bit ? AMDGPU::S_MOV_B64_IMM_PSEUDO
+ : AMDGPU::S_MOV_B32;
APInt Imm(Is64Bit ? 64 : 32, getImmFor(UseMI.getOperand(1)));
if (RI.isAGPR(*MRI, DstReg)) {
@@ -5227,64 +5227,122 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
case AMDGPU::S_FLBIT_I32: return AMDGPU::V_FFBH_I32_e64;
case AMDGPU::S_CBRANCH_SCC0: return AMDGPU::S_CBRANCH_VCCZ;
case AMDGPU::S_CBRANCH_SCC1: return AMDGPU::S_CBRANCH_VCCNZ;
- case AMDGPU::S_CVT_F32_I32: return AMDGPU::V_CVT_F32_I32_e64;
- case AMDGPU::S_CVT_F32_U32: return AMDGPU::V_CVT_F32_U32_e64;
- case AMDGPU::S_CVT_I32_F32: return AMDGPU::V_CVT_I32_F32_e64;
- case AMDGPU::S_CVT_U32_F32: return AMDGPU::V_CVT_U32_F32_e64;
- case AMDGPU::S_CVT_F32_F16: return AMDGPU::V_CVT_F32_F16_t16_e64;
- case AMDGPU::S_CVT_HI_F32_F16: return AMDGPU::V_CVT_F32_F16_t16_e64;
- case AMDGPU::S_CVT_F16_F32: return AMDGPU::V_CVT_F16_F32_t16_e64;
- case AMDGPU::S_CEIL_F32: return AMDGPU::V_CEIL_F32_e64;
- case AMDGPU::S_FLOOR_F32: return AMDGPU::V_FLOOR_F32_e64;
- case AMDGPU::S_TRUNC_F32: return AMDGPU::V_TRUNC_F32_e64;
- case AMDGPU::S_RNDNE_F32: return AMDGPU::V_RNDNE_F32_e64;
- case AMDGPU::S_CEIL_F16: return AMDGPU::V_CEIL_F16_t16_e64;
- case AMDGPU::S_FLOOR_F16: return AMDGPU::V_FLOOR_F16_t16_e64;
- case AMDGPU::S_TRUNC_F16: return AMDGPU::V_TRUNC_F16_t16_e64;
- case AMDGPU::S_RNDNE_F16: return AMDGPU::V_RNDNE_F16_t16_e64;
- case AMDGPU::S_ADD_F32: return AMDGPU::V_ADD_F32_e64;
- case AMDGPU::S_SUB_F32: return AMDGPU::V_SUB_F32_e64;
- case AMDGPU::S_MIN_F32: return AMDGPU::V_MIN_F32_e64;
- case AMDGPU::S_MAX_F32: return AMDGPU::V_MAX_F32_e64;
- case AMDGPU::S_MUL_F32: return AMDGPU::V_MUL_F32_e64;
- case AMDGPU::S_ADD_F16: return AMDGPU::V_ADD_F16_fake16_e64;
- case AMDGPU::S_SUB_F16: return AMDGPU::V_SUB_F16_fake16_e64;
- case AMDGPU::S_MIN_F16: return AMDGPU::V_MIN_F16_fake16_e64;
- case AMDGPU::S_MAX_F16: return AMDGPU::V_MAX_F16_fake16_e64;
- case AMDGPU::S_MUL_F16: return AMDGPU::V_MUL_F16_fake16_e64;
- case AMDGPU::S_CVT_PK_RTZ_F16_F32: return AMDGPU::V_CVT_PKRTZ_F16_F32_e64;
- case AMDGPU::S_FMAC_F32: return AMDGPU::V_FMAC_F32_e64;
- case AMDGPU::S_FMAC_F16: return AMDGPU::V_FMAC_F16_t16_e64;
- case AMDGPU::S_FMAMK_F32: return AMDGPU::V_FMAMK_F32;
- case AMDGPU::S_FMAAK_F32: return AMDGPU::V_FMAAK_F32;
- case AMDGPU::S_CMP_LT_F32: return AMDGPU::V_CMP_LT_F32_e64;
- case AMDGPU::S_CMP_EQ_F32: return AMDGPU::V_CMP_EQ_F32_e64;
- case AMDGPU::S_CMP_LE_F32: return AMDGPU::V_CMP_LE_F32_e64;
- case AMDGPU::S_CMP_GT_F32: return AMDGPU::V_CMP_GT_F32_e64;
- case AMDGPU::S_CMP_LG_F32: return AMDGPU::V_CMP_LG_F32_e64;
- case AMDGPU::S_CMP_GE_F32: return AMDGPU::V_CMP_GE_F32_e64;
- case AMDGPU::S_CMP_O_F32: return AMDGPU::V_CMP_O_F32_e64;
- case AMDGPU::S_CMP_U_F32: return AMDGPU::V_CMP_U_F32_e64;
- case AMDGPU::S_CMP_NGE_F32: return AMDGPU::V_CMP_NGE_F32_e64;
- case AMDGPU::S_CMP_NLG_F32: return AMDGPU::V_CMP_NLG_F32_e64;
- case AMDGPU::S_CMP_NGT_F32: return AMDGPU::V_CMP_NGT_F32_e64;
- case AMDGPU::S_CMP_NLE_F32: return AMDGPU::V_CMP_NLE_F32_e64;
- case AMDGPU::S_CMP_NEQ_F32: return AMDGPU::V_CMP_NEQ_F32_e64;
- case AMDGPU::S_CMP_NLT_F32: return AMDGPU::V_CMP_NLT_F32_e64;
- case AMDGPU::S_CMP_LT_F16: return AMDGPU::V_CMP_LT_F16_t16_e64;
- case AMDGPU::S_CMP_EQ_F16: return AMDGPU::V_CMP_EQ_F16_t16_e64;
- case AMDGPU::S_CMP_LE_F16: return AMDGPU::V_CMP_LE_F16_t16_e64;
- case AMDGPU::S_CMP_GT_F16: return AMDGPU::V_CMP_GT_F16_t16_e64;
- case AMDGPU::S_CMP_LG_F16: return AMDGPU::V_CMP_LG_F16_t16_e64;
- case AMDGPU::S_CMP_GE_F16: return AMDGPU::V_CMP_GE_F16_t16_e64;
- case AMDGPU::S_CMP_O_F16: return AMDGPU::V_CMP_O_F16_t16_e64;
- case AMDGPU::S_CMP_U_F16: return AMDGPU::V_CMP_U_F16_t16_e64;
- case AMDGPU::S_CMP_NGE_F16: return AMDGPU::V_CMP_NGE_F16_t16_e64;
- case AMDGPU::S_CMP_NLG_F16: return AMDGPU::V_CMP_NLG_F16_t16_e64;
- case AMDGPU::S_CMP_NGT_F16: return AMDGPU::V_CMP_NGT_F16_t16_e64;
- case AMDGPU::S_CMP_NLE_F16: return AMDGPU::V_CMP_NLE_F16_t16_e64;
- case AMDGPU::S_CMP_NEQ_F16: return AMDGPU::V_CMP_NEQ_F16_t16_e64;
- case AMDGPU::S_CMP_NLT_F16: return AMDGPU::V_CMP_NLT_F16_t16_e64;
+ case AMDGPU::S_CVT_F32_I32:
+ return AMDGPU::V_CVT_F32_I32_e64;
+ case AMDGPU::S_CVT_F32_U32:
+ return AMDGPU::V_CVT_F32_U32_e64;
+ case AMDGPU::S_CVT_I32_F32:
+ return AMDGPU::V_CVT_I32_F32_e64;
+ case AMDGPU::S_CVT_U32_F32:
+ return AMDGPU::V_CVT_U32_F32_e64;
+ case AMDGPU::S_CVT_F32_F16:
+ return AMDGPU::V_CVT_F32_F16_t16_e64;
+ case AMDGPU::S_CVT_HI_F32_F16:
+ return AMDGPU::V_CVT_F32_F16_t16_e64;
+ case AMDGPU::S_CVT_F16_F32:
+ return AMDGPU::V_CVT_F16_F32_t16_e64;
+ case AMDGPU::S_CEIL_F32:
+ return AMDGPU::V_CEIL_F32_e64;
+ case AMDGPU::S_FLOOR_F32:
+ return AMDGPU::V_FLOOR_F32_e64;
+ case AMDGPU::S_TRUNC_F32:
+ return AMDGPU::V_TRUNC_F32_e64;
+ case AMDGPU::S_RNDNE_F32:
+ return AMDGPU::V_RNDNE_F32_e64;
+ case AMDGPU::S_CEIL_F16:
+ return AMDGPU::V_CEIL_F16_t16_e64;
+ case AMDGPU::S_FLOOR_F16:
+ return AMDGPU::V_FLOOR_F16_t16_e64;
+ case AMDGPU::S_TRUNC_F16:
+ return AMDGPU::V_TRUNC_F16_t16_e64;
+ case AMDGPU::S_RNDNE_F16:
+ return AMDGPU::V_RNDNE_F16_t16_e64;
+ case AMDGPU::S_ADD_F32:
+ return AMDGPU::V_ADD_F32_e64;
+ case AMDGPU::S_SUB_F32:
+ return AMDGPU::V_SUB_F32_e64;
+ case AMDGPU::S_MIN_F32:
+ return AMDGPU::V_MIN_F32_e64;
+ case AMDGPU::S_MAX_F32:
+ return AMDGPU::V_MAX_F32_e64;
+ case AMDGPU::S_MUL_F32:
+ return AMDGPU::V_MUL_F32_e64;
+ case AMDGPU::S_ADD_F16:
+ return AMDGPU::V_ADD_F16_fake16_e64;
+ case AMDGPU::S_SUB_F16:
+ return AMDGPU::V_SUB_F16_fake16_e64;
+ case AMDGPU::S_MIN_F16:
+ return AMDGPU::V_MIN_F16_fake16_e64;
+ case AMDGPU::S_MAX_F16:
+ return AMDGPU::V_MAX_F16_fake16_e64;
+ case AMDGPU::S_MUL_F16:
+ return AMDGPU::V_MUL_F16_fake16_e64;
+ case AMDGPU::S_CVT_PK_RTZ_F16_F32:
+ return AMDGPU::V_CVT_PKRTZ_F16_F32_e64;
+ case AMDGPU::S_FMAC_F32:
+ return AMDGPU::V_FMAC_F32_e64;
+ case AMDGPU::S_FMAC_F16:
+ return AMDGPU::V_FMAC_F16_t16_e64;
+ case AMDGPU::S_FMAMK_F32:
+ return AMDGPU::V_FMAMK_F32;
+ case AMDGPU::S_FMAAK_F32:
+ return AMDGPU::V_FMAAK_F32;
+ case AMDGPU::S_CMP_LT_F32:
+ return AMDGPU::V_CMP_LT_F32_e64;
+ case AMDGPU::S_CMP_EQ_F32:
+ return AMDGPU::V_CMP_EQ_F32_e64;
+ case AMDGPU::S_CMP_LE_F32:
+ return AMDGPU::V_CMP_LE_F32_e64;
+ case AMDGPU::S_CMP_GT_F32:
+ return AMDGPU::V_CMP_GT_F32_e64;
+ case AMDGPU::S_CMP_LG_F32:
+ return AMDGPU::V_CMP_LG_F32_e64;
+ case AMDGPU::S_CMP_GE_F32:
+ return AMDGPU::V_CMP_GE_F32_e64;
+ case AMDGPU::S_CMP_O_F32:
+ return AMDGPU::V_CMP_O_F32_e64;
+ case AMDGPU::S_CMP_U_F32:
+ return AMDGPU::V_CMP_U_F32_e64;
+ case AMDGPU::S_CMP_NGE_F32:
+ return AMDGPU::V_CMP_NGE_F32_e64;
+ case AMDGPU::S_CMP_NLG_F32:
+ return AMDGPU::V_CMP_NLG_F32_e64;
+ case AMDGPU::S_CMP_NGT_F32:
+ return AMDGPU::V_CMP_NGT_F32_e64;
+ case AMDGPU::S_CMP_NLE_F32:
+ return AMDGPU::V_CMP_NLE_F32_e64;
+ case AMDGPU::S_CMP_NEQ_F32:
+ return AMDGPU::V_CMP_NEQ_F32_e64;
+ case AMDGPU::S_CMP_NLT_F32:
+ return AMDGPU::V_CMP_NLT_F32_e64;
+ case AMDGPU::S_CMP_LT_F16:
+ return AMDGPU::V_CMP_LT_F16_t16_e64;
+ case AMDGPU::S_CMP_EQ_F16:
+ return AMDGPU::V_CMP_EQ_F16_t16_e64;
+ case AMDGPU::S_CMP_LE_F16:
+ return AMDGPU::V_CMP_LE_F16_t16_e64;
+ case AMDGPU::S_CMP_GT_F16:
+ return AMDGPU::V_CMP_GT_F16_t16_e64;
+ case AMDGPU::S_CMP_LG_F16:
+ return AMDGPU::V_CMP_LG_F16_t16_e64;
+ case AMDGPU::S_CMP_GE_F16:
+ return AMDGPU::V_CMP_GE_F16_t16_e64;
+ case AMDGPU::S_CMP_O_F16:
+ return AMDGPU::V_CMP_O_F16_t16_e64;
+ case AMDGPU::S_CMP_U_F16:
+ return AMDGPU::V_CMP_U_F16_t16_e64;
+ case AMDGPU::S_CMP_NGE_F16:
+ return AMDGPU::V_CMP_NGE_F16_t16_e64;
+ case AMDGPU::S_CMP_NLG_F16:
+ return AMDGPU::V_CMP_NLG_F16_t16_e64;
+ case AMDGPU::S_CMP_NGT_F16:
+ return AMDGPU::V_CMP_NGT_F16_t16_e64;
+ case AMDGPU::S_CMP_NLE_F16:
+ return AMDGPU::V_CMP_NLE_F16_t16_e64;
+ case AMDGPU::S_CMP_NEQ_F16:
+ return AMDGPU::V_CMP_NEQ_F16_t16_e64;
+ case AMDGPU::S_CMP_NLT_F16:
+ return AMDGPU::V_CMP_NLT_F16_t16_e64;
}
llvm_unreachable(
"Unexpected scalar opcode without corresponding vector one!");
@@ -7045,9 +7103,9 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
Register CondReg = MRI.createVirtualRegister(RI.getWaveMaskRegClass());
auto NewInstr =
BuildMI(*MBB, Inst, Inst.getDebugLoc(), get(NewOpcode), CondReg)
- .setMIFlags(Inst.getFlags());
- if (AMDGPU::getNamedOperandIdx(NewOpcode,
- AMDGPU::OpName::src0_modifiers) >= 0) {
+ .setMIFlags(Inst.getFlags());
+ if (AMDGPU::getNamedOperandIdx(NewOpcode, AMDGPU::OpName::src0_modifiers) >=
+ 0) {
NewInstr
.addImm(0) // src0_modifiers
.add(Inst.getOperand(0)) // src0
@@ -7055,9 +7113,7 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
.add(Inst.getOperand(1)) // src1
.addImm(0); // clamp
} else {
- NewInstr
- .add(Inst.getOperand(0))
- .add(Inst.getOperand(1));
+ NewInstr.add(Inst.getOperand(0)).add(Inst.getOperand(1));
}
legalizeOperands(*NewInstr, MDT);
int SCCIdx = Inst.findRegisterDefOperandIdx(AMDGPU::SCC);
@@ -7131,8 +7187,8 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
if (isVOP3(NewOpcode)) {
// Intersperse VOP3 modifiers among the SALU operands.
NewInstr->addOperand(Inst.getOperand(0));
- if (AMDGPU::getNamedOperandIdx(NewOpcode,
- AMDGPU::OpName::src0_modifiers) >= 0)
+ if (AMDGPU::getNamedOperandIdx(NewOpcode, AMDGPU::OpName::src0_modifiers) >=
+ 0)
NewInstr.addImm(0);
if (AMDGPU::getNamedOperandIdx(NewOpcode, AMDGPU::OpName::src0) >= 0)
NewInstr->addOperand(Inst.getOperand(1));
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 1ee0b09f9..fb8f0314c 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -2079,7 +2079,7 @@ NVPTXAsmPrinter::lowerConstantForGV(const Constant *CV, bool ProcessingGeneric)
raw_string_ostream OS(S);
OS << "Unsupported expression in static initializer: ";
CE->printAsOperand(OS, /*PrintType=*/false,
- !MF ? nullptr : MF->getFunction().getParent());
+ !MF ? nullptr : MF->getFunction().getParent());
report_fatal_error(Twine(OS.str()));
}
diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 4a1247991..8f82139c2 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -489,11 +489,11 @@ TypeSize
PPCTTIImpl::getRegisterBitWidth(TargetTransformInfo::RegisterKind K) const {
switch (K) {
case TargetTransformInfo::RGK_Scalar:
- return TypeSize::Fixed(ST->isPPC64() ? 64 : 32);
+ return TypeSize::Fixed(ST->isPPC64() ? 64 : 32);
case TargetTransformInfo::RGK_FixedWidthVector:
- return TypeSize::Fixed(ST->hasAltivec() ? 128 : 0);
+ return TypeSize::Fixed(ST->hasAltivec() ? 128 : 0);
case TargetTransformInfo::RGK_ScalableVector:
- return TypeSize::Scalable(0);
+ return TypeSize::Scalable(0);
}
llvm_unreachable("Unsupported register kind");
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
index 662e5e553..bc62de6c5 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
@@ -38,8 +38,7 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
.widenScalarToNextPow2(0)
.clampScalar(0, s32, sXLen);
- getActionDefinitionsBuilder(
- {G_UADDE, G_UADDO, G_USUBE, G_USUBO}).lower();
+ getActionDefinitionsBuilder({G_UADDE, G_UADDO, G_USUBE, G_USUBO}).lower();
getActionDefinitionsBuilder({G_SADDO, G_SSUBO}).minScalar(0, sXLen).lower();
diff --git a/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp b/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
index 7bc7e3924..ff0272ff7 100644
--- a/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
+++ b/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
@@ -82,8 +82,8 @@ bool RISCVCodeGenPrepare::visitZExtInst(ZExtInst &ZExt) {
return true;
}
- // Convert (zext (abs(i32 X, i1 1))) -> (zext nneg (abs(i32 X, i1 1))). If abs of
- // INT_MIN is poison, the sign bit is zero.
+ // Convert (zext (abs(i32 X, i1 1))) -> (zext nneg (abs(i32 X, i1 1))). If abs
+ // of INT_MIN is poison, the sign bit is zero.
// TODO: Move this to instcombine now that we have zext nneg in IR.
using namespace PatternMatch;
if (match(Src, m_Intrinsic<Intrinsic::abs>(m_Value(), m_One()))) {
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index ec5ae3e8f..210647e1c 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -2111,8 +2111,8 @@ bool RISCVTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
// Building an integer and then converting requires a fmv at the end of
// the integer sequence.
const int Cost =
- 1 + RISCVMatInt::getIntMatCost(Imm.bitcastToAPInt(), Subtarget.getXLen(),
- Subtarget.getFeatureBits());
+ 1 + RISCVMatInt::getIntMatCost(Imm.bitcastToAPInt(), Subtarget.getXLen(),
+ Subtarget.getFeatureBits());
return Cost <= FPImmCost;
}
@@ -8748,7 +8748,6 @@ static unsigned getRVVReductionOp(unsigned ISDOpcode) {
case ISD::VP_REDUCE_FMIN:
return RISCVISD::VECREDUCE_FMIN_VL;
}
-
}
SDValue RISCVTargetLowering::lowerVectorMaskVecReduction(SDValue Op,
@@ -11566,7 +11565,7 @@ combineBinOpOfExtractToReduceTree(SDNode *N, SelectionDAG &DAG,
if (LHS.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
LHS.getOperand(0) == SrcVec && isa<ConstantSDNode>(LHS.getOperand(1))) {
uint64_t LHSIdx =
- cast<ConstantSDNode>(LHS.getOperand(1))->getLimitedValue();
+ cast<ConstantSDNode>(LHS.getOperand(1))->getLimitedValue();
if (0 == std::min(LHSIdx, RHSIdx) && 1 == std::max(LHSIdx, RHSIdx)) {
EVT ReduceVT = EVT::getVectorVT(*DAG.getContext(), VT, 2);
SDValue Vec = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, ReduceVT, SrcVec,
@@ -11601,7 +11600,6 @@ combineBinOpOfExtractToReduceTree(SDNode *N, SelectionDAG &DAG,
return SDValue();
}
-
// Try to fold (<bop> x, (reduction.<bop> vec, start))
static SDValue combineBinOpToReduce(SDNode *N, SelectionDAG &DAG,
const RISCVSubtarget &Subtarget) {
@@ -14722,14 +14720,16 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N,
DAG.getConstant(Addend, DL, PtrVT));
SDVTList VTs = DAG.getVTList({VT, MVT::Other});
- SDValue IntID =
- DAG.getTargetConstant(Intrinsic::riscv_masked_strided_load, DL,
- XLenVT);
- SDValue Ops[] =
- {MGN->getChain(), IntID, MGN->getPassThru(), BasePtr,
- DAG.getConstant(StepNumerator, DL, XLenVT), MGN->getMask()};
- return DAG.getMemIntrinsicNode(ISD::INTRINSIC_W_CHAIN, DL, VTs,
- Ops, VT, MGN->getMemOperand());
+ SDValue IntID = DAG.getTargetConstant(
+ Intrinsic::riscv_masked_strided_load, DL, XLenVT);
+ SDValue Ops[] = {MGN->getChain(),
+ IntID,
+ MGN->getPassThru(),
+ BasePtr,
+ DAG.getConstant(StepNumerator, DL, XLenVT),
+ MGN->getMask()};
+ return DAG.getMemIntrinsicNode(ISD::INTRINSIC_W_CHAIN, DL, VTs, Ops, VT,
+ MGN->getMemOperand());
}
}
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h
index bb2ac3c2e..1c8919ec3 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.h
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h
@@ -122,7 +122,8 @@ enum NodeType : unsigned {
FPCLASS,
// Floating point fmax and fmin matching the RISC-V instruction semantics.
- FMAX, FMIN,
+ FMAX,
+ FMIN,
// READ_CYCLE_WIDE - A read of the 64-bit cycle CSR on a 32-bit target
// (returns (Lo, Hi)). It takes a chain operand.
@@ -135,10 +136,17 @@ enum NodeType : unsigned {
UNZIP,
// Scalar cryptography
- CLMUL, CLMULH, CLMULR,
- SHA256SIG0, SHA256SIG1, SHA256SUM0, SHA256SUM1,
- SM4KS, SM4ED,
- SM3P0, SM3P1,
+ CLMUL,
+ CLMULH,
+ CLMULR,
+ SHA256SIG0,
+ SHA256SIG1,
+ SHA256SUM0,
+ SHA256SUM1,
+ SM4KS,
+ SM4ED,
+ SM3P0,
+ SM3P1,
// Vector Extension
FIRST_VL_VECTOR_OP,
diff --git a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
index e73cab58d..9ac1138a4 100644
--- a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+++ b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
@@ -663,7 +663,9 @@ bool RISCVOptWInstrs::stripWSuffixes(MachineFunction &MF,
default:
continue;
case RISCV::ADDW: Opc = RISCV::ADD; break;
- case RISCV::ADDIW: Opc = RISCV::ADDI; break;
+ case RISCV::ADDIW:
+ Opc = RISCV::ADDI;
+ break;
case RISCV::MULW: Opc = RISCV::MUL; break;
case RISCV::SLLIW: Opc = RISCV::SLLI; break;
}
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
index e6db840c0..65f3b20b2 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
@@ -584,32 +584,32 @@ namespace X86II {
// PseudoFrm - This represents an instruction that is a pseudo instruction
// or one that has not been implemented yet. It is illegal to code generate
// it, but tolerated for intermediate implementation stages.
- Pseudo = 0,
+ Pseudo = 0,
/// Raw - This form is for instructions that don't have any operands, so
/// they are just a fixed opcode value, like 'leave'.
- RawFrm = 1,
+ RawFrm = 1,
/// AddRegFrm - This form is used for instructions like 'push r32' that have
/// their one register operand added to their opcode.
- AddRegFrm = 2,
+ AddRegFrm = 2,
/// RawFrmMemOffs - This form is for instructions that store an absolute
/// memory offset as an immediate with a possible segment override.
- RawFrmMemOffs = 3,
+ RawFrmMemOffs = 3,
/// RawFrmSrc - This form is for instructions that use the source index
/// register SI/ESI/RSI with a possible segment override.
- RawFrmSrc = 4,
+ RawFrmSrc = 4,
/// RawFrmDst - This form is for instructions that use the destination index
/// register DI/EDI/RDI.
- RawFrmDst = 5,
+ RawFrmDst = 5,
/// RawFrmDstSrc - This form is for instructions that use the source index
/// register SI/ESI/RSI with a possible segment override, and also the
/// destination index register DI/EDI/RDI.
- RawFrmDstSrc = 6,
+ RawFrmDstSrc = 6,
/// RawFrmImm8 - This is used for the ENTER instruction, which has two
/// immediates, the first of which is a 16-bit immediate (specified by
@@ -630,7 +630,8 @@ namespace X86II {
/// byte like data16 or rep.
PrefixByte = 10,
- /// MRMDestMem4VOp3CC - This form is used for instructions that use the Mod/RM
+ /// MRMDestMem4VOp3CC - This form is used for instructions that use the
+ /// Mod/RM
/// byte to specify a destination which in this case is memory and operand 3
/// with VEX.VVVV, and also encodes a condition code.
MRMDestMem4VOp3CC = 20,
@@ -644,7 +645,7 @@ namespace X86II {
MRMr0 = 21,
/// MRMSrcMem - But force to use the SIB field.
- MRMSrcMemFSIB = 22,
+ MRMSrcMemFSIB = 22,
/// MRMDestMem - But force to use the SIB field.
MRMDestMemFSIB = 23,
@@ -652,12 +653,12 @@ namespace X86II {
/// MRMDestMem - This form is used for instructions that use the Mod/RM byte
/// to specify a destination, which in this case is memory.
///
- MRMDestMem = 24,
+ MRMDestMem = 24,
/// MRMSrcMem - This form is used for instructions that use the Mod/RM byte
/// to specify a source, which in this case is memory.
///
- MRMSrcMem = 25,
+ MRMSrcMem = 25,
/// MRMSrcMem4VOp3 - This form is used for instructions that encode
/// operand 3 with VEX.VVVV and load from memory.
@@ -667,12 +668,12 @@ namespace X86II {
/// MRMSrcMemOp4 - This form is used for instructions that use the Mod/RM
/// byte to specify the fourth source, which in this case is memory.
///
- MRMSrcMemOp4 = 27,
+ MRMSrcMemOp4 = 27,
/// MRMSrcMemCC - This form is used for instructions that use the Mod/RM
/// byte to specify the operands and also encodes a condition code.
///
- MRMSrcMemCC = 28,
+ MRMSrcMemCC = 28,
/// MRMXm - This form is used for instructions that use the Mod/RM byte
/// to specify a memory source, but doesn't use the middle field. And has
@@ -686,18 +687,24 @@ namespace X86II {
MRMXm = 31,
// Next, instructions that operate on a memory r/m operand...
- MRM0m = 32, MRM1m = 33, MRM2m = 34, MRM3m = 35, // Format /0 /1 /2 /3
- MRM4m = 36, MRM5m = 37, MRM6m = 38, MRM7m = 39, // Format /4 /5 /6 /7
+ MRM0m = 32,
+ MRM1m = 33,
+ MRM2m = 34,
+ MRM3m = 35, // Format /0 /1 /2 /3
+ MRM4m = 36,
+ MRM5m = 37,
+ MRM6m = 38,
+ MRM7m = 39, // Format /4 /5 /6 /7
/// MRMDestReg - This form is used for instructions that use the Mod/RM byte
/// to specify a destination, which in this case is a register.
///
- MRMDestReg = 40,
+ MRMDestReg = 40,
/// MRMSrcReg - This form is used for instructions that use the Mod/RM byte
/// to specify a source, which in this case is a register.
///
- MRMSrcReg = 41,
+ MRMSrcReg = 41,
/// MRMSrcReg4VOp3 - This form is used for instructions that encode
/// operand 3 with VEX.VVVV and do not load from memory.
@@ -707,12 +714,12 @@ namespace X86II {
/// MRMSrcRegOp4 - This form is used for instructions that use the Mod/RM
/// byte to specify the fourth source, which in this case is a register.
///
- MRMSrcRegOp4 = 43,
+ MRMSrcRegOp4 = 43,
/// MRMSrcRegCC - This form is used for instructions that use the Mod/RM
/// byte to specify the operands and also encodes a condition code
///
- MRMSrcRegCC = 44,
+ MRMSrcRegCC = 44,
/// MRMXCCr - This form is used for instructions that use the Mod/RM byte
/// to specify a register source, but doesn't use the middle field. And has
@@ -726,32 +733,92 @@ namespace X86II {
MRMXr = 47,
// Instructions that operate on a register r/m operand...
- MRM0r = 48, MRM1r = 49, MRM2r = 50, MRM3r = 51, // Format /0 /1 /2 /3
- MRM4r = 52, MRM5r = 53, MRM6r = 54, MRM7r = 55, // Format /4 /5 /6 /7
+ MRM0r = 48,
+ MRM1r = 49,
+ MRM2r = 50,
+ MRM3r = 51, // Format /0 /1 /2 /3
+ MRM4r = 52,
+ MRM5r = 53,
+ MRM6r = 54,
+ MRM7r = 55, // Format /4 /5 /6 /7
// Instructions that operate that have mod=11 and an opcode but ignore r/m.
- MRM0X = 56, MRM1X = 57, MRM2X = 58, MRM3X = 59, // Format /0 /1 /2 /3
- MRM4X = 60, MRM5X = 61, MRM6X = 62, MRM7X = 63, // Format /4 /5 /6 /7
+ MRM0X = 56,
+ MRM1X = 57,
+ MRM2X = 58,
+ MRM3X = 59, // Format /0 /1 /2 /3
+ MRM4X = 60,
+ MRM5X = 61,
+ MRM6X = 62,
+ MRM7X = 63, // Format /4 /5 /6 /7
/// MRM_XX - A mod/rm byte of exactly 0xXX.
- MRM_C0 = 64, MRM_C1 = 65, MRM_C2 = 66, MRM_C3 = 67,
- MRM_C4 = 68, MRM_C5 = 69, MRM_C6 = 70, MRM_C7 = 71,
- MRM_C8 = 72, MRM_C9 = 73, MRM_CA = 74, MRM_CB = 75,
- MRM_CC = 76, MRM_CD = 77, MRM_CE = 78, MRM_CF = 79,
- MRM_D0 = 80, MRM_D1 = 81, MRM_D2 = 82, MRM_D3 = 83,
- MRM_D4 = 84, MRM_D5 = 85, MRM_D6 = 86, MRM_D7 = 87,
- MRM_D8 = 88, MRM_D9 = 89, MRM_DA = 90, MRM_DB = 91,
- MRM_DC = 92, MRM_DD = 93, MRM_DE = 94, MRM_DF = 95,
- MRM_E0 = 96, MRM_E1 = 97, MRM_E2 = 98, MRM_E3 = 99,
- MRM_E4 = 100, MRM_E5 = 101, MRM_E6 = 102, MRM_E7 = 103,
- MRM_E8 = 104, MRM_E9 = 105, MRM_EA = 106, MRM_EB = 107,
- MRM_EC = 108, MRM_ED = 109, MRM_EE = 110, MRM_EF = 111,
- MRM_F0 = 112, MRM_F1 = 113, MRM_F2 = 114, MRM_F3 = 115,
- MRM_F4 = 116, MRM_F5 = 117, MRM_F6 = 118, MRM_F7 = 119,
- MRM_F8 = 120, MRM_F9 = 121, MRM_FA = 122, MRM_FB = 123,
- MRM_FC = 124, MRM_FD = 125, MRM_FE = 126, MRM_FF = 127,
-
- FormMask = 127,
+ MRM_C0 = 64,
+ MRM_C1 = 65,
+ MRM_C2 = 66,
+ MRM_C3 = 67,
+ MRM_C4 = 68,
+ MRM_C5 = 69,
+ MRM_C6 = 70,
+ MRM_C7 = 71,
+ MRM_C8 = 72,
+ MRM_C9 = 73,
+ MRM_CA = 74,
+ MRM_CB = 75,
+ MRM_CC = 76,
+ MRM_CD = 77,
+ MRM_CE = 78,
+ MRM_CF = 79,
+ MRM_D0 = 80,
+ MRM_D1 = 81,
+ MRM_D2 = 82,
+ MRM_D3 = 83,
+ MRM_D4 = 84,
+ MRM_D5 = 85,
+ MRM_D6 = 86,
+ MRM_D7 = 87,
+ MRM_D8 = 88,
+ MRM_D9 = 89,
+ MRM_DA = 90,
+ MRM_DB = 91,
+ MRM_DC = 92,
+ MRM_DD = 93,
+ MRM_DE = 94,
+ MRM_DF = 95,
+ MRM_E0 = 96,
+ MRM_E1 = 97,
+ MRM_E2 = 98,
+ MRM_E3 = 99,
+ MRM_E4 = 100,
+ MRM_E5 = 101,
+ MRM_E6 = 102,
+ MRM_E7 = 103,
+ MRM_E8 = 104,
+ MRM_E9 = 105,
+ MRM_EA = 106,
+ MRM_EB = 107,
+ MRM_EC = 108,
+ MRM_ED = 109,
+ MRM_EE = 110,
+ MRM_EF = 111,
+ MRM_F0 = 112,
+ MRM_F1 = 113,
+ MRM_F2 = 114,
+ MRM_F3 = 115,
+ MRM_F4 = 116,
+ MRM_F5 = 117,
+ MRM_F6 = 118,
+ MRM_F7 = 119,
+ MRM_F8 = 120,
+ MRM_F9 = 121,
+ MRM_FA = 122,
+ MRM_FB = 123,
+ MRM_FC = 124,
+ MRM_FD = 125,
+ MRM_FE = 126,
+ MRM_FF = 127,
+
+ FormMask = 127,
//===------------------------------------------------------------------===//
// Actual flags...
@@ -763,18 +830,18 @@ namespace X86II {
OpSizeShift = 7,
OpSizeMask = 0x3 << OpSizeShift,
- OpSizeFixed = 0 << OpSizeShift,
- OpSize16 = 1 << OpSizeShift,
- OpSize32 = 2 << OpSizeShift,
+ OpSizeFixed = 0 << OpSizeShift,
+ OpSize16 = 1 << OpSizeShift,
+ OpSize32 = 2 << OpSizeShift,
// AsSize - AdSizeX implies this instruction determines its need of 0x67
// prefix from a normal ModRM memory operand. The other types indicate that
// an operand is encoded with a specific width and a prefix is needed if
// it differs from the current mode.
AdSizeShift = OpSizeShift + 2,
- AdSizeMask = 0x3 << AdSizeShift,
+ AdSizeMask = 0x3 << AdSizeShift,
- AdSizeX = 0 << AdSizeShift,
+ AdSizeX = 0 << AdSizeShift,
AdSize16 = 1 << AdSizeShift,
AdSize32 = 2 << AdSizeShift,
AdSize64 = 3 << AdSizeShift,
@@ -785,7 +852,7 @@ namespace X86II {
// no prefix.
//
OpPrefixShift = AdSizeShift + 2,
- OpPrefixMask = 0x3 << OpPrefixShift,
+ OpPrefixMask = 0x3 << OpPrefixShift,
// PD - Prefix code for packed double precision vector floating point
// operations performed in the SSE registers.
@@ -793,14 +860,15 @@ namespace X86II {
// XS, XD - These prefix codes are for single and double precision scalar
// floating point operations performed in the SSE registers.
- XS = 2 << OpPrefixShift, XD = 3 << OpPrefixShift,
+ XS = 2 << OpPrefixShift,
+ XD = 3 << OpPrefixShift,
//===------------------------------------------------------------------===//
// OpMap - This field determines which opcode map this instruction
// belongs to. i.e. one-byte, two-byte, 0x0f 0x38, 0x0f 0x3a, etc.
//
OpMapShift = OpPrefixShift + 2,
- OpMapMask = 0xF << OpMapShift,
+ OpMapMask = 0xF << OpMapShift,
// OB - OneByte - Set if this instruction has a one byte opcode.
OB = 0 << OpMapShift,
@@ -810,7 +878,8 @@ namespace X86II {
TB = 1 << OpMapShift,
// T8, TA - Prefix after the 0x0F prefix.
- T8 = 2 << OpMapShift, TA = 3 << OpMapShift,
+ T8 = 2 << OpMapShift,
+ TA = 3 << OpMapShift,
// XOP8 - Prefix to include use of imm byte.
XOP8 = 4 << OpMapShift,
@@ -840,39 +909,39 @@ namespace X86II {
// etc. We only cares about REX.W and REX.R bits and only the former is
// statically determined.
//
- REXShift = OpMapShift + 4,
- REX_W = 1 << REXShift,
+ REXShift = OpMapShift + 4,
+ REX_W = 1 << REXShift,
//===------------------------------------------------------------------===//
// This three-bit field describes the size of an immediate operand. Zero is
// unused so that we can tell if we forgot to set a value.
ImmShift = REXShift + 1,
- ImmMask = 15 << ImmShift,
- Imm8 = 1 << ImmShift,
- Imm8PCRel = 2 << ImmShift,
- Imm8Reg = 3 << ImmShift,
- Imm16 = 4 << ImmShift,
+ ImmMask = 15 << ImmShift,
+ Imm8 = 1 << ImmShift,
+ Imm8PCRel = 2 << ImmShift,
+ Imm8Reg = 3 << ImmShift,
+ Imm16 = 4 << ImmShift,
Imm16PCRel = 5 << ImmShift,
- Imm32 = 6 << ImmShift,
+ Imm32 = 6 << ImmShift,
Imm32PCRel = 7 << ImmShift,
- Imm32S = 8 << ImmShift,
- Imm64 = 9 << ImmShift,
+ Imm32S = 8 << ImmShift,
+ Imm64 = 9 << ImmShift,
//===------------------------------------------------------------------===//
// FP Instruction Classification... Zero is non-fp instruction.
// FPTypeMask - Mask for all of the FP types...
FPTypeShift = ImmShift + 4,
- FPTypeMask = 7 << FPTypeShift,
+ FPTypeMask = 7 << FPTypeShift,
// NotFP - The default, set for instructions that do not use FP registers.
- NotFP = 0 << FPTypeShift,
+ NotFP = 0 << FPTypeShift,
// ZeroArgFP - 0 arg FP instruction which implicitly pushes ST(0), f.e. fld0
- ZeroArgFP = 1 << FPTypeShift,
+ ZeroArgFP = 1 << FPTypeShift,
// OneArgFP - 1 arg FP instructions which implicitly read ST(0), such as fst
- OneArgFP = 2 << FPTypeShift,
+ OneArgFP = 2 << FPTypeShift,
// OneArgFPRW - 1 arg FP instruction which implicitly read ST(0) and write a
// result back to ST(0). For example, fcos, fsqrt, etc.
@@ -882,17 +951,17 @@ namespace X86II {
// TwoArgFP - 2 arg FP instructions which implicitly read ST(0), and an
// explicit argument, storing the result to either ST(0) or the implicit
// argument. For example: fadd, fsub, fmul, etc...
- TwoArgFP = 4 << FPTypeShift,
+ TwoArgFP = 4 << FPTypeShift,
// CompareFP - 2 arg FP instructions which implicitly read ST(0) and an
// explicit argument, but have no destination. Example: fucom, fucomi, ...
- CompareFP = 5 << FPTypeShift,
+ CompareFP = 5 << FPTypeShift,
// CondMovFP - "2 operand" floating point conditional move instructions.
- CondMovFP = 6 << FPTypeShift,
+ CondMovFP = 6 << FPTypeShift,
// SpecialFP - Special instruction forms. Dispatch by opcode explicitly.
- SpecialFP = 7 << FPTypeShift,
+ SpecialFP = 7 << FPTypeShift,
// Lock prefix
LOCKShift = FPTypeShift + 3,
@@ -923,36 +992,36 @@ namespace X86II {
EVEX = 3 << EncodingShift,
// Opcode
- OpcodeShift = EncodingShift + 2,
+ OpcodeShift = EncodingShift + 2,
/// VEX_4V - Used to specify an additional AVX/SSE register. Several 2
/// address instructions in SSE are represented as 3 address ones in AVX
/// and the additional register is encoded in VEX_VVVV prefix.
VEX_4VShift = OpcodeShift + 8,
- VEX_4V = 1ULL << VEX_4VShift,
+ VEX_4V = 1ULL << VEX_4VShift,
/// VEX_L - Stands for a bit in the VEX opcode prefix meaning the current
/// instruction uses 256-bit wide registers. This is usually auto detected
/// if a VR256 register is used, but some AVX instructions also have this
/// field marked when using a f256 memory references.
VEX_LShift = VEX_4VShift + 1,
- VEX_L = 1ULL << VEX_LShift,
+ VEX_L = 1ULL << VEX_LShift,
// EVEX_K - Set if this instruction requires masking
EVEX_KShift = VEX_LShift + 1,
- EVEX_K = 1ULL << EVEX_KShift,
+ EVEX_K = 1ULL << EVEX_KShift,
// EVEX_Z - Set if this instruction has EVEX.Z field set.
EVEX_ZShift = EVEX_KShift + 1,
- EVEX_Z = 1ULL << EVEX_ZShift,
+ EVEX_Z = 1ULL << EVEX_ZShift,
// EVEX_L2 - Set if this instruction has EVEX.L' field set.
EVEX_L2Shift = EVEX_ZShift + 1,
- EVEX_L2 = 1ULL << EVEX_L2Shift,
+ EVEX_L2 = 1ULL << EVEX_L2Shift,
// EVEX_B - Set if this instruction has EVEX.B field set.
EVEX_BShift = EVEX_L2Shift + 1,
- EVEX_B = 1ULL << EVEX_BShift,
+ EVEX_B = 1ULL << EVEX_BShift,
// The scaling factor for the AVX512's 8-bit compressed displacement.
CD8_Scale_Shift = EVEX_BShift + 1,
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 9a3e1e9bd..4154d83c4 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4993,7 +4993,8 @@ static SDValue IsNOT(SDValue V, SelectionDAG &DAG) {
if (collectConcatOps(V.getNode(), CatOps, DAG)) {
for (SDValue &CatOp : CatOps) {
SDValue NotCat = IsNOT(CatOp, DAG);
- if (!NotCat) return SDValue();
+ if (!NotCat)
+ return SDValue();
CatOp = DAG.getBitcast(CatOp.getValueType(), NotCat);
}
return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(V), V.getValueType(), CatOps);
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index fa6fe9d30..07beef030 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -1034,7 +1034,8 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
// constant. We can't directly simplify pointers as a constant because of
// pointer provenance.
// TODO: We could return `(inttoptr const)` for pointers.
- if (!V->getType()->isPointerTy() && DemandedMask.isSubsetOf(Known.Zero | Known.One))
+ if (!V->getType()->isPointerTy() &&
+ DemandedMask.isSubsetOf(Known.Zero | Known.One))
return Constant::getIntegerValue(VTy, Known.One);
return nullptr;
}
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 14d2bcfd5..fae85472c 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1362,7 +1362,7 @@ public:
}
LLVM_DUMP_METHOD void dump() const { dump(dbgs()); }
#endif
- bool operator == (const EdgeInfo &Other) const {
+ bool operator==(const EdgeInfo &Other) const {
return UserTE == Other.UserTE && EdgeIdx == Other.EdgeIdx;
}
};
@@ -7485,19 +7485,19 @@ public:
return nullptr;
// Check if it can be considered reused if same extractelements were
// vectorized already.
- bool PrevNodeFound = any_of(
- ArrayRef(R.VectorizableTree).take_front(E->Idx),
- [&](const std::unique_ptr<TreeEntry> &TE) {
- return ((!TE->isAltShuffle() &&
- TE->getOpcode() == Instruction::ExtractElement) ||
- TE->State == TreeEntry::NeedToGather) &&
- all_of(enumerate(TE->Scalars), [&](auto &&Data) {
- return VL.size() > Data.index() &&
- (Mask[Data.index()] == PoisonMaskElem ||
- isa<UndefValue>(VL[Data.index()]) ||
- Data.value() == VL[Data.index()]);
- });
- });
+ bool PrevNodeFound =
+ any_of(ArrayRef(R.VectorizableTree).take_front(E->Idx),
+ [&](const std::unique_ptr<TreeEntry> &TE) {
+ return ((!TE->isAltShuffle() &&
+ TE->getOpcode() == Instruction::ExtractElement) ||
+ TE->State == TreeEntry::NeedToGather) &&
+ all_of(enumerate(TE->Scalars), [&](auto &&Data) {
+ return VL.size() > Data.index() &&
+ (Mask[Data.index()] == PoisonMaskElem ||
+ isa<UndefValue>(VL[Data.index()]) ||
+ Data.value() == VL[Data.index()]);
+ });
+ });
unsigned SliceSize = VL.size() / NumParts;
for (unsigned Part = 0; Part < NumParts; ++Part) {
ArrayRef<int> SubMask = Mask.slice(Part * SliceSize, SliceSize);
@@ -7674,7 +7674,7 @@ public:
assert((IsFinalized || CommonMask.empty()) &&
"Shuffle construction must be finalized.");
}
- };
+};
InstructionCost
BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
@@ -10055,7 +10055,7 @@ public:
#ifndef NDEBUG
int PrevSize = 0;
#endif // NDEBUG
- for (const auto [I, V]: enumerate(VL)) {
+ for (const auto [I, V] : enumerate(VL)) {
if (SubMask[I] == PoisonMaskElem)
continue;
Value *VecOp = cast<ExtractElementInst>(V)->getVectorOperand();
@@ -10907,7 +10907,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
// auto *I = dyn_cast<Instruction>(V);
// return I && I->getParent() == IBB;
// }))
- Builder.SetInsertPoint(IBB->getTerminator());
+ Builder.SetInsertPoint(IBB->getTerminator());
// else
// Builder.SetInsertPoint(IBB->getFirstNonPHIOrDbgOrLifetime());
Builder.SetCurrentDebugLocation(PH->getDebugLoc());
@@ -14210,10 +14210,9 @@ public:
// Initialize the final value in the reduction.
return Res;
};
- bool AnyBoolLogicOp =
- any_of(ReductionOps.back(), [](Value *V) {
- return isBoolLogicOp(cast<Instruction>(V));
- });
+ bool AnyBoolLogicOp = any_of(ReductionOps.back(), [](Value *V) {
+ return isBoolLogicOp(cast<Instruction>(V));
+ });
// The reduction root is used as the insertion point for new instructions,
// so set it as externally used to prevent it from being deleted.
ExternallyUsedValues[ReductionRoot];
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 9a91ce207..7756a2d7a 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -789,8 +789,7 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
InstructionCost OldCost = 2 * SplatCost + VectorOpCost;
// Determine scalar opcode
- std::optional<unsigned> FunctionalOpcode =
- VPI.getFunctionalOpcode();
+ std::optional<unsigned> FunctionalOpcode = VPI.getFunctionalOpcode();
std::optional<Intrinsic::ID> ScalarIntrID = std::nullopt;
if (!FunctionalOpcode) {
ScalarIntrID = VPI.getFunctionalIntrinsicID();
@@ -813,8 +812,7 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
(SplatCost * !Op0->hasOneUse()) + (SplatCost * !Op1->hasOneUse());
InstructionCost NewCost = ScalarOpCost + SplatCost + CostToKeepSplats;
- LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI
- << "\n");
+ LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI << "\n");
LLVM_DEBUG(dbgs() << "Cost of Intrinsic: " << OldCost
<< ", Cost of scalarizing:" << NewCost << "\n");
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index e7e7f8228..a49a925ec 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -930,8 +930,8 @@ remapSamples(const sampleprof::FunctionSamples &Samples,
BodySample.second.getSamples());
for (const auto &Target : BodySample.second.getCallTargets()) {
Result.addCalledTargetSamples(BodySample.first.LineOffset,
- MaskedDiscriminator,
- Remapper(Target.first), Target.second);
+ MaskedDiscriminator, Remapper(Target.first),
+ Target.second);
}
}
for (const auto &CallsiteSamples : Samples.getCallsiteSamples()) {
diff --git a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
index e5ee93ffa..14850e766 100644
--- a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+++ b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
@@ -4005,7 +4005,6 @@ TEST(GSYMTest, TestEmptyRangeWarnings) {
EXPECT_TRUE(errors.find("error:") == std::string::npos);
}
-
TEST(GSYMTest, TestEmptyLinkageName) {
// This example has a single compile unit that has a DW_TAG_subprogram that
// has a function that has an empty linkage name and a valid normal name.
@@ -4030,7 +4029,6 @@ TEST(GSYMTest, TestEmptyLinkageName) {
//
// 0x0000002e: NULL
-
StringRef yamldata = R"(
debug_str:
- ''
diff --git a/llvm/unittests/TargetParser/TargetParserTest.cpp b/llvm/unittests/TargetParser/TargetParserTest.cpp
index d4c5d68cb..232ef3ef2 100644
--- a/llvm/unittests/TargetParser/TargetParserTest.cpp
+++ b/llvm/unittests/TargetParser/TargetParserTest.cpp
@@ -8,8 +8,8 @@
#include "llvm/TargetParser/TargetParser.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/Support/ARMBuildAttributes.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/TargetParser/AArch64TargetParser.h"
@@ -1012,11 +1012,12 @@ TEST(TargetParserTest, getARMCPUForArch) {
}
TEST(TargetParserTest, ARMPrintSupportedExtensions) {
- std::string expected = "All available -march extensions for ARM\n\n"
- " Name Description\n"
- " crc This is a long dummy description\n"
- " crypto\n"
- " sha2\n";
+ std::string expected =
+ "All available -march extensions for ARM\n\n"
+ " Name Description\n"
+ " crc This is a long dummy description\n"
+ " crypto\n"
+ " sha2\n";
StringMap<StringRef> DummyMap;
DummyMap["crc"] = "This is a long dummy description";
@@ -1969,11 +1970,12 @@ TEST(TargetParserTest, AArch64ArchExtFeature) {
}
TEST(TargetParserTest, AArch64PrintSupportedExtensions) {
- std::string expected = "All available -march extensions for AArch64\n\n"
- " Name Description\n"
- " aes This is a long dummy description\n"
- " b16b16\n"
- " bf16\n";
+ std::string expected =
+ "All available -march extensions for AArch64\n\n"
+ " Name Description\n"
+ " aes This is a long dummy description\n"
+ " b16b16\n"
+ " bf16\n";
StringMap<StringRef> DummyMap;
DummyMap["aes"] = "This is a long dummy description";
|
boomanaiden154
pushed a commit
that referenced
this pull request
Feb 24, 2024
…lvm#80904)" This reverts commit b1ac052. This commit breaks coroutine splitting for non-swift calling convention functions. In this example: ```ll ; ModuleID = 'repro.ll' source_filename = "stdlib/test/runtime/test_llcl.mojo" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @0 = internal constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (ptr @craSH to i64), i64 ptrtoint (ptr getelementptr inbounds ({ i32, i32 }, ptr @0, i32 0, i32 1) to i64)) to i32), i32 64 } define dso_local void @af_suspend_fn(ptr %0, i64 %1, ptr %2) #0 { ret void } define dso_local void @craSH(ptr %0) #0 { %2 = call token @llvm.coro.id.async(i32 64, i32 8, i32 0, ptr @0) %3 = call ptr @llvm.coro.begin(token %2, ptr null) %4 = getelementptr inbounds { ptr, { ptr, ptr }, i64, { ptr, i1 }, i64, i64 }, ptr poison, i32 0, i32 0 %5 = call ptr @llvm.coro.async.resume() store ptr %5, ptr %4, align 8 %6 = call { ptr, ptr, ptr } (i32, ptr, ptr, ...) @llvm.coro.suspend.async.sl_p0p0p0s(i32 0, ptr %5, ptr @ctxt_proj_fn, ptr @af_suspend_fn, ptr poison, i64 -1, ptr poison) ret void } define dso_local ptr @ctxt_proj_fn(ptr %0) #0 { ret ptr %0 } ; Function Attrs: nomerge nounwind declare { ptr, ptr, ptr } @llvm.coro.suspend.async.sl_p0p0p0s(i32, ptr, ptr, ...) #1 ; Function Attrs: nounwind declare token @llvm.coro.id.async(i32, i32, i32, ptr) #2 ; Function Attrs: nounwind declare ptr @llvm.coro.begin(token, ptr writeonly) #2 ; Function Attrs: nomerge nounwind declare ptr @llvm.coro.async.resume() #1 attributes #0 = { "target-features"="+adx,+aes,+avx,+avx2,+bmi,+bmi2,+clflushopt,+clwb,+clzero,+crc32,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+mwaitx,+pclmul,+pku,+popcnt,+prfchw,+rdpid,+rdpru,+rdrnd,+rdseed,+sahf,+sha,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+sse4a,+ssse3,+vaes,+vpclmulqdq,+wbnoinvd,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" } attributes #1 = { nomerge nounwind } attributes #2 = { nounwind } ``` This verifier crashes after the `coro-split` pass with ``` cannot guarantee tail call due to mismatched parameter counts musttail call void @af_suspend_fn(ptr poison, i64 -1, ptr poison) LLVM ERROR: Broken function PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: opt ../../../reduced.ll -O0 #0 0x00007f1d89645c0e __interceptor_backtrace.part.0 /build/gcc-11-XeT9lY/gcc-11-11.4.0/build/x86_64-linux-gnu/libsanitizer/asan/../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4193:28 #1 0x0000556d94d254f7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:22 #2 0x0000556d94d19a2f llvm::sys::RunSignalHandlers() /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Support/Signals.cpp:105:20 #3 0x0000556d94d1aa42 SignalHandler(int) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Support/Unix/Signals.inc:371:36 #4 0x00007f1d88e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) #5 0x00007f1d88e969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76 #6 0x00007f1d88e969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10 #7 0x00007f1d88e969fc pthread_kill ./nptl/pthread_kill.c:89:10 #8 0x00007f1d88e42476 gsignal ./signal/../sysdeps/posix/raise.c:27:6 #9 0x00007f1d88e287f3 abort ./stdlib/abort.c:81:7 #10 0x0000556d8944be01 std::vector<llvm::json::Value, std::allocator<llvm::json::Value>>::size() const /usr/include/c++/11/bits/stl_vector.h:919:40 #11 0x0000556d8944be01 bool std::operator==<llvm::json::Value, std::allocator<llvm::json::Value>>(std::vector<llvm::json::Value, std::allocator<llvm::json::Value>> const&, std::vector<llvm::json::Value, std::allocator<llvm::json::Value>> const&) /usr/include/c++/11/bits/stl_vector.h:1893:23 #12 0x0000556d8944be01 llvm::json::operator==(llvm::json::Array const&, llvm::json::Array const&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/Support/JSON.h:572:69 #13 0x0000556d8944be01 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Support/JSON.cpp:204:28 #14 0x0000556d949ed2bd llvm::report_fatal_error(char const*, bool) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Support/ErrorHandling.cpp:82:70 #15 0x0000556d8e37e876 llvm::SmallVectorBase<unsigned int>::size() const /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallVector.h:91:32 #16 0x0000556d8e37e876 llvm::SmallVectorTemplateCommon<llvm::DiagnosticInfoOptimizationBase::Argument, void>::end() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallVector.h:282:41 #17 0x0000556d8e37e876 llvm::SmallVector<llvm::DiagnosticInfoOptimizationBase::Argument, 4u>::~SmallVector() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1215:24 #18 0x0000556d8e37e876 llvm::DiagnosticInfoOptimizationBase::~DiagnosticInfoOptimizationBase() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/DiagnosticInfo.h:413:7 #19 0x0000556d8e37e876 llvm::DiagnosticInfoIROptimization::~DiagnosticInfoIROptimization() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/DiagnosticInfo.h:622:7 #20 0x0000556d8e37e876 llvm::OptimizationRemark::~OptimizationRemark() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/DiagnosticInfo.h:689:7 #21 0x0000556d8e37e876 operator() /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Transforms/Coroutines/CoroSplit.cpp:2213:14 #22 0x0000556d8e37e876 emit<llvm::CoroSplitPass::run(llvm::LazyCallGraph::SCC&, llvm::CGSCCAnalysisManager&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)::<lambda()> > /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h:83:12 #23 0x0000556d8e37e876 llvm::CoroSplitPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Transforms/Coroutines/CoroSplit.cpp:2212:13 #24 0x0000556d8c36ecb1 llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::CoroSplitPass, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:91:3 #25 0x0000556d91c1a84f llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Analysis/CGSCCPassManager.cpp:90:12 #26 0x0000556d8c3690d1 llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:91:3 #27 0x0000556d91c2162d llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Analysis/CGSCCPassManager.cpp:278:18 #28 0x0000556d8c369035 llvm::detail::PassModel<llvm::Module, llvm::ModuleToPostOrderCGSCCPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:91:3 #29 0x0000556d9457abc5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManager.h:247:20 #30 0x0000556d8e30979e llvm::CoroConditionalWrapper::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/lib/Transforms/Coroutines/CoroConditionalWrapper.cpp:19:74 #31 0x0000556d8c365755 llvm::detail::PassModel<llvm::Module, llvm::CoroConditionalWrapper, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:91:3 #32 0x0000556d9457abc5 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/PassManager.h:247:20 #33 0x0000556d89818556 llvm::SmallPtrSetImplBase::isSmall() const /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:196:33 #34 0x0000556d89818556 llvm::SmallPtrSetImplBase::~SmallPtrSetImplBase() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:84:17 #35 0x0000556d89818556 llvm::SmallPtrSetImpl<llvm::AnalysisKey*>::~SmallPtrSetImpl() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:321:7 #36 0x0000556d89818556 llvm::SmallPtrSet<llvm::AnalysisKey*, 2u>::~SmallPtrSet() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:427:7 #37 0x0000556d89818556 llvm::PreservedAnalyses::~PreservedAnalyses() /home/ubuntu/modular/third-party/llvm-project/llvm/include/llvm/IR/Analysis.h:109:7 #38 0x0000556d89818556 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) /home/ubuntu/modular/third-party/llvm-project/llvm/tools/opt/NewPMDriver.cpp:532:10 #39 0x0000556d897e3939 optMain /home/ubuntu/modular/third-party/llvm-project/llvm/tools/opt/optdriver.cpp:737:27 #40 0x0000556d89455461 main /home/ubuntu/modular/third-party/llvm-project/llvm/tools/opt/opt.cpp:25:33 #41 0x00007f1d88e29d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #42 0x00007f1d88e29e40 call_init ./csu/../csu/libc-start.c:128:20 llvm#43 0x00007f1d88e29e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 #44 0x0000556d897b6335 _start (/home/ubuntu/modular/.derived/third-party/llvm-project/build-relwithdebinfo-asan/bin/opt+0x150c335) Aborted (core dumped)
boomanaiden154
pushed a commit
that referenced
this pull request
Mar 13, 2024
TestCases/Misc/Linux/sigaction.cpp fails because dlsym() may call malloc on failure. And then the wrapped malloc appears to access thread local storage using global dynamic accesses, thus calling ___interceptor___tls_get_addr, before REAL(__tls_get_addr) has been set, so we get a crash inside ___interceptor___tls_get_addr. For example, this can happen when looking up __isoc23_scanf which might not exist in some libcs. Fix this by marking the thread local variable accessed inside the debug checks as "initial-exec", which does not require __tls_get_addr. This is probably a better alternative to llvm#83886. This fixes a different crash but is related to llvm#46204. Backtrace: ``` #0 0x0000000000000000 in ?? () #1 0x00007ffff6a9d89e in ___interceptor___tls_get_addr (arg=0x7ffff6b27be8) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:2759 #2 0x00007ffff6a46bc6 in __sanitizer::CheckedMutex::LockImpl (this=0x7ffff6b27be8, pc=140737331846066) at /path/to/llvm/compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp:218 #3 0x00007ffff6a448b2 in __sanitizer::CheckedMutex::Lock (this=0x7ffff6b27be8, this@entry=0x730000000580) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:129 #4 __sanitizer::Mutex::Lock (this=0x7ffff6b27be8, this@entry=0x730000000580) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:167 #5 0x00007ffff6abdbb2 in __sanitizer::GenericScopedLock<__sanitizer::Mutex>::GenericScopedLock (mu=0x730000000580, this=<optimized out>) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:383 #6 __sanitizer::SizeClassAllocator64<__tsan::AP64>::GetFromAllocator (this=0x7ffff7487dc0 <__tsan::allocator_placeholder>, stat=stat@entry=0x7ffff570db68, class_id=11, chunks=chunks@entry=0x7ffff5702cc8, n_chunks=n_chunks@entry=128) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_primary64.h:207 #7 0x00007ffff6abdaa0 in __sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__tsan::AP64> >::Refill (this=<optimized out>, c=c@entry=0x7ffff5702cb8, allocator=<optimized out>, class_id=<optimized out>) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_local_cache.h:103 #8 0x00007ffff6abd731 in __sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__tsan::AP64> >::Allocate (this=0x7ffff6b27be8, allocator=0x7ffff5702cc8, class_id=140737311157448) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_local_cache.h:39 #9 0x00007ffff6abc397 in __sanitizer::CombinedAllocator<__sanitizer::SizeClassAllocator64<__tsan::AP64>, __sanitizer::LargeMmapAllocatorPtrArrayDynamic>::Allocate (this=0x7ffff5702cc8, cache=0x7ffff6b27be8, size=<optimized out>, size@entry=175, alignment=alignment@entry=16) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_combined.h:69 #10 0x00007ffff6abaa6a in __tsan::user_alloc_internal (thr=0x7ffff7ebd980, pc=140737331499943, sz=sz@entry=175, align=align@entry=16, signal=true) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_mman.cpp:198 #11 0x00007ffff6abb0d1 in __tsan::user_alloc (thr=0x7ffff6b27be8, pc=140737331846066, sz=11, sz@entry=175) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_mman.cpp:223 #12 0x00007ffff6a693b5 in ___interceptor_malloc (size=175) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:666 #13 0x00007ffff7fce7f2 in malloc (size=175) at ../include/rtld-malloc.h:56 #14 __GI__dl_exception_create_format (exception=exception@entry=0x7fffffffd0d0, objname=0x7ffff7fc3550 "/path/to/llvm/compiler-rt/cmake-build-all-sanitizers/lib/linux/libclang_rt.tsan-x86_64.so", fmt=fmt@entry=0x7ffff7ff2db9 "undefined symbol: %s%s%s") at ./elf/dl-exception.c:157 #15 0x00007ffff7fd50e8 in _dl_lookup_symbol_x (undef_name=0x7ffff6af868b "__isoc23_scanf", undef_map=<optimized out>, ref=0x7fffffffd148, symbol_scope=<optimized out>, version=<optimized out>, type_class=0, flags=2, skip_map=0x7ffff7fc35e0) at ./elf/dl-lookup.c:793 --Type <RET> for more, q to quit, c to continue without paging-- #16 0x00007ffff656d6ed in do_sym (handle=<optimized out>, name=0x7ffff6af868b "__isoc23_scanf", who=0x7ffff6a3bb84 <__interception::InterceptFunction(char const*, unsigned long*, unsigned long, unsigned long)+36>, vers=vers@entry=0x0, flags=flags@entry=2) at ./elf/dl-sym.c:146 #17 0x00007ffff656d9dd in _dl_sym (handle=<optimized out>, name=<optimized out>, who=<optimized out>) at ./elf/dl-sym.c:195 #18 0x00007ffff64a2854 in dlsym_doit (a=a@entry=0x7fffffffd3b0) at ./dlfcn/dlsym.c:40 #19 0x00007ffff7fcc489 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffd310, operate=0x7ffff64a2840 <dlsym_doit>, args=0x7fffffffd3b0) at ./elf/dl-catch.c:237 #20 0x00007ffff7fcc5af in _dl_catch_error (objname=0x7fffffffd368, errstring=0x7fffffffd370, mallocedp=0x7fffffffd367, operate=<optimized out>, args=<optimized out>) at ./elf/dl-catch.c:256 #21 0x00007ffff64a2257 in _dlerror_run (operate=operate@entry=0x7ffff64a2840 <dlsym_doit>, args=args@entry=0x7fffffffd3b0) at ./dlfcn/dlerror.c:138 #22 0x00007ffff64a28e5 in dlsym_implementation (dl_caller=<optimized out>, name=<optimized out>, handle=<optimized out>) at ./dlfcn/dlsym.c:54 #23 ___dlsym (handle=<optimized out>, name=<optimized out>) at ./dlfcn/dlsym.c:68 #24 0x00007ffff6a3bb84 in __interception::GetFuncAddr (name=0x7ffff6af868b "__isoc23_scanf", trampoline=140737311157448) at /path/to/llvm/compiler-rt/lib/interception/interception_linux.cpp:42 #25 __interception::InterceptFunction (name=0x7ffff6af868b "__isoc23_scanf", ptr_to_real=0x7ffff74850e8 <__interception::real___isoc23_scanf>, func=11, trampoline=140737311157448) at /path/to/llvm/compiler-rt/lib/interception/interception_linux.cpp:61 #26 0x00007ffff6a9f2d9 in InitializeCommonInterceptors () at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:10315 ``` Reviewed By: vitalybuka, MaskRay Pull Request: llvm#83890
boomanaiden154
pushed a commit
that referenced
this pull request
Mar 22, 2024
boomanaiden154
pushed a commit
that referenced
this pull request
Jul 4, 2024
…arallel fusion llvm#94391 (llvm#97607)" This reverts commit edbc0e3. Reason for rollback. ASAN complains about this PR: ==4320==ERROR: AddressSanitizer: heap-use-after-free on address 0x502000006cd8 at pc 0x55e2978d63cf bp 0x7ffe6431c2b0 sp 0x7ffe6431c2a8 READ of size 8 at 0x502000006cd8 thread T0 #0 0x55e2978d63ce in map<llvm::MutableArrayRef<mlir::BlockArgument> &, llvm::MutableArrayRef<mlir::BlockArgument>, nullptr> mlir/include/mlir/IR/IRMapping.h:40:11 #1 0x55e2978d63ce in mlir::createFused(mlir::LoopLikeOpInterface, mlir::LoopLikeOpInterface, mlir::RewriterBase&, std::__u::function<llvm::SmallVector<mlir::Value, 6u> (mlir::OpBuilder&, mlir::Location, llvm::ArrayRef<mlir::BlockArgument>)>, llvm::function_ref<void (mlir::RewriterBase&, mlir::LoopLikeOpInterface, mlir::LoopLikeOpInterface&, mlir::IRMapping)>) mlir/lib/Interfaces/LoopLikeInterface.cpp:156:11 #2 0x55e2952a614b in mlir::fuseIndependentSiblingForLoops(mlir::scf::ForOp, mlir::scf::ForOp, mlir::RewriterBase&) mlir/lib/Dialect/SCF/Utils/Utils.cpp:1398:43 #3 0x55e291480c6f in mlir::transform::LoopFuseSiblingOp::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp:482:17 #4 0x55e29149ed5e in mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::LoopFuseSiblingOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc:477:56 #5 0x55e297494a60 in apply blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc:61:14 #6 0x55e297494a60 in mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:953:48 #7 0x55e294646a8d in applySequenceBlock(mlir::Block&, mlir::transform::FailurePropagationMode, mlir::transform::TransformState&, mlir::transform::TransformResults&) mlir/lib/Dialect/Transform/IR/TransformOps.cpp:1788:15 #8 0x55e29464f927 in mlir::transform::NamedSequenceOp::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) mlir/lib/Dialect/Transform/IR/TransformOps.cpp:2155:10 #9 0x55e2945d28ee in mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::NamedSequenceOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc:477:56 #10 0x55e297494a60 in apply blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc:61:14 #11 0x55e297494a60 in mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:953:48 #12 0x55e2974a5fe2 in mlir::transform::applyTransforms(mlir::Operation*, mlir::transform::TransformOpInterface, mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>> const&, mlir::transform::TransformOptions const&, bool) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:2016:16 #13 0x55e2945888d7 in mlir::transform::applyTransformNamedSequence(mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>>, mlir::transform::TransformOpInterface, mlir::ModuleOp, mlir::transform::TransformOptions const&) mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp:234:10 #14 0x55e294582446 in (anonymous namespace)::InterpreterPass::runOnOperation() mlir/lib/Dialect/Transform/Transforms/InterpreterPass.cpp:147:16 #15 0x55e2978e93c6 in operator() mlir/lib/Pass/Pass.cpp:527:17 #16 0x55e2978e93c6 in void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #17 0x55e2978e207a in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #18 0x55e2978e207a in executeAction<mlir::PassExecutionAction, mlir::Pass &> mlir/include/mlir/IR/MLIRContext.h:275:7 #19 0x55e2978e207a in mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) mlir/lib/Pass/Pass.cpp:521:21 #20 0x55e2978e5fbf in runPipeline mlir/lib/Pass/Pass.cpp:593:16 #21 0x55e2978e5fbf in mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) mlir/lib/Pass/Pass.cpp:904:10 #22 0x55e2978e5b65 in mlir::PassManager::run(mlir::Operation*) mlir/lib/Pass/Pass.cpp:884:60 #23 0x55e291ebb460 in performActions(llvm::raw_ostream&, std::__u::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:408:17 #24 0x55e291ebabd9 in processBuffer mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:481:9 #25 0x55e291ebabd9 in operator() mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:548:12 #26 0x55e291ebabd9 in llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #27 0x55e297b1cffe in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #28 0x55e297b1cffe in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0::operator()(llvm::StringRef) const mlir/lib/Support/ToolUtilities.cpp:86:16 #29 0x55e297b1c9c5 in interleave<const llvm::StringRef *, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), (lambda at llvm/include/llvm/ADT/STLExtras.h:2147:49), void> llvm/include/llvm/ADT/STLExtras.h:2125:3 #30 0x55e297b1c9c5 in interleave<llvm::SmallVector<llvm::StringRef, 8U>, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), llvm::raw_ostream, llvm::StringRef> llvm/include/llvm/ADT/STLExtras.h:2147:3 #31 0x55e297b1c9c5 in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) mlir/lib/Support/ToolUtilities.cpp:89:3 #32 0x55e291eb0cf0 in mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:551:10 #33 0x55e291eb115c in mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:589:14 #34 0x55e291eb15f8 in mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:605:10 #35 0x55e29130d1be in main mlir/tools/mlir-opt/mlir-opt.cpp:311:33 #36 0x7fbcf3fff3d3 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x613d3) (BuildId: 9a996398ce14a94560b0c642eb4f6e94) #37 0x55e2912365a9 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120 0x502000006cd8 is located 8 bytes inside of 16-byte region [0x502000006cd0,0x502000006ce0) freed by thread T0 here: #0 0x55e29130b7e2 in operator delete(void*, unsigned long) compiler-rt/lib/asan/asan_new_delete.cpp:155:3 #1 0x55e2979eb657 in __libcpp_operator_delete<void *, unsigned long> #2 0x55e2979eb657 in __do_deallocate_handle_size<> #3 0x55e2979eb657 in __libcpp_deallocate #4 0x55e2979eb657 in deallocate #5 0x55e2979eb657 in deallocate #6 0x55e2979eb657 in operator() #7 0x55e2979eb657 in ~vector #8 0x55e2979eb657 in mlir::Block::~Block() mlir/lib/IR/Block.cpp:24:1 #9 0x55e2979ebc17 in deleteNode llvm/include/llvm/ADT/ilist.h:42:39 #10 0x55e2979ebc17 in erase llvm/include/llvm/ADT/ilist.h:205:5 #11 0x55e2979ebc17 in erase llvm/include/llvm/ADT/ilist.h:209:39 #12 0x55e2979ebc17 in mlir::Block::erase() mlir/lib/IR/Block.cpp:67:28 #13 0x55e297aef978 in mlir::RewriterBase::eraseBlock(mlir::Block*) mlir/lib/IR/PatternMatch.cpp:245:10 #14 0x55e297af0563 in mlir::RewriterBase::inlineBlockBefore(mlir::Block*, mlir::Block*, llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, false, false, void, false, void>, false, false>, mlir::ValueRange) mlir/lib/IR/PatternMatch.cpp:331:3 #15 0x55e297af06d8 in mlir::RewriterBase::mergeBlocks(mlir::Block*, mlir::Block*, mlir::ValueRange) mlir/lib/IR/PatternMatch.cpp:341:3 #16 0x55e297036608 in mlir::scf::ForOp::replaceWithAdditionalYields(mlir::RewriterBase&, mlir::ValueRange, bool, std::__u::function<llvm::SmallVector<mlir::Value, 6u> (mlir::OpBuilder&, mlir::Location, llvm::ArrayRef<mlir::BlockArgument>)> const&) mlir/lib/Dialect/SCF/IR/SCF.cpp:575:12 #17 0x55e2970673ca in mlir::detail::LoopLikeOpInterfaceInterfaceTraits::Model<mlir::scf::ForOp>::replaceWithAdditionalYields(mlir::detail::LoopLikeOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::RewriterBase&, mlir::ValueRange, bool, std::__u::function<llvm::SmallVector<mlir::Value, 6u> (mlir::OpBuilder&, mlir::Location, llvm::ArrayRef<mlir::BlockArgument>)> const&) blaze-out/k8-opt-asan/bin/mlir/include/mlir/Interfaces/LoopLikeInterface.h.inc:658:56 #18 0x55e2978d5feb in replaceWithAdditionalYields blaze-out/k8-opt-asan/bin/mlir/include/mlir/Interfaces/LoopLikeInterface.cpp.inc:105:14 #19 0x55e2978d5feb in mlir::createFused(mlir::LoopLikeOpInterface, mlir::LoopLikeOpInterface, mlir::RewriterBase&, std::__u::function<llvm::SmallVector<mlir::Value, 6u> (mlir::OpBuilder&, mlir::Location, llvm::ArrayRef<mlir::BlockArgument>)>, llvm::function_ref<void (mlir::RewriterBase&, mlir::LoopLikeOpInterface, mlir::LoopLikeOpInterface&, mlir::IRMapping)>) mlir/lib/Interfaces/LoopLikeInterface.cpp:135:14 #20 0x55e2952a614b in mlir::fuseIndependentSiblingForLoops(mlir::scf::ForOp, mlir::scf::ForOp, mlir::RewriterBase&) mlir/lib/Dialect/SCF/Utils/Utils.cpp:1398:43 #21 0x55e291480c6f in mlir::transform::LoopFuseSiblingOp::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp:482:17 #22 0x55e29149ed5e in mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::LoopFuseSiblingOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc:477:56 #23 0x55e297494a60 in apply blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc:61:14 #24 0x55e297494a60 in mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:953:48 #25 0x55e294646a8d in applySequenceBlock(mlir::Block&, mlir::transform::FailurePropagationMode, mlir::transform::TransformState&, mlir::transform::TransformResults&) mlir/lib/Dialect/Transform/IR/TransformOps.cpp:1788:15 #26 0x55e29464f927 in mlir::transform::NamedSequenceOp::apply(mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) mlir/lib/Dialect/Transform/IR/TransformOps.cpp:2155:10 #27 0x55e2945d28ee in mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Model<mlir::transform::NamedSequenceOp>::apply(mlir::transform::detail::TransformOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::transform::TransformRewriter&, mlir::transform::TransformResults&, mlir::transform::TransformState&) blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc:477:56 #28 0x55e297494a60 in apply blaze-out/k8-opt-asan/bin/mlir/include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc:61:14 #29 0x55e297494a60 in mlir::transform::TransformState::applyTransform(mlir::transform::TransformOpInterface) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:953:48 #30 0x55e2974a5fe2 in mlir::transform::applyTransforms(mlir::Operation*, mlir::transform::TransformOpInterface, mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>> const&, mlir::transform::TransformOptions const&, bool) mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp:2016:16 #31 0x55e2945888d7 in mlir::transform::applyTransformNamedSequence(mlir::RaggedArray<llvm::PointerUnion<mlir::Operation*, mlir::Attribute, mlir::Value>>, mlir::transform::TransformOpInterface, mlir::ModuleOp, mlir::transform::TransformOptions const&) mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp:234:10 #32 0x55e294582446 in (anonymous namespace)::InterpreterPass::runOnOperation() mlir/lib/Dialect/Transform/Transforms/InterpreterPass.cpp:147:16 #33 0x55e2978e93c6 in operator() mlir/lib/Pass/Pass.cpp:527:17 #34 0x55e2978e93c6 in void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #35 0x55e2978e207a in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #36 0x55e2978e207a in executeAction<mlir::PassExecutionAction, mlir::Pass &> mlir/include/mlir/IR/MLIRContext.h:275:7 #37 0x55e2978e207a in mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) mlir/lib/Pass/Pass.cpp:521:21 #38 0x55e2978e5fbf in runPipeline mlir/lib/Pass/Pass.cpp:593:16 #39 0x55e2978e5fbf in mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) mlir/lib/Pass/Pass.cpp:904:10 #40 0x55e2978e5b65 in mlir::PassManager::run(mlir::Operation*) mlir/lib/Pass/Pass.cpp:884:60 #41 0x55e291ebb460 in performActions(llvm::raw_ostream&, std::__u::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:408:17 #42 0x55e291ebabd9 in processBuffer mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:481:9 llvm#43 0x55e291ebabd9 in operator() mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:548:12 #44 0x55e291ebabd9 in llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #45 0x55e297b1cffe in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #46 0x55e297b1cffe in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0::operator()(llvm::StringRef) const mlir/lib/Support/ToolUtilities.cpp:86:16 #47 0x55e297b1c9c5 in interleave<const llvm::StringRef *, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), (lambda at llvm/include/llvm/ADT/STLExtras.h:2147:49), void> llvm/include/llvm/ADT/STLExtras.h:2125:3 #48 0x55e297b1c9c5 in interleave<llvm::SmallVector<llvm::StringRef, 8U>, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), llvm::raw_ostream, llvm::StringRef> llvm/include/llvm/ADT/STLExtras.h:2147:3 llvm#49 0x55e297b1c9c5 in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) mlir/lib/Support/ToolUtilities.cpp:89:3 llvm#50 0x55e291eb0cf0 in mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:551:10 llvm#51 0x55e291eb115c in mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:589:14 previously allocated by thread T0 here: #0 0x55e29130ab5d in operator new(unsigned long) compiler-rt/lib/asan/asan_new_delete.cpp:86:3 #1 0x55e2979ed5d4 in __libcpp_operator_new<unsigned long> #2 0x55e2979ed5d4 in __libcpp_allocate #3 0x55e2979ed5d4 in allocate #4 0x55e2979ed5d4 in __allocate_at_least<std::__u::allocator<mlir::BlockArgument> > #5 0x55e2979ed5d4 in __split_buffer #6 0x55e2979ed5d4 in mlir::BlockArgument* std::__u::vector<mlir::BlockArgument, std::__u::allocator<mlir::BlockArgument>>::__push_back_slow_path<mlir::BlockArgument const&>(mlir::BlockArgument const&) #7 0x55e2979ec0f2 in push_back #8 0x55e2979ec0f2 in mlir::Block::addArgument(mlir::Type, mlir::Location) mlir/lib/IR/Block.cpp:154:13 #9 0x55e29796e457 in parseRegionBody mlir/lib/AsmParser/Parser.cpp:2172:34 #10 0x55e29796e457 in (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) mlir/lib/AsmParser/Parser.cpp:2121:7 #11 0x55e29796b25e in (anonymous namespace)::CustomOpAsmParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) mlir/lib/AsmParser/Parser.cpp:1785:16 #12 0x55e297035742 in mlir::scf::ForOp::parse(mlir::OpAsmParser&, mlir::OperationState&) mlir/lib/Dialect/SCF/IR/SCF.cpp:521:14 #13 0x55e291322c18 in llvm::ParseResult llvm::detail::UniqueFunctionBase<llvm::ParseResult, mlir::OpAsmParser&, mlir::OperationState&>::CallImpl<llvm::ParseResult (*)(mlir::OpAsmParser&, mlir::OperationState&)>(void*, mlir::OpAsmParser&, mlir::OperationState&) llvm/include/llvm/ADT/FunctionExtras.h:220:12 #14 0x55e29795bea3 in operator() llvm/include/llvm/ADT/FunctionExtras.h:384:12 #15 0x55e29795bea3 in callback_fn<llvm::unique_function<llvm::ParseResult (mlir::OpAsmParser &, mlir::OperationState &)> > llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #16 0x55e29795bea3 in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #17 0x55e29795bea3 in parseOperation mlir/lib/AsmParser/Parser.cpp:1521:9 #18 0x55e29795bea3 in parseCustomOperation mlir/lib/AsmParser/Parser.cpp:2017:19 #19 0x55e29795bea3 in (anonymous namespace)::OperationParser::parseOperation() mlir/lib/AsmParser/Parser.cpp:1174:10 #20 0x55e297971d20 in parseBlockBody mlir/lib/AsmParser/Parser.cpp:2296:9 #21 0x55e297971d20 in (anonymous namespace)::OperationParser::parseBlock(mlir::Block*&) mlir/lib/AsmParser/Parser.cpp:2226:12 #22 0x55e29796e4f5 in parseRegionBody mlir/lib/AsmParser/Parser.cpp:2184:7 #23 0x55e29796e4f5 in (anonymous namespace)::OperationParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) mlir/lib/AsmParser/Parser.cpp:2121:7 #24 0x55e29796b25e in (anonymous namespace)::CustomOpAsmParser::parseRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) mlir/lib/AsmParser/Parser.cpp:1785:16 #25 0x55e29796b2cf in (anonymous namespace)::CustomOpAsmParser::parseOptionalRegion(mlir::Region&, llvm::ArrayRef<mlir::OpAsmParser::Argument>, bool) mlir/lib/AsmParser/Parser.cpp:1796:12 #26 0x55e2978d89ff in mlir::function_interface_impl::parseFunctionOp(mlir::OpAsmParser&, mlir::OperationState&, bool, mlir::StringAttr, llvm::function_ref<mlir::Type (mlir::Builder&, llvm::ArrayRef<mlir::Type>, llvm::ArrayRef<mlir::Type>, mlir::function_interface_impl::VariadicFlag, std::__u::basic_string<char, std::__u::char_traits<char>, std::__u::allocator<char>>&)>, mlir::StringAttr, mlir::StringAttr) mlir/lib/Interfaces/FunctionImplementation.cpp:232:14 #27 0x55e2969ba41d in mlir::func::FuncOp::parse(mlir::OpAsmParser&, mlir::OperationState&) mlir/lib/Dialect/Func/IR/FuncOps.cpp:203:10 #28 0x55e291322c18 in llvm::ParseResult llvm::detail::UniqueFunctionBase<llvm::ParseResult, mlir::OpAsmParser&, mlir::OperationState&>::CallImpl<llvm::ParseResult (*)(mlir::OpAsmParser&, mlir::OperationState&)>(void*, mlir::OpAsmParser&, mlir::OperationState&) llvm/include/llvm/ADT/FunctionExtras.h:220:12 #29 0x55e29795bea3 in operator() llvm/include/llvm/ADT/FunctionExtras.h:384:12 #30 0x55e29795bea3 in callback_fn<llvm::unique_function<llvm::ParseResult (mlir::OpAsmParser &, mlir::OperationState &)> > llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #31 0x55e29795bea3 in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #32 0x55e29795bea3 in parseOperation mlir/lib/AsmParser/Parser.cpp:1521:9 #33 0x55e29795bea3 in parseCustomOperation mlir/lib/AsmParser/Parser.cpp:2017:19 #34 0x55e29795bea3 in (anonymous namespace)::OperationParser::parseOperation() mlir/lib/AsmParser/Parser.cpp:1174:10 #35 0x55e297959b78 in parse mlir/lib/AsmParser/Parser.cpp:2725:20 #36 0x55e297959b78 in mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) mlir/lib/AsmParser/Parser.cpp:2785:41 #37 0x55e29790d5c2 in mlir::parseSourceFile(std::__u::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) mlir/lib/Parser/Parser.cpp:46:10 #38 0x55e291ebbfe2 in parseSourceFile<mlir::ModuleOp, const std::__u::shared_ptr<llvm::SourceMgr> &> mlir/include/mlir/Parser/Parser.h:159:14 #39 0x55e291ebbfe2 in parseSourceFile<mlir::ModuleOp> mlir/include/mlir/Parser/Parser.h:189:10 #40 0x55e291ebbfe2 in mlir::parseSourceFileForTool(std::__u::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) mlir/include/mlir/Tools/ParseUtilities.h:31:12 #41 0x55e291ebb263 in performActions(llvm::raw_ostream&, std::__u::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:383:33 #42 0x55e291ebabd9 in processBuffer mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:481:9 llvm#43 0x55e291ebabd9 in operator() mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:548:12 #44 0x55e291ebabd9 in llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12 #45 0x55e297b1cffe in operator() llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12 #46 0x55e297b1cffe in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef)::$_0::operator()(llvm::StringRef) const mlir/lib/Support/ToolUtilities.cpp:86:16 #47 0x55e297b1c9c5 in interleave<const llvm::StringRef *, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), (lambda at llvm/include/llvm/ADT/STLExtras.h:2147:49), void> llvm/include/llvm/ADT/STLExtras.h:2125:3 #48 0x55e297b1c9c5 in interleave<llvm::SmallVector<llvm::StringRef, 8U>, (lambda at mlir/lib/Support/ToolUtilities.cpp:79:23), llvm::raw_ostream, llvm::StringRef> llvm/include/llvm/ADT/STLExtras.h:2147:3 llvm#49 0x55e297b1c9c5 in mlir::splitAndProcessBuffer(std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) mlir/lib/Support/ToolUtilities.cpp:89:3 llvm#50 0x55e291eb0cf0 in mlir::MlirOptMain(llvm::raw_ostream&, std::__u::unique_ptr<llvm::MemoryBuffer, std::__u::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:551:10 llvm#51 0x55e291eb115c in mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:589:14 llvm#52 0x55e291eb15f8 in mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:605:10 llvm#53 0x55e29130d1be in main mlir/tools/mlir-opt/mlir-opt.cpp:311:33 llvm#54 0x7fbcf3fff3d3 in __libc_start_main (/usr/grte/v5/lib64/libc.so.6+0x613d3) (BuildId: 9a996398ce14a94560b0c642eb4f6e94) llvm#55 0x55e2912365a9 in _start /usr/grte/v5/debug-src/src/csu/../sysdeps/x86_64/start.S:120 SUMMARY: AddressSanitizer: heap-use-after-free mlir/include/mlir/IR/IRMapping.h:40:11 in map<llvm::MutableArrayRef<mlir::BlockArgument> &, llvm::MutableArrayRef<mlir::BlockArgument>, nullptr> Shadow bytes around the buggy address: 0x502000006a00: fa fa 00 fa fa fa 00 00 fa fa 00 fa fa fa 00 fa 0x502000006a80: fa fa 00 fa fa fa 00 00 fa fa 00 00 fa fa 00 00 0x502000006b00: fa fa 00 00 fa fa 00 00 fa fa 00 fa fa fa 00 fa 0x502000006b80: fa fa 00 fa fa fa 00 fa fa fa 00 00 fa fa 00 00 0x502000006c00: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa fd fa =>0x502000006c80: fa fa fd fa fa fa fd fd fa fa fd[fd]fa fa fd fd 0x502000006d00: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa 00 fa 0x502000006d80: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa 00 fa 0x502000006e00: fa fa 00 fa fa fa 00 fa fa fa 00 00 fa fa 00 fa 0x502000006e80: fa fa 00 fa fa fa 00 00 fa fa 00 fa fa fa 00 fa 0x502000006f00: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa 00 fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==4320==ABORTING
boomanaiden154
pushed a commit
that referenced
this pull request
Nov 22, 2024
… depobj construct (llvm#114221) A codegen crash is occurring when a depend object was initialized with omp_all_memory in the depobj directive. llvm#114214 The root cause of issue looks to be the improper handling of the dependency list when omp_all_memory was specified. The change introduces the use of OMPTaskDataTy to manage dependencies. The buildDependences function is called to construct the dependency list, and the list is iterated over to emit and store the dependencies. Reduced Test Case : ``` #include <omp.h> int main() { omp_depend_t obj; #pragma omp depobj(obj) depend(inout: omp_all_memory) } ``` ``` #1 0x0000000003de6623 SignalHandler(int) Signals.cpp:0:0 #2 0x00007f8e4a6b990f (/lib64/libpthread.so.0+0x1690f) #3 0x00007f8e4a117d2a raise (/lib64/libc.so.6+0x4ad2a) #4 0x00007f8e4a1193e4 abort (/lib64/libc.so.6+0x4c3e4) #5 0x00007f8e4a10fc69 __assert_fail_base (/lib64/libc.so.6+0x42c69) #6 0x00007f8e4a10fcf1 __assert_fail (/lib64/libc.so.6+0x42cf1) #7 0x0000000004114367 clang::CodeGen::CodeGenFunction::EmitOMPDepobjDirective(clang::OMPDepobjDirective const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4114367) #8 0x00000000040f8fac clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x40f8fac) #9 0x00000000040ff4fb clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x40ff4fb) #10 0x00000000041847b2 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41847b2) #11 0x0000000004199e4a clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4199e4a) #12 0x00000000041f7b9d clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41f7b9d) #13 0x00000000041f16a3 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41f16a3) #14 0x00000000041fd954 clang::CodeGen::CodeGenModule::EmitDeferred() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41fd954) #15 0x0000000004200277 clang::CodeGen::CodeGenModule::Release() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4200277) #16 0x00000000046b6a49 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0 #17 0x00000000046b4cb6 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x46b4cb6) #18 0x0000000006204d5c clang::ParseAST(clang::Sema&, bool, bool) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x6204d5c) #19 0x000000000496b278 clang::FrontendAction::Execute() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x496b278) #20 0x00000000048dd074 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x48dd074) #21 0x0000000004a38092 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4a38092) #22 0x0000000000fd4e9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xfd4e9c) #23 0x0000000000fcca73 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0 #24 0x0000000000fd140c clang_main(int, char**, llvm::ToolContext const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xfd140c) #25 0x0000000000ee2ef3 main (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xee2ef3) #26 0x00007f8e4a10224c __libc_start_main (/lib64/libc.so.6+0x3524c) #27 0x0000000000fcaae9 _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:120:0 clang: error: unable to execute command: Aborted ``` --------- Co-authored-by: Chandra Ghale <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.