TargetOptions::DisableFramePointerElim is hot and showing up in compile-time profiles via AArch64FrameLowering::hasFPImpl on aarch64-O0-g builds. Repeatedly looking up the function attribute is expensive. Parsing it once at MachineFunction initialisation and storing as FramePointerKind on MachineFrameInfo is a -0.21% geomean improvement on CTMark stage1-aarch64-O0-g. Also helps debug builds on other targets. https://llvm-compile-time-tracker.com/compare.php?from=215f35eb8f1c313ac135ad47db1cc0b99b3ae694&to=51f6617517177bea1cc49baeab3acaf62d5e9df9&stat=instructions%3Au
2.6 KiB
2.6 KiB