diff --git a/include/revng/Support/IRHelpers.h b/include/revng/Support/IRHelpers.h index a9137bbf9..21a9539a9 100644 --- a/include/revng/Support/IRHelpers.h +++ b/include/revng/Support/IRHelpers.h @@ -11,8 +11,8 @@ #include // LLVM includes -#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/iterator_range.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/Interval.h" #include "llvm/IR/CFG.h" diff --git a/lib/DebugHelper/DebugHelper.cpp b/lib/DebugHelper/DebugHelper.cpp index d50d79782..b2ddd02af 100644 --- a/lib/DebugHelper/DebugHelper.cpp +++ b/lib/DebugHelper/DebugHelper.cpp @@ -144,7 +144,6 @@ void DAW::emitInstructionAnnot(const Instruction *Instr, auto *NonConstInstruction = const_cast(Instr); NonConstInstruction->setMetadata(DbgMDKind, Location); } - } DebugHelper::DebugHelper(std::string Output, diff --git a/lib/StackAnalysis/ABIIR.h b/lib/StackAnalysis/ABIIR.h index 9cee6b584..fa1411c1e 100644 --- a/lib/StackAnalysis/ABIIR.h +++ b/lib/StackAnalysis/ABIIR.h @@ -454,9 +454,7 @@ struct GraphTraits { using NodeRef = StackAnalysis::ABIIRBasicBlock *; using ChildIteratorType = StackAnalysis::ABIIRBasicBlock::links_iterator; - static NodeRef getEntryNode(StackAnalysis::ABIIRBasicBlock *BB) { - return BB; - } + static NodeRef getEntryNode(StackAnalysis::ABIIRBasicBlock *BB) { return BB; } static inline ChildIteratorType child_begin(StackAnalysis::ABIIRBasicBlock *N) { diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp index abb6d59c4..338bca82f 100644 --- a/lib/Support/Debug.cpp +++ b/lib/Support/Debug.cpp @@ -1,4 +1,4 @@ -/// \file debug.cpp +/// \file Debug.cpp /// \brief Implementation of the debug framework // diff --git a/tests/Unit/ReachingDefinitionsPass.cpp b/tests/Unit/ReachingDefinitionsPass.cpp index 74b1f0aea..dcac17b07 100644 --- a/tests/Unit/ReachingDefinitionsPass.cpp +++ b/tests/Unit/ReachingDefinitionsPass.cpp @@ -420,16 +420,16 @@ end: )LLVM"; runTest(RepeatedIf, - { { "load_three", { "s:storeone", "s:storetwo" } }, - { "load_four", { "s:storeone", "s:storetwo" } } }, - {}, - Regular); + { { "load_three", { "s:storeone", "s:storetwo" } }, + { "load_four", { "s:storeone", "s:storetwo" } } }, + {}, + Regular); runTest(RepeatedIf, - { { "load_three", { "s:storeone" } }, - { "load_four", { "s:storetwo" } } }, - {}, - Conditional); + { { "load_three", { "s:storeone" } }, + { "load_four", { "s:storetwo" } } }, + {}, + Conditional); } BOOST_AUTO_TEST_CASE(ConditionalDefinition) { @@ -462,10 +462,10 @@ end: )LLVM"; runTest(ConditionalDefinition, - { { "load_one", { "s:storeone" } }, - { "load_two", { "s:storezero" } } }, - {}, - Conditional); + { { "load_one", { "s:storeone" } }, + { "load_two", { "s:storezero" } } }, + {}, + Conditional); } BOOST_AUTO_TEST_CASE(LoopClobbering) { @@ -494,7 +494,7 @@ end: )LLVM"; runTest(ConditionalDefinition, - { { "load_one", { "s:storezero" } } }, - {}, - Conditional); + { { "load_one", { "s:storezero" } } }, + {}, + Conditional); } diff --git a/tools/revamb-dump/IsolateFunctions.cpp b/tools/revamb-dump/IsolateFunctions.cpp index fff1ba323..914398f5c 100644 --- a/tools/revamb-dump/IsolateFunctions.cpp +++ b/tools/revamb-dump/IsolateFunctions.cpp @@ -525,10 +525,9 @@ void IFI::run() { // Create the Arrayref necessary for the arguments of exception_warning auto *IntegerType = IntegerType::get(Context, PCBitSize); - std::vector ArgsType{ Type::getInt32Ty(Context), - IntegerType, - IntegerType, - IntegerType }; + std::vector ArgsType{ + Type::getInt32Ty(Context), IntegerType, IntegerType, IntegerType + }; // Declare the exception_warning function auto *DebugExceptionFT = FunctionType::get(Type::getVoidTy(Context), diff --git a/tools/revamb/CPUStateAccessAnalysisPass.cpp b/tools/revamb/CPUStateAccessAnalysisPass.cpp index 64964cb93..c7a3269cf 100644 --- a/tools/revamb/CPUStateAccessAnalysisPass.cpp +++ b/tools/revamb/CPUStateAccessAnalysisPass.cpp @@ -1279,20 +1279,16 @@ private: revng_assert(OffsetTuple.size() == 2); auto OpCode = I->getOpcode(); - revng_assert(OpCode == Instruction::Shl - or OpCode == Instruction::AShr - or OpCode == Instruction::LShr - or OpCode == Instruction::Mul - or OpCode == Instruction::URem - or OpCode == Instruction::SRem - or OpCode == Instruction::SDiv - or OpCode == Instruction::UDiv); + revng_assert(OpCode == Instruction::Shl or OpCode == Instruction::AShr + or OpCode == Instruction::LShr or OpCode == Instruction::Mul + or OpCode == Instruction::URem or OpCode == Instruction::SRem + or OpCode == Instruction::SDiv or OpCode == Instruction::UDiv); const auto O0 = OffsetTuple[0], O1 = OffsetTuple[1]; revng_assert(not O0->isPtr() and not O1->isPtr()); if (O0->isUnknown() or O1->isUnknown()) { return std::make_pair(false, CSVOffsets::Kind::Unknown); - } else { + } else { return std::make_pair(true, CSVOffsets::Kind::Numeric); } } @@ -1303,14 +1299,10 @@ private: const SmallVector &OffsetsIt) { auto OpCode = I->getOpcode(); - revng_assert(OpCode == Instruction::Shl - or OpCode == Instruction::AShr - or OpCode == Instruction::LShr - or OpCode == Instruction::Mul - or OpCode == Instruction::URem - or OpCode == Instruction::SRem - or OpCode == Instruction::SDiv - or OpCode == Instruction::UDiv); + revng_assert(OpCode == Instruction::Shl or OpCode == Instruction::AShr + or OpCode == Instruction::LShr or OpCode == Instruction::Mul + or OpCode == Instruction::URem or OpCode == Instruction::SRem + or OpCode == Instruction::SDiv or OpCode == Instruction::UDiv); SmallVector Operands(NumSrcs, nullptr); // Setup operands diff --git a/tools/revamb/PTCDump.h b/tools/revamb/PTCDump.h index 2058fbe3b..0c28c1081 100644 --- a/tools/revamb/PTCDump.h +++ b/tools/revamb/PTCDump.h @@ -41,7 +41,7 @@ int dumpTranslation(std::ostream &Result, PTCInstructionList *Instructions); /// \param InstructionCount the maximum number of instructions to disassemble. void disassemble(std::ostream &Result, uint64_t PC, - uint32_t MaxBytes=4096, - uint32_t InstructionCount=4096); + uint32_t MaxBytes = 4096, + uint32_t InstructionCount = 4096); #endif // PTCDUMP_H diff --git a/tools/revamb/SET.cpp b/tools/revamb/SET.cpp index 5d944f73f..69700fe54 100644 --- a/tools/revamb/SET.cpp +++ b/tools/revamb/SET.cpp @@ -1,5 +1,7 @@ /// \file set.cpp +/// /// \brief Simple Expression Tracker pass implementation +/// /// This file is composed by three main parts: the OperationsStack /// implementation, the SET algorithm and the SET pass