summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [msan] Disable tail call optimization in msan rtl.Evgeniy Stepanov2018-12-271-0/+5
| | | | | | | This should give us better error stack traces on the bots, in particular, for https://bugs.llvm.org/show_bug.cgi?id=40162 llvm-svn: 350080
* [WebAssembly] Added basic support for if/else/end_if in MC layer.Wouter van Oortmerssen2018-12-263-15/+22
| | | | | | | | | | | | | | | | | Summary: These instructions are currently unused in our backend, but for completeness it is good to support them, so they can be used with the assembler in hand-written code. Tests are very basic, signature support missing much like other blocks. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55973 llvm-svn: 350079
* [WebAssembly] Make assembler check for proper nesting of control flow.Wouter van Oortmerssen2018-12-266-5/+151
| | | | | | | | | | | | | | | | | | | | | Summary: It does so using a simple nesting stack, and gives clear errors upon violation. This is unique to wasm, since most CPUs do not have any nested constructs. Had to add an end of file check to the general assembler for this. Note: if/else/end instructions are not currently supported in our tablegen defs, so these tests will be enabled in a follow-up. They already pass the nesting check. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55797 llvm-svn: 350078
* manpages: Update the URL for httpsSylvestre Ledru2018-12-261-1/+1
| | | | llvm-svn: 350077
* [WebAssembly] Delete an unnecessary line in RegStackifyHeejin Ahn2018-12-261-1/+0
| | | | | | | `OneUseInst` is set outside of the loop before and `OneUse` does not change throughout the loop, so this line is not necessary. llvm-svn: 350076
* [WebAssembly] Fix typos in comments in RegStackify (NFC)Heejin Ahn2018-12-261-2/+2
| | | | llvm-svn: 350075
* [LoopIdiomRecognize] Add CTTZ supportCraig Topper2018-12-262-64/+167
| | | | | | | | | | | | | | | | | | | | | Summary: Existing LIR recognizes CTLZ where shifting input variable right until it is zero. (Shift-Until-Zero idiom) This commit: 1. Augments Shift-Until-Zero idiom to recognize CTTZ where input variable is shifted left. 2. Prepare for BitScan idiom recognition. Patch by Yuanfang Chen (tabloid.adroit) Reviewers: craig.topper, evstupac Reviewed By: craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D55876 llvm-svn: 350074
* [codeview] Check if this 'this' type of a method is a pointerReid Kleckner2018-12-263-8/+64
| | | | | | | | | Fixes crash reported after r347354 for frontends that don't always emit 'this' pointers for methods. Now we will silently produce debug info that makes functions like this look like static methods, which seems reasonable. llvm-svn: 350073
* [clang-cl] Treat inputs as C++ with /E, like MSVCReid Kleckner2018-12-262-1/+22
| | | | | | | | | | | | | | | | | midl invokes the compiler on .idl files with /E. Before this change, we would treat unrecognized inputs as object files. Now we pre-process to stdout as expected. I checked that MSVC defines __cplusplus when invoked this way, so treating the input as C++ seems like the right thing to do. After this change, I was able to run midl like this with clang-cl: $ midl -cpp_cmd clang-cl.exe foo.idl Things worked for the example IDL file in the Microsoft documentation, but beyond that, I don't know if this will work well. Fixes PR40140 llvm-svn: 350072
* [MS] Mangle return adjusting thunks with the public access specifierReid Kleckner2018-12-262-6/+41
| | | | | | | | MSVC does this, so we should too. Fixes PR40138 llvm-svn: 350071
* Use error() instead of fatal() to report an invalid address range.Rui Ueyama2018-12-262-17/+9
| | | | | | In this patch we also use toString() to stringize a section. llvm-svn: 350070
* [NVPTX] Allow libcalls that are defined in the current module.Justin Lebar2018-12-2617-16/+508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds a possibility to make library calls on NVPTX. An important thing about library functions - they must be defined within the current module. This basically should guarantee that we produce a valid PTX assembly (without calls to not defined functions). The one who wants to use the libcalls is probably will have to link against compiler-rt or any other implementation. Currently, it's completely impossible to make library calls because of error LLVM ERROR: Cannot select: i32 = ExternalSymbol '...'. But we can lower ExternalSymbol to TargetExternalSymbol and verify if the function definition is available. Also, there was an issue with a DAG during legalisation. When we expand instruction into libcall, the inner call-chain isn't being "integrated" into outer chain. Since the last "data-flow" (call retval load) node is located in call-chain earlier than CALLSEQ_END node, the latter becomes a leaf and therefore a dead node (and is being removed quite fast). Proposed here solution relies on another data-flow pseudo nodes (ProxyReg) which purpose is only to keep CALLSEQ_END at legalisation and instruction selection phases - we remove the pseudo instructions before register scheduling phase. Patch by Denys Zariaiev! Differential Revision: https://reviews.llvm.org/D34708 llvm-svn: 350069
* Ignore ConstantExpr in IgnoreParensReid Kleckner2018-12-262-4/+6
| | | | | | | | | | | | | | | | | | Summary: This moves it up from IgnoreParenImpCasts to IgnoreParens, so that more helpers ignore it. For most clients, this ensures that these helpers behave the same with and without C++17 enabled, which is what appears to introduce these new expression nodes. Fixes PR39881 Reviewers: void, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55853 llvm-svn: 350068
* Pass a concrete triple for two OpenMP tests that depend on TLSNico Weber2018-12-262-26/+26
| | | | | | | | | | | | | | | Not all %itanium_abi_triple values support TLS. Makes OpenMP/declare_reduction_codegen.cpp, OpenMP/parallel_copyin_codegen.cpp for %itanium_abi_triples without TLS support. Alternatively we could pass -fnoopenmp-use-tls and tweak some of the CHECK lines, but this seems a bit simpler. Fixes PR40156. Differential Revision: https://reviews.llvm.org/D56086 llvm-svn: 350067
* [AMDGPU] Regenerate i64 shift tests.Simon Pilgrim2018-12-261-19/+86
| | | | | | To show codegen diff due to a future SimplifyDemandedBits patch. llvm-svn: 350065
* [NFC] Use utility function for guards detectionMax Kazantsev2018-12-261-3/+3
| | | | llvm-svn: 350064
* [MIPS GlobalISel] Select G_SELECTPetar Avramovic2018-12-258-8/+429
| | | | | | | | | | Add widen scalar for type index 1 (i1 condition) for G_SELECT. Select G_SELECT for pointer, s32(integer) and smaller low level types on MIPS32. Differential Revision: https://reviews.llvm.org/D56001 llvm-svn: 350063
* [NFC] Reuse variables instead of re-calling getParentMax Kazantsev2018-12-251-2/+1
| | | | llvm-svn: 350062
* [PowerPC] Fix the bug of ISD::ADDE to set its second return type to glueKang Zhang2018-12-252-1/+12
| | | | | | | | | | | | | | | Summary: This patch is to fix the bug imported by rL341634. In above submit , the the return type of ISD::ADDE is 14224: SDVTList VTs = DAG.getVTList(MVT::i64, MVT::i64), but in fact, the second return type of ISD::ADDE should be MVT::Glue not MVT::i64. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D55977 llvm-svn: 350061
* [gn build] Make NOSORT line actually workNico Weber2018-12-241-1/+1
| | | | | | | | | | | | | GN wants the NOSORT line to be the first line of a comment block, not the last line. I sent https://gn-review.googlesource.com/c/gn/+/3560 to support having it in the last line too, but since it will be a while until everyone has that change even if it's expected, use the form that works today. Differential Revision: https://reviews.llvm.org/D56065 llvm-svn: 350060
* [X86] Use GetDemandedBits to simplify the operands of PMULDQ/PMULUDQ.Craig Topper2018-12-247-94/+32
| | | | | | | | | | | | | | This is an alternative to what I attempted in D56057. GetDemandedBits is a special version of SimplifyDemandedBits that allows simplifications even when the operand has other uses. GetDemandedBits will only do simplifications that allow a node to be bypassed. It won't create new nodes or alter any of the other users. I had to add support for bypassing SIGN_EXTEND_INREG to GetDemandedBits. Based on a patch that Simon Pilgrim sent me in email. Fixes PR40142. llvm-svn: 350059
* [X86] Add test cases for PR40142. NFCCraig Topper2018-12-241-0/+73
| | | | llvm-svn: 350058
* [analyzer] [NFC] Clean up the mess of constructing argument effects in ↵George Karpenkov2018-12-242-71/+91
| | | | | | | | | | | | | | RetainCountChecker Previously, argument effects were stored in a method variable, which was effectively global. The global state was reset at each (hopefully) entrance point to the summary construction, and every function could modify it. Differential Revision: https://reviews.llvm.org/D56036 llvm-svn: 350057
* [clang-tidy] add IgnoreMacros option to readability-uppercase-literal-suffixMiklos Vajna2018-12-246-2/+22
| | | | | | | | | | | | | | And also enable it by default to be consistent with e.g. modernize-use-using. This helps e.g. when running this check on client code where the macro is provided by the system, so there is no easy way to modify it. Reviewed By: JonasToth, lebedev.ri Differential Revision: https://reviews.llvm.org/D56025 llvm-svn: 350056
* [HWASAN] Instrument memorty intrinsics by defaultEugene Leviant2018-12-242-2/+2
| | | | | | Differential revision: https://reviews.llvm.org/D55926 llvm-svn: 350055
* [gn build] Add build files for clang/tools/{c-arcmt-test,c-index-test} and ↵Nico Weber2018-12-244-1/+132
| | | | | | | | | | | | | their dependency clang/tools/libclang libclang is somewhat incomplete. It's just enough to get check-clang to pass, but that requires it to be pretty complete. The biggest thing is that it's not built as a shared library on Linux. The libclang/BUILD.gn file has a comment with details on what else is missing. Differential Revision: https://reviews.llvm.org/D56059 llvm-svn: 350054
* ReleaseNotes: X86 Target: bdver2 sched model was added (D52779)Roman Lebedev2018-12-241-1/+2
| | | | llvm-svn: 350053
* Revert rL350048 and rL350050Max Kazantsev2018-12-243-25/+16
| | | | | | | These patches have broken almost all buildbots on test DebugInfo/X86/addr_comments.ll. Reverting to green. llvm-svn: 350052
* [LLD][ELF] - Cleanup gdb-index-dwarf5-low-high.s. NFC.George Rimar2018-12-241-36/+35
| | | | | | Remove tabs and .debug_macinfo sections. llvm-svn: 350051
* Fix build - follow-up to r350048 which broke headerless (v4) address poolDavid Blaikie2018-12-242-8/+10
| | | | llvm-svn: 350050
* [LoopSimplifyCFG] Delete dead exiting edgesMax Kazantsev2018-12-242-112/+193
| | | | | | | | | | This patch teaches LoopSimplifyCFG to remove dead exiting edges from loops. Differential Revision: https://reviews.llvm.org/D54025 Reviewed By: fedor.sergeev llvm-svn: 350049
* DebugInfo: Use assembly label arithmetic for address pool size for easier ↵David Blaikie2018-12-243-12/+19
| | | | | | reading/editing llvm-svn: 350048
* DebugInfo: Add assembly comments for debug_addr contribution header fieldsDavid Blaikie2018-12-242-0/+37
| | | | llvm-svn: 350047
* llvm-dwarfdump: Skip address index info (and dump only the address, if ↵David Blaikie2018-12-242-4/+82
| | | | | | | | found) when non-verbose dumping addrx forms There's a few bugs here still - demonstrated with FIXITs in the test. llvm-svn: 350046
* Return "[LoopSimplifyCFG] Delete dead in-loop blocks"Max Kazantsev2018-12-242-114/+58
| | | | | | | | The underlying bug that caused the revert should be fixed by rL348567. Differential Revision: https://reviews.llvm.org/D54023 llvm-svn: 350045
* [LoopIdioms] More LocationSize::precise annotations; NFCGeorge Burgess IV2018-12-242-3/+5
| | | | | | | | | Both of these places reference memset-like loops. Memset is precise. Trying to keep these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350044
* [X86] Remove unused variables left after r350041. NFCCraig Topper2018-12-241-6/+0
| | | | llvm-svn: 350043
* [SelectionDAGBuilder] Use ::precise LocationSizes; NFCGeorge Burgess IV2018-12-241-11/+23
| | | | | | | | | | | | | | | More migration so we can disable the implicit int -> LocationSize conversion. All of these are either scatter/gather'ed vector instructions, or direct loads. Hence, they're all precise. Perhaps if we see way more getTypeStoreSize calls, we can make a getTypeStoreLocationSize (or similar) as a wrapper that applies this ::precise. Doesn't appear that it's a good idea to make getTypeStoreSize return a LocationSize itself, however. llvm-svn: 350042
* [X86] Move the optimization that turns 'CMP (AND+IMM64), 0' into ↵Craig Topper2018-12-242-55/+75
| | | | | | | | SRL/SHL+TEST to X86ISelDAGToDAG. This cleans more code out of EmitTest. llvm-svn: 350041
* [clangd] Delete stray semicolon. NFCFangrui Song2018-12-241-1/+0
| | | | llvm-svn: 350040
* [X86] Autogenerate complete checks. NFCCraig Topper2018-12-241-21/+187
| | | | llvm-svn: 350039
* [X86] Remove the ANDN check from EmitTest.Craig Topper2018-12-243-46/+67
| | | | | | | | Remove the TESTmr isel patterns and add another postprocessing combine for TESTrr+ANDrm->TESTmr. We already have a postprocessing combine for TESTrr+ANDrr->TESTrr. With this we can give ANDN a chance to match first. And clean it up during post processing if we ended up with just a regular AND. This is another step towards my plan to gut EmitTest and do more flag handling during isel matching or by using optimizeCompare. llvm-svn: 350038
* [clangd] Delete trailing ; NFCFangrui Song2018-12-231-1/+1
| | | | llvm-svn: 350037
* Tolerate flaky LLD tests on NetBSDKamil Rytarowski2018-12-231-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: For unknown reasons LLD tests are flaky on the NetBSD buildbot, but not on local machines of developers. Unless the linker will be fully functional on this target, allow to pass flaky tests with optional retry. Reviewers: joerg, mgorny, ruiu Reviewed By: mgorny Subscribers: lebedev.ri, MaskRay, llvm-commits, #lld Tags: #lld Differential Revision: https://reviews.llvm.org/D56053 llvm-svn: 350036
* [llvm-exegesis] Clustering: don't enqueue a point multiple timesFangrui Song2018-12-231-33/+35
| | | | | | | | | | | | | | | Summary: SetVector uses both DenseSet and vector, which is time/memory inefficient. The points are represented as natural numbers so we can replace the DenseSet part by indexing into a vector<char> instead. Don't cargo cult the pseudocode on the wikipedia DBSCAN page. This is a standard BFS style algorithm (the similar loops have been used several times in other LLVM components): every point is processed at most once, thus the queue has at most NumPoints elements. We represent it with a vector and allocate it outside of the loop to avoid allocation in the loop body. We check `Processed[P]` to avoid enqueueing a point more than once, which also nicely saves us a `ClusterIdForPoint_[Q].isUndef()` check. Many people hate the oneshot abstraction but some favor it, therefore we make a compromise, use a lambda to abstract away the neighbor adding process. Delete the comment `assert(Neighbors.capacity() == (Points_.size() - 1));` as it is wrong. llvm-svn: 350035
* [DAGCombiner] limit shuffle to extend transform (PR40146)Sanjay Patel2018-12-232-80/+13
| | | | | | | | | | It's dangerous to knowingly create an illegal vector type no matter what stage of combining we're in. This prevents the missed folding/scalarization seen in: https://bugs.llvm.org/show_bug.cgi?id=40146 llvm-svn: 350034
* [x86] add test for vector shuffle --> extend transform (PR40146); NFCSanjay Patel2018-12-231-0/+91
| | | | llvm-svn: 350033
* [DAGCombiner] allow hoisting vector bitwise logic ahead of extendsSanjay Patel2018-12-232-85/+48
| | | | llvm-svn: 350032
* [x86] add tests for vector extend + logic ops; NFCSanjay Patel2018-12-231-0/+504
| | | | llvm-svn: 350031
* [xray] Detect MPROTECT and error out when it's enabled (on NetBSD)Michal Gorny2018-12-237-0/+38
| | | | | | | | | | Add a CheckMPROTECT() routine to detect when pax MPROTECT is enabled on NetBSD, and error xray out when it is. The solution is adapted from existing CheckASLR(). Differential Revision: https://reviews.llvm.org/D56049 llvm-svn: 350030
OpenPOWER on IntegriCloud