[llvm-commits] [PATCH] Make the need-stub variables accurate and consistent
Evan Cheng
evan.cheng at apple.com
Fri Nov 6 23:57:21 PST 2009
On Nov 6, 2009, at 9:30 PM, jyasskin at gmail.com wrote:
> Reviewers: ,
>
> Message:
> Please take a look.
>
> I'd like to find an example of a global-variable far stub to put in
> the
> comment for MachineRelocation::mayNeedFarStub(). Can anyone describe
> the
> requirement for ARM or another platform so I can copy it in?
>
> Description:
> I'm trying to tease apart the different uses for "stubs" in the JIT.
> In
> the case of MachineRelocations, I believe "stub" always refers to a
> far-call stub or a load-a-faraway-global stub, so this patch adds
> "Far"
Yes, "stub" is a overloaded term. Both the ARM and X86 code emitters
assume function GVs require a stub. However, they are not always due
to far address though. It could be due to lazy resolution or in the
dlsym mode, it's expected the addresses of globals are supplied by the
client.
> to the term. The variable was also inconsistent between the positive
> and
> negative sense, and the positive sense ("NeedStub") was more demanding
> than is accurate (since a nearby-enough function can be called
> directly
> even if the platform often requires a stub). Since the negative sense
> causes double-negatives, I switched to "MayNeedFarStub" globally.
This part sounds nice.
Evan
>
> Please review this at http://codereview.appspot.com/151051
>
> Affected files:
> M include/llvm/CodeGen/MachineRelocation.h
> M lib/ExecutionEngine/JIT/JITEmitter.cpp
> M lib/Target/ARM/ARMCodeEmitter.cpp
> M lib/Target/X86/X86CodeEmitter.cpp
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list