Skip to content
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

[clang analysis][thread-safety] Handle return-by-reference... #67428

Closed
wants to merge 384 commits into from

Conversation

legrosbuffle
Copy link
Contributor

...of guarded variables, when the function is not marked as requiring locks:

class Return {
  Mutex mu;
  Foo foo GUARDED_BY(mu);

  Foo &returns_ref_locked() {
    MutexLock lock(&mu);
    return foo;  // BAD
  }

  Foo &returns_ref_locks_required() SHARED_LOCKS_REQUIRED(mu) {
    return foo;  // OK
  }
};

This is carried over from phabricator: https://reviews.llvm.org/D153131

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:analysis labels Sep 26, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 26, 2023

@llvm/pr-subscribers-clang-analysis

@llvm/pr-subscribers-clang

Changes

...of guarded variables, when the function is not marked as requiring locks:

class Return {
  Mutex mu;
  Foo foo GUARDED_BY(mu);

  Foo &returns_ref_locked() {
    MutexLock lock(&mu);
    return foo;  // BAD
  }

  Foo &returns_ref_locks_required() SHARED_LOCKS_REQUIRED(mu) {
    return foo;  // OK
  }
};

This is carried over from phabricator: https://reviews.llvm.org/D153131


Full diff: https://github.com/llvm/llvm-project/pull/67428.diff

5 Files Affected:

  • (modified) clang/include/clang/Analysis/Analyses/ThreadSafety.h (+7-1)
  • (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+9-1)
  • (modified) clang/lib/Analysis/ThreadSafety.cpp (+54-26)
  • (modified) clang/lib/Sema/AnalysisBasedWarnings.cpp (+12)
  • (modified) clang/test/SemaCXX/warn-thread-safety-analysis.cpp (+79)
diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafety.h b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
index 1808d1d71e05d2c..0866b09bab2995e 100644
--- a/clang/include/clang/Analysis/Analyses/ThreadSafety.h
+++ b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
@@ -47,7 +47,13 @@ enum ProtectedOperationKind {
   POK_PassByRef,
 
   /// Passing a pt-guarded variable by reference.
-  POK_PtPassByRef
+  POK_PtPassByRef,
+
+  /// Returning a guarded variable by reference.
+  POK_ReturnByRef,
+
+  /// Returning a pt-guarded variable by reference.
+  POK_PtReturnByRef,
 };
 
 /// This enum distinguishes between different kinds of lock actions. For
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index f4eb02fd9570c2f..8e423ea7691de88 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -3858,7 +3858,7 @@ def warn_fun_requires_negative_cap : Warning<
   "calling function %0 requires negative capability '%1'">,
   InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
 
-// Thread safety warnings on pass by reference
+// Thread safety warnings on pass/return by reference
 def warn_guarded_pass_by_reference : Warning<
   "passing variable %1 by reference requires holding %0 "
   "%select{'%2'|'%2' exclusively}3">,
@@ -3867,6 +3867,14 @@ def warn_pt_guarded_pass_by_reference : Warning<
   "passing the value that %1 points to by reference requires holding %0 "
   "%select{'%2'|'%2' exclusively}3">,
   InGroup<ThreadSafetyReference>, DefaultIgnore;
+def warn_guarded_return_by_reference : Warning<
+  "returning variable %1 by reference requires holding %0 "
+  "%select{'%2'|'%2' exclusively}3">,
+  InGroup<ThreadSafetyReference>, DefaultIgnore;
+def warn_pt_guarded_return_by_reference : Warning<
+  "returning the value that %1 points to by reference requires holding %0 "
+  "%select{'%2'|'%2' exclusively}3">,
+  InGroup<ThreadSafetyReference>, DefaultIgnore;
 
 // Imprecise thread safety warnings
 def warn_variable_requires_lock : Warning<
diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp
index f160cf4d013c78d..77b12f750e18a45 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1008,7 +1008,7 @@ class ThreadSafetyAnalyzer {
   threadSafety::SExprBuilder SxBuilder;
 
   ThreadSafetyHandler &Handler;
-  const CXXMethodDecl *CurrentMethod = nullptr;
+  const FunctionDecl *CurrentFunction;
   LocalVariableMap LocalVarMap;
   FactManager FactMan;
   std::vector<CFGBlockInfo> BlockInfo;
@@ -1243,10 +1243,10 @@ bool ThreadSafetyAnalyzer::inCurrentScope(const CapabilityExpr &CapE) {
 
   // Members are in scope from methods of the same class.
   if (const auto *P = dyn_cast<til::Project>(SExp)) {
-    if (!CurrentMethod)
+    if (!isa_and_nonnull<CXXMethodDecl>(CurrentFunction))
       return false;
     const ValueDecl *VD = P->clangDecl();
-    return VD->getDeclContext() == CurrentMethod->getDeclContext();
+    return VD->getDeclContext() == CurrentFunction->getDeclContext();
   }
 
   return false;
@@ -1541,6 +1541,8 @@ class BuildLockset : public ConstStmtVisitor<BuildLockset> {
 
   ThreadSafetyAnalyzer *Analyzer;
   FactSet FSet;
+  // The fact set for the function on exit.
+  const FactSet &FunctionExitFSet;
   /// Maps constructed objects to `this` placeholder prior to initialization.
   llvm::SmallDenseMap<const Expr *, til::LiteralPtr *> ConstructedObjects;
   LocalVariableMap::Context LVarCtx;
@@ -1566,9 +1568,11 @@ class BuildLockset : public ConstStmtVisitor<BuildLockset> {
                         bool SkipFirstParam = false);
 
 public:
-  BuildLockset(ThreadSafetyAnalyzer *Anlzr, CFGBlockInfo &Info)
+  BuildLockset(ThreadSafetyAnalyzer *Anlzr, CFGBlockInfo &Info,
+               const FactSet &FunctionExitFSet)
       : ConstStmtVisitor<BuildLockset>(), Analyzer(Anlzr), FSet(Info.EntrySet),
-        LVarCtx(Info.EntryContext), CtxIndex(Info.EntryIndex) {}
+        FunctionExitFSet(FunctionExitFSet), LVarCtx(Info.EntryContext),
+        CtxIndex(Info.EntryIndex) {}
 
   void VisitUnaryOperator(const UnaryOperator *UO);
   void VisitBinaryOperator(const BinaryOperator *BO);
@@ -1577,6 +1581,7 @@ class BuildLockset : public ConstStmtVisitor<BuildLockset> {
   void VisitCXXConstructExpr(const CXXConstructExpr *Exp);
   void VisitDeclStmt(const DeclStmt *S);
   void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Exp);
+  void VisitReturnStmt(const ReturnStmt *S);
 };
 
 } // namespace
@@ -1758,6 +1763,8 @@ void ThreadSafetyAnalyzer::checkPtAccess(const FactSet &FSet, const Expr *Exp,
   // Pass by reference warnings are under a different flag.
   ProtectedOperationKind PtPOK = POK_VarDereference;
   if (POK == POK_PassByRef) PtPOK = POK_PtPassByRef;
+  if (POK == POK_ReturnByRef)
+    PtPOK = POK_PtReturnByRef;
 
   const ValueDecl *D = getValueDecl(Exp);
   if (!D || !D->hasAttrs())
@@ -2142,6 +2149,25 @@ void BuildLockset::VisitMaterializeTemporaryExpr(
   }
 }
 
+void BuildLockset::VisitReturnStmt(const ReturnStmt *S) {
+  if (Analyzer->CurrentFunction == nullptr)
+    return;
+  const Expr *RetVal = S->getRetValue();
+  if (!RetVal)
+    return;
+
+  // If returning by reference, check that the function requires the appropriate
+  // capabilities.
+  const QualType ReturnType =
+      Analyzer->CurrentFunction->getReturnType().getCanonicalType();
+  if (ReturnType->isLValueReferenceType()) {
+    Analyzer->checkAccess(
+        FunctionExitFSet, RetVal,
+        ReturnType->getPointeeType().isConstQualified() ? AK_Read : AK_Written,
+        POK_ReturnByRef);
+  }
+}
+
 /// Given two facts merging on a join point, possibly warn and decide whether to
 /// keep or replace.
 ///
@@ -2251,8 +2277,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
 
   CFG *CFGraph = walker.getGraph();
   const NamedDecl *D = walker.getDecl();
-  const auto *CurrentFunction = dyn_cast<FunctionDecl>(D);
-  CurrentMethod = dyn_cast<CXXMethodDecl>(D);
+  CurrentFunction = dyn_cast<FunctionDecl>(D);
 
   if (D->hasAttr<NoThreadSafetyAnalysisAttr>())
     return;
@@ -2278,7 +2303,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
   PostOrderCFGView::CFGBlockSet VisitedBlocks(CFGraph);
 
   CFGBlockInfo &Initial = BlockInfo[CFGraph->getEntry().getBlockID()];
-  CFGBlockInfo &Final   = BlockInfo[CFGraph->getExit().getBlockID()];
+  CFGBlockInfo &Final = BlockInfo[CFGraph->getExit().getBlockID()];
 
   // Mark entry block as reachable
   Initial.Reachable = true;
@@ -2348,6 +2373,25 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
     }
   }
 
+  // Compute the expected exit set.
+  // By default, we expect all locks held on entry to be held on exit.
+  FactSet ExpectedFunctionExitSet = Initial.EntrySet;
+
+  // Adjust the expected exit set by adding or removing locks, as declared
+  // by *-LOCK_FUNCTION and UNLOCK_FUNCTION.  The intersect below will then
+  // issue the appropriate warning.
+  // FIXME: the location here is not quite right.
+  for (const auto &Lock : ExclusiveLocksAcquired)
+    ExpectedFunctionExitSet.addLock(
+        FactMan, std::make_unique<LockableFactEntry>(Lock, LK_Exclusive,
+                                                     D->getLocation()));
+  for (const auto &Lock : SharedLocksAcquired)
+    ExpectedFunctionExitSet.addLock(
+        FactMan,
+        std::make_unique<LockableFactEntry>(Lock, LK_Shared, D->getLocation()));
+  for (const auto &Lock : LocksReleased)
+    ExpectedFunctionExitSet.removeLock(FactMan, Lock);
+
   for (const auto *CurrBlock : *SortedGraph) {
     unsigned CurrBlockID = CurrBlock->getBlockID();
     CFGBlockInfo *CurrBlockInfo = &BlockInfo[CurrBlockID];
@@ -2407,7 +2451,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
     if (!CurrBlockInfo->Reachable)
       continue;
 
-    BuildLockset LocksetBuilder(this, *CurrBlockInfo);
+    BuildLockset LocksetBuilder(this, *CurrBlockInfo, ExpectedFunctionExitSet);
 
     // Visit all the statements in the basic block.
     for (const auto &BI : *CurrBlock) {
@@ -2483,24 +2527,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
   if (!Final.Reachable)
     return;
 
-  // By default, we expect all locks held on entry to be held on exit.
-  FactSet ExpectedExitSet = Initial.EntrySet;
-
-  // Adjust the expected exit set by adding or removing locks, as declared
-  // by *-LOCK_FUNCTION and UNLOCK_FUNCTION.  The intersect below will then
-  // issue the appropriate warning.
-  // FIXME: the location here is not quite right.
-  for (const auto &Lock : ExclusiveLocksAcquired)
-    ExpectedExitSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
-                                         Lock, LK_Exclusive, D->getLocation()));
-  for (const auto &Lock : SharedLocksAcquired)
-    ExpectedExitSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
-                                         Lock, LK_Shared, D->getLocation()));
-  for (const auto &Lock : LocksReleased)
-    ExpectedExitSet.removeLock(FactMan, Lock);
-
   // FIXME: Should we call this function for all blocks which exit the function?
-  intersectAndWarn(ExpectedExitSet, Final.ExitSet, Final.ExitLoc,
+  intersectAndWarn(ExpectedFunctionExitSet, Final.ExitSet, Final.ExitLoc,
                    LEK_LockedAtEndOfFunction, LEK_NotLockedAtEndOfFunction);
 
   Handler.leaveFunction(CurrentFunction);
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index 77bb560eb6288f7..0947e8b0f526a3b 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -1983,6 +1983,12 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
         case POK_PtPassByRef:
           DiagID = diag::warn_pt_guarded_pass_by_reference;
           break;
+        case POK_ReturnByRef:
+          DiagID = diag::warn_guarded_return_by_reference;
+          break;
+        case POK_PtReturnByRef:
+          DiagID = diag::warn_pt_guarded_return_by_reference;
+          break;
       }
       PartialDiagnosticAt Warning(Loc, S.PDiag(DiagID) << Kind
                                                        << D
@@ -2013,6 +2019,12 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {
         case POK_PtPassByRef:
           DiagID = diag::warn_pt_guarded_pass_by_reference;
           break;
+        case POK_ReturnByRef:
+          DiagID = diag::warn_guarded_return_by_reference;
+          break;
+        case POK_PtReturnByRef:
+          DiagID = diag::warn_pt_guarded_return_by_reference;
+          break;
       }
       PartialDiagnosticAt Warning(Loc, S.PDiag(DiagID) << Kind
                                                        << D
diff --git a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
index 8e312e589d81160..205cfa284f6c9c9 100644
--- a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+++ b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
@@ -5580,6 +5580,85 @@ class Bar {
   }
 };
 
+class Return {
+  Mutex mu;
+  Foo foo GUARDED_BY(mu);
+  Foo* foo_ptr PT_GUARDED_BY(mu);
+
+  Foo returns_value_locked() {
+    MutexLock lock(&mu);
+    return foo;
+  }
+
+  Foo returns_value_locks_required() EXCLUSIVE_LOCKS_REQUIRED(mu) {
+    return foo;
+  }
+
+  Foo returns_value_releases_lock_after_return() UNLOCK_FUNCTION(mu) {
+    MutexLock lock(&mu, true);
+    return foo;
+  }
+
+  Foo returns_value_aquires_lock() EXCLUSIVE_LOCK_FUNCTION(mu) {
+    mu.Lock();
+    return foo;
+  }
+  
+  Foo returns_value_not_locked() {
+    return foo;               // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}}
+  }
+  
+  Foo returns_value_releases_lock_before_return() UNLOCK_FUNCTION(mu) {
+    mu.Unlock();
+    return foo;               // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}}
+  }
+
+  Foo &returns_ref_not_locked() {
+    return foo;               // expected-warning {{returning variable 'foo' by reference requires holding mutex 'mu'}}
+  }
+
+  Foo &returns_ref_locked() {
+    MutexLock lock(&mu);
+    return foo;               // expected-warning {{returning variable 'foo' by reference requires holding mutex 'mu'}}
+  }
+
+  Foo &returns_ref_shared_locks_required() SHARED_LOCKS_REQUIRED(mu) {
+    return foo;               // expected-warning {{returning variable 'foo' by reference requires holding mutex 'mu' exclusively}}
+  }
+
+  Foo &returns_ref_exclusive_locks_required() EXCLUSIVE_LOCKS_REQUIRED(mu) {
+    return foo;
+  }
+
+  Foo &returns_ref_releases_lock_after_return() UNLOCK_FUNCTION(mu) {
+    MutexLock lock(&mu, true);
+    return foo;               // expected-warning {{returning variable 'foo' by reference requires holding mutex 'mu' exclusively}}
+  }
+
+  Foo& returns_ref_releases_lock_before_return() UNLOCK_FUNCTION(mu) {
+    mu.Unlock();
+    return foo;               // // expected-warning {{returning variable 'foo' by reference requires holding mutex 'mu' exclusively}}
+  }
+  
+  Foo &returns_ref_aquires_lock() EXCLUSIVE_LOCK_FUNCTION(mu) {
+    mu.Lock();
+    return foo;
+  }
+  
+  const Foo &returns_constref_shared_locks_required() SHARED_LOCKS_REQUIRED(mu) {
+    return foo;
+  }
+  
+  Foo *returns_ptr() {
+    return &foo;              // FIXME -- Do we want to warn on this ?
+  }
+
+  Foo &returns_ref2() {
+    return *foo_ptr;          // expected-warning {{returning the value that 'foo_ptr' points to by reference requires holding mutex 'mu' exclusively}}
+  }
+
+};
+
 
 }  // end namespace PassByRefTest
 

mstorsjo and others added 25 commits September 29, 2023 10:33
This is a more correct way of linking against a specific runtime
library with the GCC-like clang frontend.

This avoids having to pass -D_DEBUG (and passes flags like -D_DLL,
which we should be passing if linking against the dynamic CRT).

When -fms-runtime-lib= is specified, each compiled object file gets
embedded directives instructing the linker about what CRT it should
link against. The -nostdlib we pass to the compiler driver only
inhibits the libs that the compiler driver passes to the linker
command.

Thus, this also avoids having to specify -lmsvcrt, -lmsvcrtd,
-llibcmt or -llibcmtd, and -loldnames.

Based on a patch by Andrew Ng.

The -fms-runtime-lib= option was added in Clang 16, but libcxx
now has dropped support for Clang 15.

Differential Revision: https://reviews.llvm.org/D155562
D152730 may add trivial pre-conditions of the form (ICMP_ULE, 0, B),
which won't be handled automatically by the constraint system, because
we don't add Var >= 0 for all variables in the unsigned system.

Handling the trivial condition explicitly here avoids having the
increase the number of rows in the system per variable.

https://alive2.llvm.org/ce/z/QC92ur

Depends on D152730.

Fixes llvm#63125.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D158776
Vector ctpop only exists under ZVBB, but ZVBB is unaccounted for in the
cost-model of ctpop. Document this defect with an additional RUN line in
the test for ctpop, showing identical costs with/without ZVBB. A
follow-up patch could fix this defect.
…ons (llvm#67009)

This updates the table of op attributes so that clicking the summary
expands to show the complete description.

```
   Attribute | MLIR Type | Description
   <name>      <type>      ▶ <summary>  <-- Click to expand
```

Enum attributes have now also been updated to generate a description
that lists all the cases (with both their MLIR and C++ names). This
makes viewing enums on the MLIR docs much nicer.

**Example**

Default view:

![image](https://github.com/llvm/llvm-project/assets/11597044/922669c7-b838-4230-bcfd-a77cde0f335d)

Expanded:

![image](https://github.com/llvm/llvm-project/assets/11597044/41da086e-a5ce-45dd-9f44-9d10a4d5f2e1)

---

This requires: llvm/mlir-www#158 (adds a very
simple markdown shortcode)
To invert the result, we can profitably commute a PCMPGT node if the LHS was a constant (C > min_signed_value): https://alive2.llvm.org/ce/z/LxcPqm

Allows the constant to fold, and helps reduce register pressure

Fixes llvm#67347
…rParallel.

This patch is extracted from D96035, it adds support for the accelerator
tables to the DWARFLinkerParallel functionality.

Differential Revision: https://reviews.llvm.org/D154793
Under RISCV experimental-zvbb, vector variants of llvm.ctpop lower to a
single instruction: vcpop. The cost-model does not check for the ZVBB
extension, and always associates a high cost to vector variants of
llvm.ctpop. Fix this defect.
These are versions of tests from flang/test/Lower/OpenMP/FIR.
… subregion (llvm#67544)

The current loop-reduce-form transformation incorrectly assumes that any
value that is used in a block that isn't in the set of loop blocks is a
block outside the loop. This is correct for a pure CFG but is incorrect
if operations with subregions are present. In that case, a use may be in
a subregion of an operation part of the loop and incorrectly deemed
outside the loop. This would later lead to transformations with code
that does not verify.

This PR fixes that issue by checking the transitive parent block that is
in the same region as the loop rather than the immediate parent block.
Just using BLACK makes it invisible in terminals with a dark background.
User only can use opt to test LoopVersioningLICM pass, and this PR add
the option back(deleted in https://reviews.llvm.org/D137915) so that
it's easy for verifying if it is useful for some benchmarks.
…67479)

We're running into stack overflows for huge functions with lots of phis.
Even without the stack overflows, this is recursing >7000 in some
auto-generated code.

This fixes the stack overflow and brings down the compile time to
something reasonable.
llvm.ptrmask is currently limited to pointers only, and does not accept
vectors of pointers. This is an unnecessary limitation, especially as
the underlying instructions (getelementptr etc) do support vectors of
pointers.

We should relax this sooner rather than later, to avoid introducing code
that assumes non-vectors (llvm#67166).
While doing this, I also found a few tests that were either clearly
incorrect (e.g. testing the wrong function) or that lacked basic test
coverage like testing std::string itself (e.g. the test was only checking
std::basic_string with a custom allocator). In these cases, I did a few
conservative drive-by changes.

Differential Revision: https://reviews.llvm.org/D140550
Co-authored-by: Brendan Emery <brendan.emery@esrlabs.com>
…endent (llvm#67546)

The buffer deallocation pipeline now works on modules and functions.
Also add extra test cases that run the buffer deallocation pipeline on
modules and functions. (Test cases that insert a helper function.)
…led (llvm#67504)

This fixes a size regression in Fuchsia when building a static libc++
multilib with exceptions disabled. Referring to `system_category` in
`__throw_system_error` brings in a relatively large amount of additional
exception classes into the link without substantially improving the
error message.
…lvm#66896)

This fixes the issue that resulted in getBuffer interpreting its
argument as a number of elements and getDynamicBuffer interpreting it
as a number of bytes.
…m#67288)

X86 don't want to unfold RMW instrs to 1 load + 1 op + 1 store, because
RMW could save code size and benefit RA when reg pressure is high.
And from all the call position analysis, we could find we didn't unfold
RMW in current code.
Relocation for 64-bit absolute values.
Need to clear MultiNodeScalars map to avoid compiler crash when tree is
deleted.
tobias-stadler and others added 22 commits September 29, 2023 10:33
The legalizer currently generates lots of G_AND artifacts.
For example between boolean uses and defs there is always a G_AND with a mask of 1, but when the target uses ZeroOrOneBooleanContents, this is unnecessary.
Currently these artifacts have to be removed using post-legalize combines.
Omitting these artifacts at their source in the artifact combiner has a few advantages:
- We know that the emitted G_AND is very likely to be useless, so our KnownBits call is likely worth it.
- The G_AND and G_CONSTANT can interrupt e.g. G_UADDE/... sequences generated during legalization of wide adds which makes it harder to detect these sequences in the instruction selector (e.g. useful to prevent unnecessary reloading of AArch64 NZCV register).
- This cleans up a lot of legalizer output and even improves compilation-times.
AArch64 CTMark geomean: `O0` -5.6% size..text; `O0` and `O3` ~-0.9% compilation-time (instruction count).

Since this introduces KnownBits into code-paths used by `O0`, I reduced the default recursion depth.
This doesn't seem to make a difference in CTMark, but should prevent excessive recursive calls in the worst case.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D159140
…lvm#67739)

While a DecltypeType node itself is not uniqued, an instantiation
dependent DecltypeType will have a
DependentDecltypeType as an underlying type, which is uniqued.

In that case, there can be non-identical non-sugar DecltypeTypes nodes
which nonetheless represent the same type.

Fixes llvm#67603
/llvm-project/clang/lib/AST/ASTContext.cpp:12938:46: error: unused variable 'DY' [-Werror,-Wunused-variable]
    const auto *DX = cast<DecltypeType>(X), *DY = cast<DecltypeType>(Y);
                                             ^
1 error generated.
…ith fixes.

This re-applies db51e57, which was reverted in 05b1a2c due to bot
failures. The DebuggerSupportPlugin now depends on DWARF, so it has been moved
to the new OrcDebugging library (as has the enableDebuggerSupport API).
The OrcDebugging library depends on JITLink after b251897.
This revision ensures that unsuppoert DISubranges are properly skipped
instead of being transformed into invalid metadata.
Use this flag to give more context to implicit def comments in assembly.

Reviewed on phabricator: 
https://reviews.llvm.org/D153754
…m#67693)

This is not standard but is vastly expected by existing code.

This was implemented by https://reviews.llvm.org/D149877 for simple
scalars, but MLIR lacked a generic way to deal with aggregate types
(arrays and derived type).

Support was recently added in
llvm#65508. Leverage it to zero
initialize all types.
The operators are defined in DwarfDebug.cpp but are
referenced in the struct definitions of FrameIndexExpr and
EntryValueInfo in DwarfDebug.h, and since they weren't
declared before, gcc warned with

 [694/5646] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfDebug.cpp.o
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:273:6: warning: 'bool llvm::operator<(const llvm::FrameIndexExpr&, const llvm::FrameIndexExpr&)' has not been declared within 'llvm'
   273 | bool llvm::operator<(const FrameIndexExpr &LHS, const FrameIndexExpr &RHS) {
       |      ^~~~
 In file included from ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:13:
 ../lib/CodeGen/AsmPrinter/DwarfDebug.h:112:15: note: only here as a 'friend'
   112 |   friend bool operator<(const FrameIndexExpr &LHS, const FrameIndexExpr &RHS);
       |               ^~~~~~~~
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:278:6: warning: 'bool llvm::operator<(const llvm::EntryValueInfo&, const llvm::EntryValueInfo&)' has not been declared within 'llvm'
   278 | bool llvm::operator<(const EntryValueInfo &LHS, const EntryValueInfo &RHS) {
       |      ^~~~
 In file included from ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:13:
 ../lib/CodeGen/AsmPrinter/DwarfDebug.h:121:15: note: only here as a 'friend'
   121 |   friend bool operator<(const EntryValueInfo &LHS, const EntryValueInfo &RHS);
       |               ^~~~~~~~
We expand aarch64_neon_rshrn intrinsics to trunc(srl(add)), having tablegen
patterns to combine the results back into rshrn. See D140297.  Unfortunately,
but perhaps not surprisingly, other combines can happen that prevent us
converting back.  For example sext(rshrn) becomes sext(trunc(srl(add))) which
will turn into sext_inreg(srl(add))).

This patch just prevents the expansion of rshrn intrinsics, reinstating the old
tablegen patterns for selecting them. This should allow us to still regognize
the rshrn instructions from trunc+shift+add, without performing any negative
optimizations for the intrinsics.

Closes llvm#67451
Use the constant folding API instead. In the second case using
IR builder should also work, but the way the instructions are
created an inserted there is very unusual, so I've left it alone.
Use the constant folding API instead.

One of these uses actually improves results, because the bitcast
expression gets folded away.
There were a couple of issues with maintaining register def/uses held
in `MachineRegisterInfo`:

* when an operand is changed from one register to another, the
corresponding instruction must already be inserted into the function,
or MRI won't be updated

* when traversing the set of all uses of a register, that set must not
change
@legrosbuffle legrosbuffle requested review from a team as code owners September 29, 2023 08:34
@legrosbuffle legrosbuffle deleted the thread-safety branch September 29, 2023 08:42
@github-actions
Copy link

⚠️ Python code formatter, darker found issues in your code. ⚠️

You can test this locally with the following command:
darker --check --diff -r f2f61a99f7f754f3e4c819e1e7c65848affe70b3..2e819d240a92b01e13bf921d09b17903a222f5de compiler-rt/test/cfi/cross-dso/icall/lit.local.cfg.py compiler-rt/test/cfi/icall/lit.local.cfg.py libcxx/utils/libcxx/test/params.py lldb/test/API/commands/expression/call-function/TestCallBuiltinFunction.py lldb/test/API/iohandler/completion/TestIOHandlerCompletion.py lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py llvm/utils/UpdateTestChecks/common.py llvm/utils/update_mca_test_checks.py mlir/python/mlir/dialects/_loop_transform_ops_ext.py mlir/test/python/dialects/transform.py mlir/test/python/dialects/transform_loop_ext.py
View the diff from darker here.
--- mlir/test/python/dialects/transform_loop_ext.py	2023-09-29 08:33:37.000000 +0000
+++ mlir/test/python/dialects/transform_loop_ext.py	2023-09-29 08:46:48.827274 +0000
@@ -57,11 +57,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 %
 
 

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff f2f61a99f7f754f3e4c819e1e7c65848affe70b3 2e819d240a92b01e13bf921d09b17903a222f5de -- clang/test/CodeGen/X86/cmp-avx-builtins-error.c clang/test/CodeGen/large-data-threshold.c clang/test/Driver/darwin-builtin-modules.c clang/test/Driver/large-data-threshold.c clang/test/Layout/ms-no-unique-address.cpp clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp clang/test/SemaCXX/lambda-expressions-gh56071.cpp libc/src/math/expm1.h libc/src/math/generic/expm1.cpp libc/src/stdio/gpu/fflush.cpp libc/src/stdio/gpu/fseek.cpp libc/src/stdio/gpu/ftell.cpp libc/test/src/math/expm1_test.cpp libc/test/src/math/smoke/expm1_test.cpp libcxx/test/std/iterators/iterator.range/begin-end.adl.pass.cpp libcxx/test/std/iterators/iterator.range/begin-end.array.pass.cpp libcxx/test/std/iterators/iterator.range/begin-end.container.pass.cpp libcxx/test/std/iterators/iterator.range/begin-end.initializer_list.pass.cpp llvm/include/llvm/ExecutionEngine/Orc/Debugging/DebugInfoSupport.h llvm/include/llvm/ExecutionEngine/Orc/Debugging/DebuggerSupport.h llvm/lib/ExecutionEngine/Orc/Debugging/DebugInfoSupport.cpp llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupport.cpp llvm/unittests/Transforms/Utils/CodeLayoutTest.cpp mlir/include/mlir/Conversion/ArithToAMDGPU/ArithToAMDGPU.h mlir/include/mlir/Conversion/SCFToEmitC/SCFToEmitC.h mlir/include/mlir/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.h mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp mlir/lib/Dialect/Linalg/Transforms/SubsetInsertionOpInterfaceImpl.cpp openmp/libomptarget/test/libc/fwrite.c bolt/lib/Core/Relocation.cpp bolt/lib/Passes/Aligner.cpp bolt/lib/Rewrite/ExecutableFileMemoryManager.cpp bolt/lib/Rewrite/JITLinkLinker.cpp bolt/lib/Rewrite/RewriteInstance.cpp bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.cpp clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/clangd/CodeCompletionStrings.cpp clang-tools-extra/clangd/CodeCompletionStrings.h clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang-tools-extra/clangd/unittests/CodeCompletionStringsTests.cpp clang/include/clang/AST/PrettyPrinter.h clang/include/clang/Analysis/Analyses/ThreadSafety.h clang/include/clang/Basic/CodeGenOptions.h clang/include/clang/Basic/FileManager.h clang/include/clang/Basic/Module.h clang/include/clang/Basic/ParsedAttrInfo.h clang/include/clang/Basic/SourceManager.h clang/include/clang/Basic/TargetOptions.h clang/include/clang/ExtractAPI/ExtractAPIVisitor.h clang/include/clang/Format/Format.h clang/include/clang/Lex/HeaderSearch.h clang/include/clang/Lex/ModuleMap.h clang/include/clang/Lex/Preprocessor.h clang/include/clang/Parse/Parser.h clang/include/clang/Sema/Sema.h clang/lib/AST/ASTContext.cpp clang/lib/AST/Decl.cpp clang/lib/AST/Expr.cpp clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Floating.h clang/lib/AST/Interp/Integral.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/InterpBuiltin.cpp clang/lib/AST/Interp/Pointer.h clang/lib/AST/RecordLayoutBuilder.cpp clang/lib/AST/TypePrinter.cpp clang/lib/Analysis/FlowSensitive/Transfer.cpp clang/lib/Analysis/ThreadSafety.cpp clang/lib/Analysis/UnsafeBufferUsage.cpp clang/lib/Basic/FileManager.cpp clang/lib/Basic/Module.cpp clang/lib/Basic/SourceManager.cpp clang/lib/Basic/Targets/NVPTX.h clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CGExprConstant.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CoverageMappingGen.cpp clang/lib/CodeGen/Targets/NVPTX.cpp clang/lib/Driver/ToolChain.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver/ToolChains/Darwin.cpp clang/lib/Driver/ToolChains/HIPAMD.cpp clang/lib/Driver/ToolChains/Hexagon.cpp clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp clang/lib/Format/ContinuationIndenter.cpp clang/lib/Format/FormatToken.h clang/lib/Format/NamespaceEndCommentsFixer.cpp clang/lib/Format/TokenAnnotator.cpp clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Frontend/FrontendAction.cpp clang/lib/Frontend/TextDiagnostic.cpp clang/lib/Headers/avxintrin.h clang/lib/Headers/emmintrin.h clang/lib/Headers/llvm_libc_wrappers/ctype.h clang/lib/Headers/xmmintrin.h clang/lib/Interpreter/IncrementalExecutor.cpp clang/lib/Lex/HeaderSearch.cpp clang/lib/Lex/ModuleMap.cpp clang/lib/Lex/PPDirectives.cpp clang/lib/Lex/Preprocessor.cpp clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Parse/ParseOpenMP.cpp clang/lib/Parse/Parser.cpp clang/lib/Sema/AnalysisBasedWarnings.cpp clang/lib/Sema/ParsedAttr.cpp clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaCodeComplete.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Serialization/ASTReader.cpp clang/lib/Serialization/ASTWriter.cpp clang/test/AST/Interp/arrays.cpp clang/test/AST/Interp/cxx20.cpp clang/test/AST/Interp/literals.cpp clang/test/AST/attr-print-emit.cpp clang/test/Analysis/eval-predefined-exprs.cpp clang/test/CodeCompletion/member-access.cpp clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-macros.c clang/test/CodeGen/X86/avx-builtins.c clang/test/CodeGen/X86/sse-builtins.c clang/test/CodeGen/X86/sse2-builtins.c clang/test/CodeGen/abs-overflow.c clang/test/CodeGen/builtin-abs.c clang/test/CodeGen/debug-info-codeview-unnamed.c clang/test/CodeGen/debug-info-unused-types.c clang/test/CodeGen/debug-info-unused-types.cpp clang/test/CodeGen/target-features-error-2.c clang/test/CodeGenCXX/builtins.cpp clang/test/CodeGenCXX/debug-info-access.cpp clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp clang/test/CodeGenCXX/debug-lambda-this.cpp clang/test/CodeGenCXX/module-initializer-guard-elision.cpp clang/test/CodeGenCXX/predefined-expr.cpp clang/test/Driver/fsanitize.c clang/test/Driver/hexagon-hvx-ieee-fp.c clang/test/Driver/hexagon-hvx-qfloat.c clang/test/Driver/hexagon-hvx.c clang/test/Driver/hexagon-long-calls.c clang/test/Driver/hexagon-memops.c clang/test/Driver/hexagon-nvj.c clang/test/Driver/hexagon-nvs.c clang/test/Driver/hexagon-packets.c clang/test/Driver/hexagon-toolchain-elf.c clang/test/Driver/hexagon-toolchain-linux.c clang/test/Driver/hexagon-vectorize.c clang/test/Driver/linker-wrapper.c clang/test/Driver/openmp-offload-gpu.c clang/test/Modules/context-hash.c clang/test/Modules/stddef.c clang/test/Preprocessor/has_attribute.cpp clang/test/Sema/builtins-x86.c clang/test/SemaCXX/lambda-expressions.cpp clang/test/SemaCXX/source_location.cpp clang/test/SemaCXX/sugar-common-types.cpp clang/test/SemaCXX/warn-thread-safety-analysis.cpp clang/test/SemaTemplate/cxx1z-fold-expressions.cpp clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp clang/tools/clang-repl/ClangRepl.cpp clang/unittests/Driver/ToolChainTest.cpp clang/unittests/Format/FormatTest.cpp clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp clang/unittests/Format/TokenAnnotatorTest.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp clang/unittests/Interpreter/InterpreterTest.cpp clang/unittests/Sema/CodeCompleteTest.cpp clang/utils/TableGen/ClangAttrEmitter.cpp compiler-rt/lib/asan/asan_allocator.h compiler-rt/lib/asan/asan_globals.cpp compiler-rt/lib/asan/asan_stats.cpp compiler-rt/lib/asan_abi/asan_abi.cpp compiler-rt/lib/asan_abi/asan_abi.h compiler-rt/lib/asan_abi/asan_abi_shim.cpp compiler-rt/lib/cfi/cfi.cpp compiler-rt/lib/dfsan/dfsan_custom.cpp compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp compiler-rt/lib/scudo/standalone/chunk.h compiler-rt/lib/scudo/standalone/combined.h compiler-rt/lib/scudo/standalone/release.cpp compiler-rt/lib/scudo/standalone/release.h compiler-rt/lib/scudo/standalone/report.cpp compiler-rt/lib/scudo/standalone/report.h compiler-rt/lib/scudo/standalone/tests/chunk_test.cpp compiler-rt/lib/scudo/standalone/tests/release_test.cpp compiler-rt/lib/scudo/standalone/tests/report_test.cpp compiler-rt/test/asan/TestCases/Posix/current_allocated_bytes.cpp compiler-rt/test/cfi/cross-dso/icall/dlopen.cpp compiler-rt/test/dfsan/custom.cpp compiler-rt/test/profile/instrprof-darwin-exports.c compiler-rt/test/sanitizer_common/TestCases/Linux/internal_symbolizer.cpp flang/include/flang/Evaluate/call.h flang/include/flang/Evaluate/type.h flang/include/flang/Optimizer/Builder/HLFIRTools.h flang/include/flang/Optimizer/Dialect/FIRType.h flang/include/flang/Runtime/api-attrs.h flang/include/flang/Runtime/descriptor.h flang/include/flang/Runtime/memory.h flang/include/flang/Runtime/type-code.h flang/include/flang/Semantics/symbol.h flang/lib/Evaluate/characteristics.cpp flang/lib/Evaluate/type.cpp flang/lib/Lower/Bridge.cpp flang/lib/Lower/ConvertCall.cpp flang/lib/Lower/ConvertConstant.cpp flang/lib/Lower/ConvertType.cpp flang/lib/Lower/ConvertVariable.cpp flang/lib/Lower/OpenACC.cpp flang/lib/Optimizer/Builder/HLFIRTools.cpp flang/lib/Optimizer/Builder/IntrinsicCall.cpp flang/lib/Optimizer/CodeGen/CodeGen.cpp flang/lib/Optimizer/HLFIR/IR/HLFIRDialect.cpp flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp flang/lib/Parser/openmp-parsers.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/resolve-directives.cpp flang/lib/Semantics/resolve-names.cpp flang/lib/Semantics/symbol.cpp flang/runtime/ISO_Fortran_util.h flang/runtime/derived.h flang/runtime/descriptor.cpp flang/runtime/terminator.cpp flang/runtime/terminator.h flang/runtime/type-code.cpp flang/runtime/type-info.h libc/config/linux/app.h libc/include/llvm-libc-types/rpc_opcodes_t.h libc/src/__support/CPP/new.h libc/src/__support/FPUtil/FEnvImpl.h libc/src/__support/FPUtil/FMA.h libc/src/__support/FPUtil/FPBits.h libc/src/__support/FPUtil/except_value_utils.h libc/src/__support/FPUtil/sqrt.h libc/src/__support/OSUtil/linux/syscall.h libc/src/__support/RPC/rpc.h libc/src/__support/RPC/rpc_client.cpp libc/src/__support/common.h libc/src/__support/macros/properties/architectures.h libc/src/__support/threads/linux/thread.cpp libc/src/__support/threads/thread.h libc/src/math/generic/exp.cpp libc/src/math/generic/expm1f.cpp libc/src/math/generic/log1pf.cpp libc/test/src/fenv/enabled_exceptions_test.cpp libc/test/src/fenv/feenableexcept_test.cpp libc/test/src/fenv/feholdexcept_test.cpp libc/utils/gpu/server/rpc_server.cpp libc/utils/gpu/server/rpc_server.h libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.verify.cpp libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.verify.cpp libcxx/test/libcxx/input.output/string.streams/traits_mismatch.verify.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp libcxx/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp libcxx/test/libcxx/utilities/expected/expected.expected/and_then.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.expected/error_or.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.expected/or_else.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.expected/value.observers.verify.cpp libcxx/test/libcxx/utilities/expected/expected.unexpected/swap.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.void/and_then.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.void/error_or.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.void/or_else.mandates.verify.cpp libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.segmented.pass.cpp libcxx/test/std/algorithms/alg.sorting/alg.three.way/lexicographical_compare_three_way_comp.verify.cpp libcxx/test/std/containers/associative/map/map.nonmember/compare.three_way.verify.cpp libcxx/test/std/containers/associative/multimap/multimap.nonmember/compare.three_way.verify.cpp libcxx/test/std/containers/sequences/array/array.fill/fill.verify.cpp libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.verify.cpp libcxx/test/std/containers/views/mdspan/layout_left/extents.verify.cpp libcxx/test/std/containers/views/mdspan/layout_right/extents.verify.cpp libcxx/test/std/containers/views/mdspan/mdspan/conversion.verify.cpp libcxx/test/std/containers/views/mdspan/mdspan/element_type.verify.cpp libcxx/test/std/containers/views/mdspan/mdspan/extents.verify.cpp libcxx/test/std/containers/views/mdspan/mdspan/mapping.verify.cpp libcxx/test/std/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp libcxx/test/std/strings/basic.string/char.bad.verify.cpp libcxx/test/std/strings/basic.string/string.capacity/capacity.pass.cpp libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp libcxx/test/std/strings/basic.string/string.contains/contains.char.pass.cpp libcxx/test/std/strings/basic.string/string.contains/contains.ptr.pass.cpp libcxx/test/std/strings/basic.string/string.contains/contains.string_view.pass.cpp libcxx/test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp libcxx/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/begin.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/cbegin.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/cend.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/crbegin.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/crend.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/end.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/rbegin.pass.cpp libcxx/test/std/strings/basic.string/string.iterators/rend.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/robust_against_adl.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_delim_rv.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/get_line_rv.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_extract.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.io/stream_insert.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/char_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_char.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_op+/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_operator==/string_view_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt/string_view_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_opgt=/string_view_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt/string_view_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/pointer_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.nonmembers/string_oplt=/string_view_string.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string.accessors/c_str.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string.accessors/data.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string.accessors/get_allocator.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp libcxx/test/std/strings/basic.string/string.require/contiguous.pass.cpp libcxx/test/std/strings/basic.string/string.starts_with/starts_with.char.pass.cpp libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp libcxx/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp libcxx/test/std/strings/string.view/char.bad.verify.cpp libcxx/test/std/strings/string.view/string.view.comparison/comparison.verify.cpp libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.verify.cpp libunwind/src/Unwind-sjlj.c libunwind/test/forceunwind.pass.cpp lld/COFF/LTO.cpp lld/Common/Filesystem.cpp lld/ELF/CallGraphSort.cpp lld/ELF/CallGraphSort.h lld/ELF/Config.h lld/ELF/Driver.cpp lld/ELF/LTO.cpp lld/MachO/Driver.cpp lld/MachO/InputFiles.cpp lld/MachO/LTO.cpp lld/include/lld/Common/Filesystem.h lldb/include/lldb/Host/Editline.h lldb/include/lldb/Target/RegisterContext.h lldb/include/lldb/lldb-defines.h lldb/source/Host/common/Editline.cpp lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Target/RegisterContext.cpp lldb/source/Target/Thread.cpp lldb/source/Utility/Args.cpp llvm/include/llvm/ADT/StringExtras.h llvm/include/llvm/Analysis/LoopIterator.h llvm/include/llvm/Analysis/MemoryBuiltins.h llvm/include/llvm/CodeGen/AccelTable.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/DWARFLinkerParallel/DWARFLinker.h llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.h llvm/include/llvm/Demangle/Demangle.h llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h llvm/include/llvm/ExecutionEngine/Orc/Shared/MemoryFlags.h llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h llvm/include/llvm/IR/DIBuilder.h llvm/include/llvm/IR/DebugInfo.h llvm/include/llvm/IR/InlineAsm.h llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h llvm/include/llvm/ProfileData/InstrProfCorrelator.h llvm/include/llvm/TableGen/Record.h llvm/include/llvm/Transforms/InstCombine/InstCombiner.h llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h llvm/include/llvm/Transforms/Utils/UnrollLoop.h llvm/lib/Analysis/ConstantFolding.cpp llvm/lib/Analysis/InstructionSimplify.cpp llvm/lib/Analysis/LoopInfo.cpp llvm/lib/Analysis/MemoryBuiltins.cpp llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/Analysis/ValueTracking.cpp llvm/lib/AsmParser/LLParser.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Reader/MetadataLoader.cpp llvm/lib/Bitcode/Reader/MetadataLoader.h llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp llvm/lib/CodeGen/MachineLICM.cpp llvm/lib/CodeGen/MachineSink.cpp llvm/lib/CodeGen/RegAllocGreedy.cpp llvm/lib/CodeGen/ScheduleDAG.cpp llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/CodeGen/TypePromotion.cpp llvm/lib/DWARFLinker/DWARFStreamer.cpp llvm/lib/DWARFLinkerParallel/ArrayList.h llvm/lib/DWARFLinkerParallel/DIEAttributeCloner.cpp llvm/lib/DWARFLinkerParallel/DIEAttributeCloner.h llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.cpp llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.h llvm/lib/DWARFLinkerParallel/DWARFLinkerCompileUnit.cpp llvm/lib/DWARFLinkerParallel/DWARFLinkerCompileUnit.h llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.cpp llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.h llvm/lib/DWARFLinkerParallel/DWARFLinkerUnit.cpp llvm/lib/DWARFLinkerParallel/DWARFLinkerUnit.h llvm/lib/DWARFLinkerParallel/DependencyTracker.cpp llvm/lib/DWARFLinkerParallel/OutputSections.cpp llvm/lib/DWARFLinkerParallel/OutputSections.h llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp llvm/lib/Demangle/Demangle.cpp llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp llvm/lib/ExecutionEngine/Orc/LLJIT.cpp llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp llvm/lib/IR/DIBuilder.cpp llvm/lib/IR/DataLayout.cpp llvm/lib/IR/DebugInfo.cpp llvm/lib/IR/Verifier.cpp llvm/lib/MC/MCParser/AsmParser.cpp llvm/lib/MC/MCPseudoProbe.cpp llvm/lib/ObjCopy/ELF/ELFObject.cpp llvm/lib/Object/COFFImportFile.cpp llvm/lib/ObjectYAML/MachOEmitter.cpp llvm/lib/Passes/PassBuilderPipelines.cpp llvm/lib/ProfileData/Coverage/CoverageMapping.cpp llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp llvm/lib/ProfileData/InstrProfCorrelator.cpp llvm/lib/Support/VirtualFileSystem.cpp llvm/lib/TableGen/Record.cpp llvm/lib/TableGen/TGParser.cpp llvm/lib/Target/AArch64/AArch64FrameLowering.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.h llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.h llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp llvm/lib/Target/NVPTX/NVPTXUtilities.cpp llvm/lib/Target/NVPTX/NVPTXUtilities.h llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/PowerPC/PPCMIPeephole.cpp llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.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/RISCVTargetTransformInfo.cpp llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp llvm/lib/Target/X86/X86FastISel.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/TargetParser/Host.cpp llvm/lib/TargetParser/Triple.cpp llvm/lib/TextAPI/TextStub.cpp llvm/lib/Transforms/IPO/LowerTypeTests.cpp llvm/lib/Transforms/IPO/OpenMPOpt.cpp llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.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/InstCombineMulDivRem.cpp llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp llvm/lib/Transforms/Scalar/ConstraintElimination.cpp llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp llvm/lib/Transforms/Scalar/NewGVN.cpp llvm/lib/Transforms/Utils/CloneFunction.cpp llvm/lib/Transforms/Utils/InlineFunction.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VectorCombine.cpp llvm/tools/dsymutil/BinaryHolder.cpp llvm/tools/lli/lli.cpp llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp llvm/tools/llvm-jitlink/llvm-jitlink.cpp llvm/tools/llvm-nm/llvm-nm.cpp llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp llvm/tools/llvm-pdbutil/TypeReferenceTracker.cpp llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp llvm/tools/llvm-readtapi/DiffEngine.cpp llvm/tools/llvm-xray/xray-converter.cpp llvm/tools/llvm-xray/xray-fdr-dump.cpp llvm/tools/llvm-xray/xray-stacks.cpp llvm/tools/obj2yaml/dwarf2yaml.cpp llvm/tools/obj2yaml/macho2yaml.cpp llvm/tools/obj2yaml/obj2yaml.h llvm/unittests/ADT/IteratorTest.cpp llvm/unittests/ADT/StringExtrasTest.cpp llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp llvm/unittests/FileCheck/FileCheckTest.cpp llvm/unittests/IR/DataLayoutTest.cpp llvm/unittests/TargetParser/TripleTest.cpp llvm/unittests/Transforms/Utils/CloningTest.cpp llvm/utils/FileCheck/FileCheck.cpp llvm/utils/TableGen/InfoByHwMode.cpp llvm/utils/TableGen/InstrInfoEmitter.cpp llvm/utils/TableGen/IntrinsicEmitter.cpp llvm/utils/TableGen/X86FoldTablesEmitter.cpp mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp mlir/include/mlir-c/Dialect/Transform.h mlir/include/mlir/Analysis/Presburger/Matrix.h mlir/include/mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h mlir/include/mlir/Conversion/Passes.h mlir/include/mlir/Dialect/Affine/IR/AffineOps.h mlir/include/mlir/Dialect/ArmSME/Utils/Utils.h mlir/include/mlir/Dialect/EmitC/IR/EmitC.h mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h mlir/include/mlir/Dialect/SCF/Utils/Utils.h mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h mlir/include/mlir/IR/ExtensibleDialect.h mlir/include/mlir/IR/ODSSupport.h mlir/include/mlir/IR/OpDefinition.h mlir/include/mlir/IR/OpImplementation.h mlir/include/mlir/IR/Operation.h mlir/include/mlir/IR/OperationSupport.h mlir/include/mlir/InitAllDialects.h mlir/include/mlir/Interfaces/LoopLikeInterface.h mlir/lib/AsmParser/Parser.cpp mlir/lib/AsmParser/TypeParser.cpp mlir/lib/Bindings/Python/DialectTransform.cpp mlir/lib/CAPI/Dialect/Transform.cpp mlir/lib/CAPI/IR/IR.cpp mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp mlir/lib/Conversion/ArmSMEToSCF/ArmSMEToSCF.cpp mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRVPass.cpp mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp mlir/lib/Conversion/VectorToArmSME/VectorToArmSME.cpp mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp mlir/lib/Dialect/Affine/IR/AffineOps.cpp mlir/lib/Dialect/Affine/Utils/LoopFusionUtils.cpp mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp mlir/lib/Dialect/ArmSME/Transforms/LegalizeForLLVMExport.cpp mlir/lib/Dialect/ArmSME/Utils/Utils.cpp mlir/lib/Dialect/Bufferization/Pipelines/BufferizationPipelines.cpp mlir/lib/Dialect/Bufferization/Transforms/EmptyTensorElimination.cpp mlir/lib/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation.cpp mlir/lib/Dialect/EmitC/IR/EmitC.cpp mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp mlir/lib/Dialect/Linalg/Transforms/SubsetHoisting.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp mlir/lib/Dialect/OpenACC/IR/OpenACC.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/SCF/Utils/Utils.cpp mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp mlir/lib/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp mlir/lib/Dialect/Tosa/IR/TosaOps.cpp mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp mlir/lib/Dialect/Vector/IR/VectorOps.cpp mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp mlir/lib/Dialect/Vector/Transforms/LowerVectorTransfer.cpp mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp mlir/lib/IR/AsmPrinter.cpp mlir/lib/IR/Attributes.cpp mlir/lib/IR/MLIRContext.cpp mlir/lib/IR/ODSSupport.cpp mlir/lib/IR/Operation.cpp mlir/lib/IR/OperationSupport.cpp mlir/lib/TableGen/CodeGenHelpers.cpp mlir/lib/Target/Cpp/TranslateToCpp.cpp mlir/lib/Target/LLVMIR/DebugImporter.cpp mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp mlir/lib/Target/LLVMIR/ModuleImport.cpp mlir/lib/Transforms/Utils/CFGToSCF.cpp mlir/test/CAPI/sparse_tensor.c mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp mlir/test/lib/Dialect/Test/TestDialect.cpp mlir/test/lib/Dialect/Test/TestDialect.h mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp mlir/tools/mlir-tblgen/OpDocGen.cpp mlir/unittests/IR/OpPropertiesTest.cpp openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp openmp/libomptarget/test/libc/malloc.c third-party/unittest/googletest/include/gtest/internal/gtest-port.h libc/src/__support/FPUtil/riscv/FEnvImpl.h libc/src/__support/FPUtil/riscv/FMA.h libc/src/__support/FPUtil/riscv/sqrt.h libc/src/__support/OSUtil/linux/riscv/syscall.h libc/src/setjmp/riscv/longjmp.cpp libc/src/setjmp/riscv/setjmp.cpp libc/src/stdio/generic/fflush.cpp libc/src/stdio/generic/fseek.cpp libc/src/stdio/generic/ftell.cpp libc/startup/linux/riscv/start.cpp llvm/include/llvm/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.h llvm/include/llvm/ExecutionEngine/Orc/Debugging/PerfSupportPlugin.h llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp llvm/lib/ExecutionEngine/Orc/Debugging/PerfSupportPlugin.cpp
View the diff from clang-format here.
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index c8700a7d159a..c003e1582ed8 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -2843,7 +2843,9 @@ bool Darwin::isAlignedAllocationUnavailable() const {
   return TargetVersion < alignedAllocMinVersion(OS);
 }
 
-static bool sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPlatform, const std::optional<DarwinSDKInfo> &SDKInfo) {
+static bool
+sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPlatform,
+                          const std::optional<DarwinSDKInfo> &SDKInfo) {
   if (!SDKInfo)
     return false;
 
@@ -2890,8 +2892,8 @@ void Darwin::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
   // the _Builtin_ modules. e.g. <inttypes.h> on darwin includes <stdint.h>.
   // The builtin <stdint.h> include-nexts <stdint.h>. When both of those
   // darwin headers are in the Darwin module, there's a module cycle Darwin ->
-  // _Builtin_stdint -> Darwin (i.e. inttypes.h (darwin) -> stdint.h (builtin) ->
-  // stdint.h (darwin)). This is fixed in later versions of the darwin SDK,
+  // _Builtin_stdint -> Darwin (i.e. inttypes.h (darwin) -> stdint.h (builtin)
+  // -> stdint.h (darwin)). This is fixed in later versions of the darwin SDK,
   // but until then, the builtin headers need to join the system modules.
   // i.e. when the builtin stdint.h is in the Darwin module too, the cycle
   // goes away. Note that -fbuiltin-headers-in-system-modules does nothing
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 2da1a89b39ba..c26f6ae8d33b 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -742,7 +742,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
   // Set up embedding for any specified files. Do this before we load any
   // source files, including the primary module map for the compilation.
   for (const auto &F : CI.getFrontendOpts().ModulesEmbedFiles) {
-    if (auto FE = CI.getFileManager().getOptionalFileRef(F, /*openFile*/true))
+    if (auto FE = CI.getFileManager().getOptionalFileRef(F, /*openFile*/ true))
       CI.getSourceManager().setFileIsTransient(*FE);
     else
       CI.getDiagnostics().Report(diag::err_modules_embed_file_not_found) << F;
diff --git a/clang/lib/Headers/xmmintrin.h b/clang/lib/Headers/xmmintrin.h
index 73b1ab4bb4a3..a2ad35a7fa16 100644
--- a/clang/lib/Headers/xmmintrin.h
+++ b/clang/lib/Headers/xmmintrin.h
@@ -2937,14 +2937,14 @@ _mm_movemask_ps(__m128 __a)
 }
 
 /* Compare */
-#define _CMP_EQ_OQ    0x00 /* Equal (ordered, non-signaling)  */
-#define _CMP_LT_OS    0x01 /* Less-than (ordered, signaling)  */
-#define _CMP_LE_OS    0x02 /* Less-than-or-equal (ordered, signaling)  */
-#define _CMP_UNORD_Q  0x03 /* Unordered (non-signaling)  */
-#define _CMP_NEQ_UQ   0x04 /* Not-equal (unordered, non-signaling)  */
-#define _CMP_NLT_US   0x05 /* Not-less-than (unordered, signaling)  */
-#define _CMP_NLE_US   0x06 /* Not-less-than-or-equal (unordered, signaling)  */
-#define _CMP_ORD_Q    0x07 /* Ordered (non-signaling)   */
+#define _CMP_EQ_OQ 0x00   /* Equal (ordered, non-signaling)  */
+#define _CMP_LT_OS 0x01   /* Less-than (ordered, signaling)  */
+#define _CMP_LE_OS 0x02   /* Less-than-or-equal (ordered, signaling)  */
+#define _CMP_UNORD_Q 0x03 /* Unordered (non-signaling)  */
+#define _CMP_NEQ_UQ 0x04  /* Not-equal (unordered, non-signaling)  */
+#define _CMP_NLT_US 0x05  /* Not-less-than (unordered, signaling)  */
+#define _CMP_NLE_US 0x06  /* Not-less-than-or-equal (unordered, signaling)  */
+#define _CMP_ORD_Q 0x07   /* Ordered (non-signaling)   */
 
 /// Compares each of the corresponding values of two 128-bit vectors of
 ///    [4 x float], using the operation specified by the immediate integer
diff --git a/clang/lib/Interpreter/IncrementalExecutor.cpp b/clang/lib/Interpreter/IncrementalExecutor.cpp
index 40bcef94797d..8579aa03617c 100644
--- a/clang/lib/Interpreter/IncrementalExecutor.cpp
+++ b/clang/lib/Interpreter/IncrementalExecutor.cpp
@@ -47,13 +47,12 @@ IncrementalExecutor::IncrementalExecutor(llvm::orc::ThreadSafeContext &TSC,
   JTMB.addFeatures(TI.getTargetOpts().Features);
   LLJITBuilder Builder;
   Builder.setJITTargetMachineBuilder(JTMB);
-  Builder.setPrePlatformSetup(
-      [](LLJIT &J) {
-        // Try to enable debugging of JIT'd code (only works with JITLink for
-        // ELF and MachO).
-        consumeError(enableDebuggerSupport(J));
-        return llvm::Error::success();
-      });
+  Builder.setPrePlatformSetup([](LLJIT &J) {
+    // Try to enable debugging of JIT'd code (only works with JITLink for
+    // ELF and MachO).
+    consumeError(enableDebuggerSupport(J));
+    return llvm::Error::success();
+  });
 
   if (auto JitOrErr = Builder.create())
     Jit = std::move(*JitOrErr);
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index e54a19ebfdbb..e4292750f899 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -1400,9 +1400,9 @@ void HeaderSearch::MarkFileModuleHeader(const FileEntry *FE,
   HFI.isCompilingModuleHeader |= isCompilingModuleHeader;
 }
 
-bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
-                                          FileEntryRef File, bool isImport,
-                                          bool ModulesEnabled, Module *M,
+bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP, FileEntryRef File,
+                                          bool isImport, bool ModulesEnabled,
+                                          Module *M,
                                           bool &IsFirstIncludeOfFile) {
   ++NumIncluded; // Count # of attempted #includes.
 
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index e8437572ebf4..ecf2a4ec48ac 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -258,38 +258,38 @@ OptionalFileEntryRef ModuleMap::findHeader(
 /// headers.
 static bool isBuiltinHeaderName(StringRef FileName) {
   return llvm::StringSwitch<bool>(FileName)
-           .Case("float.h", true)
-           .Case("iso646.h", true)
-           .Case("limits.h", true)
-           .Case("stdalign.h", true)
-           .Case("stdarg.h", true)
-           .Case("stdatomic.h", true)
-           .Case("stdbool.h", true)
-           .Case("stddef.h", true)
-           .Case("stdint.h", true)
-           .Case("tgmath.h", true)
-           .Case("unwind.h", true)
-           .Default(false);
+      .Case("float.h", true)
+      .Case("iso646.h", true)
+      .Case("limits.h", true)
+      .Case("stdalign.h", true)
+      .Case("stdarg.h", true)
+      .Case("stdatomic.h", true)
+      .Case("stdbool.h", true)
+      .Case("stddef.h", true)
+      .Case("stdint.h", true)
+      .Case("tgmath.h", true)
+      .Case("unwind.h", true)
+      .Default(false);
 }
 
 /// Determine whether the given module name is the name of a builtin
 /// module that is cyclic with a system module  on some platforms.
 static bool isBuiltInModuleName(StringRef ModuleName) {
   return llvm::StringSwitch<bool>(ModuleName)
-           .Case("_Builtin_float", true)
-           .Case("_Builtin_inttypes", true)
-           .Case("_Builtin_iso646", true)
-           .Case("_Builtin_limits", true)
-           .Case("_Builtin_stdalign", true)
-           .Case("_Builtin_stdarg", true)
-           .Case("_Builtin_stdatomic", true)
-           .Case("_Builtin_stdbool", true)
-           .Case("_Builtin_stddef", true)
-           .Case("_Builtin_stdint", true)
-           .Case("_Builtin_stdnoreturn", true)
-           .Case("_Builtin_tgmath", true)
-           .Case("_Builtin_unwind", true)
-           .Default(false);
+      .Case("_Builtin_float", true)
+      .Case("_Builtin_inttypes", true)
+      .Case("_Builtin_iso646", true)
+      .Case("_Builtin_limits", true)
+      .Case("_Builtin_stdalign", true)
+      .Case("_Builtin_stdarg", true)
+      .Case("_Builtin_stdatomic", true)
+      .Case("_Builtin_stdbool", true)
+      .Case("_Builtin_stddef", true)
+      .Case("_Builtin_stdint", true)
+      .Case("_Builtin_stdnoreturn", true)
+      .Case("_Builtin_tgmath", true)
+      .Case("_Builtin_unwind", true)
+      .Default(false);
 }
 
 void ModuleMap::resolveHeader(Module *Mod,
@@ -336,7 +336,8 @@ bool ModuleMap::resolveAsBuiltinHeader(
       llvm::sys::path::is_absolute(Header.FileName) ||
       Mod->isPartOfFramework() || !Mod->IsSystem || Header.IsUmbrella ||
       !BuiltinIncludeDir || BuiltinIncludeDir == Mod->Directory ||
-      !LangOpts.BuiltinHeadersInSystemModules || !isBuiltinHeaderName(Header.FileName))
+      !LangOpts.BuiltinHeadersInSystemModules ||
+      !isBuiltinHeaderName(Header.FileName))
     return false;
 
   // This is a system module with a top-level header. This header
@@ -413,7 +414,8 @@ static StringRef sanitizeFilenameAsIdentifier(StringRef Name,
 }
 
 bool ModuleMap::isBuiltinHeader(FileEntryRef File) {
-  return File.getDir() == BuiltinIncludeDir && LangOpts.BuiltinHeadersInSystemModules &&
+  return File.getDir() == BuiltinIncludeDir &&
+         LangOpts.BuiltinHeadersInSystemModules &&
          isBuiltinHeaderName(llvm::sys::path::filename(File.getName()));
 }
 
@@ -2491,9 +2493,10 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
   }
 
   bool NeedsFramework = false;
-  // Don't add the top level headers to the builtin modules if the builtin headers
-  // belong to the system modules.
-  if (!Map.LangOpts.BuiltinHeadersInSystemModules || ActiveModule->isSubModule() || !isBuiltInModuleName(ActiveModule->Name))
+  // Don't add the top level headers to the builtin modules if the builtin
+  // headers belong to the system modules.
+  if (!Map.LangOpts.BuiltinHeadersInSystemModules ||
+      ActiveModule->isSubModule() || !isBuiltInModuleName(ActiveModule->Name))
     Map.addUnresolvedHeader(ActiveModule, std::move(Header), NeedsFramework);
 
   if (NeedsFramework)
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 4ff145bb1e25..2e459d0af810 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -4129,7 +4129,7 @@ ASTReader::ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F,
     for (FileEntryRef ModMap : AdditionalStoredMaps) {
       if (!canRecoverFromOutOfDate(F.FileName, ClientLoadCapabilities))
         Diag(diag::err_module_different_modmap)
-          << F.ModuleName << /*not new*/1 << ModMap.getName();
+            << F.ModuleName << /*not new*/ 1 << ModMap.getName();
       return OutOfDate;
     }
   }
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index e6f6bb921f16..3a3b4db47651 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2021,7 +2021,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;
 
@@ -2037,12 +2037,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/compiler-rt/lib/dfsan/dfsan_custom.cpp b/compiler-rt/lib/dfsan/dfsan_custom.cpp
index 38371d353368..24d95bb87b4a 100644
--- a/compiler-rt/lib/dfsan/dfsan_custom.cpp
+++ b/compiler-rt/lib/dfsan/dfsan_custom.cpp
@@ -2581,45 +2581,45 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
             read_count = formatter.scan();
           } else {
             switch (*(formatter.fmt_cur - 1)) {
-            case 'h':
-              // Also covers the 'hh' case (since the size of the arg is still
-              // an int).
-              dst_ptr = va_arg(ap, int *);
-              read_count = formatter.scan((int *)dst_ptr);
-              write_size = sizeof(int);
-              break;
-            case 'l':
-              if (formatter.fmt_cur - formatter.fmt_start >= 2 &&
-                  *(formatter.fmt_cur - 2) == 'l') {
+              case 'h':
+                // Also covers the 'hh' case (since the size of the arg is still
+                // an int).
+                dst_ptr = va_arg(ap, int *);
+                read_count = formatter.scan((int *)dst_ptr);
+                write_size = sizeof(int);
+                break;
+              case 'l':
+                if (formatter.fmt_cur - formatter.fmt_start >= 2 &&
+                    *(formatter.fmt_cur - 2) == 'l') {
+                  dst_ptr = va_arg(ap, long long int *);
+                  read_count = formatter.scan((long long int *)dst_ptr);
+                  write_size = sizeof(long long int);
+                } else {
+                  dst_ptr = va_arg(ap, long int *);
+                  read_count = formatter.scan((long int *)dst_ptr);
+                  write_size = sizeof(long int);
+                }
+                break;
+              case 'q':
                 dst_ptr = va_arg(ap, long long int *);
                 read_count = formatter.scan((long long int *)dst_ptr);
                 write_size = sizeof(long long int);
-              } else {
-                dst_ptr = va_arg(ap, long int *);
-                read_count = formatter.scan((long int *)dst_ptr);
-                write_size = sizeof(long int);
-              }
-              break;
-            case 'q':
-              dst_ptr = va_arg(ap, long long int *);
-              read_count = formatter.scan((long long int *)dst_ptr);
-              write_size = sizeof(long long int);
-              break;
-            case 'j':
-              dst_ptr = va_arg(ap, intmax_t *);
-              read_count = formatter.scan((intmax_t *)dst_ptr);
-              write_size = sizeof(intmax_t);
-              break;
-            case 'z':
-            case 't':
-              dst_ptr = va_arg(ap, size_t *);
-              read_count = formatter.scan((size_t *)dst_ptr);
-              write_size = sizeof(size_t);
-              break;
-            default:
-              dst_ptr = va_arg(ap, int *);
-              read_count = formatter.scan((int *)dst_ptr);
-              write_size = sizeof(int);
+                break;
+              case 'j':
+                dst_ptr = va_arg(ap, intmax_t *);
+                read_count = formatter.scan((intmax_t *)dst_ptr);
+                write_size = sizeof(intmax_t);
+                break;
+              case 'z':
+              case 't':
+                dst_ptr = va_arg(ap, size_t *);
+                read_count = formatter.scan((size_t *)dst_ptr);
+                write_size = sizeof(size_t);
+                break;
+              default:
+                dst_ptr = va_arg(ap, int *);
+                read_count = formatter.scan((int *)dst_ptr);
+                write_size = sizeof(int);
             }
             // get the label associated with the string at the corresponding
             // place
@@ -2627,10 +2627,10 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
                 formatter.str_cur(), formatter.num_written_bytes(read_count));
             dfsan_set_label(l, dst_ptr, write_size);
             if (str_origin != nullptr) {
-            dfsan_set_label(l, dst_ptr, write_size);
-            size_t scan_count = formatter.num_written_bytes(read_count);
-            size_t size = scan_count > write_size ? write_size : scan_count;
-            dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
+              dfsan_set_label(l, dst_ptr, write_size);
+              size_t scan_count = formatter.num_written_bytes(read_count);
+              size_t size = scan_count > write_size ? write_size : scan_count;
+              dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
             }
           }
           end_fmt = true;
@@ -2649,26 +2649,26 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
             read_count = formatter.scan();
           } else {
             if (*(formatter.fmt_cur - 1) == 'L') {
-            dst_ptr = va_arg(ap, long double *);
-            read_count = formatter.scan((long double *)dst_ptr);
-            write_size = sizeof(long double);
+              dst_ptr = va_arg(ap, long double *);
+              read_count = formatter.scan((long double *)dst_ptr);
+              write_size = sizeof(long double);
             } else if (*(formatter.fmt_cur - 1) == 'l') {
-            dst_ptr = va_arg(ap, double *);
-            read_count = formatter.scan((double *)dst_ptr);
-            write_size = sizeof(double);
+              dst_ptr = va_arg(ap, double *);
+              read_count = formatter.scan((double *)dst_ptr);
+              write_size = sizeof(double);
             } else {
-            dst_ptr = va_arg(ap, float *);
-            read_count = formatter.scan((float *)dst_ptr);
-            write_size = sizeof(float);
+              dst_ptr = va_arg(ap, float *);
+              read_count = formatter.scan((float *)dst_ptr);
+              write_size = sizeof(float);
             }
             dfsan_label l = dfsan_read_label(
                 formatter.str_cur(), formatter.num_written_bytes(read_count));
             dfsan_set_label(l, dst_ptr, write_size);
             if (str_origin != nullptr) {
-            dfsan_set_label(l, dst_ptr, write_size);
-            size_t scan_count = formatter.num_written_bytes(read_count);
-            size_t size = scan_count > write_size ? write_size : scan_count;
-            dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
+              dfsan_set_label(l, dst_ptr, write_size);
+              size_t scan_count = formatter.num_written_bytes(read_count);
+              size_t size = scan_count > write_size ? write_size : scan_count;
+              dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
             }
           }
           end_fmt = true;
@@ -2685,9 +2685,9 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
                 formatter.str_cur(), formatter.num_written_bytes(read_count));
             dfsan_set_label(l, dst_ptr, write_size);
             if (str_origin != nullptr) {
-            size_t scan_count = formatter.num_written_bytes(read_count);
-            size_t size = scan_count > write_size ? write_size : scan_count;
-            dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
+              size_t scan_count = formatter.num_written_bytes(read_count);
+              size_t size = scan_count > write_size ? write_size : scan_count;
+              dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
             }
           }
           end_fmt = true;
@@ -2700,13 +2700,14 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
             dst_ptr = va_arg(ap, char *);
             read_count = formatter.scan((char *)dst_ptr);
             if (1 == read_count) {
-            // special case: we have parsed a single string and we need to
-            // update read_count with the string size
-            read_count = strlen((char *)dst_ptr);
+              // special case: we have parsed a single string and we need to
+              // update read_count with the string size
+              read_count = strlen((char *)dst_ptr);
             }
             if (str_origin)
-            dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(),
-                                      formatter.num_written_bytes(read_count));
+              dfsan_mem_origin_transfer(
+                  dst_ptr, formatter.str_cur(),
+                  formatter.num_written_bytes(read_count));
             va_labels++;
             dfsan_mem_shadow_transfer(dst_ptr, formatter.str_cur(),
                                       formatter.num_written_bytes(read_count));
@@ -2729,10 +2730,10 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
                 formatter.str_cur(), formatter.num_written_bytes(read_count));
             dfsan_set_label(l, dst_ptr, write_size);
             if (str_origin != nullptr) {
-            dfsan_set_label(l, dst_ptr, write_size);
-            size_t scan_count = formatter.num_written_bytes(read_count);
-            size_t size = scan_count > write_size ? write_size : scan_count;
-            dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
+              dfsan_set_label(l, dst_ptr, write_size);
+              size_t scan_count = formatter.num_written_bytes(read_count);
+              size_t size = scan_count > write_size ? write_size : scan_count;
+              dfsan_mem_origin_transfer(dst_ptr, formatter.str_cur(), size);
             }
           }
           end_fmt = true;
@@ -2745,7 +2746,7 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
             *va_labels++ = 0;
             dfsan_set_label(0, ptr, sizeof(*ptr));
             if (str_origin != nullptr)
-            *str_origin++ = 0;
+              *str_origin++ = 0;
           }
           end_fmt = true;
           break;
diff --git a/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp
index 5b7e8bde2e6e..a9ab0a94d396 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp
@@ -33,14 +33,14 @@ TEST_CONSTEXPR_CXX20 void test_string() {
   }
 #endif
 }
-// clang-format on
+  // clang-format on
 
-TEST_CONSTEXPR_CXX20 bool test() {
-  test_string<std::allocator>();
-  test_string<min_allocator>();
+  TEST_CONSTEXPR_CXX20 bool test() {
+    test_string<std::allocator>();
+    test_string<min_allocator>();
 
-  return true;
-}
+    return true;
+  }
 
 int main(int, char**) {
   test();
diff --git a/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp
index 88597daba121..aa1c3b8dfc5d 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp
@@ -38,14 +38,14 @@ TEST_CONSTEXPR_CXX20 void test_string() {
   }
 #endif
 }
-// clang-format on
+  // clang-format on
 
-TEST_CONSTEXPR_CXX20 bool test() {
-  test_string<std::allocator>();
-  test_string<min_allocator>();
+  TEST_CONSTEXPR_CXX20 bool test() {
+    test_string<std::allocator>();
+    test_string<min_allocator>();
 
-  return true;
-}
+    return true;
+  }
 
 int main(int, char**) {
   test();
diff --git a/llvm/include/llvm/Analysis/LoopIterator.h b/llvm/include/llvm/Analysis/LoopIterator.h
index 523d2a21825d..4558088af915 100644
--- a/llvm/include/llvm/Analysis/LoopIterator.h
+++ b/llvm/include/llvm/Analysis/LoopIterator.h
@@ -177,9 +177,7 @@ public:
   LoopBlocksRPO(Loop *Container) : DFS(Container) {}
 
   /// Traverse the loop blocks and store the DFS result.
-  void perform(const LoopInfo *LI) {
-    DFS.perform(LI);
-  }
+  void perform(const LoopInfo *LI) { DFS.perform(LI); }
 
   /// Reverse iterate over the cached postorder blocks.
   LoopBlocksDFS::RPOIterator begin() const { return DFS.beginRPO(); }
@@ -207,8 +205,8 @@ private:
   const LoopInfo *LI;
 
 public:
-  LoopBlocksTraversal(LoopBlocksDFS &Storage, const LoopInfo *LInfo) :
-    DFS(Storage), LI(LInfo) {}
+  LoopBlocksTraversal(LoopBlocksDFS &Storage, const LoopInfo *LInfo)
+      : DFS(Storage), LI(LInfo) {}
 
   /// Postorder traversal over the graph. This only needs to be done once.
   /// po_iterator "automatically" calls back to visitPreorder and
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 75c34d884e44..7c1e86813584 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/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp
index 236ba5114130..4ac1b8b5a72b 100644
--- a/llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp
@@ -169,15 +169,13 @@ public:
       // Try to parse line data. Consume error on failure.
       if (auto Err = LineTable.parse(DebugLineData, &Offset, *DWARFCtx, nullptr,
                                      consumeError)) {
-        handleAllErrors(
-          std::move(Err),
-          [&](ErrorInfoBase &EIB) {
-            LLVM_DEBUG({
-              dbgs() << "Cannot parse line table for \"" << G.getName() << "\": ";
-              EIB.log(dbgs());
-              dbgs() << "\n";
-            });
+        handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) {
+          LLVM_DEBUG({
+            dbgs() << "Cannot parse line table for \"" << G.getName() << "\": ";
+            EIB.log(dbgs());
+            dbgs() << "\n";
           });
+        });
       } else {
         if (!LineTable.Prologue.FileNames.empty())
           FileName = *dwarf::toString(LineTable.Prologue.FileNames[0].Name);
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index d3e618b638fb..f9e3c3db299a 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -69,9 +69,9 @@ void DIBuilder::finalize() {
   }
 
   if (!EnumTypes.empty())
-    CUNode->replaceEnumTypes(MDTuple::get(
-        VMContext, SmallVector<Metadata *, 16>(EnumTypes.begin(),
-                                               EnumTypes.end())));
+    CUNode->replaceEnumTypes(
+        MDTuple::get(VMContext, SmallVector<Metadata *, 16>(EnumTypes.begin(),
+                                                            EnumTypes.end())));
 
   SmallVector<Metadata *, 16> RetainValues;
   // Declarations and definitions of the same type may be retained. Some
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
index e468fbf7184f..c0785d1dc93c 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
@@ -1054,7 +1054,7 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
   auto ObjFormat = OF->getTripleObjectFormat();
   auto NamesSection =
       lookupSections(*OF, getInstrProfSectionName(IPSK_name, ObjFormat,
-                                                 /*AddSegmentInfo=*/false));
+                                                  /*AddSegmentInfo=*/false));
   if (auto E = NamesSection.takeError())
     return std::move(E);
   auto CoverageSection =
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 2799a3e78b04..8be46e238106 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5038,11 +5038,16 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
   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_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;
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index 20f53bd4badf..90d1b41100f3 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -38,21 +38,21 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/CodeGen/TargetPassConfig.h"
 #include "llvm/IR/Argument.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/OperandTraits.h"
 #include "llvm/IR/Type.h"
 #include "llvm/IR/Use.h"
 #include "llvm/IR/User.h"
 #include "llvm/IR/Value.h"
 #include "llvm/Pass.h"
-#include "llvm/CodeGen/TargetPassConfig.h"
 #include "llvm/Support/Casting.h"
 #include <cassert>
 
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h
index 2675b0ce43e4..08ed0b221853 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.h
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h
@@ -125,7 +125,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.
@@ -138,10 +139,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/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 08b9098871b3..714d380c81b2 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4926,7 +4926,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/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 2bf0fc2a4a84..9d21596bc4ce 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -761,11 +761,11 @@ Value *LowerTypeTestsModule::lowerTypeTestCall(Metadata *TypeId, CallInst *CI,
   Value *OffsetSHR =
       B.CreateLShr(PtrOffset, B.CreateZExt(TIL.AlignLog2, IntPtrTy));
   Value *OffsetSHL = B.CreateShl(
-      PtrOffset, B.CreateZExt(
-                     ConstantExpr::getSub(
-                         ConstantInt::get(Int8Ty, DL.getPointerSizeInBits(0)),
-                         TIL.AlignLog2),
-                     IntPtrTy));
+      PtrOffset,
+      B.CreateZExt(ConstantExpr::getSub(
+                       ConstantInt::get(Int8Ty, DL.getPointerSizeInBits(0)),
+                       TIL.AlignLog2),
+                   IntPtrTy));
   Value *BitOffset = B.CreateOr(OffsetSHR, OffsetSHL);
 
   Value *OffsetInRange = B.CreateICmpULE(BitOffset, TIL.SizeM1);
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index 0db5fc254f3c..de2bd2cfaf76 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -1267,8 +1267,7 @@ static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth,
 
 /// If we have zero-extended operands of an unsigned div or rem, we may be able
 /// to narrow the operation (sink the zext below the math).
-static Instruction *narrowUDivURem(BinaryOperator &I,
-                                   InstCombinerImpl &IC) {
+static Instruction *narrowUDivURem(BinaryOperator &I, InstCombinerImpl &IC) {
   Instruction::BinaryOps Opcode = I.getOpcode();
   Value *N = I.getOperand(0);
   Value *D = I.getOperand(1);
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
index 67335a2d0157..9f6fb7960f7c 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
@@ -166,9 +166,8 @@ static bool computeUnrollAndJamCount(
   unsigned MaxTripCount = 0;
   bool UseUpperBound = false;
   bool ExplicitUnroll = computeUnrollCount(
-    L, TTI, DT, LI, AC, SE, EphValues, ORE, OuterTripCount, MaxTripCount,
-      /*MaxOrZero*/ false, OuterTripMultiple, OuterUCE, UP, PP,
-      UseUpperBound);
+      L, TTI, DT, LI, AC, SE, EphValues, ORE, OuterTripCount, MaxTripCount,
+      /*MaxOrZero*/ false, OuterTripMultiple, OuterUCE, UP, PP, UseUpperBound);
   if (ExplicitUnroll || UseUpperBound) {
     // If the user explicitly set the loop as unrolled, dont UnJ it. Leave it
     // for the unroller instead.
@@ -369,7 +368,7 @@ tryToUnrollAndJamLoop(Loop *L, DominatorTree &DT, LoopInfo *LI,
 
   // Decide if, and by how much, to unroll
   bool IsCountSetExplicitly = computeUnrollAndJamCount(
-    L, SubLoop, TTI, DT, LI, &AC, SE, EphValues, &ORE, OuterTripCount,
+      L, SubLoop, TTI, DT, LI, &AC, SE, EphValues, &ORE, OuterTripCount,
       OuterTripMultiple, OuterUCE, InnerTripCount, InnerLoopSize, UP, PP);
   if (UP.Count <= 1)
     return LoopUnrollResult::Unmodified;
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 181be114d21e..363662bf652a 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1327,7 +1327,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;
     }
   };
diff --git a/mlir/include/mlir/Analysis/Presburger/Matrix.h b/mlir/include/mlir/Analysis/Presburger/Matrix.h
index bed3a5f75e39..1a28e4f1ce24 100644
--- a/mlir/include/mlir/Analysis/Presburger/Matrix.h
+++ b/mlir/include/mlir/Analysis/Presburger/Matrix.h
@@ -15,8 +15,8 @@
 #ifndef MLIR_ANALYSIS_PRESBURGER_MATRIX_H
 #define MLIR_ANALYSIS_PRESBURGER_MATRIX_H
 
-#include "mlir/Support/LLVM.h"
 #include "mlir/Analysis/Presburger/Fraction.h"
+#include "mlir/Support/LLVM.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/Support/raw_ostream.h"
 
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index d8f2854f4efe..b67fbafbebba 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -68,13 +68,12 @@ OpAsmParser::~OpAsmParser() = default;
 MLIRContext *AsmParser::getContext() const { return getBuilder().getContext(); }
 
 /// Parse a type list.
-/// This is out-of-line to work-around https://github.com/llvm/llvm-project/issues/62918
+/// This is out-of-line to work-around
+/// https://github.com/llvm/llvm-project/issues/62918
 ParseResult AsmParser::parseTypeList(SmallVectorImpl<Type> &result) {
-    return parseCommaSeparatedList(
-        [&]() { return parseType(result.emplace_back()); });
-  }
-
-
+  return parseCommaSeparatedList(
+      [&]() { return parseType(result.emplace_back()); });
+}
 
 //===----------------------------------------------------------------------===//
 // DialectAsmPrinter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet