summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Attributor] Make unimplemented method pure virtual.Benjamin Kramer2019-09-071-3/+3
| | | | | | Otherwise the compiler mistakes it for a vtable anchor. llvm-svn: 371298
* [SimplifyCFG][NFC] Show that we don't consider the cost when merging cond storesRoman Lebedev2019-09-071-0/+36
| | | | | | We count instruction count in each BB's separately, not their cost. llvm-svn: 371297
* [SimplifyCFG][NFC] Regenerate merge-cond-stores* testsRoman Lebedev2019-09-072-54/+65
| | | | llvm-svn: 371296
* [SimplifyCFG] SpeculativelyExecuteBB(): It's SpeculatedInstructions, not ↵Roman Lebedev2019-09-071-7/+7
| | | | | | | | | SpeculationCost It counts the number of instructions we are ok speculating (at most 1 there), not their cost, so rename accordingly. llvm-svn: 371294
* Replicate the change "[Alignment][NFC] Use Align with ↵Sylvestre Ledru2019-09-071-1/+1
| | | | | | | | | TargetLowering::setMinFunctionAlignment" on AVR to avoid a breakage. See r371200 / https://reviews.llvm.org/D67229 llvm-svn: 371293
* [ELF][test] Improve LTO testsFangrui Song2019-09-0715-78/+85
| | | | | | | | Add file-level comments Delete insignificant addresses to make them more tolerant to layout changes Simplify test output llvm-svn: 371292
* [Attributor] ValueSimplify Abstract AttributeHideto Ueno2019-09-076-7/+418
| | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces initial `AAValueSimplify` which simplifies a value in a context. example - (for function returned) If all the return values are the same and constant, then we can replace callsite returned with the constant. - If an internal function takes the same value(constant) as an argument in the callsite, then we can replace the argument with that constant. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66967 llvm-svn: 371291
* [git-llvm] Do not reinvent `@{upstream}`David Zarzycki2019-09-071-12/+2
| | | | | | | | Make `git-llvm` more robust when used with a nontrivial repository. https://reviews.llvm.org/D67262 llvm-svn: 371290
* Revert [CodeGen] Fix typos to run tests. NFC.Xing GUO2019-09-071-2/+2
| | | | | | | | This reverts r371286 (git commit b38105bbd0f7dfef424a4f096aa6a6b7b467fe99) r371286 caused build bots' failure. I'll check it. llvm-svn: 371289
* [CodeGen] Fix typos to run tests. NFC.Xing GUO2019-09-071-2/+2
| | | | llvm-svn: 371286
* Remove stale TLI Module level pass registrationTeresa Johnson2019-09-071-1/+0
| | | | | | | | Clang patch to adapt to LLVM changes in D66428 that make the TLI require a Function. There is no longer a module-level TargetLibraryAnalysis, so remove its registration llvm-svn: 371285
* Change TargetLibraryInfo analysis passes to always require FunctionTeresa Johnson2019-09-0782-243/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first change to enable the TLI to be built per-function so that -fno-builtin* handling can be migrated to use function attributes. See discussion on D61634 for background. This is an enabler for fixing handling of these options for LTO, for example. This change should not affect behavior, as the provided function is not yet used to build a specifically per-function TLI, but rather enables that migration. Most of the changes were very mechanical, e.g. passing a Function to the legacy analysis pass's getTLI interface, or in Module level cases, adding a callback. This is similar to the way the per-function TTI analysis works. There was one place where we were looking for builtins but not in the context of a specific function. See FindCXAAtExit in lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround could provide the wrong behavior in some corner cases. Suggestions welcome. Reviewers: chandlerc, hfinkel Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66428 llvm-svn: 371284
* [X86] Add tests for fp128 frem, sqrt, sin, and cos.Craig Topper2019-09-071-0/+87
| | | | llvm-svn: 371283
* [X86] Autogenerate fp128-libcalls.llCraig Topper2019-09-071-40/+81
| | | | llvm-svn: 371282
* [llvm-objcopy] Rename SHOffset (e_shoff) field to SHOff. NFCFangrui Song2019-09-072-7/+7
| | | | | | | | | Similar to D67254. `struct Elf*_Shdr` has a field `sh_offset`. Rename SHOffset to SHOff to avoid confusion. llvm-svn: 371281
* Long timeouts for the MacOSX SystemRuntime plugins under ASAN; else quick.Jason Molenda2019-09-074-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | In April via r357829, Adrian unified timeouts across lldb and set the default value high so that we wouldn't get timeouts on ASAN bots that were running under load. The library that the MacOSX SystemRuntime has functions that need to take a lock, and if that lock is held already, those functions will never complete; we're seeing the 15 second timeout being hit with inferiors that are doing a lot of enqueuing and dequeuing of libdispatch work items causing this deadlocking behavior. This patch reverts to a very short timeout for these SystemRuntime function calls, given the behavior of this library that they are calling into. When lldb is built with AddressSanitizer enabled, they will use the default 15 second timeout. tl;dr: this reverts to the previous timeouts for these SystemRuntime inf func calls. <rdar://problem/54538149> llvm-svn: 371280
* [clang][DependencyFileGenerator] Fix missing -MT option handlingJan Korous2019-09-072-5/+5
| | | | | | | | Targets in DependencyFileGenerator don't necessarily come from -MT option. Differential Revision: https://reviews.llvm.org/D67308 llvm-svn: 371279
* Fix thunks.cpp test, don't FileCheck for anon namespace idReid Kleckner2019-09-071-1/+1
| | | | | | | The anon namespace id is a hash of the main input path to the compiler, which varies in the test suite because the input path is absolute. llvm-svn: 371277
* [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownershipAkira Hatanaka2019-09-077-53/+87
| | | | | | | | | | | | | | | | | qualifications as unavailable if the union is declared in a system header r365985 stopped marking those fields as unavailable, which caused the union's NonTrivialToPrimitive* bits to be set to true. This patch restores the behavior prior to r365985, except that users can explicitly specify the ownership qualification of the field to instruct the compiler not to mark it as unavailable. rdar://problem/53420753 Differential Revision: https://reviews.llvm.org/D65256 llvm-svn: 371276
* [Sema] Diagnose default-initialization, destruction, and copying ofAkira Hatanaka2019-09-0718-122/+615
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-trivial C union types This recommits r365985, which was reverted because it broke a few projects using unions containing non-trivial ObjC pointer fields in system headers. We now have a patch to fix the problem (see https://reviews.llvm.org/D65256). Original commit message: This patch diagnoses uses of non-trivial C unions and structs/unions containing non-trivial C unions in the following contexts, which require default-initialization, destruction, or copying of the union objects, instead of disallowing fields of non-trivial types in C unions, which is what we currently do: - function parameters. - function returns. - assignments. - compound literals. - block captures except capturing of `__block` variables by non-escaping blocks. - local and global variable definitions. - lvalue-to-rvalue conversions of volatile types. See the discussion in https://reviews.llvm.org/D62988 for more background. rdar://problem/50679094 Differential Revision: https://reviews.llvm.org/D63753 llvm-svn: 371275
* Synchronize LLVM's copy of libc++abi's demangler with the libc++abiRichard Smith2019-09-073-30/+420
| | | | | | | | | version after r371273. Also fix a minor issue in r371273 that only surfaced after template instantiation from LLVM's use of the demangler. llvm-svn: 371274
* Implement demangling support for C++20 lambda expression extensions.Richard Smith2019-09-063-31/+429
| | | | | | | | | | | | | | | | | | | | | | | | | This implements demangling support for the mangling extensions specified in https://github.com/itanium-cxx-abi/cxx-abi/pull/85, much of which is implemented in Clang r359967 and r371004. Specifically, this provides demangling for: * <template-param-decl> in <lambda-sig> * <template-param> with non-zero level * lambda-expression literals (not emitted by Clang yet) * nullptr literals * string literals (The final two seem unrelated, but handling them was necessary in order to disambiguate between lambda expressions and the other forms of literal for which we have a type but no value.) When demangling a <lambda-sig>, we form template parameters with no corresponding argument, so we cannot substitute in the argument in the demangling. Instead we invent synthetic names for the template parameters (eg, '[]<typename $T>($T *x)'). llvm-svn: 371273
* Use musttail for variadic method thunks when possibleReid Kleckner2019-09-064-19/+184
| | | | | | | | | | | | | | | | | | | | | This avoids cloning variadic virtual methods when the target supports musttail and the return type is not covariant. I think we never implemented this previously because it doesn't handle the covariant case. But, in the MS ABI, there are some cases where vtable thunks must be emitted even when the variadic method defintion is not available, so it looks like we need to implement this. Do it for both ABIs, since it's a nice size improvement and simplification for Itanium. Emit an error when emitting thunks for variadic methods with a covariant return type. This case is essentially not implementable unless the ABI provides a way to perfectly forward variadic arguments without a tail call. Fixes PR43173. Differential Revision: https://reviews.llvm.org/D67028 llvm-svn: 371269
* Update lld tests dynamic-list.s and symbol-override.s to use llvm-nmMatthew Voss2019-09-062-4/+4
| | | | | | | | | | The following tests failed on Windows bots due to nm not being available: lld/test/ELF/dynamic-list.s lld/test/ELF/symbol-override.s llvm-svn: 371267
* [AArch64][GlobalISel] Enable the localizer for optimized builds.Amara Emerson2019-09-064-8/+6
| | | | | | | | | | | | | | | | | | | Despite the fact that the localizer's original motivation was to fix horrendous constant spilling at -O0, shortening live ranges still has net benefits even with optimizations enabled. On an -Os build of CTMark, doing this improves code size by 0.5% geomean. There are a few regressions, bullet increasing in size by 0.5%. One example from bullet where code size increased slightly was due to GlobalISel actually now generating the same code as SelectionDAG. So we actually have an opportunity in future to implement better heuristics for localization and therefore be *better* than SDAG in some cases. In relation to other optimizations though that one is relatively minor. Differential Revision: https://reviews.llvm.org/D67303 llvm-svn: 371266
* [InstCombine] Refactor substitution of instruction in the parent BB (NFC)Evandro Menezes2019-09-062-14/+15
| | | | | | | | | Add the new method `LibCallSimplifier::substituteInParent()` that calls `LibCallSimplifier::replaceAllUsesWith()' and `LibCallSimplifier::eraseFromParent()` back to back, simplifying the resulting code. llvm-svn: 371264
* [ORC][RPC] Join server thread before checking condition in unit test.Lang Hames2019-09-061-2/+2
| | | | | | Otherwise we have a race on the sent-messages count. llvm-svn: 371263
* [IR] CallBrInst: scan+update arg list when indirect dest list changesNick Desaulniers2019-09-063-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There's an unspoken invariant of callbr that the list of BlockAddress Constants in the "function args" list match the BasicBlocks in the "other labels" list. (This invariant is being added to the LangRef in https://reviews.llvm.org/D67196). When modifying the any of the indirect destinations of a callbr instruction (possible jump targets), we need to update the function arguments if the argument is a BlockAddress whose BasicBlock refers to the indirect destination BasicBlock being replaced. Otherwise, many transforms that modify successors will end up violating that invariant. A recent change to the arm64 Linux kernel exposed this bug, which prevents the kernel from booting. I considered maintaining a mapping from indirect destination BasicBlock to argument operand BlockAddress, but this ends up being a one to potentially many (though usually one) mapping. Also, the list of arguments to a function (or more typically inline assembly) ends up being less than 10. The implementation is significantly simpler to just rescan the full list of arguments. Because of the one to potentially many relationship, the full arg list must be scanned (we can't stop at the first instance). Thanks to the following folks that reported the issue and helped debug it: * Nathan Chancellor * Will Deacon * Andrew Murray * Craig Topper Link: https://bugs.llvm.org/show_bug.cgi?id=43222 Link: https://github.com/ClangBuiltLinux/linux/issues/649 Link: https://lists.infradead.org/pipermail/linux-arm-kernel/2019-September/678330.html Reviewers: craig.topper, chandlerc Reviewed By: craig.topper Subscribers: void, javed.absar, kristof.beyls, hiraditya, llvm-commits, nathanchance, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D67252 llvm-svn: 371262
* [X86] Add a AVX512VBMI command line to min-legal-vector-width.ll. Always ↵Craig Topper2019-09-061-73/+129
| | | | | | | | | | | | | | | enable fast-variable-shuffle Trying to minimize the features we need to manipulate when this is updated for D67259. The VBMI is interesting because it enables some improved combining for truncates. I enabled fast-variable-shuffle because all the CPUs we're going to add implicitly enable it. So they can share check lines. llvm-svn: 371261
* [X86] Replace -mcpu with -mattr on some tests.Craig Topper2019-09-062-5/+4
| | | | llvm-svn: 371260
* [test] Add a FIXME test for stop-command-source-on-errorJonas Devlieghere2019-09-063-0/+30
| | | | | | | | | | | | | | Modifying the interpreter settings is tricky because they don't take effect until we create a new command interpreter, which should be merely an implementation detail. This leads to confusing and unexpected scenarios. This adds a test cases with FIXMEs for some of the odd scenarios I encountered. I didn't XFAIL the test because I don't think there's a way to get an unexpected PASS if any of the commands succeeds and splitting up the file in multiple tests seems excessive. llvm-svn: 371259
* [Core] Remove use of ClangASTContext in DumpDataExtractorAlex Langford2019-09-064-52/+49
| | | | | | | | | | | | | Summary: DumpDataExtractor uses ClangASTContext in order to get the proper llvm fltSemantics for the type it needs so that it can dump floats in a more precise way. However, there's no reason that this behavior needs to be specific ClangASTContext. Instead, I think it makes sense to ask TypeSystems for the float semantics for a type of a given size. Differential Revision: https://reviews.llvm.org/D67239 llvm-svn: 371258
* [analyzer] Add minimal support for fix-it hints.Artem Dergachev2019-09-0615-95/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow attaching fixit hints to Static Analyzer BugReports. Fixits are attached either to the bug report itself or to its notes (path-sensitive event notes or path-insensitive extra notes). Add support for fixits in text output (including the default text output that goes without notes, as long as the fixit "belongs" to the warning). Add support for fixits in the plist output mode. Implement a fixit for the path-insensitive DeadStores checker. Only dead initialization warning is currently covered. Implement a fixit for the path-sensitive VirtualCall checker when the virtual method is not pure virtual (in this case the "fix" is to suppress the warning by qualifying the call). Both fixits are under an off-by-default flag for now, because they require more careful testing. Differential Revision: https://reviews.llvm.org/D65182 llvm-svn: 371257
* [analyzer] pr43179: Make CallDescription defensive against C variadic functions.Artem Dergachev2019-09-064-6/+33
| | | | | | | | | | | | | | | | | | | | | Most functions that our checkers react upon are not C-style variadic functions, and therefore they have as many actual arguments as they have formal parameters. However, it's not impossible to define a variadic function with the same name. This will crash any checker that relies on CallDescription to check the number of arguments but silently assumes that the number of parameters is the same. Change CallDescription to check both the number of arguments and the number of parameters by default. If we're intentionally trying to match variadic functions, allow specifying arguments and parameters separately (possibly omitting any of them). For now we only have one CallDescription which would make use of those, namely __builtin_va_start itself. Differential Revision: https://reviews.llvm.org/D67019 llvm-svn: 371256
* [ORC] Add a missing #include atomic.Lang Hames2019-09-061-0/+1
| | | | | | Hopefully this will fix the bot build failures from r371245. llvm-svn: 371255
* GlobalISel: Add G_FMAD instructionMatt Arsenault2019-09-067-0/+29
| | | | llvm-svn: 371254
* GlobalISel: Support physical register inputs in patternsMatt Arsenault2019-09-0610-31/+324
| | | | llvm-svn: 371253
* Update comment for <template-param-decl> mangling to match extended mangling ↵Richard Smith2019-09-061-0/+1
| | | | | | rule in r371004. llvm-svn: 371252
* Remove dead .seh_stackalloc parsing method in X86AsmParserReid Kleckner2019-09-061-14/+0
| | | | | | | The shared COFF asm parser code handles this directive, since it is shared with AArch64. Spotted by Alexandre Ganea in review. llvm-svn: 371251
* [clang][Index][NFC] Put IndexingOptions to a separate headerJan Korous2019-09-066-20/+47
| | | | llvm-svn: 371250
* AMDGPU: Fix typoMatt Arsenault2019-09-061-4/+4
| | | | llvm-svn: 371249
* [llvm-ifs] Improving detection of PlatformKind from triple for TBD generation.Puyan Lotfi2019-09-065-7/+119
| | | | | | | | It was pointed out that I had hard-coded PlatformKind. This is rectifying that. Differential Revision: https://reviews.llvm.org/D67255 llvm-svn: 371248
* [PowerPC][XCOFF] Remove basic test. [NFC]Sean Fertile2019-09-061-37/+0
| | | | | | | Test verified that we could compile an empty module and produce an XCOFF object file. Newer tests superssed this coverage, its safe to remove. llvm-svn: 371247
* [ConstantFolding] Add new test cases for transcendentals (NFC)Evandro Menezes2019-09-062-0/+245
| | | | llvm-svn: 371246
* [ORC] Make sure RPC channel-send is called in blocking calls and responses.Lang Hames2019-09-063-6/+64
| | | | | | | | | ORC-RPC batches calls by default, and the channel's send method must be called to transfer any buffered calls to the remote. The call to send was missing on responses and blocking calls in the SingleThreadedRPCEndpoint. This patch adds the necessary calls and modifies the RPC unit test to check for them. llvm-svn: 371245
* [llvm-jitlink] Add optional slab allocator for testing locality optimizations.Lang Hames2019-09-062-2/+178
| | | | | | | | | | | | The llvm-jitlink utility now accepts a '-slab-allocate <size>' option. If given, llvm-jitlink will use a slab-based memory manager rather than the default InProcessMemoryManager. Using a slab allocator will allow reliable testing of future locality based optimizations (e.g. PLT and GOT elimination) in JITLink. The <size> argument is a number, optionally followed by a units specifier (Kb, Mb, or Gb). If the units are not given then the number is assumed to be in Kb. llvm-svn: 371244
* [X86] Use MOVSX by default instead of CBW to extend i8 to AX for i8 sdivrem.Craig Topper2019-09-067-328/+222
| | | | | | | | | | | | | | | | | We can use a MOVSX16 here then rely on FixupBWInst to change to MOVSX32 if the upper bits are dead. With a special case to not promote if it could be turned into CBW. Then we can rely on X86MCInstLower to turn the MOVSX into CBW very late if register allocation worked out. Using MOVSX gives an opportunity to use the MOVSX as a both a copy and a sign extend since the input and output register aren't tied together. Differential Revision: https://reviews.llvm.org/D67192 llvm-svn: 371243
* [X86] Use MOVZX16rr8/MOVZXrm8 when extending input for i8 udivrem.Craig Topper2019-09-0610-64/+3
| | | | | | | | We can rely on X86FixupBWInsts to turn these into MOVZX32. This simplifies a follow up commit to use MOVSX for i8 sdivrem with a late optimization to use CBW when register allocation works out. llvm-svn: 371242
* [LifetimeAnalysis] don't use raw string literals in macrosMatthias Gehre2019-09-061-29/+23
| | | | | | They broke the AArch64 bots (gcc does not support it) llvm-svn: 371241
* [X86] Teach FixupBWInsts to turn MOVSX16rr8/MOVZX16rr8/MOVSX16rm8/MOVZX16rm8 ↵Craig Topper2019-09-062-10/+52
| | | | | | into their 32-bit dest equivalents when the upper part of the register is dead. llvm-svn: 371240
OpenPOWER on IntegriCloud