[AssumeBundles] Move to IR so it can be used by Analysis
authorTyker <tyker1@outlook.com>
Sun, 8 Mar 2020 11:19:29 +0000 (12:19 +0100)
committerTyker <tyker1@outlook.com>
Sun, 8 Mar 2020 11:21:50 +0000 (12:21 +0100)
Summary:
Assume bundles need to be usable by Analysis and Transforms/Utils isn't.
so this commit moves utilities to deal with asusme bundles to IR.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75618

llvm/include/llvm/IR/KnowledgeRetention.h [moved from llvm/include/llvm/Transforms/Utils/KnowledgeRetention.h with 100% similarity]
llvm/lib/IR/CMakeLists.txt
llvm/lib/IR/KnowledgeRetention.cpp [moved from llvm/lib/Transforms/Utils/KnowledgeRetention.cpp with 99% similarity]
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Transforms/Utils/CMakeLists.txt
llvm/test/IR/assume-builder.ll [moved from llvm/test/Transforms/Util/assume-builder.ll with 100% similarity]
llvm/unittests/IR/CMakeLists.txt
llvm/unittests/IR/KnowledgeRetentionTest.cpp [moved from llvm/unittests/Transforms/Utils/KnowledgeRetentionTest.cpp with 99% similarity]
llvm/unittests/Transforms/Utils/CMakeLists.txt

index 8fcc10f..14207bc 100644 (file)
@@ -28,6 +28,7 @@ add_llvm_component_library(LLVMCore
   Instruction.cpp
   Instructions.cpp
   IntrinsicInst.cpp
+  KnowledgeRetention.cpp
   LLVMContext.cpp
   LLVMContextImpl.cpp
   LLVMRemarkStreamer.cpp
similarity index 99%
rename from llvm/lib/Transforms/Utils/KnowledgeRetention.cpp
rename to llvm/lib/IR/KnowledgeRetention.cpp
index 963bd22..7be9365 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/Utils/KnowledgeRetention.h"
+#include "llvm/IR/KnowledgeRetention.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/IR/InstIterator.h"
 #include "llvm/IR/IntrinsicInst.h"
index a6a2a78..32d0a38 100644 (file)
@@ -59,6 +59,7 @@
 #include "llvm/CodeGen/UnreachableBlockElim.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/IR/KnowledgeRetention.h"
 #include "llvm/IR/PassManager.h"
 #include "llvm/IR/SafepointIRVerifier.h"
 #include "llvm/IR/Verifier.h"
 #include "llvm/Transforms/Utils/CanonicalizeAliases.h"
 #include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
 #include "llvm/Transforms/Utils/InjectTLIMappings.h"
-#include "llvm/Transforms/Utils/KnowledgeRetention.h"
 #include "llvm/Transforms/Utils/LCSSA.h"
 #include "llvm/Transforms/Utils/LibCallsShrinkWrap.h"
 #include "llvm/Transforms/Utils/LoopSimplify.h"
index 24a5202..56e5071 100644 (file)
@@ -29,7 +29,6 @@ add_llvm_component_library(LLVMTransformUtils
   InjectTLIMappings.cpp
   InstructionNamer.cpp
   IntegerDivision.cpp
-  KnowledgeRetention.cpp
   LCSSA.cpp
   LibCallsShrinkWrap.cpp
   Local.cpp
index 3ef7cee..9dba01d 100644 (file)
@@ -24,6 +24,7 @@ add_llvm_unittest(IRTests
   IRBuilderTest.cpp
   InstructionsTest.cpp
   IntrinsicsTest.cpp
+  KnowledgeRetentionTest.cpp
   LegacyPassManagerTest.cpp
   MDBuilderTest.cpp
   ManglerTest.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/Utils/KnowledgeRetention.h"
+#include "llvm/IR/KnowledgeRetention.h"
 #include "llvm/AsmParser/Parser.h"
 #include "llvm/IR/CallSite.h"
 #include "llvm/IR/LLVMContext.h"
index 9b0d7f0..c9c0f9f 100644 (file)
@@ -15,7 +15,6 @@ add_llvm_unittest(UtilsTests
   CodeMoverUtilsTest.cpp
   FunctionComparatorTest.cpp
   IntegerDivisionTest.cpp
-  KnowledgeRetentionTest.cpp
   LocalTest.cpp
   LoopRotationUtilsTest.cpp
   LoopUtilsTest.cpp