Sort allocas, compute frame pointer in Cfg pass Split allocas in the entry block into two categories. The first has alignment <= stack alignment and constant size. The second violates one or both of those conditions. Sort both of these lists in descending alignment order and emit. Also, compute the need for a frame pointer during the pass. BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1414343010 .
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h index 605562d..f518225 100644 --- a/src/IceTargetLowering.h +++ b/src/IceTargetLowering.h
@@ -201,9 +201,11 @@ virtual IceString getRegName(SizeT RegNum, Type Ty) const = 0; virtual bool hasFramePointer() const { return false; } + virtual void setHasFramePointer() = 0; virtual SizeT getStackReg() const = 0; virtual SizeT getFrameOrStackReg() const = 0; virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0; + virtual uint32_t getStackAlignment() const = 0; /// Return whether a 64-bit Variable should be split into a Variable64On32. virtual bool shouldSplitToVariable64On32(Type Ty) const = 0;