summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Fix formatting. NFCCraig Topper2016-06-171-1/+1
| | | | llvm-svn: 272996
* [LLE] Don't hard-code the name of the preheader in testAdam Nemet2016-06-171-2/+2
| | | | | | | Turns out a didn't get this right because symbolic stride versioning changes the name. Relax the matching. llvm-svn: 272992
* [PM] Run clang-format over various parts of the new pass manager codeChandler Carruth2016-06-175-19/+24
| | | | | | | prior to some very substantial patches to isolate any formatting-only changes. llvm-svn: 272991
* Revert "InstCombine: Reduce trunc (shl x, K) width."Matt Arsenault2016-06-175-139/+10
| | | | | | | | This reverts commit r272987. This might be causing crashes on some bots. llvm-svn: 272990
* [esan|cfrag] Add the struct field size array in StructInfoQin Zhao2016-06-173-29/+44
| | | | | | | | | | | | | | | Summary: Adds the struct field size array in struct StructInfo. Updates test struct_field_count_basic.ll. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits Differential Revision: http://reviews.llvm.org/D21341 llvm-svn: 272989
* InstCombine: Reduce trunc (shl x, K) width.Matt Arsenault2016-06-175-10/+139
| | | | llvm-svn: 272987
* [ARM] Add support for mrrc/mrrc2 intrinsics.Ranjeet Singh2016-06-175-19/+88
| | | | | | | | | | | | | | | | | | | Reapplying patch as it was reverted when it was first committed because of an assertion failure when the mrrc2 intrinsic was called in ARM mode. The failure was happening because the instruction was being built in ARMISelDAGToDAG.cpp and the tablegen description for mrrc2 instruction doesn't allow you to use a predicate. The ARM architecture manuals do say that mrrc2 in ARM mode can be predicated with AL in assembly but this has no effect on the encoding of the instruction as the top 4 bits will always be 1111 not 1110 which is the encoding for the condition AL. Differential Revision: http://reviews.llvm.org/D21408 llvm-svn: 272982
* [RS4GC] Pass CallSite by value instead of const ref; NFCSanjoy Das2016-06-171-11/+10
| | | | | | That's the idiomatic LLVM pattern. llvm-svn: 272981
* [PM] Remove support for omitting the AnalysisManager argument to newChandler Carruth2016-06-1749-180/+122
| | | | | | | | | | | | | | | | | | | | pass manager passes' `run` methods. This removes a bunch of SFINAE goop from the pass manager and just requires pass authors to accept `AnalysisManager<IRUnitT> &` as a dead argument. This is a small price to pay for the simplicity of the system as a whole, despite the noise that changing it causes at this stage. This will also helpfull allow us to make the signature of the run methods much more flexible for different kinds af passes to support things like intelligently updating the pass's progression over IR units. While this touches many, many, files, the changes are really boring. Mostly made with the help of my trusty perl one liners. Thanks to Sean and Hal for bouncing ideas for this with me in IRC. llvm-svn: 272978
* Use m_APInt in SimplifyCFGChuang-Yu Cheng2016-06-171-5/+5
| | | | | | | | | | | Switch from m_Constant to m_APInt per David's request. NFC. Author: Thomas Jablin (tjablin) Reviewers: majnemer cycheng http://reviews.llvm.org/D21440 llvm-svn: 272977
* [LV] Move management of symbolic strides to LAA. NFCIAdam Nemet2016-06-164-83/+72
| | | | | | | | | | | | | | | | | | | This is still NFCI, so the list of clients that allow symbolic stride speculation does not change (yes: LV and LoopVersioningLICM, no: LLE, LDist). However since the symbolic strides are now managed by LAA rather than passed by client a new bool parameter is used to enable symbolic stride speculation. The existing test Transforms/LoopVectorize/version-mem-access.ll checks that stride speculation is performed for LV. The previously added test Transforms/LoopLoadElim/symbolic-stride.ll ensures that no speculation is performed for LLE. The next patch will change the functionality and turn on symbolic stride speculation in all of LAA's clients and remove the bool parameter. llvm-svn: 272970
* [safestack] Sink unsafe address computation to each use.Evgeniy Stepanov2016-06-166-20/+97
| | | | | | | | | | This is a fix for PR27844. When replacing uses of unsafe allocas, emit the new location immediately after each use. Without this, the pointer stays live from the function entry to the last use, while it's usually cheaper to recalculate. llvm-svn: 272969
* [safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.Evgeniy Stepanov2016-06-165-19/+237
| | | | | | | | | When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are updated to refer to the new location. This change does the same to dbg.value intrinsics. llvm-svn: 272968
* Properly handle short file names on the command line in WindowsAdrian McCarthy2016-06-161-2/+27
| | | | | | | | Some build systems use the short (8.3) file names on Windows, especially if the path has spaces in it. The shortening made it impossible for clang to distinguish between clang.exe, clang++.exe, and clang-cl.exe. So this expands short names in the first argument and does wildcard expansion for the rest. Differential Revision: http://reviews.llvm.org/D21420 llvm-svn: 272967
* [LV] Make getSymbolicStrides return a pointer rather than a reference. NFCAdam Nemet2016-06-161-5/+5
| | | | | | | | | | | | | | | Turns out SymbolicStrides is actually used in canVectorizeWithIfConvert before it gets set up in canVectorizeMemory. This works fine as long as SymbolicStrides resides in LV since we just have an empty map. Based on this the conclusion is made that there are no symbolic strides which is conservatively correct. However once SymbolicStrides becomes part of LAI, LAI is nullptr at this point so we need to differentiate the uninitialized state by returning a nullptr for SymbolicStrides. llvm-svn: 272966
* Fix BitVector move ctor/assignment.Evgeniy Stepanov2016-06-162-0/+28
| | | | | | | | Current implementation leaves the object in an invalid state. This reverts commit bf0c389ac683cd6c0e5959b16537e59e5f4589e3. llvm-svn: 272965
* TTI: Add hook for memory width to vectorizeMatt Arsenault2016-06-163-0/+16
| | | | llvm-svn: 272964
* [CodeView] Implement support for enumsDavid Majnemer2016-06-163-0/+69
| | | | | | | | | | MSVC handles enums differently from structs and classes: a forward declaration is not emitted unconditionally. MSVC does not emit an S_UDT record for the enum. Differential Revision: http://reviews.llvm.org/D21442 llvm-svn: 272960
* AArch64: Fix range loop contradicting comment above itMatt Arsenault2016-06-161-1/+2
| | | | llvm-svn: 272959
* AMDGPU/SI: Propagate the Kill flag in storeRegToStackSlot and ↵Changpeng Fang2016-06-163-15/+29
| | | | | | | | | | eliminateFrameIndex Reviewers: arsenm, tstellarAMD Differential Revision: http://reviews.llvm.org/21438 llvm-svn: 272958
* Revert "Refactor and cleanup Assembly Parsing / Lexing"Nirav Dave2016-06-169-165/+135
| | | | | | | | Reverting for unexpected crashes on various platforms. This reverts commit r272953. llvm-svn: 272957
* AMDGPU: Fix maximum instruction size for amdgcnMatt Arsenault2016-06-161-1/+3
| | | | | | | This was causing the conservative estimate of inline asm size to be twice as big as expected. llvm-svn: 272956
* [EarlyCSE] Minor cosmetic NFC changesSanjoy Das2016-06-161-2/+2
| | | | | | | - Avoid implicit conversion from pointer to bool - Add a comment when passing in a boolean value llvm-svn: 272955
* [EarlyCSE] Fold invariant loadsSanjoy Das2016-06-162-8/+121
| | | | | | | | Redundant invariant loads can be CSE'ed with very little extra effort over what early-cse already tracks, so it looks reasonable to make early-cse handle this case. llvm-svn: 272954
* Refactor and cleanup Assembly Parsing / LexingNirav Dave2016-06-169-135/+165
| | | | | | | | | | | | | | | | | | | | | | | Add explicit Comment Token in Assembly Lexing for future support for outputting explicit comments from inline assembly. As part of this, CPPHash Directives are now explicitly distinguished from Hash line comments in Lexer. Line comments are recorded as EndOfStatement tokens, not Comment tokens to simplify compatibility with current TargetParsers. This slightly complicates comment output. This remove all lexing tasks out of the parser, does minor cleanup to remove extraneous newlines Asm Output, and some improvements white space handling. Reviewers: rtrieu, dwmw2, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20009 llvm-svn: 272953
* [libFuzzer] use the new chainable malloc hooks instead of the old ↵Kostya Serebryany2016-06-163-39/+32
| | | | | | un-chainable ones, use atomic for malloc/free counters instead of a thread local counter in the main thread. This should make on-the-spot leak detection in libFuzzer more reliable llvm-svn: 272948
* Fix strip-dead-debug-info test if path contains "bar".Justin Lebar2016-06-161-2/+2
| | | | | | | | | | | This test checks that the string 'bar' (no quotes) doesn't exist in the output after running opt. But opt embeds the absolute path to the filename, and on my machine, the filename contains the string 'jlebar', causing the test to fail. This patch changes the test to look for the string '"bar"' instead. llvm-svn: 272941
* Make check lines not match themselves.Paul Robinson2016-06-161-3/+4
| | | | | | Noticed during review of the recent FileCheck change. llvm-svn: 272940
* Refactor more duplicated code.Rafael Espindola2016-06-162-21/+18
| | | | llvm-svn: 272939
* NFC; refactor getFrameIndexReferenceFromSPSanjoy Das2016-06-165-44/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: ... into getFrameIndexReferencePreferSP. This change folds the fail-then-retry logic into getFrameIndexReferencePreferSP. There is a non-functional but behaviorial change in WinException -- earlier if `getFrameIndexReferenceFromSP` failed we'd trip an assert, but now we'll silently use the (wrong) offset from the base pointer. I could not write the assert I'd like to write ("FrameReg == StackRegister", like I've done in X86FrameLowering) since there is no easy way to get to the stack register from WinException (happy to be proven wrong here). One solution to this is to add a `bool OnlyStackPointer` parameter to `getFrameIndexReferenceFromSP` that asserts if it could not satisfy its promise of returning an offset from a stack pointer, but that seems overkill. Reviewers: rnk Subscribers: sanjoy, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D21427 llvm-svn: 272938
* Refactor duplicated code.Rafael Espindola2016-06-161-4/+4
| | | | llvm-svn: 272936
* [x86] autoupgrade and remove AVX2 integer min/max intrinsicsSanjay Patel2016-06-165-91/+180
| | | | | | | This will (hopefully very temporarily) break clang. The clang side of this should be the next commit. llvm-svn: 272932
* [codeview] Use hashBufferV8 to verify all type records.Rui Ueyama2016-06-161-15/+15
| | | | | | Differential Revision: http://reviews.llvm.org/D21393 llvm-svn: 272930
* Resubmit "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-1614-387/+483
| | | | | | | There was a regression introduced during type stream merging when visiting a field list record. This has been fixed in this patch. llvm-svn: 272929
* dos2unix this test. NFC.Rafael Espindola2016-06-161-45/+45
| | | | llvm-svn: 272928
* Revert "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-1614-466/+390
| | | | | | | | This reverts commit fb0dd311e1ad945827b8ffd5354f4810e2be1579. This breaks some llvm-readobj tests. llvm-svn: 272927
* [pdb] Change type visitor pattern to be dynamic.Zachary Turner2016-06-1614-390/+466
| | | | | | | | | | | | | | | This allows better catching of compiler errors since we can use the override keyword to verify that methods are actually overridden. Also in this patch I've changed from storing a boolean Error code everywhere to returning an llvm::Error, to propagate richer error information up the call stack. Reviewed By: ruiu, rnk Differential Revision: http://reviews.llvm.org/D21410 llvm-svn: 272926
* [PM] Revert the port of MergeLoadStoreMotion to the new pass manager.Davide Italiano2016-06-168-172/+134
| | | | | | | | Daniel Berlin expressed some real concerns about the port and proposed and alternative approach. I'll revert this for now while working on a new patch, which I hope to put up for review shortly. Sorry for the churn. llvm-svn: 272925
* [DSE] Minor style cleanup. NFC.Chad Rosier2016-06-161-12/+5
| | | | llvm-svn: 272922
* remove old FileCheck lines that are no longer usedSanjay Patel2016-06-161-18/+0
| | | | llvm-svn: 272921
* [DAG] Remove redundant FMUL in Newton-Raphson SQRT codeSanjay Patel2016-06-163-68/+152
| | | | | | | | | | | | | | | | | When calculating a square root using Newton-Raphson with two constants, a naive implementation is to use five multiplications (four muls to calculate reciprocal square root and another one to calculate the square root itself). However, after some reassociation and CSE the same result can be obtained with only four multiplications. Unfortunately, there's no reliable way to do such a reassociation in the back-end. So, the patch modifies NR code itself so that it directly builds optimal code for SQRT and doesn't rely on any further reassociation. Patch by Nikolai Bozhenov! Differential Revision: http://reviews.llvm.org/D21127 llvm-svn: 272920
* AMDGPU: Add v_mad 16-bit instructions definition.Wei Ding2016-06-162-0/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D21362 llvm-svn: 272919
* [LLE] New test to check that no versioning for symbolic strides occurs. NFCAdam Nemet2016-06-161-0/+35
| | | | | | | | | This is currently only performed in the Vectorizer. I will change this as symbolic stride collection is moved to LAA. This test will track when the actual functional change occurs. llvm-svn: 272918
* LangRef: Note expectations when loading with extra alignmentMatt Arsenault2016-06-161-2/+14
| | | | llvm-svn: 272914
* Revert r272891 "[JumpThreading] Prevent dangling pointer problems in ↵Igor Laevsky2016-06-168-64/+7
| | | | | | | | BranchProbabilityInfo" It was causing failures in Profile-i386 and Profile-x86_64 tests. llvm-svn: 272912
* [PATCH] Fix RuntimeDyldCOFFI386 to handle relocations with a non-zero addendReid Kleckner2016-06-162-3/+34
| | | | | | | | | This fixes IMAGE_REL_I386_DIR32, IMAGE_REL_I386_DIR32NB, IMAGE_REL_I386_SECREL, and IMAGE_REL_I386_REL32 relocations. Based on patch by Jon Turney <jon.turney@dronecode.org.uk> llvm-svn: 272911
* Don't print (PLT) on arm.Rafael Espindola2016-06-1610-57/+29
| | | | | | | | | The R_ARM_PLT32 relocation is deprecated and is not produced by MC. This means that the code being deleted is dead from the .o point of view and was making the .s more confusing. llvm-svn: 272909
* [x86] autoupgrade and remove SSE2/SSE41 integer min/max intrinsicsSanjay Patel2016-06-165-59/+177
| | | | | | | | Follow-up to: http://reviews.llvm.org/rL272806 http://reviews.llvm.org/rL272807 llvm-svn: 272907
* Remove redundant -mattr options from llvm-objdump commands.Daniel Sanders2016-06-164-6/+2
| | | | | | | | The -mattr options in these four tests have no effect on the output of llvm-objdump. In the case of the two Mips tests, removing the -mattr option left duplicate RUN lines so the duplicates have been removed. llvm-svn: 272906
* Refactor duplicated code. NFC.Rafael Espindola2016-06-161-3/+1
| | | | llvm-svn: 272905
OpenPOWER on IntegriCloud