summaryrefslogtreecommitdiff
path: root/backend/src/ir/unit.cpp
diff options
context:
space:
mode:
authorPan Xiuli <xiuli.pan@intel.com>2015-11-20 15:07:42 +0800
committerYang Rong <rong.r.yang@intel.com>2015-11-25 11:45:18 +0800
commit3bda30a2d5705fea64568bd4f39367754364bc8d (patch)
treea50573feb9ac68ef1c90128a264b529007cf5735 /backend/src/ir/unit.cpp
parent06b0298cb481f936f84e9e9af8fae0763574d3fd (diff)
Backend: Refine printfs into ir unit
Move the printfs of PrintfParser into the ir::Unit to make the gbe thread safe. The old static printfs will be cleared by othrer thread when running in multithread. V2: Rebase the patch Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'backend/src/ir/unit.cpp')
-rw-r--r--backend/src/ir/unit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/src/ir/unit.cpp b/backend/src/ir/unit.cpp
index 56042446..a350c602 100644
--- a/backend/src/ir/unit.cpp
+++ b/backend/src/ir/unit.cpp
@@ -34,6 +34,7 @@ namespace ir {
Unit::~Unit(void) {
for (const auto &pair : functions) GBE_DELETE(pair.second);
delete profilingInfo;
+ for (const auto &pair : printfs) GBE_DELETE(pair.second);
}
Function *Unit::getFunction(const std::string &name) const {
auto it = functions.find(name);