diff options
| author | 2012-09-09 14:41:03 -0700 | |
|---|---|---|
| committer | 2012-09-09 14:41:03 -0700 | |
| commit | 1a0806c6847a9dc5cc6d73460d7e8ad3183b5c49 (patch) | |
| tree | 380a8b0796e3ee94072457013de1ad8e94e9a287 /src/compiler/codegen/CodegenUtil.cc | |
| parent | 324e190e9de0d81d39d88474e189acef9b10bcc8 (diff) | |
| parent | d1643e41ef242ae656f667bf3c8b0324635cefd3 (diff) | |
Merge "Basic block combine pass" into dalvik-dev
Diffstat (limited to 'src/compiler/codegen/CodegenUtil.cc')
| -rw-r--r-- | src/compiler/codegen/CodegenUtil.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/compiler/codegen/CodegenUtil.cc b/src/compiler/codegen/CodegenUtil.cc index 3aea76a4cc..bdc2c8b207 100644 --- a/src/compiler/codegen/CodegenUtil.cc +++ b/src/compiler/codegen/CodegenUtil.cc @@ -998,5 +998,20 @@ void dumpPackedSwitchTable(const u2* table) } } +/* + * Set up special LIR to mark a Dalvik byte-code instruction start and + * record it in the boundaryMap. NOTE: in cases such as kMirOpCheck in + * which we split a single Dalvik instruction, only the first MIR op + * associated with a Dalvik PC should be entered into the map. + */ +LIR* markBoundary(CompilationUnit* cUnit, int offset, const char* instStr) +{ + LIR* res = newLIR1(cUnit, kPseudoDalvikByteCodeBoundary, (intptr_t) instStr); + if (cUnit->boundaryMap.find(offset) == cUnit->boundaryMap.end()) { + cUnit->boundaryMap.Put(offset, res); + } + return res; +} -} // namespace art +} + // namespace art |