mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-09 00:31:33 +00:00
code cleanup
This commit is contained in:
parent
1842c8390f
commit
b7cd6d4035
@ -407,10 +407,10 @@ struct InsTrim : public ModulePass {
|
|||||||
// does the function have calls? and is any of the calls larger than
|
// does the function have calls? and is any of the calls larger than
|
||||||
// one basic block?
|
// one basic block?
|
||||||
has_calls = 0;
|
has_calls = 0;
|
||||||
for (auto &BB : F) {
|
for (auto &BB2 : F) {
|
||||||
|
|
||||||
if (has_calls) break;
|
if (has_calls) break;
|
||||||
for (auto &IN : BB) {
|
for (auto &IN : BB2) {
|
||||||
|
|
||||||
CallInst *callInst = nullptr;
|
CallInst *callInst = nullptr;
|
||||||
if ((callInst = dyn_cast<CallInst>(&IN))) {
|
if ((callInst = dyn_cast<CallInst>(&IN))) {
|
||||||
@ -454,7 +454,7 @@ struct InsTrim : public ModulePass {
|
|||||||
|
|
||||||
auto *PN = PHINode::Create(Int32Ty, 0, "", &*BB.begin());
|
auto *PN = PHINode::Create(Int32Ty, 0, "", &*BB.begin());
|
||||||
DenseMap<BasicBlock *, unsigned> PredMap;
|
DenseMap<BasicBlock *, unsigned> PredMap;
|
||||||
for (auto PI = pred_begin(&BB), PE = pred_end(&BB); PI != PE; ++PI) {
|
for (PI = pred_begin(&BB), PE = pred_end(&BB); PI != PE; ++PI) {
|
||||||
|
|
||||||
BasicBlock *PBB = *PI;
|
BasicBlock *PBB = *PI;
|
||||||
auto It = PredMap.insert({PBB, genLabel()});
|
auto It = PredMap.insert({PBB, genLabel()});
|
||||||
@ -568,7 +568,7 @@ struct InsTrim : public ModulePass {
|
|||||||
getenv("AFL_USE_CFISAN") ? ", CFISAN" : "",
|
getenv("AFL_USE_CFISAN") ? ", CFISAN" : "",
|
||||||
getenv("AFL_USE_UBSAN") ? ", UBSAN" : "");
|
getenv("AFL_USE_UBSAN") ? ", UBSAN" : "");
|
||||||
|
|
||||||
OKF("Instrumented %u locations (%llu, %llu) (%s mode)\n", total_instr,
|
OKF("Instrumented %d locations (%llu, %llu) (%s mode)\n", total_instr,
|
||||||
total_rs, total_hs, modeline);
|
total_rs, total_hs, modeline);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -332,11 +332,11 @@ bool Indistinguish(uint32_t node1, uint32_t node2) {
|
|||||||
|
|
||||||
void MakeUniq(uint32_t now) {
|
void MakeUniq(uint32_t now) {
|
||||||
|
|
||||||
bool StopFlag = false;
|
|
||||||
if (Marked.find(now) == Marked.end()) {
|
if (Marked.find(now) == Marked.end()) {
|
||||||
|
|
||||||
for (uint32_t pred1 : t_Pred[now]) {
|
for (uint32_t pred1 : t_Pred[now]) {
|
||||||
|
|
||||||
|
bool StopFlag = false;
|
||||||
for (uint32_t pred2 : t_Pred[now]) {
|
for (uint32_t pred2 : t_Pred[now]) {
|
||||||
|
|
||||||
if (pred1 == pred2) continue;
|
if (pred1 == pred2) continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user