summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [RISCV] Fix evaluation of %pcrel_loRoger Ferrer Ibanez2019-11-082-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following testcase function: .Lpcrel_label1: auipc a0, %pcrel_hi(other_function) addi a1, a0, %pcrel_lo(.Lpcrel_label1) .p2align 2 # Causes a new fragment to be emitted .type other_function,@function other_function: ret exposes an odd behaviour in which only the %pcrel_hi relocation is evaluated but not the %pcrel_lo. $ llvm-mc -triple riscv64 -filetype obj t.s | llvm-objdump -d -r - <stdin>: file format ELF64-riscv Disassembly of section .text: 0000000000000000 function: 0: 17 05 00 00 auipc a0, 0 4: 93 05 05 00 mv a1, a0 0000000000000004: R_RISCV_PCREL_LO12_I other_function+4 0000000000000008 other_function: 8: 67 80 00 00 ret The reason seems to be that in RISCVAsmBackend::shouldForceRelocation we only consider the fragment but in RISCVMCExpr::evaluatePCRelLo we consider the section. This usually works but there are cases where the section may still be the same but the fragment may be another one. In that case we end forcing a %pcrel_lo relocation without any %pcrel_hi. This patch makes RISCVAsmBackend::shouldForceRelocation use the section, if any, to determine if the relocation must be forced or not. Differential Revision: https://reviews.llvm.org/D60657
* [Analyzer] Checker for Debugging Iterator CheckersAdam Balogh2019-11-083-2/+221
| | | | | | | | | For white-box testing correct container and iterator modelling it is essential to access the internal data structures stored for container and iterators. This patch introduces a simple debug checkers called debug.IteratorDebugging to achieve this. Differential Revision: https://reviews.llvm.org/D67156
* [NFC][IndVarS] Adjust a commentDaniil Suchkov2019-11-081-1/+1
| | | | (test commit)
* [CR] ConstantRange::sshl_sat(): check sigdness of the min/max, not rangesRoman Lebedev2019-11-081-2/+2
| | | | | This was pointed out in review, but forgot to stage this change into the commit itself..
* [ConstantRange] Add `ushl_sat()`/`sshl_sat()` methods.Roman Lebedev2019-11-083-0/+44
| | | | | | | | | | | | | | | | | | Summary: To be used in `ConstantRange::shlWithNoOverflow()`, may in future be useful for when saturating shift/mul ops are added. Unlike `ConstantRange::shl()`, these are precise. Reviewers: nikic, spatel, reames Reviewed By: nikic Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69960
* [BPF] turn on -mattr=+alu32 for cpu version v3 and laterYonghong Song2019-11-072-0/+2
| | | | | | | | | | | -mattr=+alu32 has shown good performance vs. without this attribute. Based on discussion at https://lore.kernel.org/bpf/1ec37838-966f-ec0b-5223-ca9b6eb0860d@fb.com/T/#t cpu version v3 should support -mattr=+alu32. This patch enabled alu32 if cpu version is v3, either specified by user or probed by the llvm. Differential Revision: https://reviews.llvm.org/D69957
* Reordering KextImageInfo::LoadImageUsingMemoryModuleJason Molenda2019-11-071-9/+15
| | | | | | | | | | | | so we only call ModulesDidLoad at the end of the method after the new module has been added to the target and the sections have all been adjusted to their actual load addresses. Solves a problem where an operating system plugin in the kernel could be loaded multiple times; the first before the binary had even been added to the target. <rdar://problem/50523558>
* [PowerPC][Altivec] Fix offsets for vec_xl and vec_xstNemanja Ivanovic2019-11-072-20/+530
| | | | | | | | As we currently have it implemented in altivec.h, the offsets for these two intrinsics are element offsets. The documentation in the ABI (as well as the implementation in both XL and GCC) states that these should be byte offsets. Differential revision: https://reviews.llvm.org/D63636
* [PowerPC][Altivec] Emit correct builtin for single precision vec_all_neNemanja Ivanovic2019-11-072-1/+58
| | | | | | | We currently emit a double precision comparison instruction for this, whereas we need to emit the single precision version. Differential revision: https://reviews.llvm.org/D64024
* [PowerPC] Option for enabling absolute jumptables with command lineNemanja Ivanovic2019-11-072-0/+105
| | | | | | | | | This option allows the user to specify the use of absolute jumptables instead of relative which is the default on most PPC subtargets. Patch by Kamauu Bridgeman Differential revision: https://reviews.llvm.org/D69108
* [creduce] Fixed a typo in the error message we're looking for.Artem Belevich2019-11-071-1/+1
|
* [analyzer] Add test cases for the unsupported C++ constructor modeling.Artem Dergachev2019-11-073-3/+242
| | | | | | | | | | | | | Namely, for the following items: - Handle constructors within new[]; - Handle constructors for default arguments. Update the open projects page with a link to the newly added tests and more hints for potential contributors. Patch by Daniel Krupp! Differential Revision: https://reviews.llvm.org/D69308
* [analyzer] PR41729: CStringChecker: Improve strlcat and strlcpy modeling.Artem Dergachev2019-11-072-138/+252
| | | | | | | | | | | - Fix false positive reports of strlcat. - The return value of strlcat and strlcpy is now correctly calculated. - The resulting string length of strlcat and strlcpy is now correctly calculated. Patch by Daniel Krupp! Differential Revision: https://reviews.llvm.org/D66049
* [llvm/test] Update test commentsShu-Chun Weng2019-11-071-5/+5
|
* [MC] Delete defaulted constructor llvm::AsmCond::AsmCondFangrui Song2019-11-071-2/+0
|
* [InstCombine] Don't transform bitcasts between x86_mmx and v1i64 into ↵Craig Topper2019-11-072-6/+5
| | | | | | | | | | insertelement/extractelement x86_mmx is conceptually a vector already. Don't introduce an extra conversion between it and scalar i64. I'm using VectorType::isValidElementType which checks for floating point, integer, and pointers to hopefully make this more readable than just blacklisting x86_mmx. Differential Revision: https://reviews.llvm.org/D69964
* [InstCombine] auto-generate complete checks; NFCSanjay Patel2019-11-071-10/+9
|
* Modernize TestWeakSymbols MakefileFred Riss2019-11-071-20/+15
|
* [SEH] Defer checking filter expression types until instantiatonReid Kleckner2019-11-074-13/+24
| | | | | | | | | | | While here, wordsmith the error a bit. Now clang says: error: filter expression has non-integral type 'Foo' Fixes PR43779 Reviewers: amccarth Differential Revision: https://reviews.llvm.org/D69969
* Correctly update isSignalFrame when unwinding the stack via dwarf.Sterling Augustine2019-11-074-4/+39
| | | | | | | | | | | | | | | | | | A "signal frame" is a function or block of code where execution arrives via a signal or interrupt, rather than via a normal call instruction. In fact, a particular instruction is interrupted by the signal and needs to be restarted. Therefore, when the signal handler is complete, execution needs to return to the interrupted instruction, rather than the instruction immediately following the call instruction, as in a normal call. Stack unwinders need to know this to correctly unwind signal frames. Dwarf handily provides an "S" in the CIE augmentation string to describe this case, and the libunwind API provides various functions to for unwinders to determine it,. The llvm libunwind implementation correctly sets it's internal variable "isSignalFrame" when initializing an unwind context. However, upon stepping up the stack, the current implementation correctly reads the augmentation string and sets it in the CIE info (which it then discards), libunwind doesn't update it's internal unwind context data structure. This change fixes that, and provides compatibility with both the canonical libunwind and the libgcc implementation. Reviewers: jfb Subscribers: christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D69677
* gn build: Merge 25ee861372fLLVM GN Syncbot2019-11-072-1/+1
|
* [debugify] Move the Debugify pass from tools/opt to lib/Transform/UtilsDaniel Sanders2019-11-076-40/+28
| | | | | | | | | | | | | | | | | | | Summary: I need to make use of this pass from a driver program that isn't opt. Therefore this patch moves this pass into the LLVM library so that it is available for use elsewhere. There was one function I kept in tools/opt which is exportDebugifyStats() this is because it's serializing the statistics into a human readable format and this seemed more in keeping with opt than a library function Reviewers: vsk, aprantl Subscribers: mgorny, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69926
* [compiler-rt] Fix tests after 03b84e4f6d0Jan Korous2019-11-072-2/+2
| | | | | | | Fallout from: [clang] Report sanitizer blacklist as a dependency in cc1 Default blacklists are now passed via -fsanitize-system-blacklist from driver to cc1.
* BreakpointDummyOptionGroup was using g_breakpoint_modify_options rather than ↵Jim Ingham2019-11-073-1/+25
| | | | | | | | | | g_breakpoint_dummy_options causing the -D option for breakpoint set command to be incorrectly parsed. Patch by Martin Svensson. Differential Revision: https://reviews.llvm.org/D69425
* [clang] Report sanitizer blacklist as a dependency in cc1Jan Korous2019-11-076-21/+62
| | | | | | | | Previously these were reported from the driver which blocked clang-scan-deps from getting the full set of dependencies from cc1 commands. Also the default sanitizer blacklist that is added in driver was never reported as a dependency. I introduced -fsanitize-system-blacklist cc1 option to keep track of which blacklists were user-specified and which were added by driver and clang -MD now also reports system blacklists as dependencies. Differential Revision: https://reviews.llvm.org/D69290
* Revert "[MachineVerifier] Improve verification of live-in lists.Galina Kistanova2019-11-075-154/+0
| | | | This reverts commit b7b170c to give the author more time to address failing tests on the expensive checks buildbots.
* [codeview] Reference types in type parent scopesReid Kleckner2019-11-074-16/+170
| | | | | | | | | | | | | | | | Without this change, when a nested tag type of any kind (enum, class, struct, union) is used as a variable type, it is emitted without emitting the parent type. In CodeView, parent types point to their inner types, and inner types do not point back to their parents. We already walk over all of the parent scopes to build the fully qualified name. This change simply requests their type indices as we go along to enusre they are all emitted. Fixes PR43905 Reviewers: akhuang, amccarth Differential Revision: https://reviews.llvm.org/D69924
* [Diagnostics] Teach -Wnull-dereference about address_space attributeDávid Bolvanský2019-11-072-14/+29
| | | | | | | | | | | | | | | | | | | | | | Summary: Clang should not warn for: > test.c:2:12: warning: indirection of non-volatile null pointer will be deleted, > not trap [-Wnull-dereference] > return *(int __attribute__((address_space(256))) *) 0; > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Solves PR42292. Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69664
* [CodeGenModule] Group blocks runtime globals together, NFCVedant Kumar2019-11-071-4/+4
|
* [lldb] Improve assert in GDBRemoteCommunicationReplayServerJonas Devlieghere2019-11-071-1/+8
| | | | | | | | | | | | While investigating an issue where a different packet was sent during replay I noticed how annoying it is that the existing assert doesn't specify what packet is actually different. It's printed to the log, but enabling logging has the potential to change LLDB's behavior. The same is true when debugging LLDB while it's replaying the reproducer. I replaced the assert with a printf of the unexpected packet followed by a fatal_error wrapped in ifndef NDEBUG. The behavior is the same as the previous assert, just with more/better context.
* [InstCombine] Add test cases to show bad canonicalization of bitcasts ↵Craig Topper2019-11-071-0/+19
| | | | | | | | | | | | | between x86_mmx and <1 x i64>. As the test cases show, we end up with an insert/extract and a bitcast to/from i64. x86_mmx is for some purposes conceptually a vector. We shouldn't be adding scalar conversions around it. Since _m64 is defined as <1 x i64> and intrinsics use x86_mmx as their input/output these extra scalar operations prevent the X86 backend from generating good code especially on 32-bit targets where i64 gets split.
* [Sema] Fixes a crash with a templated destructorMark de Wever2019-11-072-4/+13
| | | | | | | | The issue was introduced by D33189 which fixed PR33189. Fixes PR38671: "destructor cannot be declared as a template" leads to segfault in Sema::LookupSpecialMember Differential Revision: https://reviews.llvm.org/D69225
* [clang] Add -fdebug-default-version for specifying the default DWARF versionDavid Blaikie2019-11-075-1/+76
| | | | | | | | | | This flag decouples specifying the DWARF version from enabling/disabling DWARF in general (or the gN level - gmlt/limited/standalone, etc) while still allowing existing -gdwarf-N flags to override this default. Patch by Caroline Tice! Differential Revision: https://reviews.llvm.org/D69822
* Wrong debug info generated at -O2 (-O0 is correct)Vedant Kumar2019-11-078-8/+73
| | | | | | | | | | | | | | | | Instcombiner pass was erasing trivially dead instruction without updating dependent llvm.dbg.value. which was not showing programmer current state of variables while debugging. As a part of this fix I did following, Iterate throught all the users (llvm.dbg) of a instruction which is trivially dead and set each if them undef, Before deleting the instruction. Now user will see optimized out, when try to print those variables. This fixes https://bugs.llvm.org/show_bug.cgi?id=43893 This is my first fix to llvm. Patch by kamlesh kumar! Differential Revision: https://reviews.llvm.org/D69809
* crashlog.py: Improve regular expressionsAdrian Prantl2019-11-072-13/+63
| | | | | | | | | | | | | | | | | | | This is yet another change to the regular expressions in crashlog.py that fix a few edge cases, and attempt to improve the readability quite a bit in the process. My last change to support spaces in filenames introduced a bug that caused the version/archspec field to be parsed as part of the image name. For example, in "0x1111111 - 0x22222 +MyApp Pro arm64 <01234>", the name of the image was recognized as "MyApp Pro arm64" instead of "MyApp Pro" with a "version" of arm64. The bugfix makes the space following an optional field mandatory *inside* the optional group. rdar://problem/56883435 Differential Revision: https://reviews.llvm.org/D69871
* Revert "[Sema] Suppress -Wchar-subscripts if the index is a literal char"Edward Jones2019-11-072-15/+1
| | | | This reverts commit 7adab7719e55e1b29bfd521dcc73f202139e8f41.
* FDRRecords - fix uninitialized variable warnings. NFCI.Simon Pilgrim2019-11-071-3/+3
|
* ImutAVLTree::validateTree - fix null dereference typo warning. NFCI.Simon Pilgrim2019-11-071-2/+1
| | | | Noticed by static analyzer.
* canFoldMergeOpcode returns a bool result not an unsigned. NFCI.Simon Pilgrim2019-11-071-2/+2
|
* Fix warning about unused std::unique result, erase shifted elementsReid Kleckner2019-11-071-8/+11
| | | | | This is actually a functional change. I haven't added any new test coverage. I'm just trying to fix the warning and hoping for the best.
* [AsmWritter] Fixed "null check after dereferencing" warningDávid Bolvanský2019-11-071-4/+2
| | | | | | | | | | | | Summary: The 'BB->getParent()' pointer was utilized before it was verified against nullptr. Check lines: 3567, 3581. Reviewers: jyknight, RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69751
* [RISCV] Fix up tests on Windows after new usage of sys::path::appendReid Kleckner2019-11-072-22/+22
|
* [XCOFF] Add back extern template declarationsReid Kleckner2019-11-071-0/+6
| | | | | The extern template declarations were fine. The duplicate explicit instantiations were both in the .cpp file.
* Revert "[XCOFF] Fix link errors from explicit template instantiation"Reid Kleckner2019-11-072-10/+0
| | | | | | | | This reverts commit c989993ba1a666f04f7aee7df51d9f4de0588b71. maskray already fixed the explicit instantiation definition in the .cpp file, and these extern template declarations seem to be causing warnings that I don't understand.
* [XCOFF] Fix link errors from explicit template instantiationReid Kleckner2019-11-072-0/+10
| | | | | | | | | | | | | | | | I happen to be using clang-cl+lld-link locally, and I get these link errors: lld-link: error: undefined symbol: public: unsigned short __cdecl llvm::object::XCOFFSectionHeader<struct llvm::object::XCOFFSectionHeader64>::getSectionType(void) const >>> referenced by C:\src\llvm-project\llvm\tools\llvm-readobj\XCOFFDumper.cpp:106 >>> tools\llvm-readobj\CMakeFiles\llvm-readobj.dir\XCOFFDumper.cpp.obj:(public: virtual void __cdecl `anonymous namespace'::XCOFFDumper::printSectionHeaders(void)) I suspect this is because the explicit template instaniation appears before the inline method definitions in the .cpp file, so they aren't available at the point of instantiation. Move the explicit instantiation later. Also, forward declare the explicit instantiation for good measure.
* [llvm-ar] Support verbose mode for operation 'x'Fangrui Song2019-11-072-4/+17
| | | | | | Reviewed By: jhenderson, kongyi Differential Revision: https://reviews.llvm.org/D69911
* [XCOFF] Move explicit instantions after member function definitions to fix ↵Fangrui Song2019-11-071-4/+4
| | | | clang builds
* [InstCombine] canonicalize shift+logic+shift to reduce dependency chainSanjay Patel2019-11-073-31/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shift (logic (shift X, C0), Y), C1 --> logic (shift X, C0+C1), (shift Y, C1) This is an IR translation of an existing SDAG transform added here: rL370617 So we again have 9 possible patterns with a commuted IR variant of each pattern: https://rise4fun.com/Alive/VlI https://rise4fun.com/Alive/n1m https://rise4fun.com/Alive/1Vn Part of the motivation is to allow easier recognition and subsequent canonicalization of bswap patterns as discussed in PR43146: https://bugs.llvm.org/show_bug.cgi?id=43146 We had to delay this transform because it used to allow the SLP vectorizer to create awful reductions out of simple load-combines. That problem was fixed with: rL375025 (we'll bring back load combining in IR someday...) The backend is also better equipped to deal with these patterns now using hooks like TLI.getShiftAmountThreshold(). The only remaining potential controversy is that the -reassociate pass tends to reverse this kind of pattern (to help GVN?). But since -reassociate doesn't do anything with these specific patterns, there is no conflict currently. Finally, there's a new pass proposal at D67383 for general tree-height-reduction reassociation, and it could use a cost model to decide how to optimally rearrange these kinds of ops for a target. That patch appears to be stalled. Differential Revision: https://reviews.llvm.org/D69842
* X86FrameLowering - fix bool to unsigned cast static analyzer warnings. NFCI.Simon Pilgrim2019-11-071-7/+7
|
* MachineMemOperand::getBaseAlignment() - fix "shift of i32 then extended to ↵Simon Pilgrim2019-11-071-1/+1
| | | | i64" static analyzer warning. NFCI.
OpenPOWER on IntegriCloud