From 1148a2d0d1ce43ab89e14eefb70bc410726838c4 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 10 Mar 2020 07:14:42 +0100 Subject: document new environment variables and code format --- llvm_mode/LLVMInsTrim.so.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'llvm_mode/LLVMInsTrim.so.cc') diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index 0fddad24..229d7d24 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -54,7 +54,7 @@ struct InsTrim : public ModulePass { protected: std::list myWhitelist; - uint32_t function_minimum_size = 1; + uint32_t function_minimum_size = 1; private: std::mt19937 generator; @@ -387,15 +387,18 @@ struct InsTrim : public ModulePass { } - if (function_minimum_size < 2) { + if (function_minimum_size < 2) { + for (BasicBlock &BB : F) { - if (MS.find(&BB) == MS.end()) { - continue; - } + + if (MS.find(&BB) == MS.end()) { continue; } IRBuilder<> IRB(&*BB.getFirstInsertionPt()); IRB.CreateStore(ConstantInt::get(Int32Ty, genLabel()), OldPrev); + } + } + } for (BasicBlock &BB : F) { -- cgit 1.4.1