summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Teach llvm-lto to respect the given RelocModel.James Molloy2014-04-143-3/+21
| | | | | | Patch by Nick Tomlinson! llvm-svn: 206177
* Add support for named values in the parser.Samuel Benzaquen2014-04-1410-69/+175
| | | | | | | | | | | | Summary: Add support for named values in the parser. Reviewers: pcc CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3276 llvm-svn: 206176
* 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
* clang-format: Fix regression caused by r206165.Daniel Jasper2014-04-142-1/+13
| | | | llvm-svn: 206173
* 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
* clang-format: Fix incorrect &&-detection in macros.Daniel Jasper2014-04-142-0/+4
| | | | | | | | | | | | Before: #define A(a, b) (a &&b) After: #define A(a, b) (a && b) This fixes llvm.org/PR19343. llvm-svn: 206165
* 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
* clang-format: Improve array literal formatting fix in r206161.Daniel Jasper2014-04-142-7/+16
| | | | | | | Instead of choosing based on the number of elements, simply respect the user's choice of where to wrap array literals. llvm-svn: 206162
* clang-format: With ColumnLimit=0, keep short array literals on a line.Daniel Jasper2014-04-142-0/+15
| | | | | | | | | | | | | | | | Before: NSArray* a = [[NSArray alloc] initWithArray:@[ @"a" ] copyItems:YES]; After: NSArray* a = [[NSArray alloc] initWithArray:@[ @"a" ] copyItems:YES]; This fixed llvm.org/PR19080. llvm-svn: 206161
* [asan] don't use bool in public interface, make sure the interface headers ↵Kostya Serebryany2014-04-146-13/+16
| | | | | | are usable in plain C llvm-svn: 206160
* clang-format: Don't allow hanging indentation for operators on new linesDaniel Jasper2014-04-144-21/+52
| | | | | | | | | | | | | | | | Before: if (aaaaaaaa && bbbbbbbbbbbbbbb // need to wrap == cccccccccccccc) ... After: if (aaaaaaaa && bbbbbbbbbbbbbbb // need to wrap == cccccccccccccc) ... The same rule has already be implemented for BreakBeforeBinaryOperators set to false in r205527. llvm-svn: 206159
* [asan] provide better reports for cases where memcpy/etc get negative size ↵Kostya Serebryany2014-04-146-1/+30
| | | | | | parameter. Also fix a typo found by Tetsuo Kiso llvm-svn: 206158
* Format code around VCS conflict markers.Manuel Klimek2014-04-145-31/+224
| | | | | | | | | | | | | | | | | | | | | Now correctly formats: { int a; void f() { callme(some(parameter1, <<<<<<< text by the vcs parameter2), ||||||| text by the vcs parameter2), parameter3, ======= text by the vcs parameter2, parameter3), >>>>>>> text by the vcs otherparameter); } } llvm-svn: 206157
* Codegeneration: Free memory correctly when using -polly-vectorizer=pollyTobias Grosser2014-04-142-0/+22
| | | | | | | This fixes PR19421. Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> llvm-svn: 206156
* clang-format: Improve formatting of annotated variables.Daniel Jasper2014-04-142-6/+8
| | | | | | | | | | | | Before: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY( aaaaaaaaaaaa) = aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(aaaaaaaaaaaa) = aaaaaaaa::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 206155
* 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
* Improve error recovery around colon.Serge Pavlov2014-04-1310-33/+200
| | | | | | | | | | Parse of nested name spacifier is modified so that it properly recovers if colon is mistyped as double colon in case statement. This patch fixes PR15133. Differential Revision: http://llvm-reviews.chandlerc.com/D2870 llvm-svn: 206135
* Update isl to fix memory bugsTobias Grosser2014-04-131-1/+1
| | | | llvm-svn: 206134
* Fix diagnostics for C-style cast to function type.Logan Chien2014-04-132-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | If the C-style type cast is applied to the overloaded function and the destination type is function type, then Clang will crash with assertion failure. For example, void foo(int); void foo(int, int); void bar() { typedef void (ft)(int); ft p = (ft)foo; } In this case, the overloaded function foo will be cast to a function type, which should be considered as an error. But, unfortunately, since the function resolution is using canonical type, the matched function will be returned, and result in SEGV. This patch fixes this issue by removing the assertion and add some error diagnostics as the one in static_cast. llvm-svn: 206133
* MS ABI: Bitfields FielDecls only align if they allocateDavid Majnemer2014-04-132-5/+29
| | | | | | | | | Don't consider a __declspec(align) on a bitfield's declaration if it didn't allocate any underlying storage. This fixes PR19414. llvm-svn: 206132
* 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
* PR19339: Disambiguate lambdas with init-captures from designated initializersRichard Smith2014-04-133-40/+32
| | | | | | properly. llvm-svn: 206128
* [X86] unique_ptr'ify one of X86GenericDisassembler's members.Lang Hames2014-04-132-14/+10
| | | | llvm-svn: 206127
OpenPOWER on IntegriCloud