Commit dc25e0c4 authored by plind44@gmail.com's avatar plind44@gmail.com

Make offsets to inner allocated objects aligned in allocation folding.

Folded allocations marked for double alignment is not aligned if old dominator
size is used for offset to inner object.

TEST=mjsunit/big-array-literal on MIPS
BUG=
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/103963005

Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 649a2dca
......@@ -3495,11 +3495,18 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
dominator_allocate->clear_next_map_word_ = clear_next_map_word_;
// After that replace the dominated allocate instruction.
HInstruction* inner_offset = HConstant::CreateAndInsertBefore(
zone,
context(),
dominator_size_constant,
Representation::None(),
this);
HInstruction* dominated_allocate_instr =
HInnerAllocatedObject::New(zone,
context(),
dominator_allocate,
dominator_size,
inner_offset,
type());
dominated_allocate_instr->InsertBefore(this);
DeleteAndReplaceWith(dominated_allocate_instr);
......
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