]> git.ipfire.org Git - people/ms/gcc.git/commit
Change vec<,,vl_embed>::m_vecdata refrences into address ()
authorRichard Biener <rguenther@suse.de>
Fri, 24 Feb 2023 08:54:09 +0000 (09:54 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 24 Feb 2023 15:41:32 +0000 (16:41 +0100)
commitef22c3e90b5010a5229e70907ad2087f774fdfc0
treebed6e87eb2251cef1e4b209124e72fc6cefdb5da
parent94c9b1bb79f63d000ebb05efc155c149325e332d
Change vec<,,vl_embed>::m_vecdata refrences into address ()

As preparation to remove m_vecdata in the vl_embed vector this
changes references to it into calls to address ().

As I was here it also fixes ::contains to avoid repeated bounds
checking and the same issue in ::lower_bound which also suffers
from unnecessary copying around values.

* vec.h (vec<T, A, vl_embed>::lower_bound): Adjust to
take a const reference to the object, use address to
access data.
(vec<T, A, vl_embed>::contains): Use address to access data.
(vec<T, A, vl_embed>::operator[]): Use address instead of
m_vecdata to access data.
(vec<T, A, vl_embed>::iterate): Likewise.
(vec<T, A, vl_embed>::copy): Likewise.
(vec<T, A, vl_embed>::quick_push): Likewise.
(vec<T, A, vl_embed>::pop): Likewise.
(vec<T, A, vl_embed>::quick_insert): Likewise.
(vec<T, A, vl_embed>::ordered_remove): Likewise.
(vec<T, A, vl_embed>::unordered_remove): Likewise.
(vec<T, A, vl_embed>::block_remove): Likewise.
(vec<T, A, vl_heap>::address): Likewise.
gcc/vec.h