Move IntrusiveForwardList<> to libartbase.

It's generally useful, not just for the compiler.

Test: m test-art-host-gtest
Change-Id: I3ca742d93a0bca961d1b8b8209356747d2de08a0
diff --git a/compiler/Android.bp b/compiler/Android.bp
index aee181a..c7fe77d 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -382,7 +382,6 @@
         "optimizing/suspend_check_test.cc",
         "utils/atomic_dex_ref_map_test.cc",
         "utils/dedupe_set_test.cc",
-        "utils/intrusive_forward_list_test.cc",
         "utils/swap_space_test.cc",
 
         "jni/jni_cfi_test.cc",
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc
index 2a7bbcb..9419c8d 100644
--- a/compiler/optimizing/graph_visualizer.cc
+++ b/compiler/optimizing/graph_visualizer.cc
@@ -22,6 +22,7 @@
 #include <sstream>
 
 #include "art_method.h"
+#include "base/intrusive_forward_list.h"
 #include "bounds_check_elimination.h"
 #include "builder.h"
 #include "code_generator.h"
@@ -38,7 +39,6 @@
 #include "scoped_thread_state_change-inl.h"
 #include "ssa_liveness_analysis.h"
 #include "utils/assembler.h"
-#include "utils/intrusive_forward_list.h"
 
 namespace art {
 
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 57ed71d..023e3a6 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -25,6 +25,7 @@
 #include "base/arena_containers.h"
 #include "base/arena_object.h"
 #include "base/array_ref.h"
+#include "base/intrusive_forward_list.h"
 #include "base/iteration_range.h"
 #include "base/mutex.h"
 #include "base/quasi_atomic.h"
@@ -45,7 +46,6 @@
 #include "mirror/class.h"
 #include "mirror/method_type.h"
 #include "offsets.h"
-#include "utils/intrusive_forward_list.h"
 
 namespace art {
 
diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h
index c883907..3ea2815 100644
--- a/compiler/optimizing/ssa_liveness_analysis.h
+++ b/compiler/optimizing/ssa_liveness_analysis.h
@@ -19,11 +19,11 @@
 
 #include <iostream>
 
+#include "base/intrusive_forward_list.h"
 #include "base/iteration_range.h"
 #include "base/scoped_arena_allocator.h"
 #include "base/scoped_arena_containers.h"
 #include "nodes.h"
-#include "utils/intrusive_forward_list.h"
 
 namespace art {
 
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index bbb84a6..4fb0f76 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -250,6 +250,7 @@
         "base/hex_dump_test.cc",
         "base/histogram_test.cc",
         "base/indenter_test.cc",
+        "base/intrusive_forward_list_test.cc",
         "base/leb128_test.cc",
         "base/logging_test.cc",
         "base/memfd_test.cc",
diff --git a/compiler/utils/intrusive_forward_list.h b/libartbase/base/intrusive_forward_list.h
similarity index 98%
rename from compiler/utils/intrusive_forward_list.h
rename to libartbase/base/intrusive_forward_list.h
index ccdd32a..984ae9c 100644
--- a/compiler/utils/intrusive_forward_list.h
+++ b/libartbase/base/intrusive_forward_list.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_COMPILER_UTILS_INTRUSIVE_FORWARD_LIST_H_
-#define ART_COMPILER_UTILS_INTRUSIVE_FORWARD_LIST_H_
+#ifndef ART_LIBARTBASE_BASE_INTRUSIVE_FORWARD_LIST_H_
+#define ART_LIBARTBASE_BASE_INTRUSIVE_FORWARD_LIST_H_
 
 #include <stdint.h>
 #include <functional>
@@ -474,4 +474,4 @@
 
 }  // namespace art
 
-#endif  // ART_COMPILER_UTILS_INTRUSIVE_FORWARD_LIST_H_
+#endif  // ART_LIBARTBASE_BASE_INTRUSIVE_FORWARD_LIST_H_
diff --git a/compiler/utils/intrusive_forward_list_test.cc b/libartbase/base/intrusive_forward_list_test.cc
similarity index 100%
rename from compiler/utils/intrusive_forward_list_test.cc
rename to libartbase/base/intrusive_forward_list_test.cc