[llvm] llvm-canon (PR #68176)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 21:43:24 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 8641cdf397d86f33ac45e4c691ca4f843c359370 90912d2b40121936c239f9275bebd52db5d3a116 -- llvm/include/llvm/Transforms/Utils/IRCanonicalizer.h llvm/lib/Transforms/Utils/IRCanonicalizer.cpp llvm/lib/Passes/PassBuilder.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 8a495e6d7dc1..7fc17ab31a11 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -233,14 +233,14 @@
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
#include "llvm/Transforms/Utils/CanonicalizeFreezeInLoops.h"
#include "llvm/Transforms/Utils/CountVisits.h"
-#include "llvm/Transforms/Utils/Debugify.h"
#include "llvm/Transforms/Utils/DXILUpgrade.h"
+#include "llvm/Transforms/Utils/Debugify.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/FixIrreducible.h"
#include "llvm/Transforms/Utils/HelloWorld.h"
+#include "llvm/Transforms/Utils/IRCanonicalizer.h"
#include "llvm/Transforms/Utils/InjectTLIMappings.h"
#include "llvm/Transforms/Utils/InstructionNamer.h"
-#include "llvm/Transforms/Utils/IRCanonicalizer.h"
#include "llvm/Transforms/Utils/LCSSA.h"
#include "llvm/Transforms/Utils/LibCallsShrinkWrap.h"
#include "llvm/Transforms/Utils/LoopSimplify.h"
diff --git a/llvm/lib/Transforms/Utils/IRCanonicalizer.cpp b/llvm/lib/Transforms/Utils/IRCanonicalizer.cpp
index 45dc954f97b9..1a4edadec42f 100644
--- a/llvm/lib/Transforms/Utils/IRCanonicalizer.cpp
+++ b/llvm/lib/Transforms/Utils/IRCanonicalizer.cpp
@@ -14,6 +14,7 @@
///
//===----------------------------------------------------------------------===//
+#include "llvm/Transforms/Utils/IRCanonicalizer.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
@@ -28,7 +29,6 @@
#include "llvm/PassRegistry.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Utils.h"
-#include "llvm/Transforms/Utils/IRCanonicalizer.h"
#include <algorithm>
#include <vector>
@@ -174,12 +174,12 @@ void IRCanonicalizer::nameBasicBlocks(Function &F) {
///
/// \param I Instruction to be renamed.
void IRCanonicalizer::nameInstruction(Instruction *I) {
- //ensure instructions are not renamed. This is done
- //to prevent situation where instructions are used
- //before their definition (in phi nodes)
+ // ensure instructions are not renamed. This is done
+ // to prevent situation where instructions are used
+ // before their definition (in phi nodes)
if (NamedInstructions.contains(I))
return;
- NamedInstructions.insert(I);
+ NamedInstructions.insert(I);
// Determine the type of instruction to name.
if (isInitialInstruction(I)) {
// This is an initial instruction.
@@ -441,7 +441,7 @@ void IRCanonicalizer::reorderInstructions(
void IRCanonicalizer::reorderInstruction(
Instruction *Used, Instruction *User,
SmallPtrSet<const Instruction *, 32> &Visited) {
- if(isa<PHINode>(Used))
+ if (isa<PHINode>(Used))
return;
if (Visited.contains(Used))
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/68176
More information about the llvm-commits
mailing list