Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: src/compiler/frame.h

Issue 2816743003: [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Upload missing file Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/instruction-selector.cc » ('j') | src/compiler/instruction-selector.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/frame.h
diff --git a/src/compiler/frame.h b/src/compiler/frame.h
index a4d6829cfa843d8c06254cce61f6b5f0194a0fbc..2d9e5e03688a15d83cbb062a0bdb0d4544ed559b 100644
--- a/src/compiler/frame.h
+++ b/src/compiler/frame.h
@@ -111,9 +111,18 @@ class Frame : public ZoneObject {
frame_slot_count_ += count;
}
- int AllocateSpillSlot(int width) {
+ int AllocateSpillSlot(int width, int alignement = 0) {
ahaas 2017/04/24 11:43:54 alignment
ivica.bogosavljevic 2017/04/27 13:56:56 Acknowledged.
int frame_slot_count_before = frame_slot_count_;
- AllocateAlignedFrameSlots(width);
+ if (alignement <= kPointerSize) {
+ AllocateAlignedFrameSlots(width);
+ } else {
+ // We need to allocate more place for spill slot
+ // in case we need an aligned spill slot to be
+ // able to properly align start of spill slot
+ // and still have enough place to hold all the
+ // data
+ AllocateAlignedFrameSlots(width + alignement - kPointerSize);
+ }
spill_slot_count_ += frame_slot_count_ - frame_slot_count_before;
return frame_slot_count_ - 1;
}
« no previous file with comments | « no previous file | src/compiler/instruction-selector.cc » ('j') | src/compiler/instruction-selector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698