summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add the `lto_codegen_set_export_dynamic' function.Bill Wendling2012-12-084-3/+14
| | | | | | | | | | | | | | | | | | | | | This function sets the `_exportDynamic' ivar. When that's set, we export all symbols (e.g. we don't run the internalize pass). This is equivalent to the `--export-dynamic' linker flag in GNU land: --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will normally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use dlopen to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. The Darwin linker will support this via the `-export_dynamic' flag. We should modify clang to support this via the `-rdynamic' flag. llvm-svn: 169656
* Add C API for specifying CPU to the disassembler.Jim Grosbach2012-12-071-0/+1
| | | | | | | | | It was a nasty oversight that we didn't include this when we added this API in the first place. Blech. rdar://12839439 llvm-svn: 169653
* Quick build fix for c++03 clang. This needs a proper solution. Note that ↵Michael J. Spencer2012-12-051-4/+4
| | | | | | these offsets are guaranteed to be correct by Endian.h. llvm-svn: 169438
* Add dump of Win64 EH unwind data.Michael J. Spencer2012-12-054-3/+391
| | | | | | | | | | The new command line option -unwind-info dumps the Win64 EH unwind data to the console. This is a nice feature if you need to debug generated EH data (e.g. from LLVM). Includes a test case. Initial patch by João Matos, extensions and rework by Kai Nacke. llvm-svn: 169415
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-051-4/+16
| | | | | | | | | | | | | | | | | | | | This is for the lldb team so most of but not all of the values are to be printed as hex with this option. Some small values like the scale in an X86 address were requested to printed in decimal without the leading 0x. There may be some tweaks need to places that may still be in decimal that they want in hex. Specially for arm. I made my best guess. Any tweaks from here should be simple. I also did the best I know now with help from the C++ gurus creating the cleanest formatImm() utility function and containing the changes. But if someone has a better idea to make something cleaner I'm all ears and game for changing the implementation. rdar://8109283 llvm-svn: 169393
* Sort the #include lines for tools/...Chandler Carruth2012-12-0449-222/+208
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* Add a -time-compilations=<N> option to llc.Jakob Stoklund Olesen2012-11-301-0/+16
| | | | | | | | This causes llc to repeat the module compilation N times, making it possible to get more accurate information from -time-passes when compiling small modules. llvm-svn: 169040
* Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth2012-11-301-1/+1
| | | | | | | | | | | | depends on the IR infrastructure, there is no sense in it being off in Support land. This is in preparation to start working to expand InstVisitor into more special-purpose visitors that are still generic and can be re-used across different passes. The expansion will go into the Analylis tree though as nothing in VMCore needs it. llvm-svn: 168972
* One more step towards making doInitialization and doFinalization useful forPedro Artigas2012-11-297-16/+0
| | | | | | | start up and clean up module passes, now that ASAN and TSAN are fixed the tests pass llvm-svn: 168905
* Add back support for reading and parsing 'deplibs'.Bill Wendling2012-11-281-0/+1
| | | | | | | This is for backwards compatibility for pre-3.x bc files. The code reads the code, but does nothing with it. llvm-svn: 168779
* Modifying lli to use the SectionMemoryManager.Andrew Kaylor2012-11-271-222/+10
| | | | | | The functionality of SectionMemoryManager is equivalent to the LLIMCJITMemoryManager being replaced except that it allocates memory as RW and later changes it to RX or R as needed. The page permissions are set in the call to MCJIT::finalizeObject. llvm-svn: 168722
* Remove the dependent libraries feature.Bill Wendling2012-11-271-1/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Make building of llvm-jitlistener conditional on the USE_INTEL_JITEVENTS ↵Andrew Kaylor2012-11-271-1/+6
| | | | | | setting. llvm-svn: 168665
* Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson2012-11-277-0/+16
| | | | | | | | doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model". It appears to have broken at least one buildbot. llvm-svn: 168654
* Step towards implementation of pass manager with doInitialization and ↵Owen Anderson2012-11-267-16/+0
| | | | | | | | doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model Patch by Pedro Artigas, with feedback from by Chandler Carruth. llvm-svn: 168635
* libLTO: Add a utility method to initialize the disassemblers.Benjamin Kramer2012-11-243-0/+28
| | | | | | | | | | | | Necessary to give disassembler users (like darwin's otool) a possibility to dlopen libLTO and still initialize the required LLVM bits. This used to go through libMCDisassembler but that's a gross layering violation, the MC layer can't pull in functions from the targets. Adding a function to libLTO is a bit of a hack but not worse than exposing other disassembler bits from libLTO. Fixes PR14362. llvm-svn: 168545
* Add a -disable-cfi option to llvm-mc. This is useful for debugging asRafael Espindola2012-11-231-1/+5
| | | | | | | | | it will expand any .cfi_* directives in the input assembly. Unfortunately this cannot replace elf-dump in tests as the asm streamer cannot relax the line advance opcodes. llvm-svn: 168522
* Adding tests for the Intel JIT event listener's MCJIT support.Andrew Kaylor2012-11-217-2/+281
| | | | llvm-svn: 168459
* Add the -no-show-raw-insn option to llvm-objdump, thus making it a bit moreEli Bendersky2012-11-201-2/+9
| | | | | | conformant to binutils objdump. llvm-svn: 168393
* MCJIT: [cygming] Give noop to __main also in RecordingMemoryManger. It is ↵NAKAMURA Takumi2012-11-181-0/+13
| | | | | | | | emitted in @main(). XFAIL(s) can be removed. llvm-svn: 168282
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-154-6/+16
| | | | | | permissions after an object has been loaded. llvm-svn: 168114
* Add doInitialization and doFinalization methods to ModulePass's, to allow ↵Owen Anderson2012-11-157-0/+16
| | | | | | | | them to be re-initialized and reused on multiple Module's. Patch by Pedro Artigas. llvm-svn: 168008
* llvm-nm: Make sort more stable when symbol names are equal.Daniel Dunbar2012-11-131-1/+12
| | | | llvm-svn: 167866
* Adding changes to support GNU style archive library readingShankar Easwaran2012-11-131-0/+22
| | | | llvm-svn: 167853
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-123-197/+8
| | | | llvm-svn: 167757
* Don't use __cxa_demangle under MSVC (which doesn't have it)Alexander Potapenko2012-11-121-1/+5
| | | | llvm-svn: 167730
* Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in ↵Alexey Samsonov2012-11-121-1/+1
| | | | | | DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor. llvm-svn: 167728
* [ASan] Add llvm-symbolizer from to tools/Alexander Potapenko2012-11-125-1/+413
| | | | | | | 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
* Add a relocation visitor to lib object. This works via caching relocatedEric Christopher2012-11-071-1/+58
| | | | | | | values in a map that can be passed to consumers. Add a testcase that ensures this works for llvm-dwarfdump. llvm-svn: 167558
* Remove accidental commit.Bill Wendling2012-11-071-21/+0
| | | | llvm-svn: 167544
* Add comment describing what's going on here.Bill Wendling2012-11-071-0/+21
| | | | llvm-svn: 167525
* Add a method to indicate section address re-assignment is finished.Andrew Kaylor2012-11-051-0/+4
| | | | | | 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
* lli: Initialize the native asm parser for inline assembly.Jim Grosbach2012-11-054-3/+4
| | | | | | | MCJIT supports inline assembly, but requires the asm parser to do so. Make sure to link it in and initialize it. llvm-svn: 167392
* Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.Andrew Kaylor2012-11-011-1/+1
| | | | | | Patch by Ashok Thirumurthi llvm-svn: 167192
* Fixed format strings to avoid pointer truncation during 64-bit debugging.Andrew Kaylor2012-11-011-4/+4
| | | | llvm-svn: 167185
* MC: Simple example parser for MC assembly markup.Jim Grosbach2012-10-317-2/+272
| | | | | | Nothing fancy, just a simple demonstration parser. llvm-svn: 167181
* Mark code, not data, as executable in lli RemoteTarget simulator.Andrew Kaylor2012-10-311-2/+2
| | | | llvm-svn: 167164
* Align the data section correctly when loading an ELF file.Tim Northover2012-10-291-3/+11
| | | | | | Patch by Amara Emerson. llvm-svn: 166920
* Add -alias and -ralias options to match what we have for functions andRafael Espindola2012-10-291-0/+47
| | | | | | globals. llvm-svn: 166909
* Adjust llvm-ar and llvm-ranlib to not depend on exception handling.Joerg Sonnenberger2012-10-269-137/+132
| | | | | | | | 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
* libLTO has a bug in that it will keep every symbol if none is needed. We usedRafael Espindola2012-10-261-10/+0
| | | | | | | | | | 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
* Opt does not need to initialize the Asm printer/parserNadav Rotem2012-10-241-2/+0
| | | | llvm-svn: 166602
* Opt needs to initialize the different targets.Nadav Rotem2012-10-241-0/+6
| | | | llvm-svn: 166595
* Add support for annotated disassembly output for X86 and arm.Kevin Enderby2012-10-222-2/+10
| | | | | | | | | | | 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
* Reapply the TargerTransformInfo changes, minus the changes to LSR and ↵Nadav Rotem2012-10-186-209/+92
| | | | | | Lowerinvoke. llvm-svn: 166248
* Revert "We need this symbol after an LTO build."Bob Wilson2012-10-181-1/+0
| | | | | | | 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
* Temporarily revert the TargetTransform changes.Bob Wilson2012-10-186-92/+209
| | | | | | | | | | | 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
* Formatting and 80-col.Eric Christopher2012-10-161-3/+3
| | | | llvm-svn: 166075
* LTO also needs to initialize the TargetTransform infrastructure.Nadav Rotem2012-10-151-0/+2
| | | | llvm-svn: 165997
* Set default CPU for Darwin targets with LTO. <rdar://problem/12457841>Bob Wilson2012-10-122-12/+28
| | | | | | | | 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
OpenPOWER on IntegriCloud