From 46a504b9eaab6f5e75c36326aeda568e4d281d37 Mon Sep 17 00:00:00 2001 From: Pietro Fezzardi Date: Tue, 23 Jun 2020 14:31:12 +0200 Subject: [PATCH] [DLA] Drop useless method from `LayoutTypeSystem` --- lib/Decompiler/DLATypeSystem.cpp | 13 ------------- lib/Decompiler/DLATypeSystem.h | 8 -------- 2 files changed, 21 deletions(-) diff --git a/lib/Decompiler/DLATypeSystem.cpp b/lib/Decompiler/DLATypeSystem.cpp index fbaab8473..4f108caa6 100644 --- a/lib/Decompiler/DLATypeSystem.cpp +++ b/lib/Decompiler/DLATypeSystem.cpp @@ -7,7 +7,6 @@ #include "llvm/ADT/SCCIterator.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/IR/Argument.h" #include "llvm/IR/Instruction.h" #include "llvm/Support/FormattedStream.h" @@ -208,18 +207,6 @@ static void assertGetLayoutTypePreConditions(const Value *V, unsigned Id) { or cast(V)->getReturnType()->isStructTy()); } -LayoutTypeSystemNode *LayoutTypeSystem::getLayoutType(const llvm::SCEV *S) { - if (S == nullptr) - return nullptr; - if (auto *U = dyn_cast(S)) { - llvm::Value *V = U->getValue(); - return getLayoutType(V); - } - - // LayoutTypePtr Key(S, Id); - return nullptr; // TypePtrToLayoutMap.at(Key); -} - LayoutTypeSystemNode * LayoutTypeSystem::getLayoutType(const Value *V, unsigned Id) { diff --git a/lib/Decompiler/DLATypeSystem.h b/lib/Decompiler/DLATypeSystem.h index 064fc0e1e..5130bdb71 100644 --- a/lib/Decompiler/DLATypeSystem.h +++ b/lib/Decompiler/DLATypeSystem.h @@ -26,12 +26,6 @@ #include "revng/ADT/FilteredGraphTraits.h" #include "revng/Support/Assert.h" -namespace llvm { - -class SCEV; - -} // end namespace llvm - namespace dla { /// A representation of a pointer to a type. @@ -246,8 +240,6 @@ public: llvm::SmallVector, 2> getOrCreateLayoutTypes(const llvm::Value &V); - LayoutTypeSystemNode *getLayoutType(const llvm::SCEV *S); - protected: // This method is templated only to enable perfect forwarding. template