[all-commits] [llvm/llvm-project] 21d288: AMDGPU: Annotate functions that have stack objects
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Tue May 19 15:51:20 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 21d2884a9c5b4227a3e7f3220e4398aab1e49e1c
https://github.com/llvm/llvm-project/commit/21d2884a9c5b4227a3e7f3220e4398aab1e49e1c
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2020-05-19 (Tue, 19 May 2020)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
A llvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch-init.ll
M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
Log Message:
-----------
AMDGPU: Annotate functions that have stack objects
Relying on any MachineFunction state in the MachineFunctionInfo
constructor is hazardous, because the construction time is unclear and
determined by the first use. The function may be only partially
constructed, which is part of why we have many of these hacky string
attributes to track what we need for ABI lowering.
For SelectionDAG, all stack objects are created up-front before
calling convention lowering so stack objects are visible at
construction time. For GlobalISel, none of the IR function has been
visited yet and the allocas haven't been added to the MachineFrameInfo
yet. This should fix failing to set flat_scratch_init in GlobalISel
when needed.
This pass really needs to be turned into some kind of analysis, but I
haven't found a nice way use one here.
More information about the All-commits
mailing list