Commit Graph

3909 Commits

Author SHA1 Message Date
Alexey Samsonov 9cb13d59b7 Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor.
llvm-svn: 167728
2012-11-12 14:25:36 +00:00
Alexander Potapenko 8c07f55568 [ASan] Add llvm-symbolizer from to tools/
This is the second and last (2/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.

llvm-svn: 167723
2012-11-12 11:33:29 +00:00
Eric Christopher 7c678de861 Add a relocation visitor to lib object. This works via caching relocated
values in a map that can be passed to consumers. Add a testcase that
ensures this works for llvm-dwarfdump.

llvm-svn: 167558
2012-11-07 23:22:07 +00:00
Bill Wendling 3fdaa244e1 Remove accidental commit.
llvm-svn: 167544
2012-11-07 18:39:32 +00:00
Bill Wendling f720bf64d4 Add comment describing what's going on here.
llvm-svn: 167525
2012-11-07 05:19:04 +00:00
Andrew Kaylor a714efc1bd Add a method to indicate section address re-assignment is finished.
Prior to this patch RuntimeDyld attempted to re-apply relocations every time reassignSectionAddress was called (via MCJIT::mapSectionAddress).  In addition to being inefficient and redundant, this led to a problem when a section was temporarily moved too far away from another section with a relative relocation referencing the section being moved.  To fix this, I'm adding a new method (finalizeObject) which the client can call to indicate that it is finished rearranging section addresses so the relocations can safely be applied.

llvm-svn: 167400
2012-11-05 20:57:16 +00:00
Jim Grosbach 2cce3f91f8 lli: Initialize the native asm parser for inline assembly.
MCJIT supports inline assembly, but requires the asm parser to do so.
Make sure to link it in and initialize it.

llvm-svn: 167392
2012-11-05 19:06:05 +00:00
Andrew Kaylor f2c10782ce Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.
Patch by Ashok Thirumurthi

llvm-svn: 167192
2012-11-01 00:46:04 +00:00
Andrew Kaylor 8565e50ad4 Fixed format strings to avoid pointer truncation during 64-bit debugging.
llvm-svn: 167185
2012-11-01 00:17:11 +00:00
Jim Grosbach acd8801e25 MC: Simple example parser for MC assembly markup.
Nothing fancy, just a simple demonstration parser.

llvm-svn: 167181
2012-10-31 23:24:13 +00:00
Andrew Kaylor 66ebd33bd3 Mark code, not data, as executable in lli RemoteTarget simulator.
llvm-svn: 167164
2012-10-31 20:37:14 +00:00
Tim Northover 3643a8f8eb Align the data section correctly when loading an ELF file.
Patch by Amara Emerson.

llvm-svn: 166920
2012-10-29 10:47:07 +00:00
Rafael Espindola 7043858a5b Add -alias and -ralias options to match what we have for functions and
globals.

llvm-svn: 166909
2012-10-29 02:23:07 +00:00
Joerg Sonnenberger 4a0f7becd8 Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

llvm-svn: 166767
2012-10-26 10:49:15 +00:00
Rafael Espindola a339e47689 libLTO has a bug in that it will keep every symbol if none is needed. We used
to hack around this in the gold plugin by deleting a module if no symbol was
needed. Unfortunately, the hack is wrong in the case of o module having no
visible symbols but still having side effects via static constructors.

The bug will have to be fixed in libLTO itself.

llvm-svn: 166745
2012-10-26 00:29:57 +00:00
Nadav Rotem 18d0635339 Opt does not need to initialize the Asm printer/parser
llvm-svn: 166602
2012-10-24 17:55:53 +00:00
Nadav Rotem ac9a344915 Opt needs to initialize the different targets.
llvm-svn: 166595
2012-10-24 17:23:50 +00:00
Kevin Enderby 62183c4e18 Add support for annotated disassembly output for X86 and arm.
Per the October 12, 2012 Proposal for annotated disassembly output sent out by
Jim Grosbach this set of changes implements this for X86 and arm.  The llvm-mc
tool now has a -mdis option to produced the marked up disassembly and a couple
of small example test cases have been added.

rdar://11764962

llvm-svn: 166445
2012-10-22 22:31:46 +00:00
Nadav Rotem 5dc203e8f4 Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
llvm-svn: 166248
2012-10-18 23:22:48 +00:00
Bob Wilson 3b8d7bc1e8 Revert "We need this symbol after an LTO build."
This reverts commit 165776.  The plug-in uses this symbol; it does not
define it.  It needs to be exported from bugpoint itself, not from the plug-in.

llvm-svn: 166207
2012-10-18 18:52:54 +00:00
Bob Wilson d6d9ccca38 Temporarily revert the TargetTransform changes.
The TargetTransform changes are breaking LTO bootstraps of clang.  I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.

This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741

llvm-svn: 166168
2012-10-18 05:43:52 +00:00
Eric Christopher 3680f8826e Formatting and 80-col.
llvm-svn: 166075
2012-10-16 23:46:21 +00:00
Nadav Rotem 8be2a9adba LTO also needs to initialize the TargetTransform infrastructure.
llvm-svn: 165997
2012-10-15 22:50:02 +00:00
Bob Wilson 3f7e7c061c Set default CPU for Darwin targets with LTO. <rdar://problem/12457841>
This is a temporary hack until Bill's project to record command line options
in the LLVM IR is ready. Clang currently sets a default CPU but that isn't
recorded anywhere and it doesn't get used in the final LTO compilation.

llvm-svn: 165809
2012-10-12 17:39:25 +00:00
Tim Northover d4a2f5bbfa Add float-abi and softfloat options to lli
Patch by Amara Emerson.

llvm-svn: 165791
2012-10-12 09:55:13 +00:00
Bill Wendling c2c6411fac We need this symbol after an LTO build.
llvm-svn: 165776
2012-10-12 01:06:33 +00:00
Nadav Rotem e10328737d Add a new interface to allow IR-level passes to access codegen-specific information.
llvm-svn: 165665
2012-10-10 22:04:55 +00:00
Bill Wendling ff4ddaa9d2 Place temporary LTO files into their own subdirectory.
llvm-svn: 165599
2012-10-10 05:29:15 +00:00
Bob Wilson 8fd10ef0d6 Revert "Use a special path to place the .o files in."
This reverts commit 165428 in an attempt to get our buildbots going.

llvm-svn: 165574
2012-10-09 23:59:01 +00:00
Bill Wendling 03783ff3d8 Use a special path to place the .o files in.
llvm-svn: 165428
2012-10-08 21:17:45 +00:00
Micah Villmow 9cfc13d46c Move TargetData to DataLayout.
llvm-svn: 165403
2012-10-08 16:39:34 +00:00
NAKAMURA Takumi a549b51a32 lli: [MCJIT] Suppress "__main" for cygming in LLIMCJITMemoryManager::getPointerToNamedFunction(), like legacy JITMemoryManager's.
CRT's __main (aka premain) invokes global ctors on cygming. See also PR3897.

llvm-svn: 165312
2012-10-05 14:10:23 +00:00
Bill Wendling 7dee2557ef Add an explicit -object_path_lto flag during linking with a uniquified temporary
file name if building Apple-style.

llvm-svn: 165185
2012-10-03 23:52:10 +00:00
Andrew Kaylor adc70568f9 Clean-up of memory buffer and object ownership model in MCJIT
llvm-svn: 165053
2012-10-02 21:18:39 +00:00
Jordan Rose 3c837abd2b Re-enable support for --program-prefix.
The Apple buildbots have been modified not to pass --target,
so they shouldn't choke on a default program prefix anymore.

Patch by Rick Foos!

llvm-svn: 164956
2012-10-01 18:40:32 +00:00
Andrew Kaylor 5808c7d828 Removing dependency on third party library for Intel JIT event support.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 164831
2012-09-28 17:35:20 +00:00
Sylvestre Ledru 91ce36c986 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru 721cffd53a Fix a typo 'iff' => 'if'
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Jordan Rose 2998d25a6e Revert "Add --program-prefix support to build"
The Apple buildbots are set up to pass --target to configure for both
cross- and non-cross-compile builds, and the standard autoconf response
to this is to set the program prefix to '<target>-'. Until we can figure
out the proper way to handle this (don't pass --target? pass an explicit
--program-prefix=""? don't auto-populate program_prefix with target_alias?)
it's more important to keep the buildbots running.

This reverts r164633 / ba48ceb1a3802e20e781ef04ea2573ffae2ac414.

llvm-svn: 164651
2012-09-26 00:01:00 +00:00
Sebastian Pop 17e118b79c Add --program-prefix support to build
llvm-svn: 164633
2012-09-25 21:15:08 +00:00
Tim Northover 572d0698d2 Make sure lli compiles all code before invalidating instruction caches.
Patch from Amara Emerson.

llvm-svn: 164296
2012-09-20 08:46:30 +00:00
Andrew Trick becbbbe112 Silence -Wnon-virtual-dtor in llvm-stress.
This was making it hard to scan my builds for new warnings. The
warning still fires with ToT clang. But if my workaround is unnecessary
for whatever reason, feel free to revert.

llvm-svn: 164201
2012-09-19 05:08:30 +00:00
Jan Sjödin 4d0c299f39 Add hidden flag to exclude aliases from output.
llvm-svn: 164158
2012-09-18 18:47:58 +00:00
Roman Divacky 5dd4ccb402 When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
store this and use it to not emit long nops when the CPU is geode which
doesnt support them.

Fixes PR11212.

llvm-svn: 164132
2012-09-18 16:08:49 +00:00
Craig Topper bc40d7e023 Fix includes of llvm files that used angle brackets.
llvm-svn: 163979
2012-09-15 18:45:38 +00:00
Eli Friedman 713bbb78c6 Don't include stdint.h directly.
llvm-svn: 163354
2012-09-06 22:55:11 +00:00
Bill Wendling 33fa1df67d Explicitly erase the file from disk if something bad happened. <rdar://problem/12184899>
llvm-svn: 163349
2012-09-06 21:07:57 +00:00
Eli Friedman e07b1bbaae Don't include stdint.h directly.
llvm-svn: 163276
2012-09-06 00:12:55 +00:00
Roman Divacky ad06cee239 Stop casting away const qualifier needlessly.
llvm-svn: 163258
2012-09-05 22:26:57 +00:00
Jan Wen Voung 5020dd35e5 Fix a bug.
llvm-svn: 163242
2012-09-05 20:56:00 +00:00