 Chromium Code Reviews
 Chromium Code Reviews Issue 870653002:
  Subzero: Initial implementation of multithreaded translation.  (Closed) 
  Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
    
  
    Issue 870653002:
  Subzero: Initial implementation of multithreaded translation.  (Closed) 
  Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master| Index: src/IceTranslator.h | 
| diff --git a/src/IceTranslator.h b/src/IceTranslator.h | 
| index a0c04098c3f3f73a403ac65b2d7bb45f099af308..63be3798070c4b2b468aac3293ead584828e15de 100644 | 
| --- a/src/IceTranslator.h | 
| +++ b/src/IceTranslator.h | 
| @@ -15,8 +15,6 @@ | 
| #ifndef SUBZERO_SRC_ICETRANSLATOR_H | 
| #define SUBZERO_SRC_ICETRANSLATOR_H | 
| -#include <memory> | 
| - | 
| namespace llvm { | 
| class Module; | 
| } | 
| @@ -39,7 +37,7 @@ public: | 
| typedef std::vector<VariableDeclaration *> VariableDeclarationListType; | 
| Translator(GlobalContext *Ctx, const ClFlags &Flags) | 
| - : Ctx(Ctx), Flags(Flags), ErrorStatus(0) {} | 
| + : Ctx(Ctx), Flags(Flags), ErrorStatus(false) {} | 
| ~Translator(); | 
| bool getErrorStatus() const { return ErrorStatus; } | 
| @@ -49,9 +47,8 @@ public: | 
| const ClFlags &getFlags() const { return Flags; } | 
| /// Translates the constructed ICE function Fcn to machine code. | 
| - /// Takes ownership of Fcn. Note: As a side effect, Field Func is | 
| - /// set to Fcn. | 
| - void translateFcn(Cfg *Fcn); | 
| + /// Takes ownership of Func. | 
| + void translateFcn(Cfg *Func); | 
| /// Emits the constant pool. | 
| void emitConstants(); | 
| @@ -75,15 +72,6 @@ protected: | 
| // The exit status of the translation. False is successful. True | 
| // otherwise. | 
| bool ErrorStatus; | 
| - // Ideally, Func would be inside the methods that converts IR to | 
| - // functions. However, emitting the constant pool requires a valid | 
| - // Cfg object, so we need to defer deleting the last non-empty Cfg | 
| - // object to emit the constant pool (via emitConstants). TODO: | 
| - // Since all constants are globally pooled in the GlobalContext | 
| - // object, change all Constant related functions to use | 
| - // GlobalContext instead of Cfg, and then make emitConstantPool use | 
| - // that. | 
| - std::unique_ptr<Cfg> Func; | 
| 
Karl
2015/01/22 20:41:13
Nice to see this wart go away!
 
Jim Stichnoth
2015/01/23 07:55:55
Indeed.
 | 
| }; | 
| } // end of namespace Ice |