- Apr 05, 2020
-
-
Jonathan Roelofs authored
Sometimes LegalizeTypes knows about common subexpressions before SelectionDAG does, leading to accidental SDValue removal before its reference count was truly zero. Fixes: https://bugs.llvm.org/show_bug.cgi?id=45049 https://reviews.llvm.org/D76994
-
Fangrui Song authored
The thunk implementation is available but an assertion disallows it. Linux kernel has such a use case: in arch/powerpc/kernel/exceptions-64s.S:handle_page_fault, beq+ ret_from_except_lite may get out of range. Link: https://github.com/ClangBuiltLinux/linux/issues/951 Differential Revision: https://reviews.llvm.org/D76904
-
Fangrui Song authored
finalizeSynthetic(in.symTab) calls sortSymTabSymbols() to order local symbols before non-local symbols. The newly added tests ensure that thunk symbols are added before finalizeSynthetic(in.symTab), otherwise .symtab would be out of order.
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Florian Hahn authored
After 49d00824, VPWidenRecipe only stores a single instruction. tryToWiden can simply return the widen recipe, like other helpers in VPRecipeBuilder.
-
Jean-Michel Gorius authored
This adds a minimal out-of-tree dialect template which can be used to start work on a standalone dialect implementation without having to integrate it in the main LLVM tree. It mostly sets up the directory structure and provides CMakeLists.txt files to build a dialect library, an opt-like tool to operate on that dialect as well as tests. It could be expanded in the future to add examples of more user-defined operations, types, attributes, generated enums, transforms, etc. and linked to a tutorial. Differential Revision: https://reviews.llvm.org/D77133
-
Heejin Ahn authored
Summary: D77423 started using a dominator tree in WasmEHPrepare, but we deleted BBs in `prepareThrows` before we used the domtree in `prepareEHPads`, and those CFG changes were not reflected in the domtree. This uses `DomTreeUpdater` to make sure we update the domtree every time we delete BBs from the CFG. This fixes ubsan/msan/expensive_check errors caught in LLVM buildbots. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77465
-
Nico Weber authored
-
Nikita Popov authored
eraseInstFromFunction() adds the operands of the erased instructions, as those might now be dead as well. However, this is limited to instructions with less than 8 operands. This check doesn't make a lot of sense to me. As the instruction gets removed afterwards, I don't see a potential for anything overly pathological happening here (as we can only add those operands to the worklist once). The impact on CTMark is in the noise. We also have the same code in instruction sinking and don't limit the operand count there. Differential Revision: https://reviews.llvm.org/D77325
-
Luofan Chen authored
This patch is based on D63312 and D63319. For now we create shallow wrappers for all functions that are IPO amendable. See also [this github issue](https://github.com/llvm/llvm-project/issues/172). Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D76404
-
Johannes Doerfert authored
-
Nico Weber authored
See https://reviews.llvm.org/D77184#1961208
-
- Apr 04, 2020
-
-
Tamás Zolnai authored
Summary: It seems we need a different matcher for binary operator in a template context. Fixes this issue: https://bugs.llvm.org/show_bug.cgi?id=44499 Reviewers: aaron.ballman, alexfh, hokein, njames93 Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D76990
-
Heejin Ahn authored
Summary: When we insert a call to the personality function wrapper (`_Unwind_CallPersonality`) for a catch pad, we store some necessary info in `__wasm_lpad_context` struct and pass it. One of the info is the LSDA address for the function. For this, we insert a call to `wasm.lsda()`, which will be lowered down to the address of LSDA, and store it in a field in `__wasm_lpad_context`. There are exceptions to this personality call insertion: catchpads for `catch (...)` and cleanuppads (for destructors) don't need personality function calls, because we don't need to figure out whether the current exception should be caught or not. (They always should.) There was a little optimization to `wasm.lsda()` call insertion. Because the LSDA address is the same throughout a function, we don't need to insert a store of `wasm.lsda()` return value in every catchpad. For example: ``` try { foo(); } catch (int) { // wasm.lsda() call and a store are inserted here, like, in // pseudocode, // %lsda = wasm.lsda(); // store %lsda to a field in __wasm_lpad_context try { foo(); } catch (int) { // We don't need to insert the wasm.lsda() and store again, because // to arrive here, we have already stored the LSDA address to // __wasm_lpad_context in the outer catch. } } ``` So the previous algorithm checked if the current catch has a parent EH pad, we didn't insert a call to `wasm.lsda()` and its store. But this was incorrect, because what if the outer catch is `catch (...)` or a cleanuppad? ``` try { foo(); } catch (...) { // wasm.lsda() call and a store are NOT inserted here try { foo(); } catch (int) { // We need wasm.lsda() here! } } ``` In this case we need to insert `wasm.lsda()` in the inner catchpad, because the outer catchpad does not have one. To minimize the number of inserted `wasm.lsda()` calls and stores, we need a way to figure out whether we have encountered `wasm.lsda()` call in any of EH pads that dominates the current EH pad. To figure that out, we now visit EH pads in BFS order in the dominator tree so that we visit parent BBs first before visiting its child BBs in the domtree. We keep a set named `ExecutedLSDA`, which basically means "Do we have `wasm.lsda()` either in the current EH pad or any of its parent EH pads in the dominator tree?". This is to prevent scanning the domtree up to the root in the worst case every time we examine an EH pad: each EH pad only needs to examine its immediate parent EH pad. - If any of its parent EH pads in the domtree has `wasm.lsda()`, this means we don't need `wasm.lsda()` in the current EH pad. We also insert the current EH pad in `ExecutedLSDA` set. - If none of its parent EH pad has `wasm.lsda()` - If the current EH pad is a `catch (...)` or a cleanuppad, done. - If the current EH pad is neither a `catch (...)` nor a cleanuppad, add `wasm.lsda()` and the store in the current EH pad, and add the current EH pad to `ExecutedLSDA` set. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77423 -
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Similar to the lowerV16I8Shuffle implementation, for binary compaction v8i16 shuffles we can avoid the PUNPCKLDQ(PSHUFB,PSHUFB) pattern on SSE41+ targets by using PACKUSDW and PBLENDW. Before SSE41 we would need to use PACKSSDW but that requires sign extension that seems to destroy any gains, even on targets without PSHUFB. This is a bigger gain on AMD than Intel targets but should never be a regression, and avoiding the shuffle mask load(s) is always useful. Noticed in codegen while dealing with PR31443.
-
Nikita Popov authored
Since D73835 we no longer need to define the whole IRBuilder implementation in the header. This patch moves some of the larger methods out of line, into the C++ file. Differential Revision: https://reviews.llvm.org/D77332
-
Nikita Popov authored
And remove include from header.
-
vgxbj authored
Summary: Note: This revision is very similar to D62296. In D75756, we need `getDynamicSymbolIterators()` to skip first NULL symbol in `.dynsym`. And I believe it might be worth pointing this out in a separate patch to gather you experts' opinions. I have checked that current code base will not be affected by this change. ``` dynamic_symbol_begin() |- dynamic_symbol_end(): Ok `- getDynamicSymbolIterators() |- addDynamicElfSymbols(): llvm/tools/llvm-objdump/llvm-objdump.cpp, Line 934 | Ok, NULL symbol will be omitted by Line 945-947 | StringRef Name = unwrapOrError(Symbol.getName(), Obj->getName()); | if (Name.empty()) continue; |- dumpSymbolNameFromObject(): llvm/tools/llvm-nm/llvm-nm.cpp, Line 1192 | There's no test for dumping dynamic debugging symbol. This patch helps improve llvm-nm behavior. (we should add test for this later) `- computeSymbolSizes(): llvm/lib/Object/SymbolSize.cpp, Line 52 |- OProfileJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp, Line 92 | Ok, NULL symbol will be omitted by Line 94-95 | if (!Sym.getType() || *Sym.getType() != SF_Function) continue; |- IntelJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp, Line 98 | Ok, NULL symbol will be omitted by Line 124-126 (same as previous one) |- PerfJITEventListener::notifyObjectLoaded(): llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp, Line 244 | Ok, NULL symbol will be omitted by Line 254-256, (same as previous one) |- SymbolizableObjectFile::create(): llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp, Line 73 | Ok, NULL symbol will be omitted by Line 75 | res->addSymbol() | In addSymbol(), Line 167-168 | if (!Sec || (Obj && Obj->section_end() == *Sec)) return std::error_code(); |- dumpCXXData(): llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp, Line 189 | Ok, NULL symbol will be omitted by Line 199-202 | object::section_iterator SecI = *SecIOrErr; | // Skip external symbols. | if (SecI == Obj->section_end()) | continue; `- printLineInfoForInput(): llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp, Line 418 Ok, NULL symbol will be omitted by Line 430-477 if (Type == object::SymbolRef::ST_Function) { ... } ``` Reviewers: grimar, jhenderson, MaskRay Reviewed By: jhenderson, MaskRay Subscribers: rupprecht, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76081 -
Nikita Popov authored
And remove now unnecessary IRBuilder.h include in header.
-
Nikita Popov authored
IVDescriptors.h itself does not reference IRBuilder at all. Move the include into transformation passes that do.
-
Nikita Popov authored
Forward declare DemandedBits in IVDescriptors, and move include into the cpp file. Also drop the include from LoopUtils, which does not need it at all.
-
Eric Fiselier authored
-
Sam McCall authored
This clears the way for the raw lines themselves to be parsed easily. (Okay, one functional change: fix punctuation linebreaks with trailing WS)
-
Sam McCall authored
Summary: (Only if their definitions are visible and they have no other docs) Reviewers: kadircet Subscribers: jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77408
-
Frederik Gossen authored
The implementation of shape inference in the toy tutorial did not conform to the correct algorithmic description. The result was only correct because all operations appear to be processed in sequence. Differential Revision: https://reviews.llvm.org/D77382
-
Matt Arsenault authored
-
Mehdi Amini authored
Differential Revision: https://reviews.llvm.org/D76952
-
Richard Smith authored
as invalid. We create those when forming trivial type source information with no associated location, which, unfortunately, we do create in some cases (when a TreeTransform with no base location is used to transform a QualType). This would previously lead to rejects-valid bugs when we misinterpreted these constructs as having no nested-name-specifier.
-
Frederik Gossen authored
Fix two typos throughout the chapters. Differential Revision: https://reviews.llvm.org/D77397
-
Kazuaki Ishizaki authored
Differential Revision: https://reviews.llvm.org/D77430
-
Jim Ingham authored
Mark it expected fail for now. The test output shows that the "internal" thread listing isn't showing the step out plan that we use to step back out of a function we're stepping into. The internal plan listing code has nothing platform specific in it, so that isn't the problem. I am pretty sure the difference is that on MacOS we step into the function and then need to step back out again so we push the internal plan the test is checking for. But on Linux we are able to step past the function without stepping into it. So nothing is actually going wrong here, I just need to find a better test case where I can ensure we are going to have to push a private plan. It's probably better to test this using a custom thread plan, then I can control the state of the plan stack better. That's for Monday...
-
Walter Erquinigo authored
Summary: A recent change in ThreadPlans introduced this little compilation error. Seems to be related to the work around https://reviews.llvm.org/D76814. Reviewers: clayborg, labath, jingham Reviewed By: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77450
-
River Riddle authored
Summary: The attribute grammar includes an optional trailing colon type, so for attributes without a constant buildable type this will generally lead to unexpected and undesired behavior. Given that, it's better to just error out on these cases. Differential Revision: https://reviews.llvm.org/D77293
-
Walter Erquinigo authored
Summary: In this diff of mine D77186 I introduce a bug in the replace operation, where I was failing fast by mistake. Besides, a similar problem existed in the insert-after operation, where it was failing fast. Finally, the remove operation was wrong, as it was not using the indices provided by the users. I fixed those issues and added some tests account for cases with multiple elements in these requests. Reviewers: labath, clayborg Reviewed By: labath Subscribers: mgrang, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77324
-
River Riddle authored
Summary: It is a very common user trap to think that the location printed along with the diagnostic is the same as the current operation that caused the error. This revision changes the behavior to always print the current operation, except for when diagnostics are being verified. This is achieved by moving the command line flags in IR/ to be options on the MLIRContext. Differential Revision: https://reviews.llvm.org/D77095
-
Nemanja Ivanovic authored
Pre-committing the new test case so the review shows only the diffs.
-
Richard Smith authored
memchr consistent and comprehensible, and document them. We previously allowed evaluation of memcmp on arrays of integers of any size, so long as the call evaluated to 0, and allowed evaluation of memchr on any array of integral type of size 1 (including enums). The purpose of constant-evaluating these builtins is only to support constexpr std::char_traits, so we now consistently allow them on arrays of (possibly signed or unsigned) char only.
-