2013-02-07 01:32:29 +08:00
|
|
|
//===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===//
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
2018-05-01 23:54:18 +08:00
|
|
|
/// Interface to describe a layout of a stack frame on an AMDGPU target.
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2016-12-10 06:06:55 +08:00
|
|
|
|
2015-11-07 02:17:45 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2017-11-04 06:32:11 +08:00
|
|
|
#include "llvm/CodeGen/TargetFrameLowering.h"
|
2012-12-12 05:25:42 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2018-05-01 23:54:18 +08:00
|
|
|
/// Information about the stack frame layout on the AMDGPU targets.
|
2012-12-12 05:25:42 +08:00
|
|
|
///
|
|
|
|
/// It holds the direction of the stack growth, the known stack alignment on
|
|
|
|
/// entry to each function, and the offset to the locals area.
|
|
|
|
/// See TargetFrameInfo for more comments.
|
|
|
|
class AMDGPUFrameLowering : public TargetFrameLowering {
|
|
|
|
public:
|
[Alignment][NFC] Use Align for TargetFrameLowering/Subtarget
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68993
llvm-svn: 375084
2019-10-17 15:49:39 +08:00
|
|
|
AMDGPUFrameLowering(StackDirection D, Align StackAl, int LAO,
|
[Alignment][NFC] Deprecate Align::None()
Summary:
This is a follow up on https://reviews.llvm.org/D71473#inline-647262.
There's a caveat here that `Align(1)` relies on the compiler understanding of `Log2_64` implementation to produce good code. One could use `Align()` as a replacement but I believe it is less clear that the alignment is one in that case.
Reviewers: xbolva00, courbet, bollu
Subscribers: arsenm, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, jsji, Jim, kerbowa, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73099
2020-01-21 22:00:04 +08:00
|
|
|
Align TransAl = Align(1));
|
2016-12-10 06:06:55 +08:00
|
|
|
~AMDGPUFrameLowering() override;
|
2013-02-07 01:32:29 +08:00
|
|
|
|
|
|
|
/// \returns The number of 32-bit sub-registers that are used when storing
|
|
|
|
/// values to the stack.
|
2014-04-30 13:53:27 +08:00
|
|
|
unsigned getStackWidth(const MachineFunction &MF) const;
|
2012-12-12 05:25:42 +08:00
|
|
|
};
|
2016-12-10 06:06:55 +08:00
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|