Commit Graph

425728 Commits

Author SHA1 Message Date
Jamie Schmeiser efbf0136b4 Only issue warning for subtraction involving null pointers on live code paths
Summary:
Change the warning produced for subtraction from (or with) a null pointer
to only be produced when the code path is live.
https://github.com/llvm/llvm-project/issues/54570

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: anarazel (Andres Freund)
Differential Revision: https://reviews.llvm.org/D126816
2022-06-03 10:10:37 -04:00
Arnold Schwaighofer 5c902af572 [coro async] Add code to support dynamic aligment of over-aligned types in async frames
Async context frames are allocated with a maximum alignment. If a type
requests an alignment bigger than that dynamically align the address
in the frame.

Differential Revision: https://reviews.llvm.org/D126715
2022-06-03 07:06:14 -07:00
Stanislav Gatev 65e710c3fc [clang][dataflow] Model calls returning optionals
Model calls returning optionals

Differential Revision: https://reviews.llvm.org/D126759

Reviewed-by: ymandel, xazax.hun
2022-06-03 13:38:22 +00:00
Nico Weber 371e6f8b7f Revert "[clang-tidy] Confusable identifiers detection"
This reverts commit b94db7ed7e.
See comments on https://reviews.llvm.org/D112916:
- breaks `check-clangd`, and makes clang-tidy crash on simple inputs
- likely does the wrong thing in cross builds

Also revert follow-up "[gn build] (manually) port b94db7ed7e (Confusables.inc)"
This reverts commit 180bae08a0.
2022-06-03 09:30:01 -04:00
Nico Weber 88052fd241 check_clang_tidy.py: Update run line to python3
`python` no longer exists on several systems, and the script
runs under python3 when run as part of lit.
2022-06-03 09:28:09 -04:00
Michał Górny aed179f5f5 [lldb] [Process/FreeBSD] Do not send SIGSTOP to stopped process
Do not send SIGSTOP when requested to halt a process that's already
stopped.  This results in the signal being queued for delivery once
the process is resumed, and unexpectedly stopping it again.

This is necessary for non-stop protocol patches to land.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D126770
2022-06-03 15:19:09 +02:00
Aaron Ballman 1896df18cc Correct the behavior of this test for non-Windows targets
This should address build failures like:
https://lab.llvm.org/buildbot/#/builders/188/builds/14980
https://lab.llvm.org/buildbot/#/builders/171/builds/15515
https://lab.llvm.org/buildbot/#/builders/91/builds/9877
2022-06-03 09:00:05 -04:00
Nikita Popov fcdc6a466a [SCCP] Regenerate test checks with function signature (NFC)
The previous checks were manually modified to avoid the label
clash. Use the --function-signature flag that exists for this
purpose.
2022-06-03 14:37:41 +02:00
Aaron Ballman 3472b6eb0a Updating more entries in the C DR Status page
Adds test coverage or information for ~25 more C DRs.
2022-06-03 08:29:06 -04:00
Nikita Popov 6baf44c8b1 [SCCP] Regenerate test checks (NFC) 2022-06-03 14:27:34 +02:00
Hans Wennborg 166f9be330 Update old mailing list link in the nullability doc 2022-06-03 14:23:41 +02:00
Benjamin Kramer a8d2a381a2 [VPlan] Silence another unused variable warning in release builds 2022-06-03 14:07:56 +02:00
lewuathe d4141c93a8 [mlir][complex] Check the correctness of tanh in complex dialect
Correctness check for tanh operation in complex dialect.

Ref: https://reviews.llvm.org/D126858

Reviewed By: pifon2a

Differential Revision: https://reviews.llvm.org/D126946
2022-06-03 14:04:48 +02:00
Benjamin Kramer 6b7c186390 [VPlan] Inline variable into assertion. NFC.
Avoids a warning in release builds
llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp:311:14: warning: unused variable 'BrCond' [-Wunused-variable]
      Value *BrCond = Br->getCondition();
2022-06-03 13:59:48 +02:00
Nico Weber 180bae08a0 [gn build] (manually) port b94db7ed7e (Confusables.inc) 2022-06-03 07:49:28 -04:00
CHIANG, YU-HSUN (Tommy Chiang, oToToT) 8df2b1a866 [pp-trace] Print HashLoc in InclusionDirective callback
The HashLoc in InclusionDirective callback is an unused parameter.
Since pp-trace is also used as a test of Clang’s PPCallbacks interface,
add it to the output of pp-trace could avoid some unintended change on
it.

This shuold resolves PR52673

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D125373
2022-06-03 19:29:59 +08:00
Benjamin Kramer e8e4b741dd [DAGCombiner] Add bf16 to the matrix of types that we don't promote to integer stores
Remove a few stray semicolons while there.
2022-06-03 13:28:34 +02:00
Paul Walker 2dde272db7 [SVE] Refactor sve-bitcast.ll to include all combinations for legal types.
Patch enables custom lowering for MVT::nxv4bf16 because otherwise
the refactored test file triggers a selection failure.

The reason for the refactoring it to highlight cases where the
generated code is wrong.
2022-06-03 12:09:19 +01:00
Florian Hahn fe65c567a5
[VPlan] Update failing HCFG unit tests after a5bb4a3b4d. 2022-06-03 12:05:00 +01:00
Florian Hahn a5bb4a3b4d
[VPlan] Replace CondBit with BranchOnCond VPInstruction.
This patch removes CondBit and Predicate from VPBasicBlock. To do so,
the patch introduces a new branch-on-cond VPInstruction opcode to model
a branch on a condition explicitly.

This addresses a long-standing TODO/FIXME that blocks shouldn't be users
of VPValues. Those extra users can cause issues for VPValue-based
analyses that don't expect blocks. Addressing this fixme should allow us
to re-introduce 266ea446ab.

The generic branch opcode can also be used in follow-up patches.

Depends on D123005.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D126618
2022-06-03 11:48:31 +01:00
Adrian Kuegel 39f28397e2 [mlir] Fix ClangTidy warning (NFC).
virtual is redundant since the function is already declared 'override'.
2022-06-03 12:46:14 +02:00
David Green 79e3b043e5 [AArch64] Add extra addp codegen tests. NFC 2022-06-03 11:36:40 +01:00
serge-sans-paille b94db7ed7e [clang-tidy] Confusable identifiers detection
Detect identifiers that are confusable according to Unicode definition

        http://www.unicode.org/reports/tr39/#Confusable_Detection

and have conflicting scopes.

Differential Revision: https://reviews.llvm.org/D112916
2022-06-03 12:18:36 +02:00
Kristof Beyls 8b18572ea7 [docs] Fix RST code-block syntax in HowToSetUpLLVMStyleRTTI.rst 2022-06-03 11:24:49 +02:00
LLVM GN Syncbot 1523e8bb19 [gn build] Port a29a1a33ac 2022-06-03 08:36:05 +00:00
Martin Boehme b50542f21e [clang-tidy] Add missing close quote in release notes.
Sorry for the breakage.
2022-06-03 10:33:57 +02:00
Nikolas Klauser a29a1a33ac [libc++] Fix conjunction/disjunction and mark a few LWG issues as complete
Fixes #54803
Fixes #53133

Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D125221
2022-06-03 10:31:42 +02:00
Jonas Hahnfeld f31797f9f1 [cmake] Fix typo in CrossCompile.cmake 2022-06-03 10:19:28 +02:00
Diana Picus 7ce8c59b38 [flang][test-suite] Document need for NO_STOP_MESSAGE environment variable. NFC
When running the llvm-test-suite with flang, we get a lot of failures
because of the output of the `STOP` statement. We can workaround them by
setting `NO_STOP_MESSAGE=1` in the environment. This patch adds a few
words about it to the docs about the Fortran part of the llvm-test-suite.

See also https://reviews.llvm.org/D126360
2022-06-03 08:19:10 +00:00
Shraiysh Vaishay f5d29c15bf [mlir][OpenMP] Add memory_order clause tests
This patch adds tests for memory_order clause for atomic update and
capture operations. This patch also adds a check for making sure that
the operations inside and omp.atomic.capture region do not specify the
memory_order clause.

Reviewed By: kiranchandramohan, peixin

Differential Revision: https://reviews.llvm.org/D126195
2022-06-03 13:41:22 +05:30
Nikita Popov ad742cf85d [DAGCombine] Handle promotion of shift with both operands the same
When promoting a shift, make sure we only fetch the second operand
after promoting the first. Load promotion may replace users of the
old load, and we don't want to be left with a dangling reference to
the old load instruction.

The crashing test case is from https://reviews.llvm.org/D126689#3553212.

Differential Revision: https://reviews.llvm.org/D126886
2022-06-03 10:00:44 +02:00
Guillaume Chatelet c698189696 [NFC] Format CGBuilder.h 2022-06-03 07:54:01 +00:00
Timm Bäder a459d1eb2c [clang][sema] Remove unused paramter from VerifyBitField
The ZeroWidth paramter is unused in every call site of VerifyBitField.
2022-06-03 09:52:37 +02:00
Martin Boehme 8b90b25390 [clang-tidy] `bugprone-use-after-move`: Fix handling of moves in lambda captures
Previously, we were treating a move in the lambda capture as if it happened
within the body of the lambda, not within the function that defines the lambda.

This fixes the same bug as https://reviews.llvm.org/D119165 (which it appears
may have been abandoned by the author?) but does so more simply.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D126780
2022-06-03 09:34:09 +02:00
Fangrui Song df0f30dc36 Revert "[SLP]Improve shuffles cost estimation where possible."
This reverts commit 9980c99718.

Caused assertion failures: https://reviews.llvm.org/D115462#3555350
2022-06-03 00:30:34 -07:00
Nicolas Vasilache 72de7588cc [mlir][SCF] Add bufferization hook for scf.foreach_thread and terminator.
`scf.foreach_thread` results alias with the underlying `scf.foreach_thread.parallel_insert_slice` destination operands
and they bufferize to equivalent buffers in the absence of other conflicts.
`scf.foreach_thread.parallel_insert_slice` conflict detection is similar to `tensor.insert_slice` conflict detection.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D126769
2022-06-03 07:14:05 +00:00
Jonas Hahnfeld 0d2186373f [Driver] Add multiarch path for RISC-V
This is required to find headers on the Debian port for RISC-V.

Differential Revision: https://reviews.llvm.org/D126672
2022-06-03 09:10:34 +02:00
Martin Storsjö e8402d5de8 [clang] [MSVC] Enable unwind tables for ARM
The backend now can generate working unwind information for this
target.

Improve the existing windows-exceptions.cpp testcase to check for
the state of unwind tables on all MSVC architectures.

Differential Revision: https://reviews.llvm.org/D126862
2022-06-03 09:32:00 +03:00
Martin Storsjö 40c937cba2 [ARM] Fix restoring stack for varargs with SEH split frame pointer push
Previously, the "add sp, #12" ended up inserted after "bx lr".

Differential Revision: https://reviews.llvm.org/D126872
2022-06-03 09:32:00 +03:00
Timm Bäder 9f97720268 [clang][driver] Dynamically select gcc-toolset/devtoolset
Instead of adding all devtoolset and gcc-toolset prefixes to the list of
prefixes, just scan the /opt/rh/ directory for the one with the highest
version number and only add that one.

Differential Revision: https://reviews.llvm.org/D125862
2022-06-03 08:12:27 +02:00
Alexander Batashev b34fb277df [mlir][cf] Implement missing SwitchOp::build function
Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D126594
2022-06-03 09:08:04 +03:00
bzcheeseman 47231248f5 [LLVM][Docs] Update for HowToSetUpLLVMStyleRTTI.rst, NFC.
This patch updates the document with some advanced use cases and examples on how to set up and use LLVM-style RTTI. It includes a few motivating examples to get readers comfortable with the concepts.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D126943
2022-06-02 22:34:38 -07:00
Max Kazantsev 8555e59a71 [NFC][MemDep] Remove unnecessary Worklist.clear
This execution path leads to return 'false' where the Worklist
will be deallocated anyways. No need to clear it separately.
2022-06-03 12:31:44 +07:00
Serguei Katkov 24e16e4af2 [SSAUpdaterImpl] Do not generate phi node with all the same incoming values
If all available vals to basic block are the same - do not build new phi node and
just use this value.

Reviewed By: sameerds
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D126525
2022-06-03 12:24:33 +07:00
Tue Ly 614567a7bf [libc] Automatically add -mfma flag for architectures supporting FMA.
Detect if the architecture supports FMA instructions and if
the targets depend on fma.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D123615
2022-06-03 01:21:20 -04:00
Douglas Chen 78b16ccf2b [M68k] Instruction selection to choose neg x when mul x -1 (Fix issue 48588)
This patch is trying to fix issue 48588(https://github.com/llvm/llvm-project/issues/48588)

I found the results of Instruction Selection between SelectionDAG and FastISEL for the `%mul = mul i32 %A, 4294967295`:
(seldag-isel) mul --> sub --> SUB32dp
(fast-isel)   mul --> sub --> NEG32d

My patch to fix this issue is by overriding a virtual function M68kDAGToDAGISel::IsProfitableToFold(). Return `false` when it was trying to match with SUB, then it will match with NEG.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D116886
2022-06-03 13:20:30 +08:00
Thomas Raoux 271a48e029 [mlir][VectorToGPU] Fix bug generating incorrect ldmatrix ops
ldmatrix transpose can only be used with types that are 16bits wide.

Differential Revision: https://reviews.llvm.org/D126846
2022-06-03 04:30:22 +00:00
Serguei Katkov c4d955dd7f [MachineSSAUpdate] Add a test for redundant phi generation. 2022-06-03 11:27:14 +07:00
Thomas Raoux 205c08b54d [mlir][scf] Add option to loop pipelining to not peel the epilogue
Add an option to predicate the epilogue within the kernel instead of
peeling the epilogue. This is a useful option to prevent generating
large amount of code for deep pipeline. This currently require a user
lamdba to implement operation predication.

Differential Revision: https://reviews.llvm.org/D126753
2022-06-03 04:20:20 +00:00
Craig Topper 1d67adbfbf [RISCV] Give CSImm12MulBy4 PatLeaf priority over CSImm12MulBy8. NFC
The immediate range check for CSImm12MulBy8 included some values
covered by CSImm12MulBy4. I assume CSImm12MulBy4 had priority due
to pattern order in the td file, but this makes the priority
explicit in the predicate.
2022-06-02 20:51:14 -07:00