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

Unified Diff: src/IceTargetLoweringMIPS32.h

Issue 2067183002: [Subzero][MIPS32] Implements lowering of alloca instruction (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 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/IceTargetLoweringMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.h
diff --git a/src/IceTargetLoweringMIPS32.h b/src/IceTargetLoweringMIPS32.h
index cfbaa6f2d4b5f56af050441e23b2bfdf2105499d..155b60882aa07df11b7318c248e82290df5cbbf6 100644
--- a/src/IceTargetLoweringMIPS32.h
+++ b/src/IceTargetLoweringMIPS32.h
@@ -89,15 +89,12 @@ public:
// are rounded up to 4 bytes.
return (typeWidthInBytes(Ty) + 3) & ~3;
}
- uint32_t getStackAlignment() const override {
- // TODO(sehr): what is the stack alignment?
- return 1;
- }
+ uint32_t getStackAlignment() const override;
void reserveFixedAllocaArea(size_t Size, size_t Align) override {
- // TODO(sehr): Implement fixed stack layout.
- (void)Size;
- (void)Align;
- llvm::report_fatal_error("Not yet implemented");
+ FixedAllocaSizeBytes = Size;
+ assert(llvm::isPowerOf2_32(Align));
+ FixedAllocaAlignBytes = Align;
+ PrologEmitsFixedAllocas = true;
}
int32_t getFrameFixedAllocaOffset() const override {
// TODO(sehr): Implement fixed stack layout.
@@ -105,6 +102,8 @@ public:
return 0;
}
+ uint32_t maxOutArgsSizeBytes() const override { return MaxOutArgsSizeBytes; }
+
bool shouldSplitToVariable64On32(Type Ty) const override {
return Ty == IceType_i64;
}
@@ -447,6 +446,8 @@ public:
static Type stackSlotType();
Variable *copyToReg(Operand *Src, RegNumT RegNum = RegNumT());
+ void unsetIfNonLeafFunc();
+
// Iterates over the CFG and determines the maximum outgoing stack arguments
// bytes. This information is later used during addProlog() to pre-allocate
// the outargs area
@@ -563,6 +564,8 @@ protected:
static constexpr uint32_t CHAR_BITS = 8;
static constexpr uint32_t INT32_BITS = 32;
size_t SpillAreaSizeBytes = 0;
+ size_t FixedAllocaSizeBytes = 0;
+ size_t FixedAllocaAlignBytes = 0;
private:
ENABLE_MAKE_UNIQUE;
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.cpp » ('j') | src/IceTargetLoweringMIPS32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698