summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[Hexagon] Recognize polynomial-modulo loop idiom again"Vitaly Buka2017-03-212-784/+17
| | | | | | | | Fix memory leaks on check-llvm tests detected by Asan. This reverts commit r298282. llvm-svn: 298329
* [ARM] Revert r297443 and r297820.Eli Friedman2017-03-214-287/+39
| | | | | | | | | | | | The glueless lowering of addc/adde in Thumb1 has known serious miscompiles (see https://reviews.llvm.org/D31081), and r297820 causes an infinite loop for certain constructs. It's not clear when they will be fixed, so let's just take them out of the tree for now. (I resolved a small conflict with r297453.) llvm-svn: 298328
* [Support] Fill the file_status struct with link count.Zachary Turner2017-03-203-16/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D31110 llvm-svn: 298326
* Add a function to MD5 a file's contents.Zachary Turner2017-03-208-22/+111
| | | | | | | | | | | | | | | In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but for some users that care about the upper and lower, there wasn't a good interface. Furthermore, consumers of the MD5 checksum were required to handle endianness details on their own, so it seems reasonable to abstract this into a nicer interface that just gives you the right value. Differential Revision: https://reviews.llvm.org/D31105 llvm-svn: 298322
* [ARM] Fix PR32130: Handle promotion of zero sized constants.Vadzim Dambrouski2017-03-202-1/+11
| | | | | | | | | | | The special case of zero sized values was previously not handled correctly. This patch handles this by not promoting if the size is zero. Patch by Tim Neumann. Differential Revision: https://reviews.llvm.org/D31116 llvm-svn: 298320
* [x86] add tests for setcc of i128/i256; NFCSanjay Patel2017-03-201-0/+188
| | | | llvm-svn: 298317
* InstCombine: Check source value precision when reducing cast intrinsicMatt Arsenault2017-03-202-38/+419
| | | | | | Missed this check when porting from the libcall version. llvm-svn: 298312
* GlobalISel: add implicit defs & uses when mutating an instruction.Tim Northover2017-03-202-3/+20
| | | | | | Otherwise a scheduler might do bad things to the code we produce. llvm-svn: 298311
* Replace uses of DwarfExpression::addMachineReg* with addMachineRegExpressionAdrian Prantl2017-03-204-81/+96
| | | | | | | | | | | | | and mark the methods as protected. Besides reducing the surface area of DwarfExpression, this is in preparation for an upcoming bugfix in the DwarfExpression implementation, for which it will be necessary to defer emitting register operations until the rest of the expression is known. NFC llvm-svn: 298309
* Make implementation details in DwarfExpression protected. (NFC)Adrian Prantl2017-03-201-13/+12
| | | | llvm-svn: 298308
* [Fuchsia] Use %gs for ABI slots under -mcmodel=kernelEvgeniy Stepanov2017-03-201-2/+2
| | | | | | | | | | | Make x86_64-fuchsia targets under -mcmodel=kernel use %gs rather than %fs to access ABI slots for stack-protector and safe-stack Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D30870 llvm-svn: 298302
* [SCEV] Fix trip multiple calculationEli Friedman2017-03-202-10/+141
| | | | | | | | | | | | | | | | | | | | If loop bound containing calculations like min(a,b), the Scalar Evolution API getSmallConstantTripMultiple returns 4294967295 "-1" as the trip multiple. The problem is that, SCEV use -1 * umax to represent umin. The multiple constant -1 was returned, and the logic of guarding against huge trip counts was skipped. Because -1 has 32 active bits. The fix attempt to factor more general cases. First try to get the greatest power of two divisor of trip count expression. In case overflow happens, the trip count expression is still divisible by the greatest power of two divisor returned. Returns 1 if not divisible by 2. Patch by Huihui Zhang <huihuiz@codeaurora.org> Differential Revision: https://reviews.llvm.org/D30840 llvm-svn: 298301
* [X86] Clean up test/CodeGen/X86/2006-03-01-InstrSchedBug.llDavid L. Jones2017-03-201-8/+20
| | | | | | | | | | | | | | | | | Summary: - Migrated from grep to FileCheck. - Re-indented, removed boilerplate comments. - Added 'entry' label at beginning of basic block. Patch by Jorge Gorbe! Reviewed By: RKSimon Subscribers: RKSimon, jgorbe, llvm-commits Differential Revision: https://reviews.llvm.org/D30317 llvm-svn: 298298
* Explicitly add move constructor/assignment operators.Zachary Turner2017-03-201-0/+2
| | | | | | | | | | These are needed due to some obscure rules in the standard about how std::vector selects between copy and move constructors, which can cause a conforming implementation to attempt to select the copy constructor of RuleMatcher, which will fail since std::unique_ptr<> isn't copyable. llvm-svn: 298294
* Add test case for merging of chained stores of mismatched type.Nirav Dave2017-03-201-0/+48
| | | | llvm-svn: 298293
* Add the rest of the error checking for Mach-O dyld compact bind entry errorsKevin Enderby2017-03-2025-203/+623
| | | | | | | | | | | | | | | | | | | | | | | | | and test cases for each of the error checks. To do this more plumbing was needed so that the segment indexes and segment offsets can be checked. Basically what was done was the SegInfo from llvm-objdump’s MachODump.cpp was moved into libObject for Mach-O objects as BindRebaseSegInfo and it is only created when an iterator for bind or rebase entries are created. This commit really only adds the error checking and test cases for the bind table entires and the checking for the lazy bind and weak bind entries are still to be fully done as well as the rebase entires. Though some of the plumbing for those are added with this commit. Those other error checks and test cases will be added in follow on commits. Note, the two llvm_unreachable() calls should now actually be unreachable with the error checks in place and would take a logic bug in the error checking code to be reached if the segment indexes and segment offsets are used from a checked bind entry. Comments have been added to the methods that require the arguments to have been checked prior to calling. llvm-svn: 298292
* Revert r298158.Evgeniy Stepanov2017-03-207-162/+57
| | | | | | | | Revert "[asan] Fix dead stripping of globals on Linux." OOM in gold linker. llvm-svn: 298288
* Fixed include order. NFCI.Simon Pilgrim2017-03-201-1/+1
| | | | llvm-svn: 298286
* Try using llvm::errc, should hopefully fix version mismatch problem on ↵Peter Collingbourne2017-03-201-4/+2
| | | | | | clang-s390x-linux bot. llvm-svn: 298285
* [Hexagon] Recognize polynomial-modulo loop idiom againKrzysztof Parzyszek2017-03-202-17/+784
| | | | | | | | | Regain the ability to recognize loops calculating polynomial modulo operation. This ability has been lost due to some changes in the preceding optimizations. Add code to preprocess the IR to a form that the pattern matching code can recognize. llvm-svn: 298282
* [AMDGPU] Run always inliner early in optKonstantin Zhuravlyov2017-03-203-0/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D31141 llvm-svn: 298281
* Add missing updated test from VN coercion changes. Instructions were ↵Daniel Berlin2017-03-201-3/+3
| | | | | | renamed. NFC llvm-svn: 298280
* Fix UB found by -Wtautological-undefined-compareDavid Blaikie2017-03-201-4/+3
| | | | llvm-svn: 298279
* Mention that the Sphinx docs build wants version 1.5 or laterJonathan Roelofs2017-03-201-1/+2
| | | | | | | `misc.highlighting_failure` support was added to `suppress_warnings` in that version, and the warnings-as-errors docs build relies on it. llvm-svn: 298277
* [WinEH] Adjust decision to emit SEH moves for leaf functionsReid Kleckner2017-03-202-2/+24
| | | | | | | | | Move the check for "MF->hasWinCFI()" up into the calculation of the shouldEmitMoves boolean, rather than putting it in the early returning if. This ensures that endFunction doesn't try to emit .seh_* directives for leaf functions. llvm-svn: 298276
* GlobalISel: allow quad-precision values to be dumped.Tim Northover2017-03-202-0/+13
| | | | | | | Otherwise the fallback path fails with an assertion on AAPCS AArch64 targets, when "long double" is encountered. llvm-svn: 298273
* Support, LTO: When pruning a directory, ignore files matching a prefix.Peter Collingbourne2017-03-205-7/+25
| | | | | | | | | | This is a safeguard against data loss if the user specifies a directory that is not a cache directory. Teach the existing cache pruning clients to create files with appropriate names. Differential Revision: https://reviews.llvm.org/D31109 llvm-svn: 298271
* Updates branch_weights annotation for call instructions during inlining.Dehao Chen2017-03-204-11/+105
| | | | | | | | | | | | | | Summary: Inliner should update the branch_weights annotation to scale it to proper value. Reviewers: davidxl, eraman Reviewed By: eraman Subscribers: zzheng, llvm-commits Differential Revision: https://reviews.llvm.org/D30767 llvm-svn: 298270
* Use isa<> instead of dyn_cast<> (NFC).Adrian Prantl2017-03-201-5/+5
| | | | llvm-svn: 298268
* 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
* [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
* [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
* [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
* [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 "[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
* [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
OpenPOWER on IntegriCloud