Commit Graph

207 Commits

Author SHA1 Message Date
Rafael Espindola a8a74ece08 Record sysbols created by aliases. Fixes PR8414.
llvm-svn: 116910
2010-10-20 04:57:22 +00:00
Daniel Dunbar ef47b66d52 lto: Respect LLVM_VERSION_INFO make variable, since setting CC arguments with
spaces gives tests fits and shell escaping is an art best left to jabberwockies.

llvm-svn: 116632
2010-10-15 22:46:15 +00:00
Dan Gohman a6769bb993 This file needs ToolOutputFile.h too.
llvm-svn: 115976
2010-10-07 20:48:46 +00:00
Bill Wendling 0198ce06fc Provide a fast "get me the target triple from the module" API. This can
drastically reduce the linking time during LTO.

Patch by Shantonu Sen!

llvm-svn: 115728
2010-10-06 01:22:42 +00:00
Bill Wendling dcd7c2b833 Add a new scope type "LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN" for the
"linker_private_weak_auto_def" linkage type for LTO.

llvm-svn: 114868
2010-09-27 20:17:45 +00:00
Bill Wendling 2776d465ee The "linker_private_weak*" linkages should set the LTO_SYMBOL_DEFINITION_WEAK
during LTO.

llvm-svn: 114850
2010-09-27 18:05:19 +00:00
Dan Gohman a2233f2801 Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.

llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Devang Patel 7b888fbd91 Fix prototypes.
llvm-svn: 112200
2010-08-26 17:47:45 +00:00
Dan Gohman 74328ab826 lto_codegen_set_gcc_path was removed.
llvm-svn: 112069
2010-08-25 18:37:04 +00:00
Dan Gohman c894a7f942 Fix a few missing entries in lto.exports.
llvm-svn: 112068
2010-08-25 18:22:12 +00:00
Dan Gohman 8525fe7155 Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.

llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Rafael Espindola ccab1dddd1 Make it possible to set the cpu used for codegen.
llvm-svn: 110759
2010-08-11 00:15:13 +00:00
Daniel Dunbar a8272596bc lto: Fix an inverted conditional which prevented the addition of symbols scraped
from inline assembly, except in cases where they had already been seen (in which
case they would get added twice).
 - I can't see how this ever worked...

llvm-svn: 110757
2010-08-11 00:11:19 +00:00
Daniel Dunbar 4493c7e550 lto: Fix gratuitous memory leaks.
llvm-svn: 110756
2010-08-11 00:11:17 +00:00
Daniel Dunbar 919660b2ed lto: Reduce nesting.
llvm-svn: 110752
2010-08-10 23:46:46 +00:00
Daniel Dunbar 5657e7b667 LTOModule.cpp: Fix numerous style issues.
llvm-svn: 110751
2010-08-10 23:46:39 +00:00
Rafael Espindola 0045646633 Make it possible to set the flags passed to the assembler.
Nick, please review.

llvm-svn: 110705
2010-08-10 18:55:09 +00:00
Rafael Espindola 4ef89f5200 Make it possible to set the target triple and expose that with an option in the
gold plugin.

llvm-svn: 110604
2010-08-09 21:09:46 +00:00
Daniel Dunbar 40842fa2ee build: Don't pass -avoid-version or -no-undefined on Darwin, they don't do
anything.

llvm-svn: 109957
2010-07-31 21:32:56 +00:00
Daniel Dunbar bdb298912b build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version.

llvm-svn: 108495
2010-07-16 01:41:38 +00:00
Dan Gohman 6debf89587 Eliminate some unnessary Path::exists() calls.
llvm-svn: 104888
2010-05-27 20:51:54 +00:00
Dan Gohman ab366f055a When handling raw_ostream errors manually, use clear_error() so that
raw_ostream doesn't try to do its own error handling.

Also, close the raw_ostream before checking for errors so that any
errors that occur during closing are caught by the manual check.

llvm-svn: 104882
2010-05-27 20:19:47 +00:00
Bill Wendling a12c1ff25a The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
string of features for that target. However LTO was using that string to pass
into the "create target machine" stuff. That stuff needed the feature string to
be in a particular form. In particular, it needed the CPU specified first and
then the attributes. If there isn't a CPU specified, it required it to be blank
-- e.g., ",+altivec". Yuck.

Modify the getDefaultSubtargetFeatures method to be a non-static member
function. For all attributes for a specific subtarget, it will add them in like
normal. It will also take a CPU string so that it can satisfy this horrible
syntax.

llvm-svn: 103451
2010-05-11 00:30:02 +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
Bill Wendling 633c48ec1d r98363 deleted a '!' when cleaning up whitespace. This caused globals which are
*not* declarations to *not* be placed in the "preserve" list.
<rdar://problem/7870735>

llvm-svn: 102405
2010-04-27 00:55:25 +00:00
Dan Gohman 7a0fde90f5 Fix more -Wcast-qual warnings.
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman ff9ecb2824 Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.

llvm-svn: 101414
2010-04-15 23:08:00 +00:00
Dan Gohman 473a53f7b1 Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.

llvm-svn: 101399
2010-04-15 20:54:25 +00:00
Chris Lattner 0e45d24a4e stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.

llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Dan Gohman 8e404fe769 Trim #includes.
llvm-svn: 99416
2010-03-24 19:56:17 +00:00
Chris Lattner c7b46f9d9c give Mangler access to TargetData.
llvm-svn: 98378
2010-03-12 20:47:28 +00:00
Chris Lattner 2eff505fba make the mangler take an MCContext instead of an MAI.
No functionality change.

llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner edcf065a29 change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.

llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Chris Lattner 919b97436e Remove a bunch of stuff around the edges of the ELF writer.
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(

llvm-svn: 95148
2010-02-02 22:31:11 +00:00
Chris Lattner f0cb12acf2 eliminate FileModel::Model, just use CodeGenFileType. The client
of the code generator shouldn't care what object format a target
uses.

llvm-svn: 95124
2010-02-02 21:06:45 +00:00
Chris Lattner 03dc0f7077 eliminate all forms of addPassesToEmitMachineCode except
the one used by the JIT.  Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator.  Inline the remaining version of
addPassesToEmitFileFinish into its only caller.

llvm-svn: 95109
2010-02-02 19:14:27 +00:00
Chris Lattner 57992e2da6 remove dead code, we're requesting TargetMachine::AssemblyFile here.
llvm-svn: 95105
2010-02-02 19:03:39 +00:00
Jeffrey Yasskin 091217be6f 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 823aed16f9 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner 7ba0661f27 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner b4ffc894e6 now that mangler is in libtarget, it can use MCAsmInfo instead of clients
having to pass various fields from it in.  Simplify.

llvm-svn: 93686
2010-01-17 18:22:35 +00:00
Chris Lattner f62e3ee8c5 move the mangler into libtarget from vmcore.
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner 2ce863be1c remove calls to dead methods.
llvm-svn: 93657
2010-01-16 21:20:34 +00:00
Chris Lattner 46d3a102da remove use of getMangledName.
llvm-svn: 93655
2010-01-16 20:56:05 +00:00
Chris Lattner 9787fd0468 switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Nate Begeman d232150b83 Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer

Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.

llvm-svn: 93527
2010-01-15 18:51:18 +00:00
Benjamin Kramer c6fe3c3273 Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple
  separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
  same behaviour as getToken.

llvm-svn: 93161
2010-01-11 18:03:24 +00:00
Douglas Gregor 66ffa50e6d Fix another -Wmismatched-tags warning
llvm-svn: 92017
2009-12-23 18:27:13 +00:00
Douglas Gregor 35ac67ff8e Fix struct/class mismatch for LTOModule and LTOCodeGenerator, detected by Clang
llvm-svn: 92004
2009-12-23 17:05:07 +00:00
Viktor Kutuzov 8981b3abe5 Rollback changes r89516: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
llvm-svn: 89893
2009-11-25 22:44:18 +00:00