Commit d6d95bea authored by Sanjoy Das's avatar Sanjoy Das Committed by TensorFlower Gardener
Browse files

Remove BufferAllocation::is_reusable() and introduce is_readonly(); NFC

 - Instead of remembering is_reusable_, remember BufferAllocation::is_tuple_ and
   compute is_reusable() from is_tuple() and is_thread_local().

 - Introduce is_readonly() which tells us whether an allocation holds readonly
   data.  In the future this will return true for constant buffer allocations
   but today only entry parameters are readonly.

is_reusable() is about lifetime whereas is_readonly() is about write access.  In
particular, we sometimes "re-use" readonly allocations e.g. when the init value
of a while loop is an entry parameter and the while body is readonly.

PiperOrigin-RevId: 205881338
parent 3e9adc8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment