summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify test code with initializer lists.Benjamin Kramer2016-01-101-47/+16
| | | | | | No functional change intended. llvm-svn: 257287
* Make test work on windows by turning \ in paths back into /.Benjamin Kramer2016-01-101-2/+8
| | | | llvm-svn: 257286
* Optimized instruction sequence for sitofp operation on X86-32Elena Demikhovsky2016-01-103-16/+87
| | | | | | | | | | | | | | | | | | | Optimized sitofp i64 %x to double. The current sequence movl %ecx, 8(%esp) movl %edx, 12(%esp) fildll 8(%esp) is replaced with: movd %ecx, %xmm0 movd %edx, %xmm1 punpckldq %xmm1, %xmm0 movq %xmm0, 8(%esp) Differential Revision: http://reviews.llvm.org/D15946 llvm-svn: 257285
* [ADT] Add an abstraction for embedding an integer within a pointer-likeChandler Carruth2016-01-103-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | type. This makes it easy and safe to use a set of flags as one elmenet of a tagged union with pointers. There is quite a bit of code that has historically done this by casting arbitrary integers to "pointers" and assuming that this was safe and reliable. It is neither, and has started to rear its head by triggering safety asserts in various abstractions like PointerLikeTypeTraits when the integers chosen are invariably poor choices for *some* platform and *some* situation. Not to mention the (hopefully unlikely) prospect of one of these integers actually getting allocated! With this, it will be straightforward to build type safe abstractions like this without being error prone. The abstraction itself is also remarkably simple thanks to the implicit conversion. This use case and pattern was also independently created by the folks working on Swift, and they're going to incrementally add any missing functionality they find. Differential Revision: http://reviews.llvm.org/D15844 llvm-svn: 257284
* [AVX512] add PRORVQ and PRORVD IntrinsicMichael Zuckerman2016-01-104-0/+151
| | | | | | Differential Revision:http://reviews.llvm.org/D15955 llvm-svn: 257283
* [ADT] Add a sum type abstraction for pointer-like types.Chandler Carruth2016-01-103-0/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a much more general and powerful form of PointerUnion. It provides a reasonably complete sum type (from type theory) for pointer-like types. It has several significant advantages over the existing PointerUnion infrastructure: 1) It allows more than two pointer types to participate without awkward nesting structures. 2) It directly exposes the tag so that it is convenient to write switches over the possible members. 3) It can re-use the same type for multiple tag values, something that has been worked around by either abusing PointerIntPair or defining nonce types and doing unsafe pointer casting. 4) It supports customization of the PointerLikeTypeTraits used for specific member types. This means it could (in theory) be used even with types that are over-aligned on allocation to expose larger numbers of bits to the tag. All in all, I think it is at least complimentary to the existing infrastructure, and a strict improvement for some use cases. Differential Revision: http://reviews.llvm.org/D15843 llvm-svn: 257282
* [ADT] Remove 'reinterpreted as a pointer' from some Twine comments. Integers ↵Craig Topper2016-01-101-5/+3
| | | | | | have been stored directly in a union for some time. NFC llvm-svn: 257281
* Add test for r257279.David Majnemer2016-01-101-0/+68
| | | | llvm-svn: 257280
* [JumpThreading] Don't forget to report that the IR changedDavid Majnemer2016-01-103-4/+9
| | | | | | | | | | | | | | JumpThreading's runOnFunction is supposed to return true if it made any changes. JumpThreading has a call to removeUnreachableBlocks which may result in changes to the IR but runOnFunction didn't appropriate account for this possibility, leading to badness. While we are here, make sure to call LazyValueInfo::eraseBlock in removeUnreachableBlocks; JumpThreading preserves LVI. This fixes PR26096. llvm-svn: 257279
* Fix a control flow problem in commit rL257277.Chen Li2016-01-101-0/+2
| | | | llvm-svn: 257278
* [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.Chen Li2016-01-103-6/+175
| | | | | | | | | | | | | | | | Summary: This is a fix of D13718. D13718 was committed but then reverted because of the following bug: https://llvm.org/bugs/show_bug.cgi?id=25299 This patch fixes the issue shown in the bug. Reviewers: majnemer, reames Subscribers: jevinskie, llvm-commits Differential Revision: http://reviews.llvm.org/D14308 llvm-svn: 257277
* [LangRef] Move catchpad to "Other Operators" (NFC)Joseph Tremoulet2016-01-101-68/+68
| | | | | | It is no longer a terminator, so should no longer be grouped with them. llvm-svn: 257276
* [WinEH] Fix catchpad pred verificationJoseph Tremoulet2016-01-102-0/+34
| | | | | | | | | | | | | | | Summary: The code was simply ensuring that the catchpad's pred is its catchswitch, which was letting cases slip through where the flow edge was the unwind edge of the catchswitch rather than one of its catch clauses. Reviewers: andrew.w.kaylor, rnk, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16011 llvm-svn: 257275
* [WinEH] Disallow cyclic unwindsJoseph Tremoulet2016-01-104-46/+139
| | | | | | | | | | | | | | | | Summary: Funclet-based EH personalities/tables likely can't handle these, and they can't be generated at source, so make them officially illegal in IR as well. Reviewers: andrew.w.kaylor, rnk, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15963 llvm-svn: 257274
* [WinEH] Verify consistent funclet unwind exitsJoseph Tremoulet2016-01-106-29/+265
| | | | | | | | | | | | | | | | | | | | Summary: A funclet EH pad may be exited by an unwind edge, which may be a cleanupret exiting its cleanuppad, an invoke exiting a funclet, or an unwind out of a nested funclet transitively exiting its parent. Funclet EH personalities require all such exceptional exits from a given funclet to have the same unwind destination, and EH preparation / state numbering / table generation implicitly depends on this. Formalize it as a rule of the IR in the LangRef and verifier. Reviewers: rnk, majnemer, andrew.w.kaylor Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15962 llvm-svn: 257273
* [WinEH] Verify unwind edges against EH pad treeJoseph Tremoulet2016-01-106-47/+211
| | | | | | | | | | | | | | | | | | | | | | Summary: Funclet EH personalities require a tree-like nesting among funclets (enforced by the ParentPad linkage in the IR), and also require that unwind edges conform to certain rules with respect to the tree: - An unwind edge may exit 0 or more ancestor pads - An unwind edge must enter exactly one EH pad, which must be distinct from any exited pads - A cleanupret's edge must exit its cleanuppad Describe these rules in the LangRef, and enforce them in the verifier. Reviewers: rnk, majnemer, andrew.w.kaylor Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15961 llvm-svn: 257272
* Don't use random class variables across functionsDaniel Berlin2016-01-101-29/+30
| | | | llvm-svn: 257271
* Revert "[BranchFolding] Set correct mem refs"Michael Zolotukhin2016-01-092-54/+1
| | | | | | This reverts commit 1ff11017d2669b933b29fcbb6451cfcda34ad693. llvm-svn: 257270
* [Orc] Fix MSVC build errors due to r257265 by adding explicit move constructionLang Hames2016-01-091-0/+16
| | | | | | and assignment to LogicalDylibResources. llvm-svn: 257269
* Revert "Teach the CMake build system to run lit's test suite. These can be run"Dan Liew2016-01-094-51/+2
| | | | | | | | | | | | | | This reverts r257221. This caused several build bot failures * It looks like some of the tests don't work correctly under Windows * It looks like the lit per test timeout tests fail So I'm reverting for now. Once the above failures are fixed running lit's tests can be enabled again. llvm-svn: 257268
* clang-format: Fix the counting of leading whitespace in tok::unknown tokensDaniel Jasper2016-01-092-0/+5
| | | | | | | | Previously, all whitespace characters would increase the starting column, which doesn't make sense. This fixes a problem, e.g. with the length calculation in JS template strings. llvm-svn: 257267
* [X86][AVX] Match broadcast loads through a bitcastSimon Pilgrim2016-01-093-21/+12
| | | | | | | | AVX1 v8i32/v4i64 shuffles are bitcasted to v8f32/v4f64, this patch peeks through any bitcast to check for a load node to allow broadcasts to occur. This is a re-commit of r257055 after r257264 fixed 32-bit broadcast loads of i64 scalars. llvm-svn: 257266
* [Orc] Enable user-supplied memory managers in the CompileOnDemand layer.Lang Hames2016-01-093-39/+57
| | | | | | | Previously the CompileOnDemand layer was hard-coded to use a new SectionMemoryManager for each function when it was called. llvm-svn: 257265
* [X86][AVX] Add support for i64 broadcast loads on 32-bit targetsSimon Pilgrim2016-01-093-355/+862
| | | | | | Added 32-bit AVX1/AVX2 broadcast tests. llvm-svn: 257264
* [Orc][RuntimeDyld] Prevent duplicate calls to finalizeMemory on shared memoryLang Hames2016-01-096-7/+120
| | | | | | | | | | | | | | | | | | | | | | | managers. Prior to this patch, recursive finalization (where finalization of one RuntimeDyld instance triggers finalization of another instance on which the first depends) could trigger memory access failures: When the inner (dependent) RuntimeDyld instance and its memory manager are finalized, memory allocated (but not yet relocated) by the outer instance is locked, and relocation in the outer instance fails with a memory access error. This patch adds a latch to the RuntimeDyld::MemoryManager base class that is checked by a new method: RuntimeDyld::finalizeWithMemoryManagerLocking, ensuring that shared memory managers are only finalized by the outermost RuntimeDyld instance. This allows ORC clients to supply the same memory manager to multiple calls to addModuleSet. In particular it enables the use of user-supplied memory managers with the CompileOnDemandLayer which must reuse the supplied memory manager for each function that is lazily compiled. llvm-svn: 257263
* [JumpThreading] Use range-based for loops.Benjamin Kramer2016-01-091-82/+68
| | | | | | No functionality change intended. llvm-svn: 257262
* [TRE] Simplify code with range-based loops and std::find.Benjamin Kramer2016-01-091-7/+2
| | | | | | No functional change intended. llvm-svn: 257261
* [vfs] Normalize working directory if requested.Benjamin Kramer2016-01-093-4/+24
| | | | | | | | FixedCompilationDatabase sets the working dir to "." by default. For chdir(".") this is a noop but this lead to InMemoryFileSystem to create bogus paths. Fixes PR25327. llvm-svn: 257260
* Make clang::format::reformat work with non 0-terminated strings.Daniel Jasper2016-01-091-2/+3
| | | | llvm-svn: 257259
* clang-format: Improve selective comment formatting.Daniel Jasper2016-01-092-7/+21
| | | | | | | | | | | | | | | | | | | Starting here: int x; // Format this line only. int xx; // int xxxxx; // Before: int x; // Format this line only. int xx; // int xxxxx; // After: int x; // Format this line only. int xx; // int xxxxx; // llvm-svn: 257258
* clang-format: Fix incorrect line break in certain configurations.Daniel Jasper2016-01-092-1/+6
| | | | | | | | | | | | | Before: void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa, vector<int> bbbbbbbbbbbbbbb); After: void aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa, vector<int> bbbbbbbbbbbbbbb); llvm-svn: 257257
* clang-format: Support definitions/declarations of operator,.Daniel Jasper2016-01-093-4/+9
| | | | | | | | | | Before: bool operator, (); After: bool operator,(); llvm-svn: 257256
* clang-format: [JS] Support semicolons in TypeScript's TypeMemberLists.Daniel Jasper2016-01-093-44/+76
| | | | | | | | | | | | | | Before: var x: { a: string; b: number; } = {}; After: var x: {a: string; b: number;} = {}; llvm-svn: 257255
* [OpenCL] Pipe type supportXiuli Pan2016-01-0943-14/+525
| | | | | | | | | | | | | | | Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 llvm-svn: 257254
* [BranchFolding] Set correct mem refsJunmo Park2016-01-092-1/+54
| | | | | | | | Merge MBBICommon and MBBI's MMOs. Differential Revision: http://reviews.llvm.org/D15990 llvm-svn: 257253
* Test CommitXiuli Pan2016-01-091-1/+1
| | | | | | Fix a typo llvm-svn: 257252
* [modules] If we're treating an elaborated-type-specifier as if it introduces aRichard Smith2016-01-092-17/+35
| | | | | | | | tag (because the previous declaration was found in a different module), inject the tag into the appropriate scope (that is, the enclosing scope if we're in a function prototype scope in C++). llvm-svn: 257251
* [RS4GC] Update and simplify handling of Constants in ↵Manuel Jacob2016-01-092-19/+12
| | | | | | | | | | | | | | | | findBaseDefiningValueOfVector(). Summary: This is analogous to r256079, which removed an overly strong assertion, and r256812, which simplified the code by replacing three conditionals by one. Reviewers: reames Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D16019 llvm-svn: 257250
* [libFuzzer] debug prints in tracingKostya Serebryany2016-01-091-2/+27
| | | | llvm-svn: 257249
* [libFuzzer] change the way trace-based mutations are applied. Instead of a ↵Kostya Serebryany2016-01-098-60/+33
| | | | | | custom code just rely on the automatically created dictionary llvm-svn: 257248
* [RS4GC] Unify two asserts. NFC.Manuel Jacob2016-01-091-7/+3
| | | | llvm-svn: 257247
* [libFuzzer] don't limit memcmp tracing with 8 bytesKostya Serebryany2016-01-093-43/+90
| | | | llvm-svn: 257245
* [rs4gc] Optionally directly relocated vector of pointersPhilip Reames2016-01-094-14/+143
| | | | | | | | | | | | | | This patch teaches rewrite-statepoints-for-gc to relocate vector-of-pointers directly rather than trying to split them. This builds on the recent lowering/IR changes to allow vector typed gc.relocates. The motivation for this is that we recently found a bug in the vector splitting code where depending on visit order, a vector might not be relocated at some safepoint. Specifically, the bug is that the splitting code wasn't updating the side tables (live vector) of other safepoints. As a result, a vector which was live at two safepoints might not be updated at one of them. However, if you happened to visit safepoints in post order over the dominator tree, everything worked correctly. Weirdly, it turns out that post order is actually an incredibly common order to visit instructions in in practice. Frustratingly, I have not managed to write a test case which actually hits this. I can only reproduce it in large IR files produced by actual applications. Rather than continue to make this code more complicated, we can remove all of the complexity by just representing the relocation of the entire vector natively in the IR. At the moment, the new functionality is hidden behind a flag. To use this code, you need to pass "-rs4gc-split-vector-values=0". Once I have a chance to stress test with this option and get feedback from other users, my plan is to flip the default and remove the original splitting code. I would just remove it now, but given the rareness of the bug, I figured it was better to leave it in place until the new approach has been stress tested. Differential Revision: http://reviews.llvm.org/D15982 llvm-svn: 257244
* COFF: Implement DLL symbol forwarding.Rui Ueyama2016-01-095-7/+63
| | | | | | | | | | | | | | | | DLL export tables usually contain dllexport'ed symbol RVAs so that applications which use the DLLs can find symbols from the DLLs. However, there's a minor feature to "forward" DLL symbols to other DLLs. If you set an RVA to a string whose form is "<dllname>.<symbolname>" (e.g. "KERNEL32.ExitProcess") instead of symbol RVA to the export table, the loader interprets that as a forwarder symbol, and resolve that symbol from the specified DLL. This patch implements that feature. llvm-svn: 257243
* Writing a test case for r257234 I found another place that wasJim Ingham2016-01-094-1/+84
| | | | | | | assuming a ValueObject always has a process. So this is that fix and the test case. llvm-svn: 257242
* Module debugging: Add a testcase for standalone forward declarations.Adrian Prantl2016-01-092-0/+6
| | | | llvm-svn: 257241
* Only take NULL macros instead of all macros into account for -Wnull-conversion.Richard Trieu2016-01-092-2/+26
| | | | llvm-svn: 257240
* [libFuzzer] refactor the way we collect cmp traces (don't use std::vector, ↵Kostya Serebryany2016-01-091-22/+35
| | | | | | don't limit with 8 bytes) llvm-svn: 257239
* fixing type.Mike Aizatsky2016-01-091-1/+2
| | | | llvm-svn: 257238
* llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp: Fix build in -m32. 1L is ↵NAKAMURA Takumi2016-01-091-1/+1
| | | | | | incompatible to int64_t. llvm-svn: 257237
OpenPOWER on IntegriCloud