| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 162843
|
| |
|
|
|
|
|
| |
no cost to using memcpy here: the fixed code is optimized by LLVM to perfect
machine code.
llvm-svn: 162311
|
| |
|
|
|
|
|
|
|
| |
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.
llvm-svn: 150364
|
| |
|
|
| |
llvm-svn: 148578
|
| |
|
|
|
|
|
|
| |
the same value) to this variable. This code could be refactored, but it doesn't
matter since the old JIT is going away. Add tsan annotations to ignore the
race.
llvm-svn: 145745
|
| |
|
|
| |
llvm-svn: 124947
|
| |
|
|
| |
llvm-svn: 124946
|
| |
|
|
| |
llvm-svn: 120298
|
| |
|
|
|
|
| |
until other LLVM projects using these are cleaned up.
llvm-svn: 117200
|
| |
|
|
|
|
|
| |
to re-instrument the code. We depend on the system valgrind.h to
avoid adding a new license.
llvm-svn: 98529
|
| |
|
|
|
|
| |
Thanks to Kristaps Straupe for noticing the bug.
llvm-svn: 95537
|
| |
|
|
| |
llvm-svn: 92651
|
| |
|
|
|
|
|
|
|
| |
remove start/finishGVStub and the BufferState helper class from the
MachineCodeEmitter interface. It has the side-effect of not setting the
indirect global writable and then executable on ARM, but that shouldn't be
necessary.
llvm-svn: 91464
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
way for each TargetJITInfo subclass to allocate its own stubs. This
means stubs aren't as exactly-sized anymore, but it lets us get rid of
TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC
support the eager JIT, fixing http://llvm.org/PR4816.
* Rename the JITEmitter's stub creation functions to describe the kind
of stub they create. So far, all of them create lazy-compilation
stubs, but they sometimes get used when far-call stubs are needed.
Fixing http://llvm.org/PR5201 will involve fixing this.
llvm-svn: 89715
|
| |
|
|
|
|
|
|
| |
It's probably better in the long run to replace the
indirect-GlobalVariable system. That'll be done after a subsequent
patch.
llvm-svn: 89708
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.
To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.
To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.
Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.
This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.
Thanks to echristo for lots of testing!
llvm-svn: 88984
|
| |
|
|
|
|
|
|
|
| |
interrupt instruction, which shouldn't arise any other way). 0xcd is
also used by JITMemoryManager to initialize the buffer to garbage,
which means it could appear following a noreturn call even when
that is not a stub, confusing X86CompilationCallback2. PR 4929.
llvm-svn: 81888
|
| |
|
|
|
|
| |
dependent. Hopefully, this will fix PR3801.
llvm-svn: 81132
|
| |
|
|
| |
llvm-svn: 80885
|
| |
|
|
|
|
|
|
| |
whether sse is available. Just use consult subtarget.
No functionality changes.
llvm-svn: 80880
|
| |
|
|
|
|
|
|
| |
Some other minor win64 fixes as well.
Patch by Michael Beck!
llvm-svn: 80370
|
| |
|
|
| |
llvm-svn: 79873
|
| |
|
|
| |
llvm-svn: 79494
|
| |
|
|
|
|
|
|
|
|
| |
for ELF to work.
2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0,
IndexReg=0.
3) The JIT can get the real address of cstpools and jmptables during
code emission, fix that for object code emission
llvm-svn: 78129
|
| |
|
|
|
|
| |
- Tidy up some headers.
llvm-svn: 77929
|
| |
|
|
|
|
|
|
|
| |
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
|
| |
|
|
| |
llvm-svn: 75416
|
| |
|
|
|
|
|
|
|
| |
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
|
| |
|
|
|
|
|
| |
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)
llvm-svn: 75018
|
| |
|
|
|
|
| |
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray
llvm-svn: 72631
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that has not been JIT'd yet, the callee is put on a list of pending functions
to JIT. The call is directed through a stub, which is updated with the address
of the function after it has been JIT'd. A new interface for allocating and
updating empty stubs is provided.
Add support for removing the ModuleProvider the JIT was created with, which
would otherwise invalidate the JIT's PassManager, which is initialized with the
ModuleProvider's Module.
Add support under a new ExecutionEngine flag for emitting the infomration
necessary to update Function and GlobalVariable stubs after JITing them, by
recording the address of the stub and the name of the GlobalValue. This allows
code to be copied from one address space to another, where libraries may live
at different virtual addresses, and have the stubs updated with their new
correct target addresses.
llvm-svn: 64906
|
| |
|
|
|
|
| |
addresses to symbols.
llvm-svn: 63962
|
| |
|
|
|
|
| |
some overflow issues. Patch by Thomas Jablin.
llvm-svn: 60828
|
| |
|
|
| |
llvm-svn: 58949
|
| |
|
|
|
|
| |
ptr.
llvm-svn: 58897
|
| |
|
|
|
|
| |
indirect gv reference. Please don't call it lazy.
llvm-svn: 58746
|
| |
|
|
|
|
|
|
| |
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.
llvm-svn: 58142
|
| |
|
|
|
|
| |
rather than the absolute address if the target is within range.
llvm-svn: 54708
|
| |
|
|
|
|
| |
use and may delete the function.
llvm-svn: 53692
|
| |
|
|
|
|
| |
- table base.
llvm-svn: 53660
|
| |
|
|
|
|
|
| |
general solution possible, but it's a fairly simple one.
Based on a patch from the OpenGTL project!
llvm-svn: 52662
|
| |
|
|
| |
llvm-svn: 52026
|
| |
|
|
| |
llvm-svn: 49822
|
| |
|
|
|
|
|
|
| |
the memory manager which function
the stub will resolve.
llvm-svn: 49814
|
| |
|
|
| |
llvm-svn: 48706
|
| |
|
|
|
|
| |
of compiler used.
llvm-svn: 48702
|
| |
|
|
| |
llvm-svn: 48701
|
| |
|
|
|
|
| |
annoying warnings.
llvm-svn: 47367
|
| |
|
|
| |
llvm-svn: 45731
|
| |
|
|
| |
llvm-svn: 45616
|