1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

1061 Commits

Author SHA1 Message Date
Chris Lattner
7c16f1a16e 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
65ad913bec remove the JIT "NeedsExactSize" feature and supporting logic.
llvm-svn: 109167
2010-07-22 21:17:55 +00:00
Duncan Sands
d4fcfc6539 Fix indentation.
llvm-svn: 108691
2010-07-19 09:36:45 +00:00
Duncan Sands
dcdd9f3a78 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
a0458f78a8 Get rid of a bunch of duplicated ELF enum values.
llvm-svn: 108520
2010-07-16 07:53:29 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner
bb04e40482 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
7bd41176cc 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
6e63336eb4 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
153ad3b903 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
11b3613649 Fix an ancient FIXME.
llvm-svn: 102827
2010-05-01 02:43:10 +00:00
Jeffrey Yasskin
db377e2f86 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
3592f4fac4 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
19aefaac85 Formatting changes. No functionality change.
llvm-svn: 101685
2010-04-18 00:52:08 +00:00
Dan Gohman
fba34ef042 Fix -Wcast-qual warnings.
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Bill Wendling
7ede9396f4 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
0e0b8cf9fd Add const qualifiers to CodeGen's use of LLVM IR constructs.
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Nicolas Geoffray
8e94bbf2e1 Don't use DILocation when processing a DebugLoc.
llvm-svn: 101294
2010-04-14 22:06:37 +00:00
Benjamin Kramer
0fb23008bb 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
80b41881bc rename llvm::llvm_report_error -> llvm::report_fatal_error
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Jeffrey Yasskin
39cdeee4c3 Fix OProfileJITEventListener build for new DebugLoc.
llvm-svn: 100461
2010-04-05 21:09:12 +00:00
Nicolas Geoffray
be623e86f8 CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
llvm-svn: 100328
2010-04-04 10:31:49 +00:00
Chris Lattner
305c84b8ee 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
8b6e668f35 Typo noticed by Duncan.
llvm-svn: 99918
2010-03-30 20:15:13 +00:00
Torok Edwin
b2d59bc592 Don't overwrite previous value, if it succeeded.
llvm-svn: 99886
2010-03-30 12:52:03 +00:00
Torok Edwin
6509d58fd5 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
7378e4ce11 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
289846d250 Avoid leaking argv and env arrays from lli.
llvm-svn: 99589
2010-03-26 00:59:12 +00:00
Jeffrey Yasskin
4eb3242b81 Avoid a memory leak in JITDebugRegisterer.
llvm-svn: 98612
2010-03-16 05:54:54 +00:00
Chris Lattner
e939096a3b fix these two get the mcsymbol operand instead of imm operand.
llvm-svn: 98487
2010-03-14 08:28:48 +00:00
Chris Lattner
23ec7363b8 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
149cf816bb 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
9c71a0a5ba 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
d4ce7a73e8 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
d12b6277e8 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
14080c578d 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
15b3688e56 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
66bf49241f Add Module functions in place of module providers.
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Duncan Sands
1b33dd3c83 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
7734240a2a 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
2acaf3609c 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
72e77cf286 Make JIT::runFunction clean up the generated stub function.
Patch by Shivram K!

llvm-svn: 96037
2010-02-12 23:05:31 +00:00
Jeffrey Yasskin
8a1ee8f852 Make it possible to create multiple JIT instances at the same time, by removing
the global TheJIT and TheJITResolver variables.  Lazy compilation is supported
by a global map from a stub address to the JITResolver that knows how to
compile it.

Patch by Olivier Meurant!

llvm-svn: 95837
2010-02-11 01:07:39 +00:00
Dan Gohman
92b6122204 Fix "the the" and similar typos.
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Jeffrey Yasskin
1604115c5a Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions.  This patch passes them through the EngineBuilder into
JIT::selectTarget().

llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Jeffrey Yasskin
92abe5abcc r94686 changed all ModuleProvider parameters to Modules, which made the
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params).  Fixed
by removing the 1-argument create().  Fixes PR6221.

llvm-svn: 95236
2010-02-03 19:18:04 +00:00
Benjamin Kramer
3b01285b76 Replace strcpy with memcpy when we have the length around anyway.
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Jeffrey Yasskin
fb10587e50 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.

llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Chris Lattner
5ee5b62838 Add support for target-specific 32-bit custom-lowered
jump table entries.

llvm-svn: 94505
2010-01-26 04:05:28 +00:00
Chris Lattner
643adc5090 make jit jump table emission be based on the EntryKind instead of magic variables.
JITInfo::getPICJumpTableEntry can probably be removed now, but I don't plan to do 
this.

llvm-svn: 94501
2010-01-26 03:47:15 +00:00