summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [DAGCombine][NFC] Use ArrayRef and correctly size SmallVectors.Clement Courbet2019-11-211-3/+3
| | | | In preparation for D70487.
* D'oh. Fix assert after a84922916e6eddf701b39fbd7fe0222cb0fee1d6.James Y Knight2019-11-201-2/+3
| | | | (Which was attempting to fix unused variable warning in NDEBUG mode after 8ba56f322abf848cec78ff7f814f3ad84cd778be)
* [clang][IFS][test] GreenDragon and Fuchsia Darwin bot fix: BindArchClass Nest.Puyan Lotfi2019-11-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | On Darwin the clang driver does not invoke Driver::BuildActions directly due to the need to handle Universal apps. Because of this there is a difference in code path where Driver::BuildUniversalActions is called instead of Driver::BuildActions. BuildUniversalActions ends up calling Driver::BuildAction but what it does differently is it takes the driver actions returned and wraps them each into a BindArchAction. In Driver::BuildJobs there is a check for '-o' to determine that multiple files are not specified when passing -o, except for Clang Interface Stub this need to be an exception as we actually want to write out multiple files: for every libfoo.so we have a libfoo.ifso sidecar ifso file, etc. To allow this to happen there is a check for IfsMergeAction, which is permitted to write out a secondary file. Except on Darwin, the IfsMergeAction gets wrapped in the BindArchAction by Driver::BuildUniversalActions so the check fails. This patch is to look inside a BindArchAction in Driver::BuildJobs to determine if there is in fact an IfsMergeAction, and if-so (pun intended) allow the secondary sidecard ifs/ifso file to be written out.
* Fix unused variable warning in NDEBUG mode after ↵James Y Knight2019-11-201-2/+2
| | | | 8ba56f322abf848cec78ff7f814f3ad84cd778be
* Tablegen: Remove the error for duplicate include files.River Riddle2019-11-206-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | This error was originally added a while(7 years) ago when including multiple files was basically always an error. Tablegen now has preprocessor support, which allows for building nice c/c++ style include guards. With the current error being reported, we unfortunately need to double guard when including files: * In user of MyFile.td #ifndef MYFILE_TD include MyFile.td #endif * In MyFile.td #ifndef MYFILE_TD #define MYFILE_TD ... #endif Differential Revision: https://reviews.llvm.org/D70410
* [Error] Remove a broken code fragment accidentally included in 76bcbaafab2.Lang Hames2019-11-201-2/+0
|
* [Orc][Modules] Fix Modules build fallout from a34680a33eb.Lang Hames2019-11-205-4/+35
| | | | | | | | | | | | In a34680a33eb OrcError.h and Orc/RPC/*.h were split out from the rest of ExecutionEngine in order to eliminate false dependencies for remote JIT targets (see https://reviews.llvm.org/D68732), however this broke modules builds (see https://reviews.llvm.org/D69817). This patch splits these headers out into a separate module, LLVM_OrcSupport, in order to fix the modules build. Fixes <rdar://56377508>.
* [MemorySSA] Moving at the end often means before terminator.Alina Sbirlea2019-11-207-6/+45
| | | | | | | | | | | | | Moving accesses in MemorySSA at InsertionPlace::End, when an instruction is moved into a block, almost always means insert at the end of the block, but before the block terminator. This matters when the block terminator is a MemoryAccess itself (an invoke), and the insertion must be done before the terminator for the update to be correct. Insert an additional position: InsertionPlace:BeforeTerminator and update current usages where this applies. Resolves PR44027.
* [X86] Fix i16->f128 sitofp to promote the i16 to i32 before trying to form a ↵Craig Topper2019-11-202-16/+113
| | | | | | libcall. Previously one of the test cases added here gave an error.
* [X86] Fix f128->i16 fptosi to promote the i16 to i32 before trying to form a ↵Craig Topper2019-11-202-23/+101
| | | | | | libcall. Previously one of the test cases added here gave an error.
* Fix an offset underflow bug in DwarfExpression when describing small values ↵Adrian Prantl2019-11-203-12/+47
| | | | | | | | | | | | | | | | | | with subregisters DwarfExpression::addMachineReg() knows how to build a larger register that isn't expressible in DWARF by combining multiple subregisters. However, if the entire value fits into just one subregister, it would still emit the other subregisters, leading to all sorts of inconsistencies down the line. This patch fixes that by moving an already existing(!) check whether the subregister's offset is before the end of the value to the right place. rdar://problem/57294211 Differential Revision: https://reviews.llvm.org/D70508
* Precommit tests for forthcoming widenable.condition transformsPhilip Reames2019-11-201-0/+156
|
* [docs] Tiny rewording in the portability FAQ entryJosh Kunz2019-11-201-1/+1
| | | | The entry reads better with these two words swapped.
* [MemorySSA] Update analysis when the terminator is a memory instruction.Alina Sbirlea2019-11-203-1/+73
| | | | | Update MemorySSA when moving the terminator instruction, as that may be a memory touching instruction. Resolves PR44029.
* [ADT] Move to_vector from STLExtras.h to SmallVector.hReid Kleckner2019-11-202-14/+11
| | | | | | Nothing breaks, so this probably has zero impact, but it seems nice, since to_vector is more like makeArrayRef, and should really live in SmallVector.h.
* [Sema] Add a 'Semantic' parameter to Expr::isKnownToHaveBooleanValueErik Pilkington2019-11-204-16/+30
| | | | | | | | | Some clients of this function want to know about any expression that is known to produce a 0/1 value, and others care about expressions that are semantically boolean. This fixes a -Wswitch-bool regression I introduced in 8bfb353bb33c, pointed out by Chris Hamilton!
* gn build: check-clang depends on llvm-cxxfilt.Peter Collingbourne2019-11-201-0/+1
|
* Revert "[AArch64] Add the pipeline model for Exynos M5"Eric Christopher2019-11-2030-3349/+35
| | | | | | as it's causing test failures in llvm-mca. This reverts commit 9bdfee2a3bd13d405ce1592930182f23849d2897.
* Temporarily Revert "[SLP] allow forming 2-way reduction patterns" and update ↵Eric Christopher2019-11-205-53/+29
| | | | | | | | | | testcases. After speaking with Sanjay - seeing a number of miscompiles and working on tracking down a testcase. None of the follow on patches seem to have helped so far. This reverts commit 8a0aa5310bccbb42d16d11db090419fcefdd1376.
* Temporarily Revert "Temporarily Revert "[SLP] allow forming 2-way reduction ↵Eric Christopher2019-11-204-20/+43
| | | | | | | | patterns"" as there were testcase changes after that need to also be reverted. This reverts commit cd8748a15f2d18861b3548eb26ed2b52e5ee50b4.
* [BPF] Fix a bug in peephole optimizationYonghong Song2019-11-205-29/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of current peephole optimiations is to remove SLL/SRL if the sub register has been zero extended. This phase has two bugs and one limitations. First, for the physical subregister used in pseudo insn COPY like below, it permits incorrect optimization. %0:gpr32 = COPY $w0 ... %4:gpr = MOV_32_64 %0:gpr32 %5:gpr = SLL_ri %4:gpr(tied-def 0), 32 %6:gpr = SRA_ri %5:gpr(tied-def 0), 32 The $w0 could be from the return value of a previous function call and its upper 32-bit value might contain some non-zero values. The same applies to function arguments. Second, the current code may permits removing SLL/SRA like below: %0:gpr32 = COPY $w0 %1:gpr32 = COPY %0:gpr32 ... %4:gpr = MOV_32_64 %1:gpr32 %5:gpr = SLL_ri %4:gpr(tied-def 0), 32 %6:gpr = SRA_ri %5:gpr(tied-def 0), 32 The reason is that it did not follow def-use chain to skip all intermediate 32bit-to-32bit COPY instructions. The current implementation is also very conservative for PHI instructions. If any PHI insn component is another PHI or COPY insn, it will just permit SLL/SRA. This patch fixed the issue as follows: - During def/use chain traversal, if any physical register is read, SLL/SRA will be preserved as these physical registers are mostly from function return values or current function arguments. - Recursively visit all COPY and PHI instructions.
* Temporarily Revert "[SLP] allow forming 2-way reduction patterns"Eric Christopher2019-11-204-43/+20
| | | | | | | | After speaking with Sanjay - seeing a number of miscompiles and working on tracking down a testcase. None of the follow on patches seem to have helped so far. This reverts commit 7ff57705ba196ce649d6034614b3b9df57e1f84f.
* [clang-tidy] modernize-use-equals-default avoid adding redundant semicolonsMitchell Balan2019-11-206-12/+41
| | | | | | | | | | | | | | | | | | | Summary: `modernize-use-equals-default` replaces default constructors/destructors with `= default;`. When the optional semicolon after a member function is present, this results in two consecutive semicolons. This patch checks to see if the next non-comment token after the code to be replaced is a semicolon, and if so offers a replacement of `= default` rather than `= default;`. This patch adds trailing comments and semicolons to about 5 existing tests. Reviewers: malcolm.parsons, angelgarcia, aaron.ballman, alexfh Patch by: poelmanc Subscribers: MyDeveloperDay, JonasToth, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70144
* [Support][Error] Unfriend FileError. It is not special.Lang Hames2019-11-201-4/+10
| | | | | | | | FileError doesn't need direct access to Error's internals as it can access the payload via handleErrors. (ErrorList remains special: it is not possible to write a handler for it, due to the special auto-unpacking treatment that it receives from handleErrors.)
* [AArch64] Add the pipeline model for Exynos M5Evandro Menezes2019-11-2030-35/+3349
| | | | Add the scheduling and cost models for Exynos M5.
* [Reproducer] Limit signals to macro define sin <csignal>Jonas Devlieghere2019-11-202-10/+0
| | | | SIGBUS is not part of the signal macros defined in the header <csignal>.
* Handle the case where the 'g' packet doesn't get all regs.Jason Molenda2019-11-203-1/+214
| | | | | | | | | | lldb would silently accept a response to the 'g' packet (read all registers) which was too large; this handles the case where it is too small. Differential Revision: https://reviews.llvm.org/D70417 <rdar://problem/34916465>
* Cherry-pick gtest fix for asan tests.Evgenii Stepanov2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: https://github.com/google/googletest/commit/681454dae48f109abf68c424c9d2e6db9a092238 Clone+exec death test allocates a single page of stack to run chdir + exec on. This is not enough when gtest is built with ASan and run on particular hardware. With ASan on x86_64, ExecDeathTestChildMain has frame size of 1728 bytes. Call to chdir() in ExecDeathTestChildMain ends up in _dl_runtime_resolve_xsavec, which attempts to save register state on the stack; according to cpuid(0xd) XSAVE register save area size is 2568 on my machine. This results in something like this in all death tests: Result: died but not with expected error. ... [ DEATH ] AddressSanitizer:DEADLYSIGNAL [ DEATH ] ================================================================= [ DEATH ] ==178637==ERROR: AddressSanitizer: stack-overflow on address ... PiperOrigin-RevId: 278709790 Reviewers: pcc Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70332
* [AMDGPU][SILoadStoreOptimizer] Merge TBUFFER loads/storesPiotr Sobczak2019-11-205-8/+2003
| | | | | | | | | | | | | | Summary: Extend SILoadStoreOptimizer to merge tbuffer loads and stores. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69794
* [Driver] Fix missing space in lldb --help output.Jonas Devlieghere2019-11-201-1/+1
|
* [Docs] Fix Sphinx warning (treated as error)Jonas Devlieghere2019-11-201-8/+8
| | | | | Fixes "undefined label" warning: if the link has no caption the label must precede a section header.
* [clang][IFS] Driver Pipeline: generate stubs after standard pipeline (3)Puyan Lotfi2019-11-207-33/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | Third Landing Attempt (dropping any linker invocation from clang driver): Up until now, clang interface stubs has replaced the standard PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in conjunction with it. So what when you build your code you will get an a.out or lib.so as well as an interface stub file. Example: clang -shared -o libfoo.so -emit-interface-stubs ... will generate both a libfoo.so and a libfoo.ifso. The .so file will contain the code from the standard compilation pipeline and the .ifso file will contain the ELF stub library. Note: For driver-test.c I've added -S in order to prevent any bot failures on bots that don't have the proper linker for their native triple. You could always specify a triple like x86_64-unknown-linux-gnu and on bots like x86_64-scei-ps4 the clang driver would invoke regular ld instead of getting the error 'Executable "orbis-ld" doesn't exist!' but on bots like ppc64be and s390x you'd get an error "/usr/bin/ld: unrecognised emulation mode: elf_x86_64" Differential Revision: https://reviews.llvm.org/D70274
* [Reproducer] Generate LLDB reproducer on crashJonas Devlieghere2019-11-208-4/+194
| | | | | | | | | | | | | | | | | | | | This patch hooks the reproducer infrastructure with the signal handlers. When lldb crashes with reproducers capture enabled, it will now generate the reproducer and print a short message the standard out. This doesn't affect the pretty stack traces, which are still printed before. This patch also introduces a new reproducer sub-command that intentionally raises a given signal to test the reproducer signal handling. Currently the signal handler is doing too much work. Instead of copying over files into the reproducers in the signal handler, we should re-invoke ourselves with a special command line flag that looks at the VFS mapping and performs the copy. This is a NO-OP when reproducers are disabled. Differential revision: https://reviews.llvm.org/D70474
* [Hexagon] Fix two testcase errorsKrzysztof Parzyszek2019-11-202-4/+4
| | | | This fixes issues discovered in https://reviews.llvm.org/D63973.
* [X86] Mark vector STRICT_FP_ROUND as Legal instead of Custom.Craig Topper2019-11-201-3/+9
| | | | | | | | | The Custom handler doesn't do anything for these nodes anyway. SelectionDAGISel won't mutate them if they are Legal or Custom. X86 has custom code for mutating them due to missing isel patterns. When the isel patterns are added Legal will be the right answer. So go ahead a change it now since that's where we'll end up.
* Move widenable branch formation into makeGuardControlFlowExplicit helperPhilip Reames2019-11-204-19/+21
| | | | This is mostly NFC, but I removed the setting of the guard's calling convention onto the WC call. Why? Because it was untested, and was producing an ill defined output as the declaration's convention wasn't been changed leaving a mismatch which is UB.
* [CMake] Fix the path to CrossWinToARMLinux.cmake CMake cache.Vladimir Vereschaka2019-11-201-1/+1
| | | | | | | | The comment was slightly misleading. Behalf: broadwaylamb (Sergej Jaskiewicz) Differential Revision: https://reviews.llvm.org/D70499
* [AMDGPU] Fixed mfma test check. NFC.Stanislav Mekhanoshin2019-11-201-69/+9
|
* [lldb] Fix NSURL data formatter truncation issueDavide Italiano2019-11-201-21/+33
| | | | | | | | | | | | Remove hardcoded string prefix length assumption causing issues when concatenating summary for NSURL in NSURLSummaryProvider. Provider relies on concatenation of NSStringProvider results for summary, and while the strings are prefixed with '@' in Objective-C, that is not the case in Swift causing part of the description to be truncated. This will be tested in the downstream fork. Patch by Martin Svensson!
* [lldb] [test] Un-XFAIL one lldb-server test on NetBSDMichał Górny2019-11-201-1/+0
|
* [debugserver] Set arch based on TARGET_TRIPLEVedant Kumar2019-11-201-4/+4
| | | | | | Use TARGET_TRIPLE instead of LLVM_DEFAULT_TARGET_TRIPLE, as the latter isn't exported by LLVMConfig.cmake, which means arch detection fails if lldb is built separately from llvm.
* [AMDGPU] Keep consistent check of legal addressing mode.Michael Liao2019-11-204-15/+292
| | | | | | | | | | | | | | Summary: - Add test cases for GFX10, which has narrower offset range compared to GFX9. Reviewers: rampitec, arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70473
* Fix parser bug that permitted 'private' as a (no-op) decl-specifier even ↵Richard Smith2019-11-202-1/+8
| | | | outside OpenCL.
* Revert "[clangd] Fix a crash in expected types"Nico Weber2019-11-202-12/+4
| | | | | This reverts commit b5135a86e04761577494c70e7c0057136cc90b5b. Test fails on Windows.
* scudo: Only use the Android reserved TLS slot when building libc's copy of ↵Peter Collingbourne2019-11-203-4/+10
| | | | | | | | | | | | | | the allocator. When we're not building libc's allocator, just use a regular TLS variable. This lets the unit tests pass on Android devices whose libc uses Scudo. Otherwise libc's copy of Scudo and the unit tests' copy will both try to use the same TLS slot, in likely incompatible ways. This requires using ELF TLS, so start passing -fno-emulated-tls when building the library and the unit tests on Android. Differential Revision: https://reviews.llvm.org/D70472
* [FileCollector] Ignore empty paths.Jonas Devlieghere2019-11-201-1/+5
| | | | | Don't insert empty strings into the StringSet<> because that triggers an assert in its implementation.
* [SystemZ] Avoid mixing strict and non-strict FP operations in testsUlrich Weigand2019-11-207-74/+215
| | | | | | This is to prepare for having the IR verifier reject mixed functions. Note that fp-strict-mul-02.ll and fp-strict-mul-04.ll still remain to be fixed.
* [SelectionDAG][X86] Mutate strictFP nodes to non-strict in ↵Craig Topper2019-11-202-1/+8
| | | | | | | | | | DoInstructionSelection when the node is marked Expand rather than when it is not Legal. This allows operations that are marked Custom, but have some type combinations that are legal to get past this code. Add custom mutation code to X86's Select function for the nodes that don't have isel patterns yet.
* [SystemZ] Use fneg in test casesUlrich Weigand2019-11-2022-98/+88
| | | | | | Now that we have fneg, prefer using it over "fsub -0.0, ...". This helps in particular with strict FP tests, as fneg does not raise any exceptions.
* Rename 'DenormalMode' in CommandFlags.inc to 'DenormalFPMath', as itsJames Y Knight2019-11-201-2/+2
| | | | | | | option is actually named anyhow. This avoids a conflict with the llvm::DenormalMode enum in FloatingPointMode.h.
OpenPOWER on IntegriCloud