- Jan 05, 2022
-
-
Florian Hahn authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D116362
-
Florian Hahn authored
At the moment, the primary induction variable for the vector loop is created as part of the skeleton creation. This is tied to creating the vector loop latch outside of VPlan. This prevents from modeling the *whole* vector loop in VPlan, which in turn is required to model preheader and exit blocks in VPlan as well. This patch introduces a new recipe VPCanonicalIVPHIRecipe to represent the primary IV in VPlan and CanonicalIVIncrement{NUW} opcodes for VPInstruction to model the increment. This allows us to partly retire createInductionVariable. At the moment, a bit of patching up is done after executing all blocks in the plan. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D113223
-
Archibald Elliott authored
This fixes the test introduced in D114206 so it no longer writes to the current working directory. Reviewed By: simon_tatham Differential Revision: https://reviews.llvm.org/D116611
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
The diagnostic is emitted for an unextracted lazy symbol but suppressed for an undefined symbol. Suppressing the diagnostic for unextracted lazy symbol probably makes more sense because (a) an unextracted lazy symbol is quite similar to an undefined symbol and (b) an unextracted lazy symbol is different from "no such symbol".
-
Nicolas Vasilache authored
This revision refactors the implementation of outlineIfOp to expose a finer-grain functionality `outlineSingleBlockRegion` that will be reused in other contexts. Differential Revision: https://reviews.llvm.org/D116591
-
Victor Perez authored
Widen vp.select the same way as select and vselect. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116407
-
Sjoerd Meijer authored
-
Martin Storsjö authored
This reverts commit ea75be3d and 1eb5b6e8. That commit caused crashes with compilation e.g. like this (not fixed by the follow-up commit): $ cat sqrt.c float a; b() { sqrt(a); } $ clang -target x86_64-linux-gnu -c -O2 sqrt.c Attributes 'readnone and writeonly' are incompatible! %sqrtf = tail call float @sqrtf(float %0) #1 in function b fatal error: error in backend: Broken function found, compilation aborted!
-
Jim Lin authored
-
Sjoerd Meijer authored
Clarify that `Changed` is set to true if the instruction/value was made loop-invariant; the function is returning true if it was already invariant. Differential Revision: https://reviews.llvm.org/D116588
-
Nikita Popov authored
The user scanning loop above looks through pointer casts, so we also need to strip pointer casts in the capture check. Previously the source was incorrectly considered not captured if a bitcast was passed to the call.
-
Fangrui Song authored
The code path is dead after D111365.
-
Nikita Popov authored
Call slot optimization is currently supposed to be prevented if the call can capture the source pointer. Due to an implementation bug, this check currently doesn't trigger if a bitcast of the source pointer is passed instead. I'm somewhat afraid of the fallout of fixing this bug (due to heavy reliance on call slot optimization in rust), so I'd like to strengthen the capture reasoning a bit first. In particular, I believe that the capture is fine as long as a) the call itself cannot depend on the pointer identity, because neither dest has been captured before/at nor src before the call and b) there is no potential use of the captured pointer before the lifetime of the source alloca ends, either due to lifetime.end or a return from a function. At that point the potentially captured pointer becomes dangling. Differential Revision: https://reviews.llvm.org/D115615
-
Nikita Popov authored
-
Nikita Popov authored
isBitOrNoopPointerCastable() returns true if the types are the same, but it's not actually possible to create a bitcast for all such types. The assumption seems to be that the user will omit creating the cast in that case, as it is unnecessary. Fixes https://github.com/llvm/llvm-project/issues/52994.
-
Nikolas Klauser authored
Use `_LIBCPP_DEBUG_ASSERT` in `__iterator/wrap_iter.h` Reviewed By: #libc, Quuxplusone, Mordante, ldionne Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D116347
-
Bharadwaj, Ritanya B authored
This is a segmentation fault in INTERCEPTOR function on a special edge case of strstr libc call. When 'Haystack'(main string to be examined) is NULL and 'needle'(sub-string to be searched in 'Haystack') is an empty string then it hits a SEGV while using sanitizers and as a 'string not found' case otherwise. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D115919
-
serge-sans-paille authored
Differential Revision: https://reviews.llvm.org/D116598
-
Nikolas Klauser authored
Remove duplicate header includes from `<algorithm>` and reorder the includes Reviewed By: Quuxplusone, ldionne, Mordante, #libc, jloser Spies: jloser, libcxx-commits Differential Revision: https://reviews.llvm.org/D116507
-
Zi Xuan Wu authored
-
Zi Xuan Wu authored
Add basic integer codegen of select/br/cmp instruction. It also includes frame lowering code such as prologue/epilogue.
-
Jim Lin authored
-
Mikael Holmen authored
-
Shao-Ce SUN authored
-
Florian Mayer authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116639
-
Mehdi Amini authored
Each attribute has two accessor: one suffixed with `Attr` which returns the attribute itself and one without the suffix which unwrap the attribute. For example for a StringAttr attribute with a field named `kind`, we'll generate: StringAttr getKindAttr(); StringRef getKind(); Differential Revision: https://reviews.llvm.org/D116466
-
Xu Mingjie authored
In https://reviews.llvm.org/D86905, we introduce an optimization, when lld emits LLVM bitcode, we allow bitcode writer flush data to disk early when buffered data size is above some threshold. But when `--plugin-opt=emit-llvm` and `-o /dev/null` are used, lld will trigger assertion `BytesRead >= 0 && static_cast<size_t>(BytesRead) == BytesFromDisk`. When we write output to /dev/null, BytesRead is zero, but at this program point BytesFromDisk is always non-zero. Reviewed By: stephan.yichao.zhao, MaskRay Differential Revision: https://reviews.llvm.org/D112297
-
Pravin Jagtap authored
Differential Revision: https://reviews.llvm.org/D116641
-
Mircea Trofin authored
-
Chuanqi Xu authored
We could use the variable as a flag to indicate if the optimization is on.
-
Fangrui Song authored
-
Luís Ferreira authored
LLVM core library supports demangling other mangled symbols other than itanium, such as D and Rust. LLD should use those demanglers in order to output pretty demangled symbols on error messages. Reviewed By: MaskRay, #lld-macho Differential Revision: https://reviews.llvm.org/D116279
-
Fangrui Song authored
D116426 may lead to an assertion failure `Attributes 'readonly and writeonly' are incompatible!` if the builtin function already has `readonly`.
-
Chuanqi Xu authored
This fixes bug49264. Simply, coroutine shouldn't be inlined before CoroSplit. And the marker for pre-splited coroutine is created in CoroEarly pass, which ran after AlwaysInliner Pass in O0 pipeline. So that the AlwaysInliner couldn't detect it shouldn't inline a coroutine. So here is the error. This patch set the presplit attribute in clang and mlir. So the inliner would always detect the attribute before splitting. Reviewed By: rjmccall, ezhulenev Differential Revision: https://reviews.llvm.org/D115790
-
Heejin Ahn authored
This uses `changeToCall` and `changeToInvokeAndSplitBasicBlock` from `lib/Transforms/Utils`, replacing the custom logic. One difference of those functions from our previous logic is they delete the original `CallInst`/`InvokeInst`, which makes them tricky to use while iterating through instructions/BBs. So this CL gathers the candidate calls first and run them through `changeToInvokeAndSplitBasicBlock` later. Also this renames some variables. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D116620
-
Heejin Ahn authored
D107530 did a small optimization that, if a function contains `setjmp` calls but not other calls that can `longjmp`, we don't do SjLj transformation on those `setjmp` calls, because they don't have possibilities of returning from `longjmp`. But we should remove those `setjmp` calls even in that case, because Emscripten doesn't provide that function, assuming it is lowered away by SjLj transformation. `setjmp` always returns 0 when called directly, so this CL replaces them with `i32 0`. Fixes https://github.com/emscripten-core/emscripten/issues/15679. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D116619
-
Fangrui Song authored
-