Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: src/IceTranslator.h

Issue 870653002: Subzero: Initial implementation of multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes, continued Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceTranslator.h
diff --git a/src/IceTranslator.h b/src/IceTranslator.h
index a0c04098c3f3f73a403ac65b2d7bb45f099af308..e01a2b2955e104b46d76baf3e2de8a1183492a36 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;
}
@@ -38,20 +36,17 @@ class Translator {
public:
typedef std::vector<VariableDeclaration *> VariableDeclarationListType;
- Translator(GlobalContext *Ctx, const ClFlags &Flags)
- : Ctx(Ctx), Flags(Flags), ErrorStatus(0) {}
-
+ Translator(GlobalContext *Ctx, const ClFlags &Flags);
~Translator();
- bool getErrorStatus() const { return ErrorStatus; }
+ std::error_code getErrorStatus() const { return ErrorStatus; }
GlobalContext *getContext() const { return Ctx; }
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();
@@ -72,18 +67,10 @@ public:
protected:
GlobalContext *Ctx;
const ClFlags &Flags;
- // The exit status of the translation. False is successful. True
+ std::unique_ptr<TargetGlobalLowering> GlobalLowering;
+ // the exit status of the translation. False is successful. True
jvoung (off chromium) 2015/01/23 22:56:37 Back to "The"?
Jim Stichnoth 2015/01/25 07:29:38 Done.
// 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;
+ std::error_code ErrorStatus;
};
} // end of namespace Ice

Powered by Google App Engine
This is Rietveld 408576698