Michael J. Spencer
93c9b2ea93
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
...
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer
dc38d36ccb
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
...
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
NAKAMURA Takumi
fe933eb8f6
Fix a comment.
...
llvm-svn: 112535
2010-08-30 21:54:03 +00:00
NAKAMURA Takumi
9c0e59de64
EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
...
On Mingw and Cygwin, the symbol __main is resolved to
callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
(and register wrong callee's dtors with atexit(3)).
We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
is called before ExecutionEngine::runFunctionAsMain() is called.
llvm-svn: 112474
2010-08-30 14:00:29 +00:00
Chris Lattner
c3847a8134
remove some dead code.
...
llvm-svn: 111791
2010-08-23 03:12:06 +00:00
Nick Lewycky
83a09f0b4f
When creating a JIT, try to load the program so that we can resolve symbols
...
against it. This affects Windows.
llvm-svn: 111240
2010-08-17 16:19:18 +00:00
Nick Lewycky
ec846ac2cc
Stop the JIT from refusing to work just because the program it was compiled into
...
was built with -static.
llvm-svn: 110564
2010-08-09 07:20:20 +00:00
Bob Wilson
f23a06c2e4
Don't call __register_frame from the JIT on systems that use setjmp/longjmp
...
exception handling. Also fix an extra underscore typo in one instance of
"__ARM_EABI__". Radar 8236264.
llvm-svn: 109451
2010-07-26 21:58:00 +00:00
Chris Lattner
aba8ee38c2
remove the dwarf sizing stuff which is now dead, it was
...
"yet another" copy of the dwarf EH emission code that was
copied, pasted and slightly hacked up.
llvm-svn: 109169
2010-07-22 21:20:39 +00:00
Chris Lattner
8f3adc9057
remove the JIT "NeedsExactSize" feature and supporting logic.
...
llvm-svn: 109167
2010-07-22 21:17:55 +00:00
Duncan Sands
953e617de6
Fix indentation.
...
llvm-svn: 108691
2010-07-19 09:36:45 +00:00
Duncan Sands
330134bf15
Expose JIT::recompileAndRelinkFunction for use through the C API.
...
Patch by Benjamin Saunders.
llvm-svn: 108690
2010-07-19 09:33:13 +00:00
Eli Friedman
17c5a23559
Get rid of a bunch of duplicated ELF enum values.
...
llvm-svn: 108520
2010-07-16 07:53:29 +00:00
Duncan Sands
41b4a6b36a
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner
b6df00c29a
first part of JIT support for address of labels, part of PR7264,
...
patch by Yuri!
llvm-svn: 108107
2010-07-11 23:07:28 +00:00
Dan Gohman
c61056a421
Handle execution entrypoints with non-integer return types.
...
Fix from Russel Power in PR7284.
llvm-svn: 106271
2010-06-18 02:01:10 +00:00
Chris Lattner
93cd0f1c89
improve portability to systems that don't have powf/modf (e.g. solaris 9)
...
patch by Evzen Muller!
llvm-svn: 103876
2010-05-15 17:10:24 +00:00
Duncan Sands
211427bda9
Remove the -enable-sjlj-eh option, which doesn't do anything.
...
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.
llvm-svn: 102865
2010-05-02 15:36:26 +00:00
Dan Gohman
effa3e5689
Fix an ancient FIXME.
...
llvm-svn: 102827
2010-05-01 02:43:10 +00:00
Jeffrey Yasskin
0a1513902f
Fix the OProfileJITEventListener build after r101844 removed
...
MachineFunction::DefaultDebugLoc. We now use the same technique as
DwarfDebug::beginFunction to find the starting line number for a
function.
llvm-svn: 102679
2010-04-30 00:16:10 +00:00
Bill Wendling
268195e1d4
Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
...
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.
llvm-svn: 101686
2010-04-18 00:56:05 +00:00
Bill Wendling
47d742000b
Formatting changes. No functionality change.
...
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Dan Gohman
1f0f2142cc
Fix -Wcast-qual warnings.
...
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Bill Wendling
929f3c0927
The JIT calls TidyLandingPads to tidy up the landing pads. However, because the
...
JIT doesn't use the MC back-end asm printer to emit labels that it uses, the
section for the MCSymbol is never set. And thus the MCSymbol for the EH label
isn't marked as "defined". Because of that, TidyLandingPads removes the needed
landing pads from the JIT output. This breaks EH for every JIT program.
This is a work-around for this limitation. We pass in the label locations
map. If the label has a non-zero value, then it was "emitted" by the JIT and
TidyLandingPads shouldn't remove that label.
A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely
upon the section being set to determine if it's defined or not.
llvm-svn: 101453
2010-04-16 08:46:10 +00:00
Dan Gohman
bcaf681cde
Add const qualifiers to CodeGen's use of LLVM IR constructs.
...
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Nicolas Geoffray
99bfbca6ec
Don't use DILocation when processing a DebugLoc.
...
llvm-svn: 101294
2010-04-14 22:06:37 +00:00
Benjamin Kramer
a6769269f3
Use twines to simplify calls to report_fatal_error. For code size and readability.
...
llvm-svn: 100756
2010-04-08 10:44:28 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Jeffrey Yasskin
7dd816097a
Fix OProfileJITEventListener build for new DebugLoc.
...
llvm-svn: 100461
2010-04-05 21:09:12 +00:00
Nicolas Geoffray
9b9dc4d4c6
CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
...
llvm-svn: 100328
2010-04-04 10:31:49 +00:00
Chris Lattner
915c5f9862
Switch the code generator (except the JIT) onto the new DebugLoc
...
representation. This eliminates the 'DILocation' MDNodes for
file/line/col tuples from -O0 -g codegen.
This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.
I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before. Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.
llvm-svn: 100209
2010-04-02 19:42:39 +00:00
Torok Edwin
921e80b1f5
Typo noticed by Duncan.
...
llvm-svn: 99918
2010-03-30 20:15:13 +00:00
Torok Edwin
cc1db61180
Don't overwrite previous value, if it succeeded.
...
llvm-svn: 99886
2010-03-30 12:52:03 +00:00
Torok Edwin
61b798a5ac
Honour addGlobalMapping() in the interpreter, if it was used to add mappings for
...
external Functions (the JIT does honour this).
llvm-svn: 99885
2010-03-30 12:31:58 +00:00
Jeffrey Yasskin
a4044332a9
Avoid leaking the memory allocated for GlobalVariables in the interpreter, by
...
freeing that memory when the GV is destroyed.
llvm-svn: 99706
2010-03-27 04:53:56 +00:00
Jeffrey Yasskin
bfd38abbed
Avoid leaking argv and env arrays from lli.
...
llvm-svn: 99589
2010-03-26 00:59:12 +00:00
Jeffrey Yasskin
7d83d9b23c
Avoid a memory leak in JITDebugRegisterer.
...
llvm-svn: 98612
2010-03-16 05:54:54 +00:00
Chris Lattner
f1c2b9d3b1
fix these two get the mcsymbol operand instead of imm operand.
...
llvm-svn: 98487
2010-03-14 08:28:48 +00:00
Chris Lattner
d5e8d9f29a
Now that DBG_LABEL is updated, we can finally make MachineMove
...
contain an MCSymbol instead of a label index.
llvm-svn: 98482
2010-03-14 08:12:40 +00:00
Chris Lattner
34adc8d225
change EH related stuff (other than EH_LABEL) to use MCSymbol
...
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.
Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(
One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.
llvm-svn: 98459
2010-03-14 01:41:15 +00:00
Richard Osborne
6d3e92dfee
Add a new jump table encoding to indicate jump tables entries
...
are inside the function by the target at the point of use.
llvm-svn: 98255
2010-03-11 14:58:16 +00:00
Chris Lattner
c3b70f636f
strength reduce MMI::MappedLabel to MMI::isLabelDeleted,
...
and add a FIXME about how we are eventually going to zap this
lookup table once mc world domination is complete.
llvm-svn: 98031
2010-03-09 01:51:43 +00:00
Jeffrey Yasskin
c3b7d1edfa
Fix PR6360. It's easy for a stub's address to escape to user code, so we can't
...
just count references to it from JIT output to decide when to destroy it. This
patch waits to destroy the JIT's memory of a stub until the Function it refers
to is destroyed. External function stubs and GVIndirectSyms aren't destroyed
until the JIT itself is.
llvm-svn: 97737
2010-03-04 19:45:09 +00:00
Jeffrey Yasskin
391aad6327
Fix PR5291, in which a SmallPtrSet iterator was held across an insertion into
...
the set.
llvm-svn: 97720
2010-03-04 06:50:01 +00:00
Jeffrey Yasskin
950e0fba8e
Make sure JITResolvers don't leave any stubs behind. When a JITResolver was
...
destroyed, it could leave stubs in the StubToResolverMap, which would confuse
the lookup for subsequent lazy compilations.
llvm-svn: 97698
2010-03-04 00:32:33 +00:00
Erick Tryzelaar
ad0e0cb0df
Add Module functions in place of module providers.
...
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Duncan Sands
19d0b47b1f
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Bill Wendling
1776295bf1
Apply patch from http://llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 is
...
finished.
llvm-svn: 96304
2010-02-16 00:58:02 +00:00
Duncan Sands
9dff9bec31
Uniformize the names of type predicates: rather than having isFloatTy and
...
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Jeffrey Yasskin
2d36eb6e18
Make JIT::runFunction clean up the generated stub function.
...
Patch by Shivram K!
llvm-svn: 96037
2010-02-12 23:05:31 +00:00