- /// doesntNeedStub - This function returns true if the JIT for this target
- /// target is capable of directly handling the relocated GlobalValue reference
- /// without using either a stub function or issuing an extra load to get the
- /// GV address.
- bool doesntNeedStub() const {
- return !NeedStub;
+ /// mayNeedFarStub - This function returns true if the JIT for this target may
+ /// need either a stub function or an indirect global-variable load to handle
+ /// the relocated GlobalValue reference. For example, the x86-64 call
+ /// instruction can only call functions within +/-2GB of the call site.
+ /// Anything farther away needs a longer mov+call sequence, which can't just
+ /// be written on top of the existing call.
+ bool mayNeedFarStub() const {
+ return MayNeedFarStub;