[PATCH] D21259: don't force SP-relative addressing for statepoints when the offset is not statically known

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 08:28:02 PDT 2016


rnk added a comment.

Is it really necessary to prefer SP-relative offsets from FP-relative offsets? Is there any reason not to standardize on getFrameIndexReference? You can always get SP-relative offsets by disabling frame pointers.

Assuming we need SP-relative offsets, I think it would be cleaner to expose an API on TargetFrameLowering that prefers returning SP-relative offsets if possible, rather than having an API that might fail. The base TargetFrameLowering implementation can delegate directly to getFrameIndexReference, and targets like X86 can implement the preference for SP-relative offsets.


Repository:
  rL LLVM

http://reviews.llvm.org/D21259





More information about the llvm-commits mailing list