summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix another place where we build the TTI pass to the new interface.Chandler Carruth2013-01-051-2/+2
| | | | | | Sorry for the noise here, 'make check' doesn't build this code. =/ llvm-svn: 171623
* Convert the TargetTransformInfo from an immutable pass with dynamicChandler Carruth2013-01-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | interfaces which could be extracted from it, and must be provided on construction, to a chained analysis group. The end goal here is that TTI works much like AA -- there is a baseline "no-op" and target independent pass which is in the group, and each target can expose a target-specific pass in the group. These passes will naturally chain allowing each target-specific pass to delegate to the generic pass as needed. In particular, this will allow a much simpler interface for passes that would like to use TTI -- they can have a hard dependency on TTI and it will just be satisfied by the stub implementation when that is all that is available. This patch is a WIP however. In particular, the "stub" pass is actually the one and only pass, and everything there is implemented by delegating to the target-provided interfaces. As a consequence the tools still have to explicitly construct the pass. Switching targets to provide custom passes and sinking the stub behavior into the NoTTI pass is the next step. llvm-svn: 171621
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-0230-79/+79
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort a few more #include lines in tools/... unittests/... and utils/...Chandler Carruth2013-01-024-4/+4
| | | | llvm-svn: 171363
* Make opt grab the triple from the module and use it to initialize the target ↵Nadav Rotem2013-01-011-8/+8
| | | | | | machine. llvm-svn: 171341
* Use the generic dump template. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-53/+19
| | | | llvm-svn: 171305
* Dump sections. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+76
| | | | llvm-svn: 171304
* Print a header above the symbols. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+12
| | | | llvm-svn: 171302
* Check for errors. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-6/+12
| | | | llvm-svn: 171301
* Fix indentation. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-311-32/+32
| | | | llvm-svn: 171300
* Style fixes in llvm-readobj.cpp. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-311-28/+18
| | | | llvm-svn: 171299
* Add a function to get the segment name of a section.Rafael Espindola2012-12-212-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On MachO, sections also have segment names. When a tool looking at a .o file prints a segment name, this is what they mean. In reality, a .o has only one anonymous, segment. This patch adds a MachO only function to fetch that segment name. I named it getSectionFinalSegmentName since the main use for the name seems to be inform the linker with segment this section should go to. The patch also changes MachOObjectFile::getSectionName to return just the section name instead of computing SegmentName,SectionName. The main difference from the previous patch is that it doesn't use InMemoryStruct. It is extremely dangerous: if the endians match it returns a pointer to the file buffer, if not, it returns a pointer to an internal buffer that is overwritten in the next API call. We should change all of this code to use support::detail::packed_endian_specific_integral like ELF, but since these functions only handle strings, they work with big and little endian machines as is. I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took so long :-) llvm-svn: 170838
* Aligned bundling support. Following the discussion here:Eli Bendersky2012-12-201-0/+4
| | | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056754.html The proposal and implementation are fully documented here: https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm Tests will follow shortly. llvm-svn: 170718
* Remove MCTargetAsmLexer and its derived classes now that edis,Roman Divacky2012-12-201-3/+0
| | | | | | its only user, is gone. llvm-svn: 170699
* Remove edis - the enhanced disassembler. Fixes PR14654.Roman Divacky2012-12-193-187/+0
| | | | llvm-svn: 170578
* Revert 170545 while I debug the ppc failures.Rafael Espindola2012-12-192-28/+5
| | | | llvm-svn: 170547
* Add r170095 back.Rafael Espindola2012-12-192-5/+28
| | | | | | | | | | | | | | | | | | | | | | | I cannot reproduce it the failures locally, so I will keep an eye at the ppc bots. This patch does add the change to the "Disassembly of section" message, but that is not what was failing on the bots. Original message: Add a funciton to get the segment name of a section. On MachO, sections also have segment names. When a tool looking at a .o file prints a segment name, this is what they mean. In reality, a .o has only one anonymous, segment. This patch adds a MachO only function to fetch that segment name. I named it getSectionFinalSegmentName since the main use for the name seems to be infor the linker with segment this section should go to. The patch also changes MachOObjectFile::getSectionName to return just the section name instead of computing SegmentName,SectionName. llvm-svn: 170545
* Add support for passing -main-file-name all the way through toEric Christopher2012-12-181-0/+6
| | | | | | | | the assembler. Part of PR14624 llvm-svn: 170390
* Prepare LLVM to fix PR14625, exposing a hook in MCContext to manage theChandler Carruth2012-12-171-1/+7
| | | | | | | | | | compilation directory. This defaults to the current working directory, just as it always has, but now an assembler can choose to override it with a custom directory. I've taught llvm-mc about this option and added a test case. llvm-svn: 170371
* This patch is needed to make c++ exceptions work for mips16.Reed Kotler2012-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mips16 is really a processor decoding mode (ala thumb 1) and in the same program, mips16 and mips32 functions can exist and can call each other. If a jal type instruction encounters an address with the lower bit set, then the processor switches to mips16 mode (if it is not already in it). If the lower bit is not set, then it switches to mips32 mode. The linker knows which functions are mips16 and which are mips32. When relocation is performed on code labels, this lower order bit is set if the code label is a mips16 code label. In general this works just fine, however when creating exception handling tables and dwarf, there are cases where you don't want this lower order bit added in. This has been traditionally distinguished in gas assembly source by using a different syntax for the label. lab1: ; this will cause the lower order bit to be added lab2=. ; this will not cause the lower order bit to be added In some cases, it does not matter because in dwarf and debug tables the difference of two labels is used and in that case the lower order bits subtract each other out. To fix this, I have added to mcstreamer the notion of a debuglabel. The default is for label and debug label to be the same. So calling EmitLabel and EmitDebugLabel produce the same result. For various reasons, there is only one set of labels that needs to be modified for the mips exceptions to work. These are the "$eh_func_beginXXX" labels. Mips overrides the debug label suffix from ":" to "=." . This initial patch fixes exceptions. More changes most likely will be needed to DwarfCFException to make all of this work for actual debugging. These changes will be to emit debug labels in some places where a simple label is emitted now. Some historical discussion on this from gcc can be found at: http://gcc.gnu.org/ml/gcc-patches/2008-08/msg00623.html http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01273.html llvm-svn: 170279
* Revert "Add a funciton to get the segment name of a section."Eric Christopher2012-12-132-18/+4
| | | | | | This reverts commit r170095 since it appears to be breaking the bots. llvm-svn: 170105
* Add a funciton to get the segment name of a section.Rafael Espindola2012-12-132-4/+18
| | | | | | | | | | | | | | | On MachO, sections also have segment names. When a tool looking at a .o file prints a segment name, this is what they mean. In reality, a .o has only one, anonymous, segment. This patch adds a MachO only function to fetch that segment name. I named it getSectionFinalSegmentName since the main use for the name seems to be informing the linker with segment this section should go to. The patch also changes MachOObjectFile::getSectionName to return just the section name instead of computing SegmentName,SectionName. llvm-svn: 170095
* llvm/tools: Add #include "llvm/TargetTransformInfo.h"NAKAMURA Takumi2012-12-113-0/+3
| | | | llvm-svn: 169817
* Change some functions to take const pointers.Rafael Espindola2012-12-112-24/+26
| | | | llvm-svn: 169812
* Revert r169656.Bill Wendling2012-12-104-18/+3
| | | | | | | | The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that should be kept around. The linker will pretend that a dylib is being created. <rdar://problem/12528059> llvm-svn: 169770
* [CMake] Update dependencies to intrinsics_gen corresponding to r169711.NAKAMURA Takumi2012-12-101-0/+2
| | | | llvm-svn: 169724
* Revert to old behavior until linker can pass export-dynamic option.Bill Wendling2012-12-101-1/+6
| | | | llvm-svn: 169720
* 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
OpenPOWER on IntegriCloud