Commit Graph

187 Commits

Author SHA1 Message Date
Daniel Dunbar
460f656475 Remove Value::getName{Start,End}, the last of the old Name APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 09:48:23 +00:00
Daniel Dunbar
a5881e3060 Add TargetRegistry::lookupTarget.
- This is a simplified mechanism which just looks up a target based on the
   target triple, with a few additional flags.

 - Remove getClosestStaticTargetForModule, the moral equivalent is now:
     lookupTarget(Mod->getTargetTriple, true, false, ...);

 - This no longer does the fuzzy matching with target data (based on endianness
   and pointer width) that getClosestStaticTargetForModule was doing, but this
   was deemed unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:12:58 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00
Daniel Dunbar
3d5126fbad Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:33:09 +00:00
Dan Gohman
ac95cc79ac Convert more tools code from cerr and cout to errs() and outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:30:09 +00:00
Daniel Dunbar
ff9834ab9d Kill off last uses of TargetMachineRegistry class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:41:19 +00:00
Daniel Dunbar
51b198af83 Reapply TargetRegistry refactoring commits.
--- Reverse-merging r75799 into '.':
 U   test/Analysis/PointerTracking
U    include/llvm/Target/TargetMachineRegistry.h
U    include/llvm/Target/TargetMachine.h
U    include/llvm/Target/TargetRegistry.h
U    include/llvm/Target/TargetSelect.h
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp
U    tools/llc/llc.cpp
U    lib/Target/PowerPC/PPCTargetMachine.h
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/PowerPC/PPCTargetMachine.cpp
U    lib/Target/PowerPC/PPC.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/ARMTargetMachine.h
U    lib/Target/ARM/ARM.h
U    lib/Target/XCore/XCoreTargetMachine.cpp
U    lib/Target/XCore/XCoreTargetMachine.h
U    lib/Target/PIC16/PIC16TargetMachine.cpp
U    lib/Target/PIC16/PIC16TargetMachine.h
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/Alpha/AlphaTargetMachine.cpp
U    lib/Target/Alpha/AlphaTargetMachine.h
U    lib/Target/X86/X86TargetMachine.h
U    lib/Target/X86/X86.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U    lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U    lib/Target/X86/X86TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.h
U    lib/Target/CppBackend/CPPTargetMachine.h
U    lib/Target/CppBackend/CPPBackend.cpp
U    lib/Target/CBackend/CTargetMachine.h
U    lib/Target/CBackend/CBackend.cpp
U    lib/Target/TargetMachine.cpp
U    lib/Target/IA64/IA64TargetMachine.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/IA64/IA64TargetMachine.h
U    lib/Target/IA64/IA64.h
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.h
U    lib/Target/CellSPU/SPU.h
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
U    lib/Target/Mips/MipsTargetMachine.cpp
U    lib/Target/Mips/MipsTargetMachine.h
U    lib/Target/Mips/Mips.h
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Sparc/SparcTargetMachine.cpp
U    lib/Target/Sparc/SparcTargetMachine.h
U    lib/ExecutionEngine/JIT/TargetSelect.cpp
U    lib/Support/TargetRegistry.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 20:24:03 +00:00
Dan Gohman
a1bdcedc38 Add a Force option to raw_fd_ostream to specify whether opening
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Stuart Hastings
2286f8dc4c Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:27:11 +00:00
Daniel Dunbar
dec9803b69 Switch some obvious clients to using the new TargetRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:05:03 +00:00
David Greene
71847813bc Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:18:05 +00:00
Chris Lattner
b8158acc23 Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:17:16 +00:00
Daniel Dunbar
1f316e321a Revert r7561{9,8,7,6}, which depend on r75610.
--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 16:25:11 +00:00
Chris Lattner
b5851462d0 rename getValueName -> getMangledName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:19:07 +00:00
Owen Anderson
1ca29d318a As Chris pointed out, this doesn't actually need an LLVMContext to operate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:27:19 +00:00
Owen Anderson
0a5372ed3e Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Nick Lewycky
485ded0db7 Don't create undefined symbols for aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:03:04 +00:00
Bruno Cardoso Lopes
ac57e6e498 Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 05:09:34 +00:00
Duncan Sands
d44d4bf04b Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 15:38:01 +00:00
Owen Anderson
0e7a54672c Maintain the old LTO API, by using the global context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:31:14 +00:00
John Mosby
1bc1e6407f fix ld error with -no-undefined switch, which is undefined on darwin8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:10:23 +00:00
Owen Anderson
4434ed44c4 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Evan Cheng
855a168dbe Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 06:57:16 +00:00
Chris Lattner
929a49356e remove dead makefile flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 05:29:56 +00:00
Bob Wilson
75d6ffd53f Recognize and handle ARM v7 target triples for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 18:01:28 +00:00
Chris Lattner
2deb58f72e switch to using llvm/Target/TargetSelect.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 16:42:19 +00:00
Nick Lewycky
8189d40a8d Fix libLTO by #include'ing the initializers for all targets and all asm
printers.

While I'm here, alphabetize.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 06:52:10 +00:00
Rafael Espindola
f403cd7838 Bug fix:
string::find returns string::npos if the substring is not found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-09 21:14:25 +00:00
Nick Kledzik
d8b4711a16 <rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:14:08 +00:00
Nick Kledzik
cbad586240 <rdar://problem/6940611> libLTO.dylib needs to let linker specify path to assembler
Add lto_codegen_set_assembler_path() API which allows the linker to specify the
path to the assembler tool to run.  When assembler is used (instead of compiler)
different command line options are used.
Add LTO_API_VERSION #define so clients (linkers) can conditionalize use of new APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 00:28:45 +00:00
Nick Kledzik
f5a1c35f1b <rdar://problem/6941517> C++ static constructors not preserved for static executable using LTO
Move setRelocationModel() to be called before TargetMachine is instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 22:52:12 +00:00
Daniel Dunbar
e0f0e0be1c Change LTO to run the global opt pass twice.
- This matches llvm-ld.

It took a bit of archeology to figure out what the right thing to do was
(whether this was intentionally added or intentionally removed). My final
conclusion is that Chris added this intentionally here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=16913
but the changes weren't propogated to llvm-ld until here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=34058
which was after lto.cpp had been cloned off (of llvm-ld), here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=29494

From the commit message, it looks like the motivation for running global opt
again is because we ran it prior to inlining. Based on that I updated the
comment and also only run the pass if we actually ran the inliner.

Chris, please review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:51:32 +00:00
Daniel Dunbar
006a034828 Add createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
- I know it sounds crazy, but I think all the pass lists are now coalesced into
   StandardPasses.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:06:14 +00:00
Nick Kledzik
4bdf73025a update comments about .objc_ symbols being generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 23:41:09 +00:00
Nick Kledzik
3eb445feb2 <rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Parse __OBJC data structures and synthesize magic .objc_ symbols.
Also, alter mangler so that objc method names are readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 20:33:09 +00:00
Evan Cheng
63d6f324ca Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 00:48:34 +00:00
Nick Lewycky
195bea3498 Allow a user of libLTO to specify the full pathname of the gcc executable to
run when assembling.

Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30 15:24:09 +00:00
Bill Wendling
b8cb0bb08c Remove LTO optimization level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 23:40:42 +00:00
Bill Wendling
98a366d547 Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 23:29:43 +00:00
Bill Wendling
a7e326b0a9 Don't use 'false' for 'fast isel' here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 21:22:00 +00:00
Rafael Espindola
7431af050f Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 16:55:21 +00:00
Evan Cheng
9f777c64c5 Recognize arm triplets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:54:56 +00:00
Nick Lewycky
dcd158af27 Force 'llvm-config' to go first, optionally followed by lto and gold mixed in
with the rest of the parallel directories.

Build lto when possible on all platforms. Make gold to explicitly depend on
libLTO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 07:56:49 +00:00
Nick Lewycky
677c2c2a62 Add the function attributes pass during LTO time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 06:56:16 +00:00
Nick Lewycky
a9183c8020 If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
off in libLTO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 07:41:55 +00:00
Devang Patel
38ed388fb3 Remove changes that were accidently included in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 22:45:18 +00:00
Devang Patel
13319ceffd The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 22:43:44 +00:00
Duncan Sands
535e3e8df9 Revert r64299: it breaks the build when configured
without --enable-pic, like my nightly tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 13:23:49 +00:00
Nick Lewycky
46dec95319 Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 08:44:13 +00:00
Devang Patel
ca70533d3d 62987 disables LTO build on darwin.
Revert 62987 for now. Nicolas please investigate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 02:34:33 +00:00
Nick Lewycky
b454eabe7f Correct strange whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 07:01:00 +00:00
Nick Lewycky
1281741311 Build libLTO on any platform so long as PIC is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26 03:04:57 +00:00
Bill Wendling
93d9ad567d Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-03 01:48:26 +00:00
Nick Lewycky
6e11687282 Remove warning about declaration does not declare anything. This class was
already declared in the other headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60261 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 00:36:34 +00:00
Nick Lewycky
4fd40e884c Add protected visibility to libLTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-29 22:49:59 +00:00
Daniel Dunbar
0d9eb9b491 Add Binary flag to raw_fd_ostream constructor.
Document raw_fd_ostream's treatment of "-".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59219 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 05:01:07 +00:00
Devang Patel
f75e78900c On darwin, 32-bit x86 target is i386-apple-darwin...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:13:50 +00:00
Dan Gohman
ed3e8b4ed2 Don't silently ignore errors when opening output streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 15:33:45 +00:00
Owen Anderson
cb37188323 Use raw_ostream throughout the AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 00:14:44 +00:00
Owen Anderson
3688f268cb Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-15 21:31:02 +00:00
Nick Kledzik
db6535dd20 tentative definitions are default visibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 00:58:07 +00:00
Devang Patel
5a7fb69ac2 typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:47:27 +00:00
Devang Patel
413907000e Name string length is end position marker - begin position marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 19:49:09 +00:00
Devang Patel
c2aec57c63 Do not forget global definitions from inline asm code block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 18:06:52 +00:00
Devang Patel
f0d286b77f LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53580 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 00:00:11 +00:00
Nick Kledzik
920ae9863b fix dangling pointer and argv off by one errors. Add support for --disable-inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 21:14:10 +00:00
Nick Kledzik
82eec45b00 add _lto_codegen_debug_options so that linker can use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 23:24:06 +00:00
Devang Patel
a93ae711a9 Provide a hook to set the code generation debug options to investigate lto failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 22:53:14 +00:00
Devang Patel
ebd69421a2 Rename new lto2 tool as lto.
lto2->lto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:15:01 +00:00
Devang Patel
5eabc9d4f6 Remove old LTO interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:04:55 +00:00
Dale Johannesen
7d5633e907 Add CommonLinkage to lto (treated same as weak AFAICT)
and llvm-nm (prints as C).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 22:44:18 +00:00
Owen Anderson
d2368dc344 Move MemCpyOpt after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 07:12:26 +00:00
Owen Anderson
ecbc963eda Add MemCpyOpt to LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 03:57:36 +00:00
Owen Anderson
eb60fb9c1f Use GVN in LTO instead of GCSE+LoadVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 07:51:07 +00:00
Dale Johannesen
dedf502fba Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:10:52 +00:00
Devang Patel
5252ae6eca Begin setting features for target based on target triple string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07 22:32:50 +00:00
Devang Patel
0e50128099 Do not set time out, lets assume assembler will do its job in reasonable amount of time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46718 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 21:16:10 +00:00
Devang Patel
bc9ed593d7 Do not strip symbols when EH is ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02 01:32:38 +00:00
Devang Patel
59c8d8ae89 Supply appropriate arch info to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:19:31 +00:00
Devang Patel
21b70b237d Enable exception handling if it is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 17:43:03 +00:00
Devang Patel
5e563c3264 - Introduces versioning macro LLVM_LTO_VERSION
- Communicate symbol visibility
- Communicate code generation model


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 23:52:34 +00:00
Chris Lattner
21c62da287 remove attributions from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Devang Patel
fe085f3fde Revert my previous check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 01:46:01 +00:00
Devang Patel
e3611871cb Add lto version check mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45238 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 00:24:01 +00:00
Gordon Henriksen
4b2b9402c5 Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:28:48 +00:00
Reid Spencer
cbb7ec7396 Fix a sys::Path API error caught by a gcc 4.2 warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-18 05:27:33 +00:00
Gabor Greif
a99be51bf5 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:07:56 +00:00
Chris Lattner
744879ea01 switch tools to bitcode from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:32:02 +00:00
Chris Lattner
68d4922adf bitcodify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:49:55 +00:00
Devang Patel
54959d6cf6 Now LICM is a LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 04:41:30 +00:00
Anton Korobeynikov
9ba8a76f8b Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 19:11:07 +00:00
Bill Wendling
62062b59df Avoid assert() in lto. Let linker handle all failures. Use LTO_WRITE_FAILURE
instead of LTO_UNKNOWN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:48:28 +00:00
Bill Wendling
546d0fbd97 The new version of how to add passes to emit files. We explicitly call a
function to add the file writers between calls to add the passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:41:07 +00:00
Reid Spencer
ef9b9a7939 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Devang Patel
3281528de4 Add printVersion(). Linker can use it to print LLVM version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:46:06 +00:00
Devang Patel
897b1b58af Include Makefile.config before testing OS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:18:57 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00