- Feb 27, 2020
-
-
-
Adrian Prantl authored
This patch fixes a bug that would cause dsymutil to collect .swiftinterface files for the Swift stdlib and other SDK modules. There is no advantage in copying these since they should be loaded from the ones bundled with LLDB's embedded Swift compiler instead and copying them will cause LLDB to recompile them from source instead of loading their prebuilt cached counterparts in the SDK. rdar://problem/57463247 Differential Revisions: https://reviews.llvm.org/D75196
-
Eric Astor authored
Summary: ParsingInlineAsm was a misleading name. These values are only set for MS-style inline assembly. Reviewed By: rnk Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D75198
-
Sanjay Patel authored
As suggested in D75145 - I'm not sure why, but several passes have this kind of disable/enable flag implemented at the pass manager level. But that means we have to duplicate the flag for both pass managers and add code to check the flag every time the pass appears in the pipeline. We want a debug option to see if this pass is misbehaving regardless of the pass managers, so just add a disablement check at the single point before any transforms run. Differential Revision: https://reviews.llvm.org/D75204
-
Lei Zhang authored
This commit handles folding spv.LogicalAnd/spv.LogicalOr when one of the operands is constant true/false. Differential Revision: https://reviews.llvm.org/D75195
-
Tyker authored
Summary: code like: ``` consteval int f() { int *A = new int(0); return *A; } int i1 = f(); ``` currently doesn't generate any error. Reviewers: rsmith Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D74418 -
Nikita Popov authored
-
Nikita Popov authored
CVP currently does not simplify cmps with instructions in the same block, because LVI getPredicateAt() currently does not provide much useful information for that case (D69686 would change that, but is stuck.) However, if the instruction is a Phi node, then LVI can compute the result of the predicate by threading it into the predecessor blocks, which allows it simplify some conditions that nothing else can handle. Relevant code: https://github.com/llvm/llvm-project/blob/6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb/llvm/lib/Analysis/LazyValueInfo.cpp#L1904-L1927 Differential Revision: https://reviews.llvm.org/D72169
-
Julian Lettner authored
Fails with the following message in the error case: ``` CMake Error at /path/to/llvm-project/compiler-rt/lib/tsan/CMakeLists.txt:119 (message): Building the TSan runtime requires at least macOS SDK 10.12 ``` Fixes #44682. https://bugs.llvm.org/show_bug.cgi?id=44682 Reviewed By: dmajor, delcypher Differential Revision: https://reviews.llvm.org/D74501
-
Nikita Popov authored
As pointed out on D75008, MadeIRChange is already set by eraseInstFromFunction(), which also already does a debug print.
-
Nikita Popov authored
-
Ayke van Laethem authored
This is a small pet peeve from me. This change makes sure the AVR backend uses the correct private label prefix (.L) so that private labels are hidden in avr-objdump. Example code: define i8 @foo(i1 %cond) { br i1 %cond, label %then, label %else then: ret i8 3 else: ret i8 5 } When compiling this: llc -march=avr -filetype=obj -o test.o test.ll and then dumping it: avr-objdump -d test.o You would previously get an ugly temporary label: 00000000 <foo>: 0: 81 70 andi r24, 0x01 ; 1 2: 80 30 cpi r24, 0x00 ; 0 4: f9 f3 breq .-2 ; 0x4 <foo+0x4> 6: 83 e0 ldi r24, 0x03 ; 3 8: 08 95 ret 0000000a <LBB0_2>: a: 85 e0 ldi r24, 0x05 ; 5 c: 08 95 ret This patch fixes that, the output is now: 00000000 <foo>: 0: 81 70 andi r24, 0x01 ; 1 2: 80 30 cpi r24, 0x00 ; 0 4: 01 f0 breq .+0 ; 0x6 <foo+0x6> 6: 83 e0 ldi r24, 0x03 ; 3 8: 08 95 ret a: 85 e0 ldi r24, 0x05 ; 5 c: 08 95 ret Note that as you can see the breq operand is different. However it is still the same after linking: 4: 11 f0 breq .+4 Differential Revision: https://reviews.llvm.org/D75124 -
Ayke van Laethem authored
Adjusting by 2 breaks DWARF output. With this fix, programs start to compile and produce valid DWARF output. Differential Revision: https://reviews.llvm.org/D74213
-
Nikita Popov authored
InstCombine removes pairs of start+end intrinsics that don't have anything in between them. Currently this is done by starting at the start intrinsic and scanning forwards. This patch changes it to start at the end intrinsic and scan backwards. The motivation here is as follows: When we process the start intrinsic, we have not yet looked at the following instructions, which may still get folded/removed. If they do, we will only be able to remove the start/end pair on the next iteration. When we process the end intrinsic, all the instructions before it have already been visited, and we don't run into this problem. Differential Revision: https://reviews.llvm.org/D75011
-
Reid Kleckner authored
MSVC does not define __LONG_MAX__, so we were just getting lucky in this conditional: #if __LONG_MAX__ == __INT_MAX__ Undefined identifiers evaluate to zero in preprocessor conditionals, so this became true, which happens to work for MSVC platforms. Instead, use this pattern and let the compiler constant fold: return sizeof(long) == sizeof(int) ? SwapByteOrder_32((uint32_t)C) : SwapByteOrder_64((uint64_t)C); -
Krzysztof Parzyszek authored
- Mark memory access for bool vectors as disallowed in target lowering. This will prevent combining bitcasts of bool vectors with stores. - Replace the actual bitcasting code with a faster version. - Handle casting of v16i1 to i16.
-
Martijn Vels authored
Summary: This change checks for the case where people want to erase a string to the end, i.e., __n == npos, and inlines the call if so. This also demonstrates keeping the ABI intact for V1, but inlining the erase() method for unstable. Reviewers: EricWF, mclow.lists, ldionne Reviewed By: EricWF, ldionne Subscribers: smeenai, dexonsmith, christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D73743
-
Reid Kleckner authored
-
Fangrui Song authored
They are purposefully skipped by input section descriptions (rL295324). Similarly, --orphan-handling= should not warn/error for them. This behavior matches GNU ld. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D75151
-
Greg Clayton authored
Added llvm-gsymutil to LLVM_TEST_DEPENDS.
-
Vedant Kumar authored
-
Krzysztof Parzyszek authored
Also use it in a few places to simplify code a little bit. NFC
-
Juneyoung Lee authored
-
Mikhail Maltsev authored
Summary: The definition of `__libcpp_timed_backoff_policy` and the declaration of `__libcpp_thread_poll_with_backoff` must not be guarded by #if !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) because the definitions of `__libcpp_timed_backoff_policy::operator()` and `__libcpp_thread_poll_with_backoff` aren't guarded by this macro (and this is correct because these two functions are implemented in terms of other libc++ functions and don't interact with the host threading library). Reviewers: ldionne, __simt__, EricWF, mclow.lists Reviewed By: ldionne Subscribers: dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D75191
-
Hiroshi Yamauchi authored
DevirtSCCRepeatedPass iteration. Needs ReviewPublic This aims to fix a missed inlining case. If there's a virtual call in the callee on an alloca (stack allocated object) in the caller, and the callee is inlined into the caller, the post-inline cleanup would devirtualize the virtual call, but if the next iteration of DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is based on a heuristic to determine whether to reiterate, we may miss inlining the devirtualized call. This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp.
-
Lei Zhang authored
This gives us better file organization and faster compilation time by avoid having a gigantic SPIRVOps.cpp file.
-
Steven Wu authored
Summary: For builtin compiler-rt, it is built with visibility hidden by default to avoid the client exporting symbols from libclang static library. The compiler option -fvisibility=hidden doesn't work on the aliases in c files because they are created with inline assembly. On Darwin platform, thoses aliases are exported by default if they are reference by the client. Fix the issue by adding ".private_extern" to all the aliases if the library is built with visibility hidden. rdar://problem/58960296 Reviewers: dexonsmith, arphaman, delcypher, kledzik Reviewed By: delcypher Subscribers: dberris, jkorous, ributzka, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73577
-
Sean Fertile authored
-
John Brawn authored
This doesn't do anything on its own, but it's the first step towards allowing plugins to define attributes. It does simplify the ParsedAttrInfo generation in ClangAttrEmitter a little though. Differential Revision: https://reviews.llvm.org/D31337
-
Alex Brachet authored
Reviewers: gchatelet, sivachandra Reviewed By: gchatelet, sivachandra Subscribers: libc-commits, mgorny, MaskRay, tschuett Differential Revision: https://reviews.llvm.org/D75136
-
Reid Kleckner authored
Saves 200 includes, which is mostly immaterial.
-
Fangrui Song authored
empty-sections.test: add two tests adapted from @jhenderson's https://reviews.llvm.org/D74755#1882221 strip-non-alloc.test: improve. D74755 will change the attribution of an empty section. They mostly test the behavior of Object.cpp:sectionWithinSegment : how we attribute sections to segments. `ParentSegment` can affect some subtle layout decisions. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D74879
-
Fangrui Song authored
This makes --orphan-handling= less noisy. This change also improves our compatibility with GNU ld. GNU ld special cases .symtab, .strtab and .shstrtab . We need output section descriptions for .symtab, .strtab and .shstrtab to suppress: <internal>:(.symtab) is being placed in '.symtab' <internal>:(.shstrtab) is being placed in '.shstrtab' <internal>:(.strtab) is being placed in '.strtab' With --strip-all, .symtab and .strtab can be omitted (note, --strip-all is not compatible with --emit-relocs). Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D75149
-
Kadir Cetinkaya authored
Summary: Get rid of calls to lexer and unnecessary source location transformations. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75166
-
Sanjay Patel authored
This may inhibit vector narrowing in general, but there's already an inconsistency in the way that we deal with this pattern as shown by the test diff. We may want to add a dedicated function for narrowing fneg. It's often folded into some other op, so moving it away from other math ops may cause regressions that we would not see for normal binops. See D73978 for more details.
-
LLVM GN Syncbot authored
-
Pavel Labath authored
Summary: This patch introduces a function to house the code needed to do the DWARF64 detection dance. The function decodes the initial length field and returns it as a pair containing the actual length, and the DWARF encoding. This patch does _not_ attempt to handle the problem of detecting lengths which extend past the size of the section, or cases when reads of a single contribution accidentally escape beyond its specified length, but I think it's useful in its own right. Reviewers: dblaikie, jhenderson, ikudrin Subscribers: hiraditya, probinson, aprantl, JDevlieghere, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74560
-
Martijn Vels authored
Summary: This change adds the macros _LIBCPP_COMPILER_HAS_BUILTIN_CONSTANT and _LIBCPP_BUILTIN_CONSTANT_P to detect compile time constants, and optimze the code accordingly. A planned usage example: The implementation of basic_string::assign() can short-cut a compile time known short string assignent into a fast and compact inlined assignment: ``` basic_string::assign(const value_type* __s) { if (_LIBCPP_BUILTIN_CONSTANT_P(__s[0]) && length(__s) < __min_cap) { copy(pointer(), _s, length(__s) + 1); set_size(length(__s)); } else { // delegate / tail call out of line implementation } } ``` Subscribers: christof, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D73732
-
- Feb 26, 2020
-
-
Sanjay Patel authored
See comments in D73978 for background.
-
Unnar Freyr Erlendsson authored
Summary: This adds unit tests for FindEntryIndexesThatContain, this is done in preparation for changing the logic of the function. Reviewers: labath, teemperor Reviewed By: labath Subscribers: arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D75180
-