aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge with LLVM upstream r155090.Shih-wei Liao2012-04-2417-1011/+831
|\ | | | | | | | | | | | | Conflicts: lib/Support/Unix/PathV2.inc Change-Id: I7b89833849f6cbcfa958a33a971d0f7754c9cb2c
| * Move the JIT flags from llc to lli. These flags showed up as part of movingNick Lewycky2012-04-182-26/+28
| | | | | | | | | | | | | | backend flags in TargetOptions.h into their own class in r145714. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154993 91177308-0d34-0410-b5e6-96231b3b80d8
| * allow opt to take a -mtriple optionJoe Groff2012-04-171-0/+7
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154959 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add -disassemble support for -show-inst and -show-encode capability llvm-mc. ↵Richard Barton2012-04-163-174/+80
| | | | | | | | | | | | | | | | | | Also refactor so all MC paraphernalia are created once for all uses as much as possible. The test change is to account for the fact that the default disassembler behaviour has changed with regards to specifying the assembly syntax to use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154809 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove lto_codegen_set_whole_program_optimization. It is a work in progress,Rafael Espindola2012-04-164-12/+5
| | | | | | | | | | | | | | | | | | so we don't want it to show up in the stable 3.1 interface. While at it, add a comment about why LTOCodeGenerator manually creates the internalize pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154807 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make member variables of AsmToken private. Remove unnecessary forward ↵Craig Topper2012-04-151-0/+1
| | | | | | | | | | | | declarations. Remove an unnecessary include. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154775 91177308-0d34-0410-b5e6-96231b3b80d8
| * Do not convert between fp128 <-> ppc_fp128 since there is no legal cast ↵Nadav Rotem2012-04-151-9/+12
| | | | | | | | | | | | | | | | | | | | conversion between the two. Patch by nobled <nobled@dreamwidth.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154772 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix the build under Debian GNU/Hurd.Sylvestre Ledru2012-04-111-2/+2
| | | | | | | | | | | | | | | | Thanks to Pino Toscano for the patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500 91177308-0d34-0410-b5e6-96231b3b80d8
| * llvm-stress: stop abusing ConstantFP::get()Dylan Noblesmith2012-04-101-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConstantFP::get(Type*, double) is unreliably host-specific: it can't handle a type like PPC128 on an x86 host. It even has a comment to that effect: "This should only be used for simple constant values like 2.0/1.0 etc, that are known-valid both as host double and as the target format." Instead, use APFloat. While we're at it, randomize the floating point value more thoroughly; it was previously limited to the range 0 to 2**19 - 1. PR12451. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154446 91177308-0d34-0410-b5e6-96231b3b80d8
| * llvm-stress: don't make vectors of x86_mmx typeDylan Noblesmith2012-04-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | LangRef.html says: "There are no arrays, vectors or constants of this type." This was hitting assertions when passing the -generate-x86-mmx option. PR12452. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154445 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert the 'EnableInitializing' flag. There is debate on whether we should ↵Bill Wendling2012-04-091-11/+0
| | | | | | | | | | | | run that pass by default in LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154356 91177308-0d34-0410-b5e6-96231b3b80d8
| * Apply the scope restrictions after parsing the command line options. There ↵Bill Wendling2012-04-091-3/+3
| | | | | | | | | | | | may be some which are used in that function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154348 91177308-0d34-0410-b5e6-96231b3b80d8
| * s/lto_codegen_whole_program_optimization/lto_codegen_set_whole_program_optim ↵Bill Wendling2012-04-092-4/+4
| | | | | | | | | | | | ization/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154312 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a hook to turn on the internalize pass through the LTO interface.Bill Wendling2012-04-094-2/+13
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154306 91177308-0d34-0410-b5e6-96231b3b80d8
| * Teach LLVM about a PIE option which, when enabled on top of PIC, makesChandler Carruth2012-04-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizations which are valid for position independent code being linked into a single executable, but not for such code being linked into a shared library. I discussed the design of this with Eric Christopher, and the decision was to support an optional bit rather than a completely separate relocation model. Fundamentally, this is still PIC relocation, its just that certain optimizations are only valid under a PIC relocation model when the resulting code won't be in a shared library. The simplest path to here is to expose a single bit option in the TargetOptions. If folks have different/better designs, I'm all ears. =] I've included the first optimization based upon this: changing TLS models to the *Exec models when PIE is enabled. This is the LLVM component of PR12380 and is all of the hard work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154294 91177308-0d34-0410-b5e6-96231b3b80d8
| * The internalize pass can be dangerous for LTO.Bill Wendling2012-04-051-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following program: $ cat main.c void foo(void) { } int main(int argc, char *argv[]) { foo(); return 0; } $ cat bundle.c extern void foo(void); void bar(void) { foo(); } $ clang -o main main.c $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main $ nm -m bundle.so 0000000000000f40 (__TEXT,__text) external _bar (undefined) external _foo (from executable) (undefined) external dyld_stub_binder (from libSystem) $ clang -o main main.c -O4 $ clang -o bundle.so bundle.c -bundle -bundle_loader ./main Undefined symbols for architecture x86_64: "_foo", referenced from: _bar in bundle-elQN6d.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) The linker was told that the 'foo' in 'main' was 'internal' and had no uses, so it was dead stripped. Another situation is something like: define void @foo() { ret void } define void @bar() { call asm volatile "call _foo" ... ret void } The only use of 'foo' is inside of an inline ASM call. Since we don't look inside those for uses of functions, we don't specify this as a "use." Get around this by not invoking the 'internalize' pass by default. This is an admitted hack for LTO correctness. <rdar://problem/11185386> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154124 91177308-0d34-0410-b5e6-96231b3b80d8
| * Set soname for FreeBSD as well.Anton Korobeynikov2012-04-031-2/+2
| | | | | | | | | | | | | | Patch by Bernard Cafarelli! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153965 91177308-0d34-0410-b5e6-96231b3b80d8
| * Reformatting. No functionality change.Bill Wendling2012-04-031-18/+19
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153928 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add an option to turn off the expensive GVN load PRE part of GVN.Bill Wendling2012-04-021-1/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153902 91177308-0d34-0410-b5e6-96231b3b80d8
| * Hack the hack. If we have a situation where an ASM object is defined but isn'tBill Wendling2012-04-022-23/+17
| | | | | | | | | | | | | | | | | | | | | | reflected in the LLVM IR (as a declare or something), then treat it like a data object. N.B. This isn't 100% correct. The ASM parser should supply more information so that we know what type of object it is, and what attributes it should have. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153870 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make MCInstrInfo available to the MCInstPrinter. This will be used to remove ↵Craig Topper2012-04-024-7/+23
| | | | | | | | | | | | getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153860 91177308-0d34-0410-b5e6-96231b3b80d8
| * It could come about that we parse the inline ASM before we get a potentialBill Wendling2012-04-022-0/+27
| | | | | | | | | | | | | | | | definition for it. In that case, we want to wait for the potential definition before we create a symbol for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153859 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move trivial functions into the class definition.Bill Wendling2012-03-312-10/+7
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153810 91177308-0d34-0410-b5e6-96231b3b80d8
| * Trim headers.Bill Wendling2012-03-311-7/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153809 91177308-0d34-0410-b5e6-96231b3b80d8
| * Indent according to LLVM's style guide.Bill Wendling2012-03-311-130/+121
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153808 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup whitespace and trim some of the #includes.Bill Wendling2012-03-314-60/+54
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153807 91177308-0d34-0410-b5e6-96231b3b80d8
| * These strings aren't 'const char *' but 'char *'.Bill Wendling2012-03-312-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153805 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup whitespace.Bill Wendling2012-03-311-17/+17
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153804 91177308-0d34-0410-b5e6-96231b3b80d8
| * Free the codegen options when deleting LTO code generator object.Bill Wendling2012-03-311-26/+21
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153803 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup whitespace and remove unneeded 'extern' keyword on function definitions.Bill Wendling2012-03-311-11/+10
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153802 91177308-0d34-0410-b5e6-96231b3b80d8
| * * Set the scope attributes for the ASM symbol we added to be the value passedBill Wendling2012-03-301-14/+18
| | | | | | | | | | | | | | | | into the function. * Reorder some header files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153783 91177308-0d34-0410-b5e6-96231b3b80d8
| * Re-factored RuntimeDyLd:Danil Malyshev2012-03-301-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The main works will made in the RuntimeDyLdImpl with uses the ObjectFile class. RuntimeDyLdMachO and RuntimeDyLdELF now only parses relocations and resolve it. This is allows to make improvements of the RuntimeDyLd more easily. In addition the support for COFF can be easily added. 2. Added ARM relocations to RuntimeDyLdELF. 3. Added support for stub functions for the ARM, allowing to do a long branch. 4. Added support for external functions that are not loaded from the object files, but can be loaded from external libraries. Now MCJIT can correctly execute the code containing the printf, putc, and etc. 5. The sections emitted instead functions, thanks Jim Grosbach. MemoryManager.startFunctionBody() and MemoryManager.endFunctionBody() have been removed. 6. MCJITMemoryManager.allocateDataSection() and MCJITMemoryManager. allocateCodeSection() used JMM->allocateSpace() instead of JMM->allocateCodeSection() and JMM->allocateDataSection(), because I got an error: "Cannot allocate an allocated block!" with object file contains more than one code or data sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153754 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup whitespace. Doxygenize comments. And indent to llvm coding standards.Bill Wendling2012-03-301-214/+119
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153740 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r153694. It was causing failures in the buildbots.Bill Wendling2012-03-291-0/+16
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153701 91177308-0d34-0410-b5e6-96231b3b80d8
| * Re-factored RuntimeDyld.Danil Malyshev2012-03-291-16/+0
| | | | | | | | | | | | Added ExecutionEngine/MCJIT tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153694 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make some headway towards compiling all of LLVM.Bill Wendling2012-03-292-36/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module-level ASM may contain definitions of functions and globals. However, we were not telling the linker that these globals had definitions. As far as it was concerned, they were just declarations. Attempt to resolve this by inserting module-level ASM functions and globals into the '_symbol' set so that the linker will know that they have values. This gets us further towards our goal of compiling LLVM, but it still has problems when linking libLTO.dylib because of the `-dead_strip' flag that's passed to the linker. <rdar://problem/11124216> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153638 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup whitespace.Bill Wendling2012-03-291-15/+12
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153634 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cache the end() iterator.Bill Wendling2012-03-291-3/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153632 91177308-0d34-0410-b5e6-96231b3b80d8
| * Cleanup some whitespaces.Bill Wendling2012-03-282-136/+132
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153612 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager.Danil Malyshev2012-03-281-0/+6
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153607 91177308-0d34-0410-b5e6-96231b3b80d8
| * Inline function into its one caller.Bill Wendling2012-03-281-7/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153598 91177308-0d34-0410-b5e6-96231b3b80d8
| * Reformat the LTOModule code to be more inline with LLVM's coding standards. AddBill Wendling2012-03-282-105/+170
| | | | | | | | | | | | | | a bunch of comments for the various functions. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153595 91177308-0d34-0410-b5e6-96231b3b80d8
| * Some whitespace cleanup.Bill Wendling2012-03-281-19/+14
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153567 91177308-0d34-0410-b5e6-96231b3b80d8
| * Include cctype for std::isprint.Benjamin Kramer2012-03-231-0/+1
| | | | | | | | | | | | This should unbreak the msvc build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153329 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add soname to LLVM shared library on Linux. Probably the same stuff is ↵Anton Korobeynikov2012-03-231-0/+2
| | | | | | | | | | | | | | | | | | necessary for *BSD. Patch from Mageia! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153324 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove the C backend.Eric Christopher2012-03-232-132/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153307 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert a series of commits to MCJIT to get the build working in CMakeChandler Carruth2012-03-221-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (and hopefully on Windows). The bots have been down most of the day because of this, and it's not clear to me what all will be required to fix it. The commits started with r153205, then r153207, r153208, and r153221. The first commit seems to be the real culprit, but I couldn't revert a smaller number of patches. When resubmitting, r153207 and r153208 should be folded into r153205, they were simple build fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153241 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'upstream' into sliao_dShih-wei Liao2012-03-2411-98/+149
|\ \ | |/
| * Re-factored RuntimeDyld.Danil Malyshev2012-03-211-16/+0
| | | | | | | | | | | | Added ExecutionEngine/MCJIT tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153221 91177308-0d34-0410-b5e6-96231b3b80d8
| * git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153208 ↵Danil Malyshev2012-03-211-0/+6
| | | | | | | | 91177308-0d34-0410-b5e6-96231b3b80d8