summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/ArmLIR.h
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-02-03 14:47:55 -0800
committer buzbee <buzbee@google.com> 2012-02-03 15:02:55 -0800
commitba938cbb8d73a0dcf151dfaec4662496da6afdbf (patch)
tree09ad41fc5851a22e8c11935edc83c7ece546f856 /src/compiler/codegen/arm/ArmLIR.h
parent763d5fb2f83d9c93b5b764533005865a3d1034e1 (diff)
Make the compiler threadsafe
The compiler inherited a simple memory management scheme that involved malloc'ng a clump of memory, allocating out of that clump for each unit of compilation, and then resetting after the compilation was complete. Simple & fast, but built with the expectation of a single compiler worker thread. This change moves the memory allocation arena into the CompilationUnit structure, and makes it private for each method compilation. Unlike the old scheme, allocated memory is returned to the system following completion (whereas before it was reused for the next compilation). As of this CL, each compilation is completely independent. The changes involved were mostly mechanical to pass around the cUnit pointer to anything which might need to allocate, but the accretion of crud has moved me much closer to the point that all of this stuff gets ripped out and replaced. Change-Id: I19dda0a7fb5aa228f6baee7ae5293fdd174c8337
Diffstat (limited to 'src/compiler/codegen/arm/ArmLIR.h')
-rw-r--r--src/compiler/codegen/arm/ArmLIR.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/codegen/arm/ArmLIR.h b/src/compiler/codegen/arm/ArmLIR.h
index 3c5daad990..bc536f9a86 100644
--- a/src/compiler/codegen/arm/ArmLIR.h
+++ b/src/compiler/codegen/arm/ArmLIR.h
@@ -822,7 +822,7 @@ typedef enum ArmTargetOptHints {
kMaxHoistDistance,
} ArmTargetOptHints;
-extern ArmEncodingMap EncodingMap[kArmLast];
+extern const ArmEncodingMap EncodingMap[kArmLast];
/*
* Each instance of this struct holds a pseudo or real LIR instruction: