[PATCH] D59666: AMDGPU: HIP compiler option -finstrument-functions flag
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 05:39:00 PDT 2019
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4156
+SDValue SITargetLowering::LowerRETURNADDR(SDValue Op,
+ SelectionDAG &DAG) const {
+ // Checking the depth
----------------
Formatting
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4159-4161
+ DAG.getContext()->emitError(
+ "Return address can be determined only for current frame");
+ return SDValue();
----------------
This can just give 0 instead of erring
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4168
+ MFI.setReturnAddressIsTaken(true);
+
+ const SIRegisterInfo *TRI = getSubtarget()->getRegisterInfo();
----------------
This still won't handle kernels correctly
================
Comment at: test/CodeGen/AMDGPU/returnaddress.ll:19
+ ret i8* %0
+}
----------------
Needs tests with a kernel and shader, since this should crash as is since there is no return address
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59666/new/
https://reviews.llvm.org/D59666
More information about the llvm-commits
mailing list