Skip to content

Commit f44bf38

Browse files
committed
[DeadArgElim] Reformat the pass in accordance with the code style
The code has been reformatted in accordance with the code style. Some function comments were extended to the Doxygen ones and reworded a bit to eliminate the duplication of the function's/class' name in the comment. Differential Revision: https://reviews.llvm.org/D128168
1 parent bc74bca commit f44bf38

File tree

2 files changed

+273
-284
lines changed

2 files changed

+273
-284
lines changed

llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,24 @@ class DeadArgumentEliminationPass
6666
}
6767
};
6868

69-
/// Liveness enum - During our initial pass over the program, we determine
70-
/// that things are either alive or maybe alive. We don't mark anything
71-
/// explicitly dead (even if we know they are), since anything not alive
72-
/// with no registered uses (in Uses) will never be marked alive and will
73-
/// thus become dead in the end.
69+
/// During our initial pass over the program, we determine that things are
70+
/// either alive or maybe alive. We don't mark anything explicitly dead (even
71+
/// if we know they are), since anything not alive with no registered uses
72+
/// (in Uses) will never be marked alive and will thus become dead in the end.
7473
enum Liveness { Live, MaybeLive };
7574

76-
DeadArgumentEliminationPass(bool ShouldHackArguments_ = false)
77-
: ShouldHackArguments(ShouldHackArguments_) {}
75+
DeadArgumentEliminationPass(bool ShouldHackArguments = false)
76+
: ShouldHackArguments(ShouldHackArguments) {}
7877

7978
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
8079

8180
/// Convenience wrapper
82-
RetOrArg CreateRet(const Function *F, unsigned Idx) {
81+
RetOrArg createRet(const Function *F, unsigned Idx) {
8382
return RetOrArg(F, Idx, false);
8483
}
8584

8685
/// Convenience wrapper
87-
RetOrArg CreateArg(const Function *F, unsigned Idx) {
86+
RetOrArg createArg(const Function *F, unsigned Idx) {
8887
return RetOrArg(F, Idx, true);
8988
}
9089

@@ -122,21 +121,21 @@ class DeadArgumentEliminationPass
122121
bool ShouldHackArguments = false;
123122

124123
private:
125-
Liveness MarkIfNotLive(RetOrArg Use, UseVector &MaybeLiveUses);
126-
Liveness SurveyUse(const Use *U, UseVector &MaybeLiveUses,
124+
Liveness markIfNotLive(RetOrArg Use, UseVector &MaybeLiveUses);
125+
Liveness surveyUse(const Use *U, UseVector &MaybeLiveUses,
127126
unsigned RetValNum = -1U);
128-
Liveness SurveyUses(const Value *V, UseVector &MaybeLiveUses);
127+
Liveness surveyUses(const Value *V, UseVector &MaybeLiveUses);
129128

130-
void SurveyFunction(const Function &F);
131-
bool IsLive(const RetOrArg &RA);
132-
void MarkValue(const RetOrArg &RA, Liveness L,
129+
void surveyFunction(const Function &F);
130+
bool isLive(const RetOrArg &RA);
131+
void markValue(const RetOrArg &RA, Liveness L,
133132
const UseVector &MaybeLiveUses);
134-
void MarkLive(const RetOrArg &RA);
135-
void MarkLive(const Function &F);
136-
void PropagateLiveness(const RetOrArg &RA);
137-
bool RemoveDeadStuffFromFunction(Function *F);
138-
bool DeleteDeadVarargs(Function &Fn);
139-
bool RemoveDeadArgumentsFromCallers(Function &Fn);
133+
void markLive(const RetOrArg &RA);
134+
void markLive(const Function &F);
135+
void propagateLiveness(const RetOrArg &RA);
136+
bool removeDeadStuffFromFunction(Function *F);
137+
bool deleteDeadVarargs(Function &F);
138+
bool removeDeadArgumentsFromCallers(Function &F);
140139
};
141140

142141
} // end namespace llvm

0 commit comments

Comments
 (0)