Commit 048c730d authored by Kevin Modzelewski's avatar Kevin Modzelewski

Rename ExcInfo -> UnwindInfo

and exc_info -> unw_info

(This makes more sense with the next change, but I wanted
to separate this large renaming from the functional change.)
parent 1e46a881
This diff is collapsed.
...@@ -28,15 +28,15 @@ class AST_expr; ...@@ -28,15 +28,15 @@ class AST_expr;
class GCBuilder; class GCBuilder;
class IREmitter; class IREmitter;
struct ExcInfo { struct UnwindInfo {
public: public:
llvm::BasicBlock* exc_dest; llvm::BasicBlock* exc_dest;
bool needsInvoke() { return exc_dest != NULL; } bool needsInvoke() { return exc_dest != NULL; }
ExcInfo(llvm::BasicBlock* exc_dest) : exc_dest(exc_dest) {} UnwindInfo(llvm::BasicBlock* exc_dest) : exc_dest(exc_dest) {}
static ExcInfo none() { return ExcInfo(NULL); } static UnwindInfo none() { return UnwindInfo(NULL); }
}; };
// TODO get rid of this // TODO get rid of this
...@@ -69,14 +69,16 @@ public: ...@@ -69,14 +69,16 @@ public:
virtual llvm::Function* getIntrinsic(llvm::Intrinsic::ID) = 0; virtual llvm::Function* getIntrinsic(llvm::Intrinsic::ID) = 0;
virtual llvm::Value* createCall(ExcInfo exc_info, llvm::Value* callee, const std::vector<llvm::Value*>& args) = 0; virtual llvm::Value* createCall(UnwindInfo unw_info, llvm::Value* callee, const std::vector<llvm::Value*>& args)
virtual llvm::Value* createCall(ExcInfo exc_info, llvm::Value* callee) = 0; = 0;
virtual llvm::Value* createCall(ExcInfo exc_info, llvm::Value* callee, llvm::Value* arg1) = 0; virtual llvm::Value* createCall(UnwindInfo unw_info, llvm::Value* callee) = 0;
virtual llvm::Value* createCall2(ExcInfo exc_info, llvm::Value* callee, llvm::Value* arg1, llvm::Value* arg2) = 0; virtual llvm::Value* createCall(UnwindInfo unw_info, llvm::Value* callee, llvm::Value* arg1) = 0;
virtual llvm::Value* createCall3(ExcInfo exc_info, llvm::Value* callee, llvm::Value* arg1, llvm::Value* arg2, virtual llvm::Value* createCall2(UnwindInfo unw_info, llvm::Value* callee, llvm::Value* arg1, llvm::Value* arg2)
= 0;
virtual llvm::Value* createCall3(UnwindInfo unw_info, llvm::Value* callee, llvm::Value* arg1, llvm::Value* arg2,
llvm::Value* arg3) = 0; llvm::Value* arg3) = 0;
virtual llvm::Value* createIC(const ICSetupInfo* pp, void* func_addr, const std::vector<llvm::Value*>& args, virtual llvm::Value* createIC(const ICSetupInfo* pp, void* func_addr, const std::vector<llvm::Value*>& args,
ExcInfo exc_info) = 0; UnwindInfo unw_info) = 0;
}; };
extern const std::string CREATED_CLOSURE_NAME; extern const std::string CREATED_CLOSURE_NAME;
...@@ -96,10 +98,10 @@ private: ...@@ -96,10 +98,10 @@ private:
TypeRecorder* const type_recorder; TypeRecorder* const type_recorder;
public: public:
const ExcInfo exc_info; const UnwindInfo unw_info;
OpInfo(EffortLevel::EffortLevel effort, TypeRecorder* type_recorder, ExcInfo exc_info) OpInfo(EffortLevel::EffortLevel effort, TypeRecorder* type_recorder, UnwindInfo unw_info)
: effort(effort), type_recorder(type_recorder), exc_info(exc_info) {} : effort(effort), type_recorder(type_recorder), unw_info(unw_info) {}
bool isInterpreted() const { return effort == EffortLevel::INTERPRETED; } bool isInterpreted() const { return effort == EffortLevel::INTERPRETED; }
TypeRecorder* getTypeRecorder() const { return type_recorder; } TypeRecorder* getTypeRecorder() const { return type_recorder; }
......
...@@ -123,7 +123,7 @@ static void compileIR(CompiledFunction* cf, EffortLevel::EffortLevel effort) { ...@@ -123,7 +123,7 @@ static void compileIR(CompiledFunction* cf, EffortLevel::EffortLevel effort) {
static StatCounter num_jits("num_jits"); static StatCounter num_jits("num_jits");
num_jits.log(); num_jits.log();
if (VERBOSITY() >= 1&& us > 100000) { if (VERBOSITY() >= 1 && us > 100000) {
printf("Took %.1fs to compile %s\n", us * 0.000001, cf->func->getName().str().c_str()); printf("Took %.1fs to compile %s\n", us * 0.000001, cf->func->getName().str().c_str());
printf("Has %ld basic blocks\n", cf->func->getBasicBlockList().size()); printf("Has %ld basic blocks\n", cf->func->getBasicBlockList().size());
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment