Commit 9310366b by Uros Bizjak Committed by Uros Bizjak

system.h: Include algorithm and utility.

	* system.h: Include algorithm and utility.
	* rtl.h: Do not include utility here.
	* wide-int.h: Ditto.
	* tree-vect-data-refs.c (swap): Remove template.
	(vect_prune_runtime_alias_test_list): Use std::swap instead of swap.

From-SVN: r217348
parent 568ccfea
2014-11-11 Uros Bizjak <ubizjak@gmail.com>
* system.h: Include algorithm and utility.
* rtl.h: Do not include utility here.
* wide-int.h: Ditto.
* tree-vect-data-refs.c (swap): Remove template.
(vect_prune_runtime_alias_test_list): Use std::swap instead of swap.
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR bootstrap/63699 PR bootstrap/63699
...@@ -20,7 +20,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -20,7 +20,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_RTL_H #ifndef GCC_RTL_H
#define GCC_RTL_H #define GCC_RTL_H
#include <utility>
#include "statistics.h" #include "statistics.h"
#include "machmode.h" #include "machmode.h"
#include "input.h" #include "input.h"
......
...@@ -215,7 +215,9 @@ extern int errno; ...@@ -215,7 +215,9 @@ extern int errno;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
# include <algorithm>
# include <cstring> # include <cstring>
# include <utility>
#endif #endif
/* Some of glibc's string inlines cause warnings. Plus we'd rather /* Some of glibc's string inlines cause warnings. Plus we'd rather
......
...@@ -2718,14 +2718,6 @@ comp_dr_with_seg_len_pair (const void *p1_, const void *p2_) ...@@ -2718,14 +2718,6 @@ comp_dr_with_seg_len_pair (const void *p1_, const void *p2_)
return 0; return 0;
} }
template <class T> static void
swap (T& a, T& b)
{
T c (a);
a = b;
b = c;
}
/* Function vect_vfa_segment_size. /* Function vect_vfa_segment_size.
Create an expression that computes the size of segment Create an expression that computes the size of segment
...@@ -2858,7 +2850,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo) ...@@ -2858,7 +2850,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
dr_with_seg_len (dr_b, segment_length_b)); dr_with_seg_len (dr_b, segment_length_b));
if (compare_tree (DR_BASE_ADDRESS (dr_a), DR_BASE_ADDRESS (dr_b)) > 0) if (compare_tree (DR_BASE_ADDRESS (dr_a), DR_BASE_ADDRESS (dr_b)) > 0)
swap (dr_with_seg_len_pair.first, dr_with_seg_len_pair.second); std::swap (dr_with_seg_len_pair.first, dr_with_seg_len_pair.second);
comp_alias_ddrs.safe_push (dr_with_seg_len_pair); comp_alias_ddrs.safe_push (dr_with_seg_len_pair);
} }
...@@ -2908,8 +2900,8 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo) ...@@ -2908,8 +2900,8 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
and DR_A1 and DR_A2 are two consecutive memrefs. */ and DR_A1 and DR_A2 are two consecutive memrefs. */
if (*dr_a1 == *dr_a2) if (*dr_a1 == *dr_a2)
{ {
swap (dr_a1, dr_b1); std::swap (dr_a1, dr_b1);
swap (dr_a2, dr_b2); std::swap (dr_a2, dr_b2);
} }
if (!operand_equal_p (DR_BASE_ADDRESS (dr_a1->dr), if (!operand_equal_p (DR_BASE_ADDRESS (dr_a1->dr),
......
...@@ -216,8 +216,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -216,8 +216,6 @@ along with GCC; see the file COPYING3. If not see
the same result as X + X; the precision of the shift amount Y the same result as X + X; the precision of the shift amount Y
can be arbitrarily different from X. */ can be arbitrarily different from X. */
#include <utility>
#include "system.h" #include "system.h"
#include "hwint.h" #include "hwint.h"
#include "signop.h" #include "signop.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment