[llvm] [TabeGen] Add `PreferSmallerInstructions` for Targets. (PR #83587)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 08:01:10 PST 2024


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 b92c3fe0274f3ba3bb7c58a8529bd9c4303a3b51 f03c485a73faa1cf05f9858335bec312deac5f02 -- llvm/utils/TableGen/AsmMatcherEmitter.cpp llvm/utils/TableGen/CodeGenTarget.cpp llvm/utils/TableGen/CodeGenTarget.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 1563349f2f..6b32d19860 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -614,7 +614,8 @@ struct MatchableInfo {
   void buildAliasResultOperands(bool AliasConstraintsAreChecked);
 
   /// shouldBeMatchedBefore - Compare two matchables for ordering.
-  bool shouldBeMatchedBefore(const MatchableInfo &RHS, const CodeGenTarget &Target) const {
+  bool shouldBeMatchedBefore(const MatchableInfo &RHS,
+                             const CodeGenTarget &Target) const {
     // The primary comparator is the instruction mnemonic.
     if (int Cmp = Mnemonic.compare_insensitive(RHS.Mnemonic))
       return Cmp == -1;
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h
index 7e2dd43cbf..36bebf0760 100644
--- a/llvm/utils/TableGen/CodeGenTarget.h
+++ b/llvm/utils/TableGen/CodeGenTarget.h
@@ -99,7 +99,7 @@ public:
   ///
   bool getAllowRegisterRenaming() const;
 
-  /// getPreferSmallerInstructions  - Return the PreferSmallerInstructions 
+  /// getPreferSmallerInstructions  - Return the PreferSmallerInstructions
   /// flag value for this target.
   ///
   bool getPreferSmallerInstructions() const;

``````````

</details>


https://github.com/llvm/llvm-project/pull/83587


More information about the llvm-commits mailing list