summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [ARM64] Port over missing subtarget features, and CPU definitions from AArch64.James Molloy2014-04-143-5/+52
| | | | llvm-svn: 206198
* [ARM64] Add big endian target arm64_be.James Molloy2014-04-142-2/+11
| | | | llvm-svn: 206197
* Replace two calls to object::symbol_iterator::increment(), which hadKaelyn Takata2014-04-141-10/+4
| | | | | | been removed in r200442. llvm-svn: 206196
* Remove a variable from r206192 that is only used in an assert.Kaelyn Takata2014-04-141-2/+2
| | | | llvm-svn: 206195
* Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of ↵Akira Hatanaka2014-04-144-22/+84
| | | | | | | | | | | | basic blocks inside loops correctly. Previously, BranchProbabilityInfo::calcLoopBranchHeuristics would determine the weights of basic blocks inside loops even when it didn't have enough information to estimate the branch probabilities correctly. This patch fixes the function to exit early if it doesn't see any exit edges or back edges and let the later heuristics determine the weights. This fixes PR18705 and <rdar://problem/15991090>. Differential Revision: http://reviews.llvm.org/D3363 llvm-svn: 206194
* Fix 2008-03-05-SxtInRegBug.ll so that the CHECK-NOT will not match the filename.Richard Trieu2014-04-141-0/+2
| | | | llvm-svn: 206193
* Fix up MCFixup::getAccessVariant to handle unary expressions.Kaelyn Takata2014-04-142-1/+9
| | | | | | | | | | | | This allows correct relocations to be generated for a symbolic address that is being adjusted by a negative constant. Since r204294, such expressions have triggered undefined behavior when LLVM was built without assertions. Credit goes to Rafael for this patch; I'm submitting it on his behalf as he is on vacation this week. llvm-svn: 206192
* tools: fix heap-buffer-overrun detected via ASANSaleem Abdulrasool2014-04-142-0/+4
| | | | | | | | | | Once the auxiliary fields relating to the filename have been inspected, any following auxiliary fields need not be visited as they have been consumed (the following fields comprise the filepath as a single unit). Adjust the test to catch this even if ASAN is not enabled. llvm-svn: 206190
* [mips] Fix fcopysign for MIPS-IV and add the test.Daniel Sanders2014-04-143-1/+3
| | | | | | | | | | | | | | | Summary: This was another incorrect use of hasMips64() vs isGP64bit(). Depends on D3344 Reviewers: matheusalmeida, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3347 llvm-svn: 206187
* [mips] MIPS-IV is broadly the same as MIPS64 so duplicate all -mcpu=mips64 ↵Daniel Sanders2014-04-1421-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests with -mcpu=mips4 as a starting point Summary: Two exceptions to this: test/CodeGen/Mips/octeon.ll test/CodeGen/Mips/octeon_popcnt.ll these test extensions to MIPS64 One test is altered for MIPS-IV: test/CodeGen/Mips/mips64countleading.ll Tests dclo/dclz which were added in MIPS64. The MIPS-IV version tests that dclo/dclz are not emitted. Four tests fail and are not in this patch: test/CodeGen/Mips/abicalls.ll test/CodeGen/Mips/fcopysign-f32-f64.ll test/CodeGen/Mips/fcopysign.ll test/CodeGen/Mips/stack-alignment.ll Depends on D3343 Reviewers: matheusalmeida, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3344 llvm-svn: 206185
* [mips] Fix more incorrect uses of HasMips64 and isMips64()Daniel Sanders2014-04-147-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Conditional moves acting on 64-bit GPR's should require MIPS-IV rather than MIPS64 - ISD::MUL, and ISD::MULH[US] should be lowered on all 64-bit ISA's Patch by David Chisnall His work was sponsored by: DARPA, AFRL I've added additional testcases to cover as much of the codegen changes affecting MIPS-IV as I can. Where I've been unable to find an existing MIPS64 testcase that can be re-used for MIPS-IV (mainly tests covering ISD::GlobalAddress and similar), I at least agree that MIPS-IV should behave like MIPS64. Further testcases that are fixed by this patch will follow in my next commit. The testcases from that commit that fail for MIPS-IV without this patch are: LLVM :: CodeGen/Mips/2010-07-20-Switch.ll LLVM :: CodeGen/Mips/cmov.ll LLVM :: CodeGen/Mips/eh-dwarf-cfa.ll LLVM :: CodeGen/Mips/largeimmprinting.ll LLVM :: CodeGen/Mips/longbranch.ll LLVM :: CodeGen/Mips/mips64-f128.ll LLVM :: CodeGen/Mips/mips64directive.ll LLVM :: CodeGen/Mips/mips64ext.ll LLVM :: CodeGen/Mips/mips64fpldst.ll LLVM :: CodeGen/Mips/mips64intldst.ll LLVM :: CodeGen/Mips/mips64load-store-left-right.ll LLVM :: CodeGen/Mips/sint-fp-store_pattern.ll Reviewers: dsanders Reviewed By: dsanders CC: matheusalmeida Differential Revision: http://reviews.llvm.org/D3343 llvm-svn: 206183
* Teach llvm-lto to respect the given RelocModel.James Molloy2014-04-143-3/+21
| | | | | | Patch by Nick Tomlinson! llvm-svn: 206177
* ARM64: specify full triple in tests to pacify Windows.Tim Northover2014-04-1414-15/+15
| | | | llvm-svn: 206175
* AArch64: add newline to end of test files.Tim Northover2014-04-1411-11/+11
| | | | | | Should be no other change. llvm-svn: 206174
* ARM64: remove buggy REV16 pattern.Tim Northover2014-04-142-3/+5
| | | | | | The 32-bit pattern is still valid: 0123 -> 3210 -> 1032. llvm-svn: 206172
* AArch64/ARM64: enable directcond.ll test on ARM64.Tim Northover2014-04-142-9/+16
| | | | | | | Code change is because optimizeCompareInstr didn't know how to pull the condition code out of FCSEL instructions. llvm-svn: 206171
* ARM64: add patterns for csXYZ with reversed operands.Tim Northover2014-04-142-8/+23
| | | | | | | AArch64 tests for this, and it's obviously a good idea. Have to invert the condition code, of course. llvm-svn: 206170
* ARM64: enable more regression tests from AArch64Tim Northover2014-04-1412-64/+106
| | | | llvm-svn: 206169
* ARM64: add support for AArch64's addsub_ext.llTim Northover2014-04-142-4/+5
| | | | | | | | | There was one definite issue in ARM64 (the off-by-1 check for whether a shift could be folded in) and one difference that is probably correct: ARM64 didn't fold nodes with multiple uses into the arithmetic operations unless optimising for code size. llvm-svn: 206168
* ARM64: optimise (cmp x, (sub 0, y)) to (cmn x, y).Tim Northover2014-04-142-11/+31
| | | | | | | This transformation is only valid when being used for an EQ or NE comparison since the flags change otherwise. llvm-svn: 206167
* ARM64: start porting regression test suite from AArch64Tim Northover2014-04-144-22/+31
| | | | llvm-svn: 206166
* Display the name of the project failing the url check in the release scriptArnaud A. de Grandmaison2014-04-141-1/+1
| | | | llvm-svn: 206164
* [XCore] Don't create invalid MKMSK instructions inside loadImmediate().Richard Osborne2014-04-142-6/+41
| | | | | | | | | | | | | | | | | Summary: Previously loadImmediate() would produce MKMSK instructions with invalid immediate values such as mkmsk r0, 9. Fix this by checking the mask size is valid. Reviewers: robertlytton Reviewed By: robertlytton CC: llvm-commits Differential Revision: http://reviews.llvm.org/D3289 llvm-svn: 206163
* Whitespace.NAKAMURA Takumi2014-04-142-9/+8
| | | | llvm-svn: 206154
* Revert r206045, "Fix shift by constants for vector."NAKAMURA Takumi2014-04-143-95/+21
| | | | | | It broke some builders, at least, i686. llvm-svn: 206153
* [Allocator] Hoist the external helper function into a namespace scopeChandler Carruth2014-04-142-6/+14
| | | | | | | declaration. GCC 4.7 appears to get hopelessly confused by declaring this function within a member function of a class template. Go figure. llvm-svn: 206152
* [cleanup] Normalize YAMLParser.h's doxygen markers with '\foo' insteadChandler Carruth2014-04-141-33/+33
| | | | | | | of '@foo'. The slash variant is prefered in LLVM and the file was already using a mixture. =/ llvm-svn: 206151
* Don't assert in BasicTTI::getMemoryOpCost for non-simple typesHal Finkel2014-04-142-6/+11
| | | | | | | | BasicTTI::getMemoryOpCost must explicitly check for non-simple types; setting AllowUnknown=true with TLI->getSimpleValueType is not sufficient because, for example, non-power-of-two vector types return non-simple EVTs (not MVT::Other). llvm-svn: 206150
* [Allocator] Make the underlying allocator a template instead of anChandler Carruth2014-04-144-73/+44
| | | | | | | | | | | | abstract interface. The only user of this functionality is the JIT memory manager and it is quite happy to have a custom type here. This removes a virtual function call and a lot of unnecessary abstraction from the common case where this is just a *very* thin vaneer around a call to malloc. Hopefully still no functionality changed here. =] llvm-svn: 206149
* Fix the compile from r206147 in release builds by moving a variableChandler Carruth2014-04-141-1/+1
| | | | | | | declaration outside of #ifndef NDEBUG -- its used elsewhere. Sorry for the noise. llvm-svn: 206148
* [Allocator] Switch the BumpPtrAllocator to use a vector of pointers toChandler Carruth2014-04-144-147/+159
| | | | | | | | | | | | | | | | | | | | | | | slabs rather than embedding a singly linked list in the slabs themselves. This has a few advantages: - Better utilization of the slab's memory by not wasting 16-bytes at the front. - Simpler allocation strategy by not having a struct packed at the front. - Avoids paging every allocated slab in just to traverse them for deallocating or dumping stats. The latter is the really nice part. Folks have complained from time to time bitterly that tearing down a BumpPtrAllocator, even if it doesn't run any destructors, pages in all of the memory allocated. Now it won't. =] Also resolves a FIXME with the scaling of the slab sizes. The scaling now disregards specially sized slabs for allocations larger than the threshold. llvm-svn: 206147
* tools: simplify symbol handling in objdumpSaleem Abdulrasool2014-04-141-25/+28
| | | | | | | | | Rather than switching behaviour on whether a previous symbol has an auxiliary symbol record for the next count of elements, simply iterate over the auxiliary symbols right after processing the current symbol entry. This makes the behaviour much simpler to follow and similar to llvm-readobj and yaml2obj. llvm-svn: 206146
* tools: address possible non-null terminated filenamesSaleem Abdulrasool2014-04-146-16/+78
| | | | | | | | | If a filename is a multiple of 18 characters, there will be no null-terminator. This will result in an invalid access by the constructed StringRef. Add a test case to exercise this and fix that handling. Address this same vulnerability in llvm-readobj as well. llvm-svn: 206145
* Use APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.Serge Pavlov2014-04-141-2/+2
| | | | llvm-svn: 206144
* Add back some typecasts I accidentally lost in r206142.Craig Topper2014-04-141-4/+4
| | | | llvm-svn: 206143
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-14169-1489/+1547
| | | | | | instead of comparing to nullptr. llvm-svn: 206142
* [PowerPC] [Constant Hoisting] Enable constant hoisting on PPCHal Finkel2014-04-134-0/+240
| | | | | | | | | | Implements the various TTI functions to enable constant hoisting on PPC. The only significant test-suite change is this: MultiSource/Benchmarks/VersaBench/bmm/bmm - 20% speedup (which essentially reverses the slowdown from r206120). llvm-svn: 206141
* tools: remove duplication of coff_aux_fileSaleem Abdulrasool2014-04-131-9/+1
| | | | | | | Now that COFF::coff_aux_file is defined, use that rather than redefining the type locally. llvm-svn: 206140
* tools: avoid a string duplicationSaleem Abdulrasool2014-04-131-8/+4
| | | | | | | | | The auxiliary file records are contiguous and only contain the filename. Construct a StringRef directly rather than copying to a temporary buffer. Suggested by majnemer on IRC! llvm-svn: 206139
* MC: check machine magic when applying offset adjustmentsSaleem Abdulrasool2014-04-131-2/+4
| | | | | | | | | | | | | | | The values for the relocation type can (and do) overlap across various architectures. When performing an adjustment of the emitted relocation in the final object file, check that the file magic matches the target for which the relocation type is valid (e.g. a I386 relocation is only applied to an X86 object file, and an AMD64 relocation is only applied to an X86_64 object file). This was noticed while adding support for ARM WinCOFF object file emission. A test case for this is not really possible as the values for REL32 do not overlap on I386 and AMD64, which is why this was never noticed in practice. The ARM WinCOFF emission is not yet ready to merge into the tree. llvm-svn: 206138
* Recognize test for overflow in integer multiplication.Serge Pavlov2014-04-132-0/+404
| | | | | | | | | | | | | | | | | | If multiplication involves zero-extended arguments and the result is compared as in the patterns: %mul32 = trunc i64 %mul64 to i32 %zext = zext i32 %mul32 to i64 %overflow = icmp ne i64 %mul64, %zext or %overflow = icmp ugt i64 %mul64 , 0xffffffff then the multiplication may be replaced by call to umul.with.overflow. This change fixes PR4917 and PR4918. Differential Revision: http://llvm-reviews.chandlerc.com/D2814 llvm-svn: 206137
* [PowerPC] Fix rlwimi isel when mask is not constantHal Finkel2014-04-132-1/+56
| | | | | | | | | | | | | | | | | We had been using the known-zero values of the operand of the or to construct the mask for an rlwimi; this is not quite correct, but fine when the mask is constant. When the mask is constant, then the known zeros of the operand must be a superset of the zeros in the mask. However, when the mask is not a constant, then there might be bits in the operand that are not known to be zero that, at runtime, might be zero in the mask. Therefore, we check that any bits not known to be zero *are* known to be one in the mask. Otherwise, we can't fold the mask with the or and shift. This was revealed as a miscompile of MultiSource/Benchmarks/BitBench/drop3/drop3 when I started experimenting with constant hoisting. llvm-svn: 206136
* Fix instruction debug info location during legalizationDavid Blaikie2014-04-133-16/+85
| | | | | | | | | | | | I found this from a particular GDB test suite case of inlining (something similar is provided as a test case) but came across a few other related cases (other callers of the same functions, and one other instance of the same coding mistake in a separate function). I'm not sure what the best way to test this is (let alone to cover the other cases I discovered), so hopefully this sufficies - open to ideas. llvm-svn: 206130
* [C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper2014-04-1353-226/+240
| | | | | | check instead of comparing to nullptr. llvm-svn: 206129
* [X86] unique_ptr'ify one of X86GenericDisassembler's members.Lang Hames2014-04-132-14/+10
| | | | llvm-svn: 206127
* tools: teach objdump about FILE aux recordsSaleem Abdulrasool2014-04-134-4/+35
| | | | | | | | | Add support for file auxiliary symbol entries in COFF symbol tables. A COFF symbol table with a FILE entry is followed by sizeof(__FILE__) / 18 auxiliary symbol records which contain the filename. Read them and form the original filename that the record contains. Then display the name in the output. llvm-svn: 206126
* [PowerPC] Implement some additional TLI callbacksHal Finkel2014-04-127-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | Add implementations of: bool isLegalICmpImmediate(int64_t Imm) const bool isLegalAddImmediate(int64_t Imm) const bool isTruncateFree(Type *Ty1, Type *Ty2) const bool isTruncateFree(EVT VT1, EVT VT2) const bool shouldConvertConstantLoadToIntImm(const APInt &Imm, Type *Ty) const Unfortunately, this regresses counter-register-based loop formation because some of the loops now end up in forms were SE cannot compute loop counts. However, nevertheless, the test-suite results favor committing: SingleSource/Benchmarks/BenchmarkGame/puzzle: 26% speedup MultiSource/Benchmarks/FreeBench/analyzer/analyzer: 21% speedup MultiSource/Benchmarks/MiBench/automotive-susan/automotive-susan: 20% speedup SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/trisolv: 19% speedup SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/gesummv: 15% speedup MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2: 2% speedup MultiSource/Benchmarks/VersaBench/bmm/bmm: 26% slowdown llvm-svn: 206120
* Fix test syntax to work with non-bash /bin/sh.Joerg Sonnenberger2014-04-122-3/+3
| | | | llvm-svn: 206119
* Spell the specialization namespace correctly.Benjamin Kramer2014-04-122-2/+6
| | | | | | Not sure why clang didn't diagnose this (GCC does). llvm-svn: 206117
* Make helper static and place random global into the llvm namespace.Benjamin Kramer2014-04-124-10/+9
| | | | llvm-svn: 206116
OpenPOWER on IntegriCloud