diff options
author | huangs <huangs@chromium.org> | 2016-01-21 22:03:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-22 06:04:22 +0000 |
commit | c9048834672beecaab298f89995a54e4b1fe40f7 (patch) | |
tree | 1cc1b4018fccac8db176ddfebf231b78c9b4b3a1 /courgette/patch_generator_x86_32.h | |
parent | f64f908c5c41aa8d68feec7220ad9aa9d7f66f01 (diff) | |
download | chromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.zip chromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.tar.gz chromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.tar.bz2 |
[Courgette] Fold TrimLabels() into ParseDetectedExecutable().
TrimLabels() was a post-processing step after ParseDetectedExecutable().
Soon we'll do trimming earlier in the flow. However, existing code calls
TrimLabels() right after ParseDetectedExecutable(). This CL moves
TrimLabels() into ParseDetectedExecutable() to simplify the transition.
Existing flows that call ParseDetectedExecutable() are also inconsistent
in TrimLabel() usage; {-gen, -apply, -dis} do, and debugging flows
{-disadj, -gen1a, -gen1u} don't. This CL makes the debugging flows use
TrimLabel(). This side effect is likely positive, since it improves
consistently. Meanwhile, the actual impact is small: TrimLabels() is
active only for ELF ARM anyway.
Review URL: https://codereview.chromium.org/1615513002
Cr-Commit-Position: refs/heads/master@{#370916}
Diffstat (limited to 'courgette/patch_generator_x86_32.h')
-rw-r--r-- | courgette/patch_generator_x86_32.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/courgette/patch_generator_x86_32.h b/courgette/patch_generator_x86_32.h index ac558be..1c56712 100644 --- a/courgette/patch_generator_x86_32.h +++ b/courgette/patch_generator_x86_32.h @@ -82,19 +82,6 @@ class PatchGeneratorX86_32 : public TransformationPatchGenerator { return new_parse_status; } - // Trim labels below a certain threshold - Status trim_old_status = TrimLabels(old_program); - if (trim_old_status != C_OK) { - DeleteAssemblyProgram(old_program); - return trim_old_status; - } - - Status trim_new_status = TrimLabels(new_program); - if (trim_new_status != C_OK) { - DeleteAssemblyProgram(new_program); - return trim_new_status; - } - EncodedProgram* old_encoded = NULL; Status old_encode_status = Encode(old_program, &old_encoded); if (old_encode_status != C_OK) { |