summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2015-11-12 16:47:03 +0800
committerYang Rong <rong.r.yang@intel.com>2015-11-25 11:45:04 +0800
commit23fceea309638afdbe34271cc55ea01d680cb402 (patch)
treeb66f4c36068d6e41b97eab9e0e6cd95a02fe3ebc
parentd71c96dcd1d51832d400c1c4f254c39038bda270 (diff)
GBE: remove useless assertions code.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
-rw-r--r--backend/src/backend/context.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/backend/src/backend/context.cpp b/backend/src/backend/context.cpp
index 47d8a457..5f5a8586 100644
--- a/backend/src/backend/context.cpp
+++ b/backend/src/backend/context.cpp
@@ -38,7 +38,7 @@ namespace gbe
class SimpleAllocator
{
public:
- SimpleAllocator(int32_t startOffset, int32_t size, bool _assertFail);
+ SimpleAllocator(int32_t startOffset, int32_t size);
~SimpleAllocator(void);
/*! Allocate some memory from the pool.
@@ -67,8 +67,6 @@ namespace gbe
void coalesce(Block *left, Block *right);
/*! the maximum offset */
int32_t maxOffset;
- /*! whether trigger an assertion on allocation failure */
- bool assertFail;
/*! Head and tail of the free list */
Block *head;
Block *tail;
@@ -90,7 +88,7 @@ namespace gbe
class RegisterAllocator: public SimpleAllocator {
public:
- RegisterAllocator(int32_t offset, int32_t size): SimpleAllocator(offset, size, false) {}
+ RegisterAllocator(int32_t offset, int32_t size): SimpleAllocator(offset, size) {}
GBE_CLASS(RegisterAllocator);
};
@@ -102,17 +100,15 @@ namespace gbe
class ScratchAllocator: public SimpleAllocator {
public:
- ScratchAllocator(int32_t size): SimpleAllocator(0, size, true) {}
+ ScratchAllocator(int32_t size): SimpleAllocator(0, size) {}
int32_t getMaxScatchMemUsed() { return maxOffset; }
GBE_CLASS(ScratchAllocator);
};
SimpleAllocator::SimpleAllocator(int32_t startOffset,
- int32_t size,
- bool _assertFail)
- : maxOffset(0),
- assertFail(_assertFail){
+ int32_t size)
+ : maxOffset(0) {
tail = head = this->newBlock(startOffset, size);
}