summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid potential ADL ambiguity between llvm::make_unique and std::make_unique ↵David Blaikie2017-03-201-1/+1
| | | | | | | | (when building as C++14+) Patch by Moritz Kiefer! llvm-svn: 298266
* [AMDGPU][MC] Fix for Bugs 28201, 28199, 28170 + LIT testsDmitry Preobrazhensky2017-03-202-8/+46
| | | | | | | | | | This fix enables sp3 abs modifier with constants Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30825 llvm-svn: 298265
* [InstCombine] Print a debug message when we constant fold an operand during ↵Craig Topper2017-03-201-0/+2
| | | | | | | | | | | | worklist creation InstCombine tries to constant fold instruction operands during worklist building, but we don't print that we're doing this. We also set a change flag here that causes us to rebuild and rerun the worklist one more time even if processing the worklist itself created no additional changes. So in the log I saw two inst combine runs that visited all instructions without printing that anything was changed. I may be submitting another patch to remove the change flag unless I can find some reason why we should be doing that. Differential Revision: https://reviews.llvm.org/D31091 llvm-svn: 298264
* [Outliner] ACTUALLY remove the errs outputJessica Paquette2017-03-201-1/+1
| | | | | | | I don't know how to type. This fixes the last commit which would have made all of the overflows legal, and kept the screaming. llvm-svn: 298263
* Templatize parts of VNCoercion, and add constant-only versions of the ↵Daniel Berlin2017-03-203-69/+124
| | | | | | | | | | | | | | | | | | | | | | | functions to be used in NewGVN. NFCI. Summary: This is ground work for the changes to enable coercion in NewGVN. GVN doesn't care if they end up constant because it eliminates as it goes. NewGVN cares. IRBuilder and ConstantFolder deliberately present the same interface, so we use this to our advantage to templatize our functions to make them either constant only or not. Reviewers: davide Subscribers: llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D30928 llvm-svn: 298262
* Fix remote test suite directory creationPavel Labath2017-03-202-27/+33
| | | | | | | | | | | | | | | r298203 make SBPlatform::MakeDirectory less recursive, which breaks the test suite creation of test directory hierarchy creation on the remote target. Since the function was never fully recursive, and the name does not imply recursiveness, I fix the problem by modifying the test runner to do the recursion manually. I also make the runner complain more loudly when it fails to create the directory -- previously it just printed the error to stdout and caused most of the tests to hang, which is not very helpful in diagnosing the problem. llvm-svn: 298261
* [Outliner] Remove output for offset range checkJessica Paquette2017-03-201-3/+1
| | | | | | | | | | Forgot to remove some output before committing last time. (Instruction fixups don't actually overflow anywhere in the test suite so far, so I missed it). To prevent the outliner from screaming "Overflow!" in the event that that does happen, this commit removes that output. llvm-svn: 298260
* [DeLICM] Refector out parseSetOrNull. NFC.Michael Kruse2017-03-201-21/+13
| | | | | | | | Note that the isl::union_set(isl_ctx,std::string) constructor will auto-convert the char* to an std::string. Converting a nullptr to std::string is undefined in C++11 (sect. 21.4.2.9). llvm-svn: 298259
* [DeLICM] Add forgotten isl_space_set_tuple_id in unittests.Michael Kruse2017-03-201-0/+2
| | | | | | | | Otherwise the isl_id NewId which ensures uniqueness of the created space is unused. None of the tests currently uses an nameless tuple, so there is not change in what is tested. llvm-svn: 298258
* [tablegen][globalisel] Capture instructions into locals and related ↵Daniel Sanders2017-03-202-121/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infrastructure for multiple instructions matches. Summary: Prepare the way for nested instruction matching support by having actions like CopyRenderer look up operands in the RuleMatcher rather than a specific InstructionMatcher. This allows actions to reference any operand from any matched instruction. It works by checking the 'shape' of the match and capturing each matched instruction to a local variable. If the shape is wrong (not enough operands, leaf nodes where non-leafs are expected, etc.), then the rule exits early without checking the predicates. Once we've captured the instructions, we then test the predicates as before (except using the local variables). If the match is successful, then we render the new instruction as before using the local variables. It's not noticable in this patch but by the time we support multiple instruction matching, this patch will also cause a significant improvement to readability of the emitted code since MRI.getVRegDef(I->getOperand(0).getReg()) will simply be MI1 after emitCxxCaptureStmts(). This isn't quite NFC because I've also fixed a bug that I'm surprised we haven't encountered yet. It now checks there are at least the expected number of operands before accessing them with getOperand(). Depends on D30531 Reviewers: t.p.northover, qcolombet, aditya_nandakumar, ab, rovka Reviewed By: rovka Subscribers: dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D30535 llvm-svn: 298257
* [OpenCL] Fix extension guards for atomic functionsAnastasia Stulova2017-03-201-4/+2
| | | | | | | | Review: D30830 Patch by James Price! llvm-svn: 298256
* [AMDGPU][MC] Fix for Bugs 28200, 28202 + LIT testsDmitry Preobrazhensky2017-03-207-31/+393
| | | | | | | | | | Fixed several related issues with VOP3 fp modifiers. Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30821 llvm-svn: 298255
* [GlobalISel] Use the correct calling conv for callsDiana Picus2017-03-2010-16/+45
| | | | | | | | | | | This commit adds a parameter that lets us pass in the calling convention of the call to CallLowering::lowerCall. This allows us to handle situations where the calling convetion of the callee is different from that of the caller. Differential Revision: https://reviews.llvm.org/D31039 llvm-svn: 298254
* Use MutableArrayRef for APFloat::convertToIntegerSimon Pilgrim2017-03-206-43/+63
| | | | | | As discussed on D31074, use MutableArrayRef for destination integer buffers to help assert before stack overflows happen. llvm-svn: 298253
* Inline a few functions.Rafael Espindola2017-03-201-24/+6
| | | | | | | I don't foresee having to makes these functions any stricter or fancier, so it probably makes sense to inline them. llvm-svn: 298252
* Initialize dot.Rafael Espindola2017-03-201-0/+1
| | | | | | | This would fix an initialized error found by msan. The error is not showing after r298241, but it is not clear why. llvm-svn: 298251
* [sancov] Fix broken links and displaced coloring in coverage-report-server.pyMaxim Ostapenko2017-03-201-2/+2
| | | | | | | | | | | | | | This patch fixes two issues: * Fixed relative links to source files * Enumeration of lines in source files starts from 1 instead of 0 to align with .symcov files generated by sancov -symbolize Patch by Dmitiriy Nikiforov. Differential Revision: https://reviews.llvm.org/D31038 llvm-svn: 298250
* Strip trailing whitespaceSimon Pilgrim2017-03-201-3/+3
| | | | llvm-svn: 298249
* Strip trailing whitespaceSimon Pilgrim2017-03-201-8/+8
| | | | llvm-svn: 298248
* Strip trailing whitespaceSimon Pilgrim2017-03-202-6/+6
| | | | llvm-svn: 298247
* Revert "Use pthreads for thread-local lsan allocator cache on darwin"Francis Ricci2017-03-204-56/+44
| | | | | | | | This is still failing stack-use-after-return on linux-aarch64. This reverts commit 5b350130fc4bf6f70c078a5d97096df98a17a057. llvm-svn: 298246
* Add more examples to clang-format configurationSylvestre Ledru2017-03-202-4/+434
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D30990 llvm-svn: 298245
* [ELF] - Simplify redundant templated call. NFC.George Rimar2017-03-201-4/+2
| | | | llvm-svn: 298244
* [ELF] - Get rid of uintX_t in GdbIndexSection. NFC.George Rimar2017-03-202-5/+3
| | | | llvm-svn: 298243
* [ELF] - Reuse Config->IsLE. NFC.George Rimar2017-03-201-4/+1
| | | | llvm-svn: 298242
* [ELF] - Combine LinkerScriptBase and LinkerScript<ELFT>George Rimar2017-03-207-87/+86
| | | | | | | | | | | | Patch removes templated linkerscript class. Unfortunately that required 2 additional static methods findSymbol() and addRegularSymbol() because code depends on Symtab<ELFT>::X Differential revision: https://reviews.llvm.org/D30982 llvm-svn: 298241
* [ELF] - Apply clang-format. NFC.George Rimar2017-03-201-3/+3
| | | | llvm-svn: 298240
* Revert "[AMDGPU] Run always inliner early in opt"Konstantin Zhuravlyov2017-03-202-22/+0
| | | | | | This reverts commit r297958, it breaks device-libs build. llvm-svn: 298239
* [scan-build-py] use python tempfile for tempdirLaszlo Nagy2017-03-203-10/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D30862 llvm-svn: 298238
* [IR] Move a few static functions in Instruction class inline.Craig Topper2017-03-202-49/+17
| | | | | | They just check for certain opcodes and opcode enums are available in Instruction.h. llvm-svn: 298237
* [ConstantRange] Add setSizeSmallerThanOf method.Michael Zolotukhin2017-03-202-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | Summary: ConstantRange class currently has a method getSetSize, which is mostly used to compare set sizes of two constant ranges (there is only one spot where it's used in a slightly different scenario). This patch introduces setSizeSmallerThanOf method, which does such comparison in a more efficient way. In the original method we have to extend our types to (BitWidth+1), which can result it using slow case of APInt, extra memory allocations, etc. The change is supposed to not change any functionality, but it slightly improves compile time. Here is compile time improvements that I observed on CTMark: * tramp3d-v4 -2.02% * pairlocalalign -1.82% * lencod -1.67% Reviewers: sanjoy, atrick, pete Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31104 llvm-svn: 298236
* [IR] Remove some unneeded includes from Operator.h and fix cpp files that ↵Craig Topper2017-03-203-2/+2
| | | | | | were transitively depending on it. NFC llvm-svn: 298235
* [IR] Add missing copyright header.Craig Topper2017-03-201-0/+13
| | | | llvm-svn: 298234
* [APInt] Don't initialize VAL to 0 in APInt constructors. Push it down to the ↵Craig Topper2017-03-202-4/+7
| | | | | | | | | | initSlowCase and other init methods. I'm not sure if zeroing VAL before writing pVal is really necessary, but at least one other place did it in code. But by taking the store out of line, this reduces the opt binary by about 20k on my local x86-64 build. llvm-svn: 298233
* Remove unnecessary IDom checkXin Tong2017-03-201-3/+4
| | | | | | | | | | | | | | Summary: This Idom check seems unnecessary. The immediate children of a node on the Dominator Tree should always be the IDom of its immediate children in this case. Reviewers: hfinkel, majnemer, dberlin Reviewed By: dberlin Subscribers: dberlin, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D26954 llvm-svn: 298232
* [InstCombine] Remove duplicate code in SimplifyDemandedUseBits for URem. NFCCraig Topper2017-03-191-2/+0
| | | | llvm-svn: 298231
* [ELF] clang-format sortMipsSymbols. NFCSimon Atanasyan2017-03-191-1/+2
| | | | llvm-svn: 298230
* Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ ↵Aaron Ballman2017-03-1913-45/+57
| | | | | | | | coding standard from PRQA. This commit renames all of the safety functionality to be hicpp, adds an appropriate LICENSE.TXT, and updates the documentation accordingly. llvm-svn: 298229
* [AVX-512] Handle kor/kand/kandn/kxor/kxnor/knot intrinsics at lowering time ↵Craig Topper2017-03-194-47/+61
| | | | | | | | | | | | | | | | | | | instead of isel Summary: Currently we handle these intrinsics at isel with special patterns. But as they just map to normal logic operations, we should just handle them at lowering. This will expose them to DAG combine optimizations. Right now the kor-sequence test generates a bunch of regclass copies between GR16 and VK16 that the peephole optimizer and/or register coallescing are removing to keep everything in the mask domain. By handling the logic op intrinsics earlier, these copies become bitcasts in the DAG and get removed by DAG combine which seems more robust. This should help enable my plan to stop copying between K registers and GR8/GR16. The peephole optimizer can't remove a chain of copies between K and GR32 with insert_subreg/extract_subreg present in the chain so the kor-sequence test break. But this patch should dodge the problem entirely. Reviewers: zvi, delena, RKSimon, igorb Reviewed By: igorb Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31056 llvm-svn: 298228
* [InstCombine] Use update_test_checks.py to regenerate a test. NFCCraig Topper2017-03-191-78/+78
| | | | llvm-svn: 298227
* Fix constant folding of fp2int to large integersSimon Pilgrim2017-03-194-21/+25
| | | | | | | | | | | | We make the assumption in most of our constant folding code that a fp2int will target an integer of 128-bits or less, calling the APFloat::convertToInteger with only uint64_t[2] of raw bits for the result. Fuzz testing (PR24662) showed that we don't handle other cases at all, resulting in stack overflows and all sorts of crashes. This patch uses the APSInt version of APFloat::convertToInteger instead to better handle such cases. Differential Revision: https://reviews.llvm.org/D31074 llvm-svn: 298226
* Fix MSVC warning: "switch statement contains 'default' but no 'case' ↵Simon Pilgrim2017-03-191-4/+1
| | | | | | labels". NFCI. llvm-svn: 298225
* [GlobalISel] Don't select trivially dead instructions.Ahmed Bougacha2017-03-1915-26/+166
| | | | | | | | | | | | | | Folding instructions when selecting can cause them to become dead. Don't select these dead instructions (if they don't have other side effects, and don't define physical registers). Preserve existing tests by adding COPYs. In some tests, the G_CONSTANT vregs never get constrained to a class: the only use of the vreg was folded into another instruction, so the G_CONSTANT, now dead, never gets selected. llvm-svn: 298224
* [GlobalISel][AArch64] Add DBG_VALUE select test. NFC.Ahmed Bougacha2017-03-191-0/+47
| | | | llvm-svn: 298223
* [GlobalISel][AArch64] Split out cast select tests. NFC.Ahmed Bougacha2017-03-195-405/+437
| | | | | | | | | | | | And remove some redundant bitcast tests. Also split the test functions themselves: it makes it obvious to see what's tested where and what isn't, it makes the tests much easier to read and manually update, and, most importantly, it makes them almost trivial to update using tooling. Yes, it's obnoxiously verbose, but said tooling helps upgrade to better MIR syntax whenever available. llvm-svn: 298222
* [GlobalISel] Move method definition to the proper file. NFC.Ahmed Bougacha2017-03-192-19/+21
| | | | llvm-svn: 298221
* [CodeGen] Update hasSideEffects comment. NFC.Ahmed Bougacha2017-03-191-5/+2
| | | | | | | We used to have 3 side effect flags, but as of r222809, we only have hasSideEffects. Change the comment to reflect that. llvm-svn: 298220
* Correct a rebase mistake.Xin Tong2017-03-191-2/+2
| | | | | | Left out AA in jumpthreading SimplifyPartiallyRedundantLoad llvm-svn: 298219
* Remove unused arguments. NFCIXin Tong2017-03-191-1/+1
| | | | llvm-svn: 298218
* [JumpThreading] Perform phi-translation in SimplifyPartiallyRedundantLoad.Xin Tong2017-03-192-18/+68
| | | | | | | | | | | | | | | | | | | Summary: In case we are loading on a phi-load in SimplifyPartiallyRedundantLoad. Try to phi translate it into incoming values in the predecessors before we search for available loads. This needs https://reviews.llvm.org/D30524 Reviewers: davide, sanjoy, efriedma, dberlin, rengolin Reviewed By: dberlin Subscribers: junbuml, llvm-commits Differential Revision: https://reviews.llvm.org/D30543 llvm-svn: 298217
OpenPOWER on IntegriCloud