[PATCH] Added a new register class for Thumb PC-rel loads
Evan Cheng
evan.cheng at apple.com
Thu Aug 8 16:06:00 PDT 2013
It would make it easier to review if you can illustrate the change with some assembly code sequence.
Evan
On Aug 8, 2013, at 7:30 AM, Daniel Stewart <stewartd at codeaurora.org> wrote:
> This patch is for allowing a jump table (in Thumb mode) to not use the LR register, which can branch mispredicts during a mov lr, pc. If it could be reviewed, I’d appreciate it.
>
> This patch does the following:
>
> - Query for the GPRPair with gsub_1 in rGPR class.
> This replaces the hard-coded reference
>
> - Add jtGPR register class to be used by load PC relative
> address for jump table that avoids the use of LR register.
> This prevents the codegen from generating mov pc, lr
> which causes the target to think it is returning
> from a function and predict that the next address will
> be in the calling function.
>
> Daniel Stewart
> --
> Qualcomm Innovation Center, Inc is a member of Code Aurora Forum, hosted by The Linux Foundation
> <0001-Added-register-class-with-no-LR-used-by-PC-rel-load.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130808/bf37c72d/attachment.html>
More information about the llvm-commits
mailing list