summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2013-03-06 15:20:50 -0800
committer Ian Rogers <irogers@google.com> 2013-03-06 15:20:50 -0800
commit0d94eb659387bb797498918ac7e1a41f14b4a11b (patch)
tree933544ec77dd17f01ecc3e6bc2337a28095ef74e
parent8227cc1b46f36aed77745ea15de2f435e04c5337 (diff)
Minor LLVM cleanup.
Change-Id: Ic3e88d5e551d0ee440231ce8bb515ecd31517fe2
-rw-r--r--src/compiler/llvm/backend_types.h42
-rw-r--r--src/compiler/llvm/compiler_llvm.cc2
-rw-r--r--src/compiler/llvm/compiler_llvm.h4
-rw-r--r--src/compiler/llvm/gbc_expander.cc4
-rw-r--r--src/compiler/llvm/llvm_compilation_unit.h2
5 files changed, 6 insertions, 48 deletions
diff --git a/src/compiler/llvm/backend_types.h b/src/compiler/llvm/backend_types.h
index 09f6de7985..c89504a859 100644
--- a/src/compiler/llvm/backend_types.h
+++ b/src/compiler/llvm/backend_types.h
@@ -38,15 +38,6 @@ enum JType {
MAX_JTYPE
};
-enum RegCategory {
- kRegUnknown,
- kRegZero,
- kRegCat1nr,
- kRegCat2,
- kRegObject,
-};
-
-
enum TBAASpecialType {
kTBAARegister,
kTBAAStackTemp,
@@ -106,39 +97,6 @@ inline JType GetJTypeFromShorty(char shorty_jty) {
}
}
-
-inline RegCategory GetRegCategoryFromJType(JType jty) {
- switch (jty) {
- case kVoid:
- return kRegUnknown;
-
- case kBoolean:
- case kByte:
- case kChar:
- case kShort:
- case kInt:
- case kFloat:
- return kRegCat1nr;
-
- case kLong:
- case kDouble:
- return kRegCat2;
-
- case kObject:
- return kRegObject;
-
- default:
- LOG(FATAL) << "Unknown java type: " << jty;
- return kRegUnknown;
- }
-}
-
-
-inline RegCategory GetRegCategoryFromShorty(char shorty) {
- return GetRegCategoryFromJType(GetJTypeFromShorty(shorty));
-}
-
-
} // namespace llvm
} // namespace art
diff --git a/src/compiler/llvm/compiler_llvm.cc b/src/compiler/llvm/compiler_llvm.cc
index be1730f736..3fbc55a41b 100644
--- a/src/compiler/llvm/compiler_llvm.cc
+++ b/src/compiler/llvm/compiler_llvm.cc
@@ -139,7 +139,7 @@ CompileDexMethod(DexCompilationUnit* dex_compilation_unit, InvokeType invoke_typ
UniquePtr<LlvmCompilationUnit> cunit(AllocateCompilationUnit());
cunit->SetDexCompilationUnit(dex_compilation_unit);
- cunit->SetCompiler(compiler_driver_);
+ cunit->SetCompilerDriver(compiler_driver_);
// TODO: consolidate ArtCompileMethods
CompileOneMethod(*compiler_driver_,
kPortable,
diff --git a/src/compiler/llvm/compiler_llvm.h b/src/compiler/llvm/compiler_llvm.h
index cbee115fee..31973a4e5c 100644
--- a/src/compiler/llvm/compiler_llvm.h
+++ b/src/compiler/llvm/compiler_llvm.h
@@ -89,9 +89,9 @@ class CompilerLLVM {
private:
LlvmCompilationUnit* AllocateCompilationUnit();
- CompilerDriver* compiler_driver_;
+ CompilerDriver* const compiler_driver_;
- InstructionSet insn_set_;
+ const InstructionSet insn_set_;
Mutex next_cunit_id_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
size_t next_cunit_id_ GUARDED_BY(next_cunit_id_lock_);
diff --git a/src/compiler/llvm/gbc_expander.cc b/src/compiler/llvm/gbc_expander.cc
index 44cba4bd2f..559ce4c8cb 100644
--- a/src/compiler/llvm/gbc_expander.cc
+++ b/src/compiler/llvm/gbc_expander.cc
@@ -340,11 +340,11 @@ class GBCExpanderPass : public llvm::FunctionPass {
static char ID;
GBCExpanderPass(const IntrinsicHelper& intrinsic_helper, IRBuilder& irb,
- art::CompilerDriver* compiler, const art::DexCompilationUnit* dex_compilation_unit)
+ art::CompilerDriver* driver, const art::DexCompilationUnit* dex_compilation_unit)
: llvm::FunctionPass(ID), intrinsic_helper_(intrinsic_helper), irb_(irb),
context_(irb.getContext()), rtb_(irb.Runtime()),
shadow_frame_(NULL), old_shadow_frame_(NULL),
- driver_(compiler),
+ driver_(driver),
dex_compilation_unit_(dex_compilation_unit),
func_(NULL), current_bb_(NULL), basic_block_unwind_(NULL), changed_(false) {}
diff --git a/src/compiler/llvm/llvm_compilation_unit.h b/src/compiler/llvm/llvm_compilation_unit.h
index 96d019c928..c632046def 100644
--- a/src/compiler/llvm/llvm_compilation_unit.h
+++ b/src/compiler/llvm/llvm_compilation_unit.h
@@ -78,7 +78,7 @@ class LlvmCompilationUnit {
LLVMInfo* GetQuickContext() const {
return llvm_info_.get();
}
- void SetCompiler(CompilerDriver* driver) {
+ void SetCompilerDriver(CompilerDriver* driver) {
driver_ = driver;
}
const DexCompilationUnit* GetDexCompilationUnit() {