summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* [objdump] Add PT_PHDR.Michael J. Spencer2013-02-211-0/+3
| | | | llvm-svn: 175709
* [objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.Michael J. Spencer2013-02-201-0/+6
| | | | llvm-svn: 175659
* [llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer2013-02-204-0/+228
| | | | llvm-svn: 175592
* clang-formatize llvm-symbolizer codeAlexey Samsonov2013-02-153-78/+69
| | | | llvm-svn: 175255
* llvm-symbolizer: speedup symbol lookupDmitry Vyukov2013-02-142-43/+73
| | | | llvm-svn: 175158
* Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling2013-02-131-1/+1
| | | | | | the Apple way. llvm-svn: 175069
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-122-2/+2
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek2013-02-121-0/+1
| | | | llvm-svn: 174976
* Update with attribute group IDs.Bill Wendling2013-02-101-11/+14
| | | | llvm-svn: 174847
* [readobj] Fix memory leak.Michael J. Spencer2013-02-081-1/+2
| | | | llvm-svn: 174687
* Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky2013-02-051-0/+1
| | | | llvm-svn: 174463
* [objdump,readobj] Document the purpose and goals of each tool.Michael J. Spencer2013-02-052-4/+10
| | | | llvm-svn: 174439
* Print error messages from MemoryBuffer::getFile() in llvm-symbolizerAlexey Samsonov2013-02-051-1/+2
| | | | llvm-svn: 174346
* Replace global std::string with const char[]Alexey Samsonov2013-02-042-2/+2
| | | | llvm-svn: 174332
* [Object][Archive] Improve performance.Michael J. Spencer2013-02-031-1/+3
| | | | | | | | | | | | Improve performance of iterating over children and accessing the member file buffer by caching the file size and moving code out to the header. This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both fixing a memory leak and removing a malloc. This takes getBuffer from ~10% of the time in lld to unmeasurable. llvm-svn: 174272
* Fix a copy/paste-o that got missed because 'check' doesn't build lto.Chandler Carruth2013-01-311-1/+1
| | | | llvm-svn: 174115
* Give the MCStreamer class hierarchy LLVM RTTI facilities for use withChandler Carruth2013-01-311-1/+6
| | | | | | | | | | | | | | | | isa<> and dyn_cast<>. In several places, code is already hacking around the absence of this, and there seem to be several interfaces that might be lifted and/or devirtualized using this. This change was based on a discussion with Jim Grosbach about how best to handle testing for specific MCStreamer subclasses. He said that this was the correct end state, and everything else was too hacky so I decided to just make it so. No functionality should be changed here, this is just threading the kind through all the constructors and setting up the classof overloads. llvm-svn: 174113
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-284-2/+5
| | | | | | object emitted by MCJIT. llvm-svn: 173712
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-288-6/+8
| | | | | | for refactoring the ARC Optimizer. llvm-svn: 173647
* Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor2013-01-261-2/+8
| | | | | | function allows a caller to obtain a table of line information for a function using the function's address and size. llvm-svn: 173537
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-253-3/+63
| | | | | | and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. llvm-svn: 173517
* When encountering an unknown file format, ObjectFile::createObjectFile shouldEli Bendersky2013-01-251-0/+5
| | | | | | | | | politely report it instead of running into llvm_unreachable. Also patch llvm-dwarfdump to actually check whether the file it's attempting to dump is a valid object file. llvm-svn: 173489
* Add command-line flags for DWARF dumping.Eli Bendersky2013-01-251-1/+18
| | | | | | | Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. llvm-svn: 173480
* Rename variable to be more comprehensible and follow naming conventionEli Bendersky2013-01-251-4/+4
| | | | llvm-svn: 173460
* [bugpoint] make tool selection messages uniqueSaleem Abdulrasool2013-01-241-1/+1
| | | | | | | | | Change messages to help identify which interpreter was actually selected (safe vs testing). Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> llvm-svn: 173360
* [bugpoint] set Message after tool configurationSaleem Abdulrasool2013-01-241-1/+1
| | | | | | | | | | Set the message returned after the GCC runner has been constructed as otherwise the message will be overwritten by the construction of the runner, resulting in misleading messages. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> llvm-svn: 173359
* lli/RecordingMemoryManager: Free allocated sections in the destructor to ↵NAKAMURA Takumi2013-01-242-1/+12
| | | | | | | satisfy --vg-leak! FIXME: It could be generalized in MemoryManager. llvm-svn: 173349
* llvm-symbolizer: factor out bits of the tool into separate ↵Alexey Samsonov2013-01-224-288/+381
| | | | | | LLVMSymbolize.{h,cpp} files. No functionality change. llvm-svn: 173159
* Fix missed out llvm-stress after APFloat change.Tim Northover2013-01-221-3/+1
| | | | llvm-svn: 173141
* [CMake] bugpoint-passes should not be built in "all", when LLVM_BUILD_TOOLS ↵NAKAMURA Takumi2013-01-221-0/+4
| | | | | | is OFF. llvm-svn: 173112
* Remove unneeded #include.Jakub Staszak2013-01-211-1/+0
| | | | llvm-svn: 173088
* switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion ofChris Lattner2013-01-201-69/+73
| | | | | | the old ReadRecord methods. llvm-svn: 172952
* fix method name.Chris Lattner2013-01-191-1/+1
| | | | llvm-svn: 172921
* Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-193-3/+2
| | | | | | includes. llvm-svn: 172891
* [MC/Mach-O] Add support for linker options in Mach-O files.Daniel Dunbar2013-01-181-1/+29
| | | | llvm-svn: 172779
* Remove unneeded include and empty lineEli Bendersky2013-01-161-2/+0
| | | | llvm-svn: 172642
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-161-0/+11
| | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is the first of two steps to allow us to do that. This is the llvm-mc change to provide a method to set the AT_producer string. The second step, coming soon to a clang near you, will have the clang driver pass the value of getClangFullVersion() via an flag when invoking the integrated assembler on assembly source files. rdar://12955296 llvm-svn: 172630
* Introduce llvm::sys::getProcessTriple() function.Peter Collingbourne2013-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r143502, we renamed getHostTriple() to getDefaultTargetTriple() as part of work to allow the user to supply a different default target triple at configure time. This change also affected the JIT. However, it is inappropriate to use the default target triple in the JIT in most circumstances because this will not necessarily match the current architecture used by the process, leading to illegal instruction and other such errors at run time. Introduce the getProcessTriple() function for use in the JIT and its clients, and cause the JIT to use it. On architectures with a single bitness, the host and process triples are identical. On other architectures, the host triple represents the architecture of the host CPU, while the process triple represents the architecture used by the host CPU to interpret machine code within the current process. For example, when executing 32-bit code on a 64-bit Linux machine, the host triple may be 'x86_64-unknown-linux-gnu', while the process triple may be 'i386-unknown-linux-gnu'. This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple platforms. Differential Revision: http://llvm-reviews.chandlerc.com/D254 llvm-svn: 172627
* [Object][ELF] Simplify ELFObjectFile by using ELFType.Michael J. Spencer2013-01-151-12/+12
| | | | | | | | | | | | | This simplifies the usage and implementation of ELFObjectFile by using ELFType to replace: <endianness target_endianness, std::size_t max_alignment, bool is64Bits> This does complicate the base ELF types as they must now use template template parameters to partially specialize for the 32 and 64bit cases. However these are only defined once. llvm-svn: 172515
* LTO: Also init TTI for codegen passes.Nadav Rotem2013-01-151-0/+1
| | | | llvm-svn: 172499
* Expose an InitToTextSection through MCStreamer.Eli Bendersky2013-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this patch is to fix the following piece of code in the platform-independent AsmParser: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.SwitchSection(Ctx.getMachOSection( "__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, 0, SectionKind::getText())); } } This was added for the "-n" option of llvm-mc. The proposed fix adds another virtual method to MCStreamer, called InitToTextSection. Conceptually, it's similar to the existing InitSections which initializes all common sections and switches to text. The new method is implemented by each platform streamer in a way that it sees fit. So AsmParser can now do this: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.InitToTextSection(); } } Which is much more reasonable. llvm-svn: 172450
* Added -view-callgraph module pass.Andrew Trick2013-01-111-72/+1
| | | | | | | | -dot-callgraph similarly follows a standard module pass pattern. Patch by Speziale Ettore! llvm-svn: 172220
* llvm-symbolizer: add DATA command that allows to symbolize global variables.Dmitry Vyukov2013-01-111-34/+88
| | | | | | | | | | Example: >DATA bin/clang 0x26e8e40 <llvm::SparcSubTypeKV <40799808 416 The last line is address and size of the object. llvm-svn: 172180
* [llvm-objdump] Emit addresses with the correct number of leading 0's.Michael J. Spencer2013-01-101-2/+5
| | | | llvm-svn: 172130
* Fix #includes after my last commit.Jakub Staszak2013-01-102-2/+2
| | | | llvm-svn: 172114
* Add the align_to_end option to .bundle_lock in the MC implementation of alignedEli Bendersky2013-01-071-1/+1
| | | | | | | | | bundling. The document describing this feature and the implementation has also been updated: https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm llvm-svn: 171797
* Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-072-2/+2
| | | | | | implementation lives already. llvm-svn: 171746
* Switch TargetTransformInfo from an immutable analysis pass that requiresChandler Carruth2013-01-073-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a TargetMachine to construct (and thus isn't always available), to an analysis group that supports layered implementations much like AliasAnalysis does. This is a pretty massive change, with a few parts that I was unable to easily separate (sorry), so I'll walk through it. The first step of this conversion was to make TargetTransformInfo an analysis group, and to sink the nonce implementations in ScalarTargetTransformInfo and VectorTargetTranformInfo into a NoTargetTransformInfo pass. This allows other passes to add a hard requirement on TTI, and assume they will always get at least on implementation. The TargetTransformInfo analysis group leverages the delegation chaining trick that AliasAnalysis uses, where the base class for the analysis group delegates to the previous analysis *pass*, allowing all but tho NoFoo analysis passes to only implement the parts of the interfaces they support. It also introduces a new trick where each pass in the group retains a pointer to the top-most pass that has been initialized. This allows passes to implement one API in terms of another API and benefit when some other pass above them in the stack has more precise results for the second API. The second step of this conversion is to create a pass that implements the TargetTransformInfo analysis using the target-independent abstractions in the code generator. This replaces the ScalarTargetTransformImpl and VectorTargetTransformImpl classes in lib/Target with a single pass in lib/CodeGen called BasicTargetTransformInfo. This class actually provides most of the TTI functionality, basing it upon the TargetLowering abstraction and other information in the target independent code generator. The third step of the conversion adds support to all TargetMachines to register custom analysis passes. This allows building those passes with access to TargetLowering or other target-specific classes, and it also allows each target to customize the set of analysis passes desired in the pass manager. The baseline LLVMTargetMachine implements this interface to add the BasicTTI pass to the pass manager, and all of the tools that want to support target-aware TTI passes call this routine on whatever target machine they end up with to add the appropriate passes. The fourth step of the conversion created target-specific TTI analysis passes for the X86 and ARM backends. These passes contain the custom logic that was previously in their extensions of the ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces. I separated them into their own file, as now all of the interface bits are private and they just expose a function to create the pass itself. Then I extended these target machines to set up a custom set of analysis passes, first adding BasicTTI as a fallback, and then adding their customized TTI implementations. The fourth step required logic that was shared between the target independent layer and the specific targets to move to a different interface, as they no longer derive from each other. As a consequence, a helper functions were added to TargetLowering representing the common logic needed both in the target implementation and the codegen implementation of the TTI pass. While technically this is the only change that could have been committed separately, it would have been a nightmare to extract. The final step of the conversion was just to delete all the old boilerplate. This got rid of the ScalarTargetTransformInfo and VectorTargetTransformInfo classes, all of the support in all of the targets for producing instances of them, and all of the support in the tools for manually constructing a pass based around them. Now that TTI is a relatively normal analysis group, two things become straightforward. First, we can sink it into lib/Analysis which is a more natural layer for it to live. Second, clients of this interface can depend on it *always* being available which will simplify their code and behavior. These (and other) simplifications will follow in subsequent commits, this one is clearly big enough. Finally, I'm very aware that much of the comments and documentation needs to be updated. As soon as I had this working, and plausibly well commented, I wanted to get it committed and in front of the build bots. I'll be doing a few passes over documentation later if it sticks. Commits to update DragonEgg and Clang will be made presently. llvm-svn: 171681
* [objdump] Use correct format specifiers and fix C++03 variadic warning.Michael J. Spencer2013-01-061-6/+8
| | | | llvm-svn: 171651
* [objdump] Add --private-headers, -p.Michael J. Spencer2013-01-064-1/+103
| | | | | | This currently prints the ELF program headers. llvm-svn: 171649
OpenPOWER on IntegriCloud