OSDN Git Service

Remove instructions instead of attempting to delete them.
authorNicolas Capens <capn@google.com>
Mon, 12 Sep 2016 19:40:25 +0000 (15:40 -0400)
committerNicolas Capens <nicolascapens@google.com>
Tue, 13 Sep 2016 21:35:19 +0000 (21:35 +0000)
commit038a9b9e2b3c3b2e2e532b6194a2b9f8351ad76c
treee925436d52a05eca1d58d2a3e103e828d695c8e5
parent47ef0be853cfd485967327aa7f9c67a747a657d8
Remove instructions instead of attempting to delete them.

Instructions are allocated using the ArenaAllocator which uses a
memory pool of "slabs", so we can't use the regular C++ delete to
deallocate them. Just remove them from the list. This change also
provides an override for Inst's operator delete to use the custom
allocator, which should currently not be called.

BUG=swiftshader:8

Change-Id: Ibb166910402a70e7d9276b28e19b15caf64422f2
Reviewed-on: https://chromium-review.googlesource.com/384336
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Jim Stichnoth <stichnot@chromium.org>
src/IceCfgNode.cpp
src/IceInst.h