- Feb 28, 2017
-
-
Dan Gohman authored
Instead of requiring every non-COFF MCObjectStreamer to implement the COFF hooks just to do an llvm_unreachable to say that they're not supported, do the llvm_unreachable in the default implementation, as suggested by rnk in https://reviews.llvm.org/D26722. llvm-svn: 296403
-
Dan Gohman authored
llvm-svn: 296402
-
Matt Arsenault authored
llvm-svn: 296401
-
Rui Ueyama authored
This part of code is hard to understand because NumLocals does not actually mean the number of local symbols but something else (!). We need to rewrite. But before that we need to clean it up. llvm-svn: 296400
-
Dan Gohman authored
CFG sorting was already an independent algorithm from block/loop insertion; this change makes it more convenient to debug. llvm-svn: 296399
-
Hans Wennborg authored
It causes miscompiles e.g. during self-host of Clang (PR32082). llvm-svn: 296398
-
Zachary Turner authored
llvm-svn: 296397
-
Matt Arsenault authored
llvm-svn: 296396
-
Arnold Schwaighofer authored
ISel: We need to notify FastIS of the IMPLICIT_DEF we created in createSwiftErrorEntriesInEntryBlock Otherwise, it will insert instructions before it. rdar://30536186 llvm-svn: 296395
-
Zachary Turner authored
This was reverted because it was breaking some builds, and because of incorrect error code usage. Since the CL was large and contained many different things, I'm resubmitting it in pieces. This portion is NFC, and consists of: 1) Renaming classes to follow a consistent naming convention. 2) Fixing the const-ness of the interface methods. 3) Adding detailed doxygen comments. 4) Fixing a few instances of passing `const BinaryStream& X`. These are now passed as `BinaryStreamRef X`. llvm-svn: 296394
-
Matt Arsenault authored
This reverts r295782. This could potentially result in some legalization loops and I avoided the need for this. llvm-svn: 296393
-
Xin Tong authored
llvm-svn: 296392
-
Rong Xu authored
Summary: Should use the Valuekind read from the profile. Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits, xur Differential Revision: https://reviews.llvm.org/D30420 llvm-svn: 296391
-
Benjamin Kramer authored
This allows the install target to also install clangd to bin, so that it can be deployed and used outside the build tree. Patch by Marc-Andre Laperle! Differential Revision: https://reviews.llvm.org/D30425 llvm-svn: 296390
-
Sanjay Patel authored
The transform in question claims to be doing: // fold (add (select cc, 0, c), x) -> (select cc, x, (add, x, c)) ...starting in PerformADDCombineWithOperands(), but it wasn't actually checking for a setcc node for the sext/zext patterns. This is exactly the opposite of a transform I'd like to add to DAGCombiner's foldSelectOfConstants(), so I was seeing infinite loops with my draft of a patch applied. The changes in select_const.ll look positive (less instructions). The change in arm-and-tst-peephole.ll is unrelated. We're changing the input IR in that test to preserve the intent of the test, but that's not affected by this code change. Differential Revision: https://reviews.llvm.org/D30355 llvm-svn: 296389
-
Adrian Prantl authored
When clang emits an inheriting C++ constructor it may inline code during the CodeGen phase. This patch ensures that any debug info in this inlined code gets a proper inlined location. Otherwise we can end up with invalid debug info metadata, since all inlined local variables and function arguments would be reparented into the call site. Analogous to ApplyInlineLocation this patch introduces a ApplyInlineDebugLocation scoped helper to facilitate entering an inlined scope and cleaning up afterwards. This fixes one of the issues discovered in PR32042. rdar://problem/30679307 llvm-svn: 296388
-
Nico Weber authored
https://reviews.llvm.org/D27455 llvm-svn: 296387
-
David Blaikie authored
llvm-svn: 296386
-
Steven Wu authored
The clang assertion causing these tests failing with sanitizer is fixed in r295794. All the bots running libcxx tests should be upgraded and running the compiler with the fix. llvm-svn: 296385
-
Lang Hames authored
fallible functions. Some fallible functions (those returning Error or Expected<T>) may only fail for a subset of their inputs. For example, a "safe" square root function will succeed for all finite positive inputs: Expected<double> safeSqrt(double d) { if (d < 0 && !isnan(d) && !isinf(d)) return make_error<...>("Cannot sqrt -ve values, nans or infs"); return sqrt(d); } At a safe callsite for such a function, checking the error return value is redundant: if (auto ValOrErr = safeSqrt(42.0)) { // use *ValOrErr. } else llvm_unreachable("safeSqrt should always succeed for +ve values"); The cantFail function wraps this check and extracts the contained value, simplifying control flow: double Result = cantFail(safeSqrt(42.0)); This function should be used with care: it is a programmatic error to wrap a call with cantFail if it can in fact fail. For debug builds this will result in llvm_unreachable being called. For release builds the behavior is undefined. Use of this function is likely to be rare in library code, but more common for tool and unit-test code where inputs and mock functions may be known to be safe. llvm-svn: 296384 -
Rui Ueyama authored
llvm-svn: 296383
-
Matt Arsenault authored
llvm-svn: 296382
-
Simon Pilgrim authored
DAGCombiner already supports peeking thorough shuffles to improve vector element extraction, but legalization often leaves us in situations where we need to extract vector elements after shuffles have already been lowered. This patch adds support for VECTOR_EXTRACT_ELEMENT/PEXTRW/PEXTRB instructions to attempt to handle target shuffles as well. I've covered some basic scenarios including handling shuffle mask scaling and the implicit zero-extension of PEXTRW/PEXTRB, there is more that could be done here (that I've mentioned in TODOs) but I haven't found many cases where its worth it. Differential Revision: https://reviews.llvm.org/D30176 llvm-svn: 296381
-
Matt Arsenault authored
Add packed types as legal so they may be used with inlineasm. Keep all operations expanded for now. llvm-svn: 296379
-
Rui Ueyama authored
Patch by Mark Kettenis. Currenlty ld.lld does not add a terminator (a CIE with its length field set to zero) to the .eh_frame sections it generates. While the relevant standards (the AMD64 SysV ABI and the Linux LSB) are not explicit about this, such a terminator is expected by some unwinder implementations and seems to be always emitted by ld.bfd. In addition to that, the Linux LSB https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html#EHFRAME explicitly says that The .eh_frame section shall contain 1 or more Call Frame Information (CFI) records. Currently, if the .eh_frame sections of the input files only contain terminators, ld.lld emits a zero=sized .eh_frame section which clearly doesn't meet that requirement. The diff makes sure a terminator gets added to each .eh_frame section and adjusts all the relevant tests to account for that. An additional test isn't needed as these adjustments mean that the existence of the terminator is tested for by several tests already. Differential Revision: https://reviews.llvm.org/D30335 llvm-svn: 296378
-
Rui Ueyama authored
Pointed out by Bob Haarman. llvm-svn: 296377
-
Alexey Bataev authored
llvm-svn: 296376
-
Matt Arsenault authored
Doesn't fix any practical problems because clamp/omod are currently folded after peephole optimizer. llvm-svn: 296375
-
Vedant Kumar authored
This is a readability improvement, but it will also help prep an upcoming patch to detect UB loads from bitfields. llvm-svn: 296374
-
Bob Haarman authored
Summary: This enables LTO to be used with the clang-cl frontend. Reviewers: rnk, hans Reviewed By: hans Subscribers: pcc, cfe-commits, mehdi_amini, Prazek Differential Revision: https://reviews.llvm.org/D30239 llvm-svn: 296373
-
Matt Arsenault authored
llvm-svn: 296372
-
Taewook Oh authored
Summary: Existing implementation of duplicateSimpleBB function drops DebugLoc metadata of branch instructions during the transformation. This patch addresses this issue by making newly created branch instructions to keep the metadata of replaced branch instructions. Reviewers: qcolombet, craig.topper, aprantl, MatzeB, sanjoy, dblaikie Reviewed By: dblaikie Subscribers: dblaikie, llvm-commits Differential Revision: https://reviews.llvm.org/D30026 llvm-svn: 296371
-
Matt Arsenault authored
Mostly useful for writing tests for f16 features. llvm-svn: 296370
-
Alexey Bataev authored
llvm-svn: 296369
-
Matt Arsenault authored
Add a few non-VOP3P but instructions related to packed. Includes hack with dummy operands for the benefit of the assembler llvm-svn: 296368
-
Amaury Sechet authored
llvm-svn: 296367
-
Sanjay Patel authored
This was suggested in D27855: have the inliner add assumptions, so we don't lose nonnull info provided by argument attributes. This still doesn't solve PR28430 (dyn_cast), but this gets us closer. https://reviews.llvm.org/D29999 llvm-svn: 296366
-
Krzysztof Parzyszek authored
llvm-svn: 296365
-
Xin Tong authored
Summary: Fix a bug when unswitching on partial LIV for SwitchInst. Reviewers: hfinkel, efriedma, sanjoy Reviewed By: sanjoy Subscribers: david2050, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D29107 llvm-svn: 296363
-
Rong Xu authored
Change "Thin-LTO" to "ThinLTO" in the comments for consistency. llvm-svn: 296362
-