- Mar 21, 2017
-
-
Serge Pavlov authored
CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided for host compiler that builds llvm components. A function add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep track of these definitions and was intended to be a replacement for CMake command add_definitions. Actually in many cases add_definitions is still used and the content of LLVM_DEFINITIONS is not actual now. On the other hand the current version of CMake allows getting set of definitions in a more convenient way. This fix implements evaluation of the variable by reading corresponding cmake property. Differential Revision: https://reviews.llvm.org/D31125 llvm-svn: 298336
-
Vitaly Buka authored
Fix memory leaks on check-llvm tests detected by Asan. This reverts commit r298282. llvm-svn: 298329
-
Eli Friedman authored
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
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D31110 llvm-svn: 298326
-
Zachary Turner authored
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
-
- Mar 20, 2017
-
-
Vadzim Dambrouski authored
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
-
Sanjay Patel authored
llvm-svn: 298317
-
Matt Arsenault authored
Missed this check when porting from the libcall version. llvm-svn: 298312
-
Tim Northover authored
Otherwise a scheduler might do bad things to the code we produce. llvm-svn: 298311
-
Adrian Prantl authored
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
-
Adrian Prantl authored
llvm-svn: 298308
-
Evgeniy Stepanov authored
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
-
Eli Friedman authored
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
-
David L. Jones authored
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
-
Zachary Turner authored
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
-
Nirav Dave authored
llvm-svn: 298293
-
Kevin Enderby authored
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
-
Evgeniy Stepanov authored
Revert "[asan] Fix dead stripping of globals on Linux." OOM in gold linker. llvm-svn: 298288
-
Simon Pilgrim authored
llvm-svn: 298286
-
Peter Collingbourne authored
llvm-svn: 298285
-
Krzysztof Parzyszek authored
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
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D31141 llvm-svn: 298281
-
Daniel Berlin authored
llvm-svn: 298280
-
David Blaikie authored
llvm-svn: 298279
-
Jon Roelofs authored
`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
-
Reid Kleckner authored
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
-
Tim Northover authored
Otherwise the fallback path fails with an assertion on AAPCS AArch64 targets, when "long double" is encountered. llvm-svn: 298273
-
Peter Collingbourne authored
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
-
Dehao Chen authored
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
-
Adrian Prantl authored
llvm-svn: 298268
-
David Blaikie authored
Avoid potential ADL ambiguity between llvm::make_unique and std::make_unique (when building as C++14+) Patch by Moritz Kiefer! llvm-svn: 298266
-
Dmitry Preobrazhensky authored
This fix enables sp3 abs modifier with constants Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30825 llvm-svn: 298265
-
Craig Topper authored
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
-
Jessica Paquette authored
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
-
Daniel Berlin authored
Templatize parts of VNCoercion, and add constant-only versions of the 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
-
Jessica Paquette authored
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
-
Daniel Sanders authored
[tablegen][globalisel] Capture instructions into locals and related 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
-
Dmitry Preobrazhensky authored
Fixed several related issues with VOP3 fp modifiers. Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30821 llvm-svn: 298255
-
Diana Picus authored
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
-
Simon Pilgrim authored
As discussed on D31074, use MutableArrayRef for destination integer buffers to help assert before stack overflows happen. llvm-svn: 298253
-