summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* Migrate existing backends that care about software floating pointEric Christopher2015-05-122-6/+2
| | | | | | | | | | | | | | | | | | | | to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. llvm-svn: 237079
* Fix input validation issues in llvm-as/llvm-disAlexey Samsonov2015-05-112-16/+10
| | | | | | | | | | | | | | | | | | Summary: 1. llvm-as/llvm-dis tools do not check for input filename length. 2. llvm-dis does not verify the `Streamer` variable against `nullptr` properly, so the `M` variable could be uninitialized (e.g. if the input file does not exist) leading to null dref. Patch by Lenar Safin! Reviewers: samsonov Reviewed By: samsonov Subscribers: samsonov, llvm-commits Differential Revision: http://reviews.llvm.org/D9584 llvm-svn: 237051
* [yaml2elf] Replace error message by assert call in writeSectionContent methodsSimon Atanasyan2015-05-081-13/+7
| | | | | | | | | Now caller of ELFState::writeSectionContent() methods is responsible to check a section type and selects an appropriate writeSectionContent method. So unexpected section type inside writeSectionContent method indicates a wrong usage of the method and should be guarded by assert. llvm-svn: 236808
* [llvm-readobj/obj2yaml/yaml2obj] Support MIPS machine ELF header flagsSimon Atanasyan2015-05-082-2/+24
| | | | llvm-svn: 236807
* [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section supportSimon Atanasyan2015-05-072-0/+74
| | | | | | | This change adds support for the SHT_MIPS_ABIFLAGS section reading/writing to the obj2yaml and yaml2obj tools. llvm-svn: 236738
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-073-1/+130
| | | | | | | | | This change adds new flag -mips-abi-flags to the llvm-readobj. This flag forces printing of .MIPS.abiflags section content. https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#10.2.1._.MIPS.abiflags llvm-svn: 236737
* [llvm-readobj/obj2yaml/yaml2obj] Support more MIPS ELF header flagsSimon Atanasyan2015-05-072-4/+14
| | | | llvm-svn: 236728
* Let llc and opt override "-target-cpu" and "-target-features" via command lineAkira Hatanaka2015-05-062-0/+6
| | | | | | | | | | | options. This commit fixes a bug in llc and opt where "-mcpu" and "-mattr" wouldn't override function attributes "-target-cpu" and "-target-features" in the IR. Differential Revision: http://reviews.llvm.org/D9537 llvm-svn: 236677
* Factor out a function which determines the cpu and feature strings based onAkira Hatanaka2015-05-062-55/+13
| | | | | | command line options -mcpu and -mattr. NFC. llvm-svn: 236671
* A few fixes for llvm-symbolizer on Windows.Zachary Turner2015-05-063-14/+38
| | | | | | | | | Specifically, this patch correctly respects the -demangle option, and additionally adds a hidden --relative-address option allows input addresses to be relative to the module load address instead of absolute addresses into the image. llvm-svn: 236653
* [Orc] Reapply r236465 with fixes for the MSVC bots.Lang Hames2015-05-051-7/+2
| | | | llvm-svn: 236506
* [bugpoint] Increase default memory limit to 400MB to fix bugpoint tests.Daniel Sanders2015-05-051-2/+2
| | | | | | | | I tracked down the bug to an unchecked malloc in SmallVectorBase::grow_pod(). This malloc is returning NULL on my machine when running under bugpoint but not when -enable-valgrind is given. llvm-svn: 236504
* [Orc] Revert r236465 - It broke the Windows bots.Lang Hames2015-05-041-2/+7
| | | | | | | Looks like the usual missing explicit move-constructor issue with MSVC. I should have a fix shortly. llvm-svn: 236472
* Add TransformUtils dependency to lli.Pete Cooper2015-05-042-1/+2
| | | | | | After r236465, Orc uses ValueMaterializer and so needs to link against TransformUtils to get the ValueMaterializer::anchor(). llvm-svn: 236467
* [Orc] Refactor the compile-on-demand layer to make module partitioning lazy,Lang Hames2015-05-041-7/+2
| | | | | | | | | | | | | | | and avoid cloning unused decls into every partition. Module partitioning showed up as a source of significant overhead when I profiled some trivial test cases. Avoiding the overhead of partitionging for uncalled functions helps to mitigate this. This change also means that it is no longer necessary to have a LazyEmittingLayer underneath the CompileOnDemand layer, since the CompileOnDemandLayer will not extract or emit function bodies until they are called. llvm-svn: 236465
* llvm-cov: Warn if object file is newer than profileJustin Bogner2015-05-041-0/+13
| | | | | | | Looking at coverage with an out of date profile can be confusing. Provide a little hint that something might be wrong. llvm-svn: 236408
* [llvm-pdbdump] Support dynamic load address and external symbols.Zachary Turner2015-05-017-12/+104
| | | | | | | | | | | This patch adds the --load-address command line option to llvm-pdbdump, which dumps all addresses assuming the module has loaded at the specified address. Additionally, this patch adds an option to llvm-pdbdump to support dumping of public symbols (i.e. symbols with external linkage). llvm-svn: 236342
* [Object] Teach Object and llvm-objdump about ".hidden"Davide Italiano2015-04-301-2/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D9416 Reviewed by: rafael llvm-svn: 236279
* Fix -Wpessimizing-move warnings by removing std::move calls.Richard Trieu2015-04-301-4/+4
| | | | llvm-svn: 236278
* For llvm-objdump, with the -archive-headers and -macho options, use the ↵Kevin Enderby2015-04-301-4/+10
| | | | | | | | | | -non-verbose option to print the archive headers using raw numeric values. Also add the -archive-member-offsets for use with these to also trigger printing of the offset of the archive member from the start of the archive. llvm-svn: 236252
* IR: Give 'DI' prefix to debug info metadataDuncan P. N. Exon Smith2015-04-292-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
* LTO: Add API to choose whether to embed uselistsDuncan P. N. Exon Smith2015-04-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | Reverse libLTO's default behaviour for preserving use-list order in bitcode, and add API for controlling it. The default setting is now `false` (don't preserve them), which is consistent with `clang`'s default behaviour. Users of libLTO should call `lto_codegen_should_embed_uselists(CG,true)` prior to calling `lto_codegen_write_merged_modules()` whenever the output file isn't part of the production workflow in order to reproduce results with subsequent calls to `llc`. (I haven't added tests since `llvm-lto` (the test tool for LTO) doesn't support bitcode output, and even if it did: there isn't actually a good way to test whether a tool has passed the flag. If the order is already "natural" (if the order will already round-trip) then no use-list directives are emitted at all. At some point I'll circle back to add tests to `llvm-as` (etc.) that they actually respect the flag, at which point I can somehow add a test here as well.) llvm-svn: 235943
* [llvm-symbolizer] Link DebugInfoPDB for the autoconf buildZachary Turner2015-04-271-1/+1
| | | | llvm-svn: 235909
* Make llvm-symbolizer work on Windows.Zachary Turner2015-04-273-1/+20
| | | | | | | Differential Revision: http://reviews.llvm.org/D9234 Reviewed By: Alexey Samsonov llvm-svn: 235900
* Remove unused variable, found with gcc-5.1 -Wunused-variable.Patrik Hagglund2015-04-271-25/+0
| | | | | | | The variable, MachOSectionTypes, seems to have been unused since its introduction in r178679. llvm-svn: 235863
* [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr.Lang Hames2015-04-241-18/+18
| | | | | | | AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a reference for this is crufty. llvm-svn: 235752
* Move DIContext.h to common DebugInfo location.Zachary Turner2015-04-235-8/+12
| | | | | | | | | | This will enable us to create a PDBContext so as to expose some amount of debug info functionality through a common interace. Differential Revision: http://reviews.llvm.org/D9205 Reviewed by: Alexey Samsonov llvm-svn: 235612
* Support arm32 R_ARM_V4BX relocation formatAdhemerval Zanella2015-04-221-6/+5
| | | | | | | | | | | | ARM32 ELF R_ARM_V4BX relocation format is a special relocation type that records the location of an ARMv4t BX instruction to enable a static linker to generate ARMv4 compatible instructions. This relocation does not contain a reference symbol. This patch enabled its creation by removing the requeriment of a relocation symbol target in ELFState<ELFT>::writeSectionContent. llvm-svn: 235513
* Linker: Add flag to override linkage rulesDuncan P. N. Exon Smith2015-04-221-3/+14
| | | | | | | | | | | | | | | | Add a flag to lib/Linker (and `llvm-link`) to override linkage rules. When set, the functions in the source module *always* replace those in the destination module. The `llvm-link` option is `-override=abc.ll`. All the "regular" modules are loaded and linked first, followed by the `-override` modules. This is useful for debugging workflows where some subset of the module (e.g., a single function) is extracted into a separate file where it's optimized differently, before being merged back in. Patch by Luqman Aden! llvm-svn: 235473
* llvm-link: Factor out loop over input files, NFCDuncan P. N. Exon Smith2015-04-221-18/+26
| | | | | | | | | | Factor the loop for linking input files together into a combined module into a separate function. This is in preparation for an upcoming patch that runs the logic twice. Patch by Luqman Aden! llvm-svn: 235472
* DebugInfo: Drop rest of DIDescriptor subclassesDuncan P. N. Exon Smith2015-04-211-4/+2
| | | | | | | Delete the remaining subclasses of (the already deleted) `DIDescriptor`. Part of PR23080. llvm-svn: 235404
* bugpoint Enhancement.JF Bastien2015-04-202-8/+104
| | | | | | | | | | | | | | | | | | | Summary: This patch adds two flags to `bugpoint`: "-replace-funcs-with-null" and "-disable-pass-list-reduction". When "-replace-funcs-with-null" is specified, bugpoint will, instead of simply deleting function bodies, replace all uses of functions and then will delete functions completely from the test module, correctly handling aliasing and @llvm.used && @llvm.compiler.used. This part was conceived while trying to debug the PNaCl IR simplification passes, which don't allow undefined functions (ie no declarations). With "-disable-pass-list-reduction", bugpoint won't try to reduce the set of passes causing the "crash". This is needed in cases where one is trying to debug an issue inside the PNaCl IR simplification passes which is causing an PNaCl ABI verification error, for example. Reviewers: jfb Reviewed By: jfb Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D8555 llvm-svn: 235362
* Add targets to cmake for specific target components.Pete Cooper2015-04-201-1/+5
| | | | | | | | | | | | This adds the following targets to cmake. These can be used to build and link only specific parts of a backend, instead of having to link the whole backend. - AllTargetsAsmPrinters, AllTargetsAsmParsers, AllTargetsDescs, AllTargetsDisassemblers, AllTargetsInfos A typical use for these is instead of linking ${LLVM_TARGETS_TO_BUILD}. This commit changes llvm-mc to show how to use the new targets. Reviewed by Chris Bieneman. llvm-svn: 235324
* [Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobjSimon Atanasyan2015-04-201-0/+2
| | | | llvm-svn: 235285
* Remove the JITEmitDebugInfo TargetOptions as they're only set andEric Christopher2015-04-191-23/+0
| | | | | | not used anywhere in llvm. llvm-svn: 235265
* DebugInfo: Delete DIDescriptor (but not its subclasses)Duncan P. N. Exon Smith2015-04-181-2/+2
| | | | | | | Delete `DIDescriptor` and update the remaining users. I'll follow-up by deleting subclasses in manageable groups (top-down). llvm-svn: 235248
* [PDB] Support executables and source/line info.Zachary Turner2015-04-171-1/+1
| | | | | | | | | | | | Previously DebugInfoPDB could only load data for a PDB given a path to the PDB. It could not open an EXE and find the matching PDB and verify it matched, etc. This patch adds support for that so that we can simply load debug information for a PDB directly. Additionally, this patch extends DebugInfoPDB to support getting source and line information for symbols. llvm-svn: 235237
* [LTO API] add lto_codegen_set_should_internalize.Manman Ren2015-04-172-0/+6
| | | | | | | | | | | When debugging LTO issues with ld64, we use -save-temps to save the merged optimized bitcode file, then invoke ld64 again on the single bitcode file. The saved bitcode file is already internalized, so we can call lto_codegen_set_should_internalize and skip running internalization again. rdar://20227235 llvm-svn: 235211
* lli/OrcLazyJIT.cpp: Use <cstdio> for printf(3) introduced in r234908.NAKAMURA Takumi2015-04-171-0/+1
| | | | llvm-svn: 235175
* For llvm-objdump, dump the (__OBJC,__protocol) section for Objc1 32-bit ↵Kevin Enderby2015-04-161-0/+52
| | | | | | | | Mach-O files with the -section option as objc_protocol_t structs. llvm-svn: 235141
* Updating symbol wildcards one more time.Chris Bieneman2015-04-161-1/+1
| | | | | | This should catch all C++ symbols containing llvm in the name. llvm-svn: 235136
* [NFC] [MachO] remove extra semicolonsJingyue Wu2015-04-161-4/+4
| | | | llvm-svn: 235130
* Properly escaping the quotes so that bash doesn't do stupid things with the ↵Chris Bieneman2015-04-161-1/+1
| | | | | | wildcards. llvm-svn: 235127
* For llvm-objdump added support for printing Objc1 32-bit runtime meta dataKevin Enderby2015-04-161-11/+836
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 235119
* Fixing llvm-shlib's LLVM_DYLIB_EXPORT_ALL to work with Darwin fat binaries.Chris Bieneman2015-04-161-25/+27
| | | | llvm-svn: 235114
* DebugInfo: Gut DIType and subclassesDuncan P. N. Exon Smith2015-04-161-3/+3
| | | | | | | | Continuing PR23080, gut `DIType` and its various subclasses, leaving behind thin wrappers around the pointer types in the new debug info hierarchy. llvm-svn: 235064
* [RuntimeDyld] Work around a bug in RuntimeDyldELF exposed by r234839.Lang Hames2015-04-151-0/+12
| | | | | | | Hopefully this will fix the failures on the windows builders that started with r234839. llvm-svn: 235043
* [Orc] Refactor the CompileOnDemandLayer to make its addModuleSet methodLang Hames2015-04-151-11/+14
| | | | | | | | | signature match the other layers. This makes it possible to compose other layers (e.g. IRTransformLayer) on top of CompileOnDemandLayer. llvm-svn: 235029
* Change range-based for-loop to use const auto&. No functionality change.Richard Trieu2015-04-151-16/+11
| | | | llvm-svn: 234974
* uselistorder: Remove the global bitsDuncan P. N. Exon Smith2015-04-157-50/+60
| | | | | | | | | | | | | Remove all the global bits to do with preserving use-list order by moving the `cl::opt`s to the individual tools that want them. There's a minor functionality change to `libLTO`, in that you can't send in `-preserve-bc-uselistorder=false`, but making that bit settable (if it's worth doing) should be through explicit LTO API. As a drive-by fix, I removed some includes of `UseListOrder.h` that were made unnecessary by recent commits. llvm-svn: 234973
OpenPOWER on IntegriCloud