[ConstraintElimination] Move StackEntry up, to allow use earlier (NFC).

This commit is contained in:
Florian Hahn 2022-06-20 16:25:53 +02:00
parent 2e2fdcd0f9
commit bd9632afd2
No known key found for this signature in database
GPG Key ID: CF59919C6547A668
1 changed files with 16 additions and 16 deletions

View File

@ -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;