summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [Hexagon] Implement TargetTransformInfo for HexagonKrzysztof Parzyszek2015-08-055-7/+155
| | | | | Author: Brendon Cahoon <bcahoon@codeaurora.org> llvm-svn: 244089
* [dsymutil] Implement support for handling mach-o universal binaries as main ↵Frederic Riss2015-08-0510-40/+235
| | | | | | | | | | | | | | | | | input/output. The DWARF linker isn't touched by this, the implementation links individual files and merges them together into a fat binary by calling out to the 'lipo' utility. The main change is that the MachODebugMapParser can now return multiple debug maps for a single binary. The test just verifies that lipo would be invoked correctly, but doesn't actually generate a binary. This mimics the way clang tests its external iplatform tools integration. llvm-svn: 244087
* [dsymutil] Introduce exit helper. NFC.Frederic Riss2015-08-052-3/+12
| | | | | | | | llvm-dsymutil will start creating temporary files in a followup commit. To ease the correct cleanup of this files, introduce a helper called to exit dsymutil. llvm-svn: 244086
* [dsymutil] Split some logic into a helper function. NFCFrederic Riss2015-08-051-10/+10
| | | | llvm-svn: 244085
* [libFuzzer] use data-flow feedback from strcmpKostya Serebryany2015-08-055-3/+45
| | | | llvm-svn: 244084
* MIR Parser: Report an error when parsing duplicate register flags.Alex Lorenz2015-08-052-1/+43
| | | | llvm-svn: 244081
* [TTI] Make the cost APIs in TargetTransformInfo consistently use 'int'Chandler Carruth2015-08-0516-436/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | rather than 'unsigned' for their costs. For something like costs in particular there is a natural "negative" value, that of savings or saved cost. As a consequence, there is a lot of code that subtracts or creates negative values based on cost, all of which is prone to awkwardness or bugs when dealing with an unsigned type. Similarly, we *never* want these values to wrap, as that would cause Very Bad code generation (likely percieved as an infinite loop as we try to emit over 2^32 instructions or some such insanity). All around 'int' seems a much better fit for these basic metrics. I've added asserts to ensure that at least the TTI interface never returns negative numbers here. If we ever have a use case for negative numbers, we can remove this, but this way a bug where someone used '-1' to produce a 'very large' cost will be caught by the assert. This passes all tests, and is also UBSan clean. No functional change intended. Differential Revision: http://reviews.llvm.org/D11741 llvm-svn: 244080
* [GMR] Teach the conservative path of GMR to catch even more easy cases.Chandler Carruth2015-08-052-41/+144
| | | | | | | | | | | | | | In PR24288 it was pointed out that the easy case of a non-escaping global and something that *obviously* required an escape sometimes is hidden behind PHIs (or selects in theory). Because we have this binary test, we can easily just check that all possible input values satisfy the requirement. This is done with a (very small) recursion through PHIs and selects. With this, the specific example from the PR is correctly folded by GVN. Differential Revision: http://reviews.llvm.org/D11707 llvm-svn: 244078
* MIR Serialization: Serialize the 'early-clobber' register operand flag.Alex Lorenz2015-08-055-2/+56
| | | | llvm-svn: 244075
* Move BB succ_iterator to be inside TerminatorInst. NFC.Pete Cooper2015-08-053-145/+186
| | | | | | | | | | | | | | | | | | | | | To get the successors of a BB we currently do successors(BB) which ultimately walks the successors of the BB's terminator. This moves the iterator to TerminatorInst as thats what we're actually using to do the iteration, and adds a member function to TerminatorInst to allow us to iterate directly over successors given an instruction. For example, we can now do for (auto *Succ : BI->successors()) instead of for (unsigned i = 0, e = BI->getNumSuccessors(); i != e; ++i) Reviewed by Tobias Grosser. llvm-svn: 244074
* MIR Serialization: Serialize the 'debug-use' register operand flag.Alex Lorenz2015-08-055-4/+13
| | | | llvm-svn: 244071
* MIR Parser: Simplify the handling of quoted tokens. NFC.Alex Lorenz2015-08-053-77/+42
| | | | | | | The machine instructions lexer should not expose the difference between quoted and unquoted tokens to the parser. llvm-svn: 244068
* [AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.Chad Rosier2015-08-051-2/+14
| | | | llvm-svn: 244067
* [Sparc] Fix disassembly of popc instruction.James Y Knight2015-08-053-2/+11
| | | | | | | | And add tests. Patch by David Wiberg! llvm-svn: 244064
* AMDGPU/SI: Remove EXECRegMatt Arsenault2015-08-055-21/+9
| | | | | | For the same reasons as the other physical registers. llvm-svn: 244062
* AMDGPU: Remove SCCReg.Matt Arsenault2015-08-055-36/+22
| | | | | | | These should be handled as a physical register rather than a virtual register class with one member. llvm-svn: 244061
* [AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass ↵Chad Rosier2015-08-051-2/+13
| | | | | | | | | manager. Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass. llvm-svn: 244060
* Force the MachO generated for Darwin to have VERSION_MIN load commandSteven Wu2015-08-0541-415/+445
| | | | | | | | | On Darwin, it is required to stamp the object file with VERSION_MIN load command. This commit will provide a VERSRION_MIN load command to the MachO file that doesn't specify the version itself by inferring from Target Triple. llvm-svn: 244059
* test-release.sh: Fix naming of OpenMP runtime tarballHans Wennborg2015-08-051-1/+6
| | | | llvm-svn: 244058
* [AArch64] Make the naming of the Address Type Promotion pass consistent.Chad Rosier2015-08-051-3/+5
| | | | llvm-svn: 244057
* [AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.Chad Rosier2015-08-051-2/+13
| | | | | | | | | Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass. IIRC, this pass is off by default, but it's still helpful when debugging. llvm-svn: 244056
* revert r243687: enable fast-math-flag propagation to DAG nodes Sanjay Patel2015-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't propagate FMF partially without breaking DAG-level CSE. We either need to relax CSE to account for mismatched FMF as a temporary work-around or fully propagate FMF throughout the DAG. Surprisingly, there are no existing regression tests for this, but here's an example: define float @fmf(float %a, float %b) { %mul1 = fmul fast float %a, %b %nega = fsub fast float 0.0, %a %mul2 = fmul fast float %nega, %b %abx2 = fsub fast float %mul1, %mul2 ret float %abx2 } $ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0 ... vmulss %xmm1, %xmm0, %xmm0 vaddss %xmm0, %xmm0, %xmm0 retq $ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1 ... vmulss %xmm1, %xmm0, %xmm2 vfmadd213ss %xmm2, %xmm1, %xmm0 <--- failed to recognize that (a * b) was already calculated retq llvm-svn: 244053
* Make this less error prone by using a #define. NFC.Chad Rosier2015-08-051-5/+5
| | | | llvm-svn: 244048
* [AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.Chad Rosier2015-08-051-2/+13
| | | | | | | Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass. llvm-svn: 244046
* [AA] Use CallSite cast idiom. No functionality change.Benjamin Kramer2015-08-051-3/+2
| | | | llvm-svn: 244045
* [YAMLTraits] Use StringRef::copy. No functionality change.Benjamin Kramer2015-08-051-12/+4
| | | | llvm-svn: 244044
* [IR] Simplify code with ArrayRef::copy. No functionality change.Benjamin Kramer2015-08-051-7/+3
| | | | llvm-svn: 244043
* [AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.Chad Rosier2015-08-051-2/+13
| | | | | | | | | Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass. This is the AArch64 version of r243052. llvm-svn: 244041
* Update comment. NFC.Chad Rosier2015-08-051-2/+2
| | | | llvm-svn: 244038
* Drop unnecessary static_cast.Rafael Espindola2015-08-051-3/+1
| | | | | | ELFT::TargetEndianness already has the correct type. llvm-svn: 244032
* ARMISelDAGToDAG.cpp had this self-contradictory code:Artyom Skrobov2015-08-052-6/+6
| | | | | | | | | | | | | | | | | | return StringSwitch<int>(Flags) .Case("g", 0x1) .Case("nzcvq", 0x2) .Case("nzcvqg", 0x3) .Default(-1); ... // The _g and _nzcvqg versions are only valid if the DSP extension is // available. if (!Subtarget->hasThumb2DSP() && (Mask & 0x2)) return -1; ARMARM confirms that the comment is right, and the code was wrong. llvm-svn: 244029
* [ArrayRefTest] Work around a GCC 4.8 internal compiler error.Benjamin Kramer2015-08-051-5/+2
| | | | llvm-svn: 244023
* [InstCombine] Added more specific SSE2/AVX2 vector shift tests.Simon Pilgrim2015-08-051-0/+464
| | | | llvm-svn: 244022
* Fixed line endings.Simon Pilgrim2015-08-051-72/+72
| | | | llvm-svn: 244021
* [MachineCombiner] Don't use the opcode-only form of computeInstrLatencyHal Finkel2015-08-052-1/+26
| | | | | | | | | In r242277, I updated the MachineCombiner to work with itineraries, but I missed a call that is scheduling-model-only (the opcode-only form of computeInstrLatency). Using the form that takes an MI* allows this to work with itineraries (and should be NFC for subtargets with scheduling models). llvm-svn: 244020
* [llvm-objdump] Call exit(1) on error, i.e. fail early.Davide Italiano2015-08-054-89/+42
| | | | | | | | | | | | | Previously we kept going on partly corrupted input, which might result in garbage being printed, or even worse, random crashes. Rafael mentioned that this is the GNU behavior as well, but after some discussion we both agreed it's probably better to emit a reasonable error message and exit. As a side-effect of this commit, now we don't rely on global state for error codes anymore. objdump was the last tool in the toolchain which needed to be converted. Hopefully the old behavior won't sneak into the tree again. llvm-svn: 244019
* unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to ↵NAKAMURA Takumi2015-08-051-0/+4
| | | | | | | | | | | | | | | unbreak bots. For example of mingw-w64-g++-4.8.1, llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()': llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523 } Array3Src[] = {{"hello"}, {"world"}}; ^ Please submit a full bug report, with preprocessed source if appropriate. llvm-svn: 244017
* Windows/COM.inc: Fix emacs mode in the first line.NAKAMURA Takumi2015-08-051-1/+1
| | | | llvm-svn: 244016
* Temporarily revert r244012 while we see if it's really necessary.Eric Christopher2015-08-053-0/+87
| | | | | | | Add a comment explaining the current theory as to why we'd need the -lole32 on the link line. llvm-svn: 244015
* Remove autoconf checks for sigsetjmp and siglongjmp as they appear toEric Christopher2015-08-053-10/+2
| | | | | | be unused. llvm-svn: 244014
* Remove the apparently unused rand48 configure checks and associated m4.Eric Christopher2015-08-054-107/+0
| | | | llvm-svn: 244013
* Remove obsolete configure check for libole32 as we don't appear to useEric Christopher2015-08-053-85/+0
| | | | | | it anymore. llvm-svn: 244012
* Remove the unused header check for utime.h.Eric Christopher2015-08-053-254/+1
| | | | llvm-svn: 244011
* Rename all references to old mailing lists to new lists.llvm.org address.Tanya Lattner2015-08-0525-58/+58
| | | | llvm-svn: 243999
* Avoid passing nullptr to std::equal. Yaron Keren2015-08-041-1/+2
| | | | | | | | | | | As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts on this in Debug mode. This happens when building clang with Visual C++ and -triple i686-pc-windows-gnu on these clang regression tests: clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c clang/test/CodeGen/empty-union-init.c llvm-svn: 243996
* [ArrayRef] Make copy use std::uninitialized_copy.Benjamin Kramer2015-08-042-2/+14
| | | | | | | std::copy does not work for non-trivially copyable classes when we're copying into uninitialized memory. llvm-svn: 243995
* wrap OptSize and MinSize attributes for easier and consistent access (NFCI)Sanjay Patel2015-08-0427-50/+53
| | | | | | | | | | | | | | | | | Create wrapper methods in the Function class for the OptimizeForSize and MinSize attributes. We want to hide the logic of "or'ing" them together when optimizing just for size (-Os). Currently, we are not consistent about this and rely on a front-end to always set OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here that should be added as follow-on patches with regression tests. This patch is NFC-intended: it just replaces existing direct accesses of the attributes by the equivalent wrapper call. Differential Revision: http://reviews.llvm.org/D11734 llvm-svn: 243994
* [RuntimeDyld] Adapt PPC64 relocations to PPC32Hal Finkel2015-08-044-0/+76
| | | | | | | | | Begin adapting some of the implemented PPC64 relocations for PPC32 (with a test case). Patch by Pierre-Andre Saulais! llvm-svn: 243991
* [x86] machine combiner reassociation: mark EFLAGS operand as 'dead'Sanjay Patel2015-08-042-5/+50
| | | | | | | | | | | | | | In the commentary for D11660, I wasn't sure if it was alright to create new integer machine instructions without also creating the implicit EFLAGS operand. From what I can see, the implicit operand is always created by the MachineInstrBuilder based on the instruction type, so we don't have to do that explicitly. However, in reviewing the debug output, I noticed that the operand was not marked as 'dead'. The machine combiner should do that to preserve future optimization opportunities that may be checking for that dead EFLAGS operand themselves. Differential Revision: http://reviews.llvm.org/D11696 llvm-svn: 243990
* [mips][FastISel] Disable code generation for unsupported targets through ↵Vasileios Kalintiris2015-08-041-0/+12
| | | | | | | | | | | | | | | | | | | FastISel. Summary: Previously, we would check whether the target is supported or not, only in fastSelectInstruction(). This means that 64-bit targets could use FastISel too. We fix this by checking every overridden method of the FastISel class and by falling back to SelectionDAG if the target isn't supported. This change should have been committed along with r243638, but somehow I missed it. Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11755 llvm-svn: 243986
OpenPOWER on IntegriCloud