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

[IR][NFC] Cleanup CmpInst signatures / code docs #86441

Merged

Conversation

marcauberer
Copy link
Member

Change param names to recommended upper case format for static methods in CmpInst for consistency
Implement suggestion from @dtcxzyw.

cc @dtcxzyw @tschuett

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 24, 2024

@llvm/pr-subscribers-llvm-ir

Author: Marc Auberer (marcauberer)

Changes

Change param names to recommended upper case format for static methods in CmpInst for consistency
Implement suggestion from @dtcxzyw.

cc @dtcxzyw @tschuett


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

1 Files Affected:

  • (modified) llvm/include/llvm/IR/InstrTypes.h (+5-4)
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index d2b33fe9c651a1..27c67c9b24ce01 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -1038,7 +1038,7 @@ class CmpInst : public Instruction {
   /// the two operands. Insert the instruction into a BasicBlock right before
   /// the specified instruction.
   /// Create a CmpInst
-  static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
+  static CmpInst *Create(OtherOps Op, Predicate Pred, Value *S1, Value *S2,
                          const Twine &Name, BasicBlock::iterator InsertBefore);
 
   /// Construct a compare instruction, given the opcode, the predicate and
@@ -1047,7 +1047,7 @@ class CmpInst : public Instruction {
   /// The specified Instruction is allowed to be a dereferenced end iterator.
   /// Create a CmpInst
   static CmpInst *Create(OtherOps Op,
-                         Predicate predicate, Value *S1,
+                         Predicate Pred, Value *S1,
                          Value *S2, const Twine &Name = "",
                          Instruction *InsertBefore = nullptr);
 
@@ -1055,14 +1055,15 @@ class CmpInst : public Instruction {
   /// two operands.  Also automatically insert this instruction to the end of
   /// the BasicBlock specified.
   /// Create a CmpInst
-  static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1,
+  static CmpInst *Create(OtherOps Op, Predicate Pred, Value *S1,
                          Value *S2, const Twine &Name, BasicBlock *InsertAtEnd);
 
   /// Construct a compare instruction, given the opcode, the predicate,
   /// the two operands and the instruction to copy the flags from. Optionally
   /// (if InstBefore is specified) insert the instruction into a BasicBlock
   /// right before the specified instruction. The specified Instruction is
-  /// allowed to be a dereferenced end iterator. Create a CmpInst
+  /// allowed to be a dereferenced end iterator.
+  /// Create a CmpInst
   static CmpInst *CreateWithCopiedFlags(OtherOps Op, Predicate Pred, Value *S1,
                                         Value *S2,
                                         const Instruction *FlagsSource,

Copy link

github-actions bot commented Mar 24, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link

✅ With the latest revision this PR passed the Python code formatter.

@marcauberer marcauberer force-pushed the ir/cleanup-comments-and-param-names branch from e659183 to 74fe47b Compare March 27, 2024 16:32
@marcauberer marcauberer merged commit a495cfb into llvm:main Mar 28, 2024
4 checks passed
@dtcxzyw
Copy link
Member

dtcxzyw commented Mar 28, 2024

Change param names to recommended upper case format for static methods in CmpInst for consistency Implement suggestion from @dtcxzyw.

cc @dtcxzyw @tschuett

Please don't include @ in the commit message :( I will receive an email each time someone updates their forks.

@marcauberer marcauberer deleted the ir/cleanup-comments-and-param-names branch March 28, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants