[llvm] bd9632a - [ConstraintElimination] Move StackEntry up, to allow use earlier (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 07:41:03 PDT 2022
Author: Florian Hahn
Date: 2022-06-20T16:40:42+02:00
New Revision: bd9632afd26e6965a2414ee26790a509d063f975
URL: https://github.com/llvm/llvm-project/commit/bd9632afd26e6965a2414ee26790a509d063f975
DIFF: https://github.com/llvm/llvm-project/commit/bd9632afd26e6965a2414ee26790a509d063f975.diff
LOG: [ConstraintElimination] Move StackEntry up, to allow use earlier (NFC).
Added:
Modified:
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 7c6d696256ba5..653f47a552714 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -49,6 +49,22 @@ namespace {
class ConstraintInfo;
+struct StackEntry {
+ unsigned NumIn;
+ unsigned NumOut;
+ Instruction *Condition;
+ bool IsNot;
+ bool IsSigned = false;
+ /// Variables that can be removed from the system once the stack entry gets
+ /// removed.
+ SmallVector<Value *, 2> ValuesToRelease;
+
+ StackEntry(unsigned NumIn, unsigned NumOut, CmpInst *Condition, bool IsNot,
+ bool IsSigned, SmallVector<Value *, 2> ValuesToRelease)
+ : NumIn(NumIn), NumOut(NumOut), Condition(Condition), IsNot(IsNot),
+ IsSigned(IsSigned), ValuesToRelease(ValuesToRelease) {}
+};
+
/// Struct to express a pre-condition of the form %Op0 Pred %Op1.
struct PreconditionTy {
CmpInst::Predicate Pred;
@@ -373,22 +389,6 @@ struct ConstraintOrBlock {
Not(Not), Condition(Condition) {}
};
-struct StackEntry {
- unsigned NumIn;
- unsigned NumOut;
- Instruction *Condition;
- bool IsNot;
- bool IsSigned = false;
- /// Variables that can be removed from the system once the stack entry gets
- /// removed.
- SmallVector<Value *, 2> ValuesToRelease;
-
- StackEntry(unsigned NumIn, unsigned NumOut, CmpInst *Condition, bool IsNot,
- bool IsSigned, SmallVector<Value *, 2> ValuesToRelease)
- : NumIn(NumIn), NumOut(NumOut), Condition(Condition), IsNot(IsNot),
- IsSigned(IsSigned), ValuesToRelease(ValuesToRelease) {}
-};
-
/// Keep state required to build worklist.
struct State {
DominatorTree &DT;
More information about the llvm-commits
mailing list