summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Use READ2/WRITE2 instructions for 64-bit mem ops with 32-bit alignmentTom Stellard2014-08-225-4/+116
| | | | llvm-svn: 216279
* R600/SI: Use a ComplexPattern for DS loads and storesTom Stellard2014-08-228-120/+169
| | | | llvm-svn: 216278
* R600/SI: Wrap local memory pointer in AssertZExt on SITom Stellard2014-08-221-0/+12
| | | | | | | | | These pointers are really just offsets and they will always be less than 16-bits. Using AssertZExt allows us to use computeKnownBits to prove that these values are positive. We will use this information in a later commit. llvm-svn: 216277
* R600/SI: Use correct helper class for DS_WRITE2 instructionsTom Stellard2014-08-221-1/+1
| | | | | | | DS_1A uses a single offset encoding, so offset1 wasn't being encoded. llvm-svn: 216276
* [test/CodeGen/ARM] Adpat test to match new codegen after r216274.Quentin Colombet2014-08-221-29/+29
| | | | | | | | | | | Moreover, rework some patterns to actually check the emitted instructions instead of matching unrelated string! E.g., some of the "// CHECK: vmov" were matching stuff like ".globl funcname_with_vmov" instead of actual instructions. llvm-svn: 216275
* [ARM] Move the implementation of the target hooks related to copy-relatedQuentin Colombet2014-08-225-116/+118
| | | | | | | | | instruction from ARMInstrInfo to ARMBaseInstrInfo. That way, thumb mode can also benefit from the advanced copy optimization. <rdar://problem/12702965> llvm-svn: 216274
* InstCombine: Don't unconditionally preserve 'nuw' when shrinking constantsDavid Majnemer2014-08-222-6/+24
| | | | | | | | | | | | Consider: %add = add nuw i32 %a, -16777216 %and = and i32 %add, 255 Regardless of whether or not we demand the sign bit of %add, we cannot replace -16777216 with 2130706432 without also removing 'nuw' from the instruction. llvm-svn: 216273
* [analyzer] Remove check covered by -Wobjc-missing-super-calls.Jordan Rose2014-08-221-39/+0
| | | | | | | | | The ObjCDealloc checker is currently disabled because it was too aggressive, but this is a good first step in getting it back to a useful state. Patch by David Kilzer! llvm-svn: 216272
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-228-0/+47
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* -fms-extensions: Alias _intNN to __intNNReid Kleckner2014-08-222-0/+9
| | | | | | | | | | Fixes build for SPEC 2000 CPU. MSVC disables these aliases under /Za, which enables stricter standards compliance. We don't currently have any way to disable them. Patch by Kevin Smith! llvm-svn: 216270
* InstCombine: sub nsw %x, C -> add nsw %x, -C if C isn't INT_MINDavid Majnemer2014-08-224-1/+38
| | | | | | We can preserve nsw during this transform if -C won't overflow. llvm-svn: 216269
* [Support] Fix the overflow bug in ULEB128 decoding.Alex Lorenz2014-08-222-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5029 llvm-svn: 216268
* Fixing MSVC warning: "warning C4373: 'blah': virtual function overrides ↵Aaron Ballman2014-08-221-4/+2
| | | | | | | | 'blah', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers." This warning is basically useless because the "previous versions" being referred to is MSVC 2005 and earlier, and we obviously do not care about them. However, this warning isn't particularly chatty (I don't recall ever seeing it previously), and it has the opportunity to point out cases where the cv-qualifiers differ unintentionally (like this case), so I am leaving it enabled for now. llvm-svn: 216267
* [ubsan] Follow-up for r216263: fix the expected line number.Alexander Potapenko2014-08-221-1/+1
| | | | llvm-svn: 216266
* [ASan/Win] Land the trivial bits of -MD RTL support (PR20214)Timur Iskhodzhanov2014-08-225-10/+11
| | | | llvm-svn: 216265
* [ASan] Use check_library_exists to determine if libc/libstdc++ are availableTimur Iskhodzhanov2014-08-222-3/+7
| | | | llvm-svn: 216264
* [ubsan] Do not run Function/function.cpp on Darwin where -fsanitize=function ↵Alexander Potapenko2014-08-221-0/+3
| | | | | | is not supported. llvm-svn: 216263
* [mips] Don't use odd-numbered float registers for double arguments for fastccSasa Stankovic2014-08-222-2/+88
| | | | | | | | calling convention if FP is 64-bit and +nooddspreg is used. Differential Revision: http://reviews.llvm.org/D4981.diff llvm-svn: 216262
* InstCombine: Don't unconditionally preserve 'nsw' when shrinking constantsDavid Majnemer2014-08-222-1/+21
| | | | | | | | | | | | | | Consider: %add = add nsw i32 %a, -16777216 %and = and i32 %add, 255 Regardless of whether or not we demand the sign bit of %add, we cannot replace -16777216 with 2130706432 without also removing 'nsw' from the instruction. This fixes PR20377. llvm-svn: 216261
* [AArch64, inline-asm] Improve diagnostic that is printed when the size of aAkira Hatanaka2014-08-229-28/+128
| | | | | | | | | | | | | | | | | variable that has regiser constraint "r" is not 64-bit. General register operands are output using 64-bit "x" register names, regardless of the size of the variable, unless the asm operand is prefixed with the "%w" modifier. This surprises and confuses many users who aren't familiar with aarch64 inline assembly rules. With this commit, a note and fixit hint are printed which tell the users that they need modifier "%w" in order to output a "w" register instead of an "x" register. <rdar://problem/12764785> llvm-svn: 216260
* MS ABI: Don't use the Itanium scheme for numbering lambdasDavid Majnemer2014-08-226-56/+85
| | | | | | | | | | | The Itanium ABI will give out the same mangling number for two different lambdas if their call operators have different types. The MS ABI cannot do the same because it does not mangle the return type into it's lambdas. This fixes PR20719. llvm-svn: 216259
* When adding a dSYM to an existing ObjectFile, we can have a situationJason Molenda2014-08-229-0/+91
| | | | | | | | | | | | | | | | | | with binaries in the dyld shared cache (esp on iOS) where the file address for the executable binary (maybe from memory, maybe from an expanded copy of the dyld shared cache) is different from the file address in the dSYM. In that case, ObjectFileMachO replaces the file addresses from the original binary with the dSYM file addresses (usually 0-based) -- lldb doesn't have a notion of two file addresses for a given module so they need to agree. There was a cache of file addresses over in the Symtab so I added a method to the Module and the objects within to clear any file address caches if they exist, and added an implementation in the Symtab module to do that. <rdar://problem/16929569> llvm-svn: 216258
* Simplify. No functionality changes.Rui Ueyama2014-08-221-6/+3
| | | | llvm-svn: 216257
* fix: SLPVectorizer crashes for unreachable blocks containing not schedulable ↵Erik Eckstein2014-08-222-0/+48
| | | | | | | | | | | | instructions. In unreachable blocks it's legal to have instructions like "%x = op %x". Such instuctions are not schedulable. Therefore the SLPVectorizer has to check for unreachable blocks and ignore them. Fixes bug 20646. llvm-svn: 216256
* [dfsan] Fix non-determinism bug in non-zero label check annotator.Peter Collingbourne2014-08-222-15/+16
| | | | | | | We now use a std::vector instead of a DenseSet to store the list of label checks so that we can iterate over it deterministically. llvm-svn: 216255
* Fix PR20705, crash on invalid.Richard Trieu2014-08-222-1/+22
| | | | | | dyn_cast -> dyn_cast_or_null to handle a null pointer. llvm-svn: 216254
* [PECOFF] Fix PE+ relocationsRui Ueyama2014-08-2219-58/+279
| | | | | | | | | | | | | The implementation of AMD64 relocations was imcomplete and wrong. On AMD64, we of course have to use AMD64 relocations instead of i386 ones. This patch fixes the issue. LLD is now able to link hello64.obj (created from hello64.asm) against user32.lib and kernel32.lib to create a Win64 binary. llvm-svn: 216253
* Fix build after r216223: Explicitly pass ownership of the MemoryBuffer to ↵Hans Wennborg2014-08-222-2/+2
| | | | | | AddNewSourceBuffer using std::unique_ptr llvm-svn: 216252
* CGCall: Factor out the logic mapping call arguments to LLVM IR arguments.Alexey Samsonov2014-08-222-235/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This refactoring introduces ClangToLLVMArgMapping class, which encapsulates the information about the order in which function arguments listed in CGFunctionInfo should be passed to actual LLVM IR function, such as: 1) positions of sret, if there is any 2) position of inalloca argument, if there is any 3) position of helper padding argument for each call argument 4) positions of regular argument (there can be many if it's expanded). Simplify several related methods (ConstructAttributeList, EmitFunctionProlog and EmitCall): now they don't have to maintain iterators over the list of LLVM IR function arguments, dealing with all the sret/inalloca/this complexities, and just use expected positions of LLVM IR arguments stored in ClangToLLVMArgMapping. This may increase the running time of EmitFunctionProlog, as we have to traverse expandable arguments twice, but in further refactoring we will be able to speed up EmitCall by passing already calculated CallArgsToIRArgsMapping to ConstructAttributeList, thus avoiding traversing expandable argument there. No functionality change. Test Plan: regression test suite Reviewers: majnemer, rnk Reviewed By: rnk Subscribers: cfe-commits, rjmccall, timurrrr Differential Revision: http://reviews.llvm.org/D4938 llvm-svn: 216251
* ValueTracking: Figure out more bits when looking at add/subDavid Majnemer2014-08-222-66/+51
| | | | | | | | | Given something like X01XX + X01XX, we know that the result must look like X1XXX. Adapted from a patch by Richard Smith, test-case written by me. llvm-svn: 216250
* [test/CodeGen/ARM] Adpat test to match new codegen after r216236.Quentin Colombet2014-08-221-9/+9
| | | | llvm-svn: 216249
* SROA: Handle a case of store size being smaller than allocation sizeReid Kleckner2014-08-222-5/+54
| | | | | | | | | | | | | | | | In this case, we are creating an x86_fp80 slice for a union from C where the padding bytes may contain real data. An x86_fp80 alloca is 16 bytes, and that's just fine. We can't, however, use regular loads and stores to access the slice, because the store size is only 10 bytes / 80 bits. Instead, use memcpy and memset. Fixes PR18726. Reviewed By: chandlerc Differential Revision: http://reviews.llvm.org/D5012 llvm-svn: 216248
* Fixes a few more places where we were manually setting the filename.Zachary Turner2014-08-213-3/+3
| | | | llvm-svn: 216247
* Revert "X86: Align the stack on word boundaries in LowerFormalArguments()"Duncan P. N. Exon Smith2014-08-212-8/+2
| | | | | | | | | | | | | This (mostly) reverts commit r216119. Somewhere during the review Reid committed r214980 which fixed this another way, and I neglected to check that the testcase still failed before committing. I've left test/CodeGen/X86/aligned-variadic.ll around in case it adds extra coverage. llvm-svn: 216246
* Bump the verison number in the xcode project files.Jason Molenda2014-08-215-35/+35
| | | | llvm-svn: 216245
* Add an explicit move constructor to SrcBufferReid Kleckner2014-08-211-0/+5
| | | | | | | MSVC can't synthesize the explicit one. Instead it tries to emit a copy ctor which would call the deleted copy ctor of unique_ptr. llvm-svn: 216244
* Two small fixes to get Mac native + debugserver working after theJason Molenda2014-08-212-3/+3
| | | | | | | HostInfo et al changes from Zachary. Changes suggested by Zachary - fixes the problems I was seeing. llvm-svn: 216243
* [FastISel][AArch64] Add support for variable shift.Juergen Ributzka2014-08-212-44/+253
| | | | | | | | This adds the missing variable shift support for value type i8, i16, and i32. This fixes <rdar://problem/18095685>. llvm-svn: 216242
* Minor refactor to make applying patches from 'Add a "probe-stack" attribute' ↵Philip Reames2014-08-211-1/+5
| | | | | | review thread out of order easier. llvm-svn: 216241
* Update for LLVM API change to remove discriminator tracking from ↵David Blaikie2014-08-211-2/+1
| | | | | | DILexicalBlock (in favor of DILexicalBlockFile - where a default arg is used to avoid the need for API churn of those callers) llvm-svn: 216240
* Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator ↵David Blaikie2014-08-2116-52/+47
| | | | | | | | | | | | | | | changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. Somewhat unnoticed in the original implementation of discriminators, but it could cause instructions to end up in new, small, DW_TAG_lexical_blocks due to the use of DILexicalBlock to track discriminator changes. Instead, use DILexicalBlockFile which we already use to track file changes without introducing new scopes, so it works well to track discriminator changes in the same way. llvm-svn: 216239
* Add missing HostInfo::Initialize() in llgs.Todd Fiala2014-08-211-1/+3
| | | | | | This fixes an llgs segfault on startup. llvm-svn: 216238
* name change: isPow2DivCheap -> isPow2SDivCheapSanjay Patel2014-08-215-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | isPow2DivCheap That name doesn't specify signed or unsigned. Lazy as I am, I eventually read the function and variable comments. It turns out that this is strictly about signed div. But I discovered that the comments are wrong: srl/add/sra is not the general sequence for signed integer division by power-of-2. We need one more 'sra': sra/srl/add/sra That's the sequence produced in DAGCombiner. The first 'sra' may be removed when dividing by exactly '2', but that's a special case. This patch corrects the comments, changes the name of the flag bit, and changes the name of the accessor methods. No functional change intended. Differential Revision: http://reviews.llvm.org/D5010 llvm-svn: 216237
* [PeepholeOptimizer] Enable the advanced copy optimization by default.Quentin Colombet2014-08-211-1/+1
| | | | | | | | | | | | | The advanced copy optimization does not yield any difference on the whole llvm test-suite + SPECs, either in compile time or runtime (binaries are identical), but has a big potential when data go back and forth between register files as demonstrated with test/CodeGen/ARM/adv-copy-opt.ll. Note: This was measured for both Os and O3 for armv7s, arm64, and x86_64. <rdar://problem/12702965> llvm-svn: 216236
* Whitespace change to reduce diff in future patch.Philip Reames2014-08-211-6/+6
| | | | | | | | Patch 2 of 11 in 'Add a "probe-stack" attribute' review thread Patch by: john.kare.alsaker@gmail.com llvm-svn: 216235
* [mach-o] support N_NO_DEAD_STRIP nlist.desc bitNick Kledzik2014-08-215-34/+63
| | | | | | | Mach-O symbols can have an attribute on them means their content should never be dead code stripped. This translates to deadStrip() == deadStripNever. llvm-svn: 216234
* [X86] Split out the logic to select the stack probe function (NFC)Philip Reames2014-08-212-11/+25
| | | | | | | | Patch 1 of 11 in 'Add a "probe-stack" attribute' review thread. Patch by: <john.kare.alsaker@gmail.com> llvm-svn: 216233
* Add hooks for emitLeading/TrailingFenceRobin Morisset2014-08-211-0/+20
| | | | llvm-svn: 216232
* Rename AtomicExpandLoadLinked into AtomicExpandRobin Morisset2014-08-2117-40/+41
| | | | | | | | | | | AtomicExpandLoadLinked is currently rather ARM-specific. This patch is the first of a group that aim at making it more target-independent. See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075873.html for details The command line option is "atomic-expand" llvm-svn: 216231
* Move the rest of the HostInfo functions over.Zachary Turner2014-08-2115-162/+131
| | | | | | | | | This should bring HostInfo up to 99% completion. The remainder of code in Host will be split into instantiatable classes representing host processes, threads, dynamic libraries, and process launching strategies. llvm-svn: 216230
OpenPOWER on IntegriCloud