KAWASHIMA Takahiro [Mon, 13 Jan 2020 09:28:02 +0000 (09:28 +0000)]
This option allows selecting the TLS size in the local exec TLS model,
which is the default TLS model for non-PIC objects. This allows large/
many thread local variables or a compact/fast code in an executable.
Specification is same as that of GCC. For example, the code model
option precedes the TLS size option.
TLS access models other than local-exec are not changed. It means
supoort of the large code model is only in the local exec TLS model.
Patch By KAWASHIMA Takahiro (kawashima-fj <t-kawashima@fujitsu.com>)
Reviewers: dmgreen, mstorsjo, t.p.northover, peter.smith, ostannard
Reviewd By: peter.smith
Committed by: peter.smith
Differential Revision: https://reviews.llvm.org/D71688
Pavel Labath [Mon, 13 Jan 2020 10:09:47 +0000 (11:09 +0100)]
[lldb] Fix eh-frame-small-fde test for changes in lld
lld in 2bfee35 started emitting relocations for some intra-section jumps
between global symbols. This shifted the code around a bit, invalidating
text expectations.
Change the symbols to local to keep the previous behavior.
Sam McCall [Mon, 13 Jan 2020 10:12:51 +0000 (11:12 +0100)]
Revert "[DWARF5][clang]: Added support for DebugInfo generation for auto return type for C++ member functions."
This reverts commit
6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb, which
introduces a crash.
See https://reviews.llvm.org/D70524 for details.
Utkarsh Saxena [Wed, 8 Jan 2020 12:57:00 +0000 (13:57 +0100)]
[clangd] Publish xref for macros from Index and AST.
Summary:
With this patch the `findReferences` API will return Xref for macros.
If the symbol under the cursor is a macro then we collect the references to it from:
1. Main file by looking at the ParsedAST. (These were added to the ParsedAST in https://reviews.llvm.org/D70008)
2. Files other than the mainfile by looking at the:
* static index (Added in https://reviews.llvm.org/D70489)
* file index (Added in https://reviews.llvm.org/D71406)
This patch collects all the xref from the above places and outputs it in `findReferences` API.
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72395
Sam Elliott [Mon, 13 Jan 2020 10:03:33 +0000 (10:03 +0000)]
[RISCV] Collect Statistics on Compressed Instructions
Summary:
It is useful to keep statistics on how many instructions we have
compressed, so we can see if future changes are increasing or decreasing this
number.
Reviewers: asb, luismarques
Reviewed By: asb, luismarques
Subscribers: xbolva00, sameer.abuasal, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67495
Raphael Isemann [Mon, 13 Jan 2020 09:00:06 +0000 (10:00 +0100)]
[lldb] Mark several tests as not dependent on debug info
Summary:
This just adds `NO_DEBUG_INFO_TESTCASE` to tests that don't really exercise anything debug information specific
and therefore don't need to be rerun for all debug information variants.
Reviewers: labath, jingham, aprantl, mib, jfb
Reviewed By: aprantl
Subscribers: dexonsmith, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D72447
Pruthvi [Mon, 13 Jan 2020 09:16:44 +0000 (10:16 +0100)]
Add zero_extendi and sign_extendi to intrinsic namespace
Summary:
- update zero_extendi and sign_extendi in edsc/intrinsic namespace
- Builder API test for zero_extendi and sign_extendi
Differential Revision: https://reviews.llvm.org/D72298
Sam Parker [Mon, 13 Jan 2020 09:18:57 +0000 (09:18 +0000)]
[NFC] Update loop.decrement.reg intrinsic comment
Note that the intrinsic is now understood by SCEV and that other
optimisations can treat it as a sub.
Sjoerd Meijer [Mon, 13 Jan 2020 08:54:38 +0000 (08:54 +0000)]
[SCEV] Follow up of D71563: addressing post commit comment. NFC.
Awanish Pandey [Mon, 13 Jan 2020 07:08:00 +0000 (12:38 +0530)]
[DWARF5][clang]: Added support for DebugInfo generation for auto return type for C++ member functions.
Summary:
This patch will provide support for auto return type for the C++ member
functions.
This patch includes clang side implementation of this feature.
Patch by: Awanish Pandey <Awanish.Pandey@amd.com>
Reviewers: dblaikie, aprantl, shafik, alok, SouraVX, jini.susan.george
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D70524
Awanish Pandey [Mon, 13 Jan 2020 06:26:18 +0000 (11:56 +0530)]
[DWARF5][DebugInfo]: Added support for DebugInfo generation for auto return type for C++ member functions.
Summary:
This patch will provide support for auto return type for the C++ member
functions. Before this return type of the member function is deduced and
stored in the DIE.
This patch includes llvm side implementation of this feature.
Patch by: Awanish Pandey <Awanish.Pandey@amd.com>
Reviewers: dblaikie, aprantl, shafik, alok, SouraVX, jini.susan.george
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D70524
Craig Topper [Mon, 13 Jan 2020 05:10:37 +0000 (21:10 -0800)]
[X86] Use SDNPOptInGlue instead of SDNPInGlue on a couple SDNodes.
At least one of these is used without a Glue. This doesn't seem
to change the X86GenDAGISel.inc output so maybe it doesn't matter?
Matt Arsenault [Sun, 12 Jan 2020 23:08:41 +0000 (18:08 -0500)]
AMDGPU: Split test function
This avoids slightly different scheduling/regalloc behavior, and
avoids a test diff between GlobalISel and SelectionDAG.
Matt Arsenault [Sun, 12 Jan 2020 22:10:18 +0000 (17:10 -0500)]
AMDGPU/GlobalISel: Don't use XEXEC class for SGPRs
We don't use the xexec register classes for arbitrary values
anymore. Avoids a test variance beween GlobalISel and SelectionDAG>
Matt Arsenault [Mon, 13 Jan 2020 00:12:59 +0000 (19:12 -0500)]
AMDGPU/GlobalISel: Copy type when inserting readfirstlane
getDefIgnoringCopies will fail to find any def if no type is set if we
try to use it on the use's operand, so propagate the type.
Nathan Ridge [Thu, 19 Dec 2019 21:22:23 +0000 (16:22 -0500)]
[clangd] Show template arguments in type hierarchy when possible
Summary: Fixes https://github.com/clangd/clangd/issues/31
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71533
Nathan Ridge [Tue, 7 Jan 2020 19:44:50 +0000 (14:44 -0500)]
[clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72355
Zheng Chen [Mon, 13 Jan 2020 01:22:37 +0000 (20:22 -0500)]
[SCEV] accurate range for addrecexpr with nuw flag
If addrecexpr has nuw flag, the value should never be less than its
start value and start value does not required to be SCEVConstant.
Reviewed By: nikic, sanjoy
Differential Revision: https://reviews.llvm.org/D71690
James Clarke [Mon, 13 Jan 2020 00:50:37 +0000 (00:50 +0000)]
[RISCV] Check register class for AMO memory operands
Summary:
AMO memory operands use a custom parser in order to accept both (reg)
and 0(reg). However, the validation predicate used for these operands
was only checking that they were registers, and not the register class,
so non-GPRs (such as FPRs) were also accepted. Thus, fix this by making
the predicate check that they are GPRs.
Reviewers: asb, lenary
Reviewed By: asb, lenary
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72471
Simon Pilgrim [Sun, 12 Jan 2020 22:08:56 +0000 (22:08 +0000)]
Fix "pointer is null" static analyzer warnings. NFCI.
Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.
Simon Pilgrim [Sun, 12 Jan 2020 21:43:11 +0000 (21:43 +0000)]
Fix "pointer is null" static analyzer warning. NFCI.
Fangrui Song [Sat, 4 Jan 2020 05:44:57 +0000 (21:44 -0800)]
[MC][ELF] Emit a relocation if target is defined in the same section and is non-local
For a target symbol defined in the same section, currently we don't emit
a relocation if VariantKind is VK_None (with few exceptions like RISC-V
relaxation), while GNU as emits one. This causes program behavior
differences with and without -ffunction-sections, and can break intended
symbol interposition in a -shared link.
```
.globl foo
foo:
call foo # no relocation. On other targets, may be written as b foo, etc
call bar # a relocation if bar is in another section (e.g. -ffunction-sections)
call foo@plt # a relocation
```
Unify these cases by always emitting a relocation. If we ever want to
optimize `call foo` in -shared links, we should emit a STB_LOCAL alias
and call via the alias.
ARM/thumb2-beq-fixup.s: we now emit a relocation to global_thumb_fn as GNU as does.
X86/Inputs/align-branch-64-2.s: we now emit R_X86_64_PLT32 to foo as GNU does.
ELF/relax.s: rewrite the test as target-in-same-section.s .
We omitted relocations to `global` and now emit R_X86_64_PLT32.
Note, GNU as does not emit a relocation for `jmp global` (maybe its own
bug). Our new behavior is compatible except `jmp global`.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D72197
Jay Foad [Sat, 11 Jan 2020 20:48:29 +0000 (20:48 +0000)]
[AMDGPU] Add gfx8 assembler and disassembler test cases
Summary:
This adds assembler tests for cases that were previously only in the
disassembler tests, and vice versa.
Reviewers: rampitec, arsenm, nhaehnle
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72561
Fangrui Song [Sun, 12 Jan 2020 20:23:16 +0000 (12:23 -0800)]
__patchable_function_entries: don't use linkage field 'unique' with -no-integrated-as
.section name, "flags"G, @type, GroupName[, linkage]
As of binutils 2.33, linkage cannot be 'unique'. For integrated
assembler, we use both 'o' flag and 'unique' linkage to support
--gc-sections and COMDAT with lld.
https://sourceware.org/ml/binutils/2019-11/msg00266.html
Markus Böck [Sun, 12 Jan 2020 19:24:35 +0000 (14:24 -0500)]
[NFC] Fix compilation of CrashRecoveryContext.cpp on mingw
Patch by Markus Böck.
Differential Revision: https://reviews.llvm.org/D72564
Fangrui Song [Thu, 2 Jan 2020 03:27:55 +0000 (19:27 -0800)]
[PowerPC] Delete PPCDarwinAsmPrinter and PPCMCAsmInfoDarwin
Darwin support has been removed.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D72063
Simon Pilgrim [Sun, 12 Jan 2020 12:57:01 +0000 (12:57 +0000)]
Fix "pointer is null" static analyzer warnings. NFCI.
Use cast<> instead of dyn_cast<> and move into its users where its dereferenced immediately.
Simon Pilgrim [Sun, 12 Jan 2020 14:35:34 +0000 (14:35 +0000)]
[MIPS] Regenerate shl/lshr shift tests
Simon Pilgrim [Sun, 12 Jan 2020 14:34:36 +0000 (14:34 +0000)]
[AMDGPU] Regenerate shl shift tests
Simon Pilgrim [Sun, 12 Jan 2020 12:29:41 +0000 (12:29 +0000)]
[X86][AVX] Use lowerShuffleAsLanePermuteAndSHUFP to lower binary v4f64 shuffles.
Only perform this if we are shuffling lower and upper lane elements across the lanes (otherwise splitting to lower xmm shuffles would be better).
This is a regression if we shuffle build_vectors due to getVectorShuffle canonicalizing 'blend of splat' build vectors, for now I've set this not to shuffle build_vector nodes at all to avoid this.
Simon Pilgrim [Sun, 12 Jan 2020 09:41:40 +0000 (09:41 +0000)]
[X86][AVX] lowerShuffleAsLanePermuteAndSHUFP - only set the demanded elements of the lane mask.
Fixes an cyclic dependency issue with an upcoming patch where getVectorShuffle canonicalizes masks with splat build vector sources.
Fangrui Song [Sun, 12 Jan 2020 02:27:13 +0000 (18:27 -0800)]
[X86][Disassembler] Merge X86DisassemblerDecoder.cpp into X86Disassembler.cpp and refactor
Fangrui Song [Sun, 12 Jan 2020 02:08:06 +0000 (18:08 -0800)]
[X86][Disassembler] Simplify
Fangrui Song [Sun, 12 Jan 2020 08:24:10 +0000 (00:24 -0800)]
[profile] Support merge pool size >= 10
The executable acquires an advisory record lock (`fcntl(fd, F_SETLKW, *)`) on a profile file.
Merge pool size >= 10 may be beneficial when the concurrency is large.
Also fix a small problem about snprintf. It can cause the filename to be truncated after %m.
Reviewed By: davidxl
Differential Revision: https://reviews.llvm.org/D71970
Qiu Chaofan [Sun, 12 Jan 2020 05:10:04 +0000 (13:10 +0800)]
[NFC] Refactor memory ops cluster method
Current implementation of BaseMemOpsClusterMutation is a little bit
obscure. This patch directly uses a map from store chain ID to set of
memory instrs to make it simpler, so that future improvements are easier
to read, update and review.
Reviewed By: evandro
Differential Revision: https://reviews.llvm.org/D72070
Craig Topper [Sun, 12 Jan 2020 02:10:11 +0000 (18:10 -0800)]
[X86] Don't call LowerSETCC from LowerSELECT for STRICT_FSETCC/STRICT_FSETCCS nodes.
This causes the STRICT_FSETCC/STRICT_FSETCCS nodes to lowered
early while lowering SELECT, but the output chain doesn't get
connected. Then we visit the node again when it is its turn
because we haven't replaced the use of the chain result. In the
case of the fp128 libcall lowering, after D72341 this will cause
the libcall to be emitted twice.
Zheng Chen [Sat, 11 Jan 2020 03:50:39 +0000 (22:50 -0500)]
[SCEV] more accurate range for addrecexpr with nsw flag.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D72436
Craig Topper [Sun, 12 Jan 2020 01:43:22 +0000 (17:43 -0800)]
[LegalizeVectorOps] Parallelize the lo/hi part of STRICT_UINT_TO_FLOAT legalization.
The lo and hi computation are independent. Give them the same input
chain and TokenFactor the results together.
Craig Topper [Sun, 12 Jan 2020 01:27:55 +0000 (17:27 -0800)]
[TargetLowering][X86] Connect the chain from STRICT_FSETCC in TargetLowering::expandFP_TO_UINT and X86TargetLowering::FP_TO_INTHelper.
Craig Topper [Sun, 12 Jan 2020 00:04:28 +0000 (16:04 -0800)]
[LegalizeVectorOps] Expand vector MERGE_VALUES immediately.
Custom legalization can produce MERGE_VALUES to return multiple
results. We can expand them immediately instead of leaving them
around for DAG combine to clean up.
Fangrui Song [Sun, 12 Jan 2020 00:27:25 +0000 (16:27 -0800)]
[X86][Disassembler] Shrink X86GenDisassemblerTables.inc from 36M to 6.1M
In x86Disassembler{OneByte,TwoByte,...}Codes,
"/* EmptyTable */" is very common. Omitting it saves lots of space.
Also, there is no need to display a table entry in multiple lines.
It is also common that the whole OpcodeDecision is { MODRM_ONEENTRY, 0}.
Make use of zero-initialization.
Fangrui Song [Sat, 11 Jan 2020 23:06:02 +0000 (15:06 -0800)]
[X86][Disassembler] Optimize argument passing and immediate reading
Fangrui Song [Sat, 11 Jan 2020 20:36:13 +0000 (12:36 -0800)]
[Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction()
The argument is llvm::null() everywhere except llvm::errs() in
llvm-objdump in -DLLVM_ENABLE_ASSERTIONS=On builds. It is used by no
target but X86 in -DLLVM_ENABLE_ASSERTIONS=On builds.
If we ever have the needs to add verbose log to disassemblers, we can
record log with a member function, instead of passing it around as an
argument.
Lang Hames [Sat, 11 Jan 2020 20:58:38 +0000 (12:58 -0800)]
[ORC] Fix argv handling in runAsMain / lli.
This fixes an off-by-one error in the argc value computed by runAsMain, and
switches lli back to using the input bitcode (rather than the string "lli") as
the effective program name.
Thanks to Stefan Graenitz for spotting the bug.
Alexandre Ganea [Sat, 11 Jan 2020 20:27:07 +0000 (15:27 -0500)]
[Support] Optionally call signal handlers when a function wrapped by the the CrashRecoveryContext fails
This patch allows for handling a failure inside a CrashRecoveryContext in the same way as the global exception/signal handler. A failure will have the same side-effect, such as cleanup of temporarty file, printing callstack, calling relevant signal handlers, and finally returning an exception code. This is an optional feature, disabled by default.
This is a support patch for D69825.
Differential Revision: https://reviews.llvm.org/D70568
Fangrui Song [Sat, 11 Jan 2020 20:03:57 +0000 (12:03 -0800)]
[X86][Disassembler] Replace custom logger with LLVM_DEBUG
llvm-objdump -d on clang is decreased from 7.8s to 7.4s.
The improvement is likely due to the elimination of logger setup and
dbgprintf(), which has a large overhead.
Craig Topper [Sat, 11 Jan 2020 20:12:53 +0000 (12:12 -0800)]
[LegalizeVectorOps] Remove some of the simpler Expand methods. Pass Results vector to a couple. NFCI
Some of the simplest handlers just call TLI and if that fails,
they fall back to unrolling. For those just inline the TLI call
and share the unrolling call with the default case of Expand.
For ExpandFSUB and ExpandBITREVERSE so that its obvious they
don't return results sometimes and want to defer to LegalizeDAG.
Craig Topper [Sat, 11 Jan 2020 19:36:50 +0000 (11:36 -0800)]
[LegalizeVectorOps] Only pass SDNode* instead SDValue to all of the Expand* and Promote* methods.
All the Expand* and Promote* function assume they are being
called with result 0 anyway. Just hardcode result 0 into them.
Fangrui Song [Sat, 11 Jan 2020 07:43:44 +0000 (23:43 -0800)]
[X86][Disassembler] Simplify and optimize reader functions
llvm-objdump -d on clang is decreased from 8.2s to 7.8s.
Craig Topper [Sat, 11 Jan 2020 19:06:52 +0000 (11:06 -0800)]
[X86] Turn FP_ROUND/STRICT_FP_ROUND into X86ISD::VFPROUND/STRICT_VFPROUND during PreprocessISelDAG to remove some duplicate isel patterns.
Mark de Wever [Sat, 11 Jan 2020 18:03:22 +0000 (19:03 +0100)]
Add -Wrange-loop-analysis changes to ReleaseNotes
This reflects the recent changes done.
Lang Hames [Sat, 11 Jan 2020 17:59:33 +0000 (09:59 -0800)]
[ExecutionEngine] Re-enable FastISel for non-iOS arm targets.
Patch by Nicolas Capens. Thanks Nicolas!
https://reviews.llvm.org/D65015
Jonas Toth [Sat, 11 Jan 2020 18:41:27 +0000 (19:41 +0100)]
Revert "[ASTMatchers] extract public matchers from const-analysis into own patch"
This reverts commit
4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4.
The powerpc buildbots had an internal compiler error after this patch.
This requires some inspection.
Jonas Toth [Sat, 11 Jan 2020 18:21:03 +0000 (19:21 +0100)]
[ASTMatchers] extract public matchers from const-analysis into own patch
Summary:
The analysis for const-ness of local variables required a view generally useful
matchers that are extracted into its own patch.
They are `decompositionDecl` and `forEachArgumentWithParamType`, that works
for calls through function pointers as well.
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72505
River Riddle [Sat, 11 Jan 2020 16:54:04 +0000 (08:54 -0800)]
[mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is properly value-typed.
Summary: These were temporary methods used to simplify the transition.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D72548
Philip Reames [Sat, 11 Jan 2020 16:41:35 +0000 (08:41 -0800)]
[X86] Adjust nop emission by compiler to consider target decode limitations
The primary motivation of this change is to bring the code more closely in sync behavior wise with the assembler's version of nop emission. I'd like to eventually factor them into one, but that's hard to do when one has features the other doesn't.
The longest encodeable nop on x86 is 15 bytes, but many processors - for instance all intel chips - can't decode the 15 byte form efficiently. On those processors, it's better to use either a 10 byte or 11 byte sequence depending.
Philip Reames [Fri, 10 Jan 2020 23:22:17 +0000 (15:22 -0800)]
[X86AsmBackend] Move static function before sole use [NFC]
Philip Reames [Fri, 10 Jan 2020 23:19:09 +0000 (15:19 -0800)]
[X86AsmBackend] Be consistent about placing definitions out of line [NFC]
Simon Pilgrim [Sat, 11 Jan 2020 16:42:41 +0000 (16:42 +0000)]
GlobalModuleIndex - Fix use-after-move clang static analyzer warning.
Shadow variable names meant we were referencing the Buffer input argument, not the GlobalModuleIndex member that its std::move()'d it.
Simon Pilgrim [Sat, 11 Jan 2020 16:01:46 +0000 (16:01 +0000)]
Fix "pointer is null" static analyzer warnings. NFCI.
Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.
Simon Pilgrim [Sat, 11 Jan 2020 16:00:17 +0000 (16:00 +0000)]
Fix "pointer is null" static analyzer warning. NFCI.
Use cast<> instead of dyn_cast<> since we know that the pointer should be valid (and is dereferenced immediately).
Simon Pilgrim [Sat, 11 Jan 2020 15:41:31 +0000 (15:41 +0000)]
Fix "pointer is null" static analyzer warning. NFCI.
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately within mangleCallingConvention and castAs will perform the null assertion for us.
Simon Pilgrim [Sat, 11 Jan 2020 15:33:25 +0000 (15:33 +0000)]
Fix "pointer is null" static analyzer warnings. NFCI.
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
Simon Pilgrim [Sat, 11 Jan 2020 14:47:17 +0000 (14:47 +0000)]
Fix "pointer is null" static analyzer warning. NFCI.
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
Simon Pilgrim [Sat, 11 Jan 2020 14:44:25 +0000 (14:44 +0000)]
Fix uninitialized value clang static analyzer warning. NFC.
Benjamin Kramer [Sat, 11 Jan 2020 15:50:55 +0000 (16:50 +0100)]
Remove copy ctors identical to the default one. NFC.
Those do nothing but make the type no longer trivial to the compiler.
Simon Pilgrim [Sat, 11 Jan 2020 14:36:46 +0000 (14:36 +0000)]
moveOperands - assert Src/Dst MachineOperands are non-null.
Fixes static-analyzer warnings.
Simon Pilgrim [Sat, 11 Jan 2020 12:57:21 +0000 (12:57 +0000)]
[X86] Fix outdated comment
The generic saturated math opcodes are no longer widened inside X86TargetLowering
Mark de Wever [Sat, 11 Jan 2020 09:16:40 +0000 (10:16 +0100)]
[Sema] Improve -Wrange-loop-analysis warnings.
No longer generate a diagnostic when a small trivially copyable type is
used without a reference. Before the test looked for a POD type and had no
size restriction. Since the range-based for loop is only available in
C++11 and POD types are trivially copyable in C++11 it's not required to
test for a POD type.
Since copying a large object will be expensive its size has been
restricted. 64 bytes is a common size of a cache line and if the object is
aligned the copy will be cheap. No performance impact testing has been
done.
Differential Revision: https://reviews.llvm.org/D72212
Simon Pilgrim [Sat, 11 Jan 2020 12:35:33 +0000 (12:35 +0000)]
Fix copy+paste typo in shuffle test name
Simon Pilgrim [Sat, 11 Jan 2020 12:28:27 +0000 (12:28 +0000)]
[X86][AVX] Add lowerShuffleAsLanePermuteAndSHUFP lowering
Add initial support for lowering v4f64 shuffles to SHUFPD(VPERM2F128(V1, V2), VPERM2F128(V1, V2)), eventually this could be used for v8f32 (and maybe v8f64/v16f32) but I'm being conservative for the initial implementation as only v4f64 can always succeed.
This currently is only called from lowerShuffleAsLanePermuteAndShuffle so only gets used for unary shuffles, and we limit this to cases where we use upper elements as otherwise concating 2 xmm shuffles is probably the better case.
Helps with poor shuffles mentioned in D66004.
Florian Hahn [Fri, 10 Jan 2020 18:08:56 +0000 (18:08 +0000)]
[X86] Add more complex tests for vector masks used with AND/OR/XOR.
Additional test cases for D72524.
Nuno Lopes [Sat, 11 Jan 2020 11:57:29 +0000 (11:57 +0000)]
DSE: fix bug where we would only check libcalls for name rather than whole decl
Nikita Popov [Thu, 9 Jan 2020 21:17:37 +0000 (22:17 +0100)]
[LoopRotate] Add tests for rotate with switch; NFC
For D72420.
Nikita Popov [Fri, 10 Jan 2020 17:20:32 +0000 (18:20 +0100)]
[LoopSimplify] Regenerate test checks; NFC
For D72519.
Nikita Popov [Wed, 1 Jan 2020 10:11:05 +0000 (11:11 +0100)]
[InstCombine] Preserve nuw on sub of geps (PR44419)
Fix https://bugs.llvm.org/show_bug.cgi?id=44419 by preserving the
nuw on sub of geps. We only do this if the offset has a multiplication
as the final operation, as we can't be sure the operations is nuw
in the other cases without more thorough analysis.
Differential Revision: https://reviews.llvm.org/D72048
Craig Topper [Sat, 11 Jan 2020 08:27:06 +0000 (00:27 -0800)]
[X86] Remove dead code from X86DAGToDAGISel::Select that is no longer needed now that we don't mutate strict fp nodes. NFC
Christian Sigg [Sat, 11 Jan 2020 07:47:41 +0000 (08:47 +0100)]
Add test for GDB pretty printers.
Reviewers: dblaikie, aprantl, davide, JDevlieghere
Reviewed By: aprantl
Subscribers: jmorse, aprantl, merge_guards_bot, mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72321
Craig Topper [Sat, 11 Jan 2020 07:28:31 +0000 (23:28 -0800)]
[X86] Simplify code by removing an unreachable condition. NFCI
For X87<->SSE conversions, the SSE type is always smaller than
the X87 type. So we can always use the smallest type for the
memory type.
Craig Topper [Sat, 11 Jan 2020 05:14:47 +0000 (21:14 -0800)]
[X86] Preserve fpexcept property when turning strict_fp_extend and strict_fp_round into stack operations.
We use the stack for X87 fp_round and for moving from SSE f32/f64 to
X87 f64/f80. Or from X87 f64/f80 to SSE f32/f64.
Note for the SSE<->X87 conversions the conversion always happens in the
X87 domain. The load/store ops in the X87 instructions are able
to signal exceptions.
Fangrui Song [Sat, 11 Jan 2020 07:31:49 +0000 (23:31 -0800)]
[X86][Disassembler] Simplify readPrefixes
Craig Topper [Sat, 11 Jan 2020 04:30:54 +0000 (20:30 -0800)]
[X86] Use ReplaceAllUsesWith instead of ReplaceAllUsesOfValueWith to simplify some code. NFCI
Amara Emerson [Sat, 11 Jan 2020 04:17:34 +0000 (20:17 -0800)]
Mark the test/Feature/load_extension.ll test as unsupported on Darwin.
With plugins and examples enabled, this XPASSes. Mark it as unsupported until
the owner investigates what's going on.
Michael Bedy [Thu, 12 Dec 2019 03:31:32 +0000 (22:31 -0500)]
[AMDGPU] Remove unnecessary v_mov from a register to itself in WQM lowering.
Summary:
- SI Whole Quad Mode phase is replacing WQM pseudo instructions with v_mov instructions.
While this is necessary for the special handling of moving results out of WWM live ranges,
it is not necessary for WQM live ranges. The result is a v_mov from a register to itself after every
WQM operation. This change uses a COPY psuedo in these cases, which allows the register
allocator to coalesce the moves away.
Reviewers: tpr, dstuttard, foad, nhaehnle
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71386
Qiu Chaofan [Sat, 11 Jan 2020 03:51:59 +0000 (11:51 +0800)]
[NFC] [PowerPC] Update mi-peephole-splat test
Use script to re-generate the test case, for easier comparison with
future patches.
Zheng Chen [Sat, 11 Jan 2020 03:43:29 +0000 (22:43 -0500)]
[SCEV] [NFC] add more test cases for range of addrecexpr with nsw flag
Craig Topper [Sat, 11 Jan 2020 02:35:43 +0000 (18:35 -0800)]
[TargetLowering][ARM][Mips][WebAssembly] Remove the ordered FP compare from RunttimeLibcalls.def and all associated usages
Summary:
This always just used the same libcall as unordered, but the comparison predicate was different. This change appears to have been made when targets were given the ability to override the predicates. Before that they were hardcoded into the type legalizer. At that time we never inverted predicates and we handled ugt/ult/uge/ule compares by emitting an unordered check ORed with a ogt/olt/oge/ole checks. So only ordered needed an inverted predicate. Later ugt/ult/uge/ule were optimized to only call a single libcall and invert the compare.
This patch removes the ordered entries and just uses the inverting logic that is now present. This removes some odd things in both the Mips and WebAssembly code.
Reviewers: efriedma, ABataev, uweigand, cameron.mcinally, kpn
Reviewed By: efriedma
Subscribers: dschuff, sdardis, sbc100, arichardson, jgravelle-google, kristof.beyls, hiraditya, aheejin, sunfish, atanasyan, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72536
Tom Tan [Sat, 11 Jan 2020 02:55:56 +0000 (18:55 -0800)]
[COFF] Align ARM64 range extension thunks at instruction boundary
RangeExtensionThunkARM64 is created for out-of-range branches on Windows ARM64
because branch instructions has limited bits to encode target address.
Currently, RangeExtensionThunkARM64 is appended to its referencing COFF section
from object file at link time without any alignment requirement, so if size of
the preceding COFF section is not aligned to instruction boundary (4 bytes),
RangeExtensionThunkARM64 will emit thunk instructions at unaligned address
which is never a valid branch target on ARM64, and usually triggers invalid
instruction exception when branching to it.
This PR fixes it by requiring such thunks to align at 4 bytes.
Differential revision: https://reviews.llvm.org/D72473
Alexandre Ganea [Sat, 11 Jan 2020 02:05:59 +0000 (21:05 -0500)]
Remove umask tests
These tests were added in
18627115f4d2db5dc73207e0b5312f52536be7dd and
e08b59f81d950bd5c8b8528fcb3ac4230c7b736c for validating a refactoring.
Removing because they break on ACL-controlled folders on Ubuntu, and their added value is low.
Differential Revision: https://reviews.llvm.org/D70854
Saar Raz [Sat, 11 Jan 2020 01:12:04 +0000 (03:12 +0200)]
[Concepts] Fix MarkUsedTemplateParameters for exprs
D41910 introduced a recursive visitor to MarkUsedTemplateParameters, but
disregarded the 'Depth' parameter, and had incorrect assertions. This fixes
the visitor and removes the assertions.
Fangrui Song [Sat, 11 Jan 2020 01:06:40 +0000 (17:06 -0800)]
[Driver] Fix OptionClass of -fconvergent-functions and -fms-volatile (Joined -> Flag)
Nico Weber [Sat, 11 Jan 2020 00:18:11 +0000 (19:18 -0500)]
driver: Allow -fdebug-compilation-dir=foo in joined form.
All 130+ f_Group flags that take an argument allow it after a '=',
except for fdebug-complation-dir. Add a Joined<> alias so that
it behaves consistently with all the other f_Group flags.
(Keep the old Separate flag for backwards compat.)
Richard Smith [Fri, 10 Jan 2020 03:24:44 +0000 (19:24 -0800)]
Clean up and slightly generalize implementation of composite pointer
type computation, in preparation for P0388R4, which adds another few
cases here.
We now properly handle forming multi-level composite pointer types
involving nested Objective-C pointer types (as is consistent with
including them as part of the notion of 'similar types' on which this
rule is based). We no longer lose non-CVR qualifiers on nested pointer
types.
Richard Smith [Fri, 10 Jan 2020 03:22:52 +0000 (19:22 -0800)]
Add a FIXME and corresponding test coverage for some suspicious behavior
forming composite ObjC pointer types in comparisons.
Richard Smith [Fri, 10 Jan 2020 21:21:24 +0000 (13:21 -0800)]
Remove redundant implicit cast creation.
FindCompositePointerType has already cast the operands to the composite
type for us in the case where it succeeds.
Jessica Paquette [Fri, 10 Jan 2020 23:46:52 +0000 (15:46 -0800)]
[AArch64] Don't generate libcalls for wide shifts on Darwin
Similar to
cff90f07cb5cc3.
Darwin doesn't always use compiler-rt, and so we can't assume that these
functions are available (at least on arm64).
Richard Smith [Fri, 10 Jan 2020 23:47:29 +0000 (15:47 -0800)]
Improve precision of documentation comment.
Lei Zhang [Fri, 10 Jan 2020 16:24:47 +0000 (11:24 -0500)]
[mlir][ods] Support dialect specific content emission via hooks
Thus far we can only generate the same set of methods even for
operations in different dialects. This is problematic for dialects that
want to generate additional operation class methods programmatically,
e.g., a special builder method or attribute getter method. Apparently
we cannot update the OpDefinitionsGen backend every time when such
a need arises. So this CL introduces a hook into the OpDefinitionsGen
backend to allow dialects to emit additional methods and traits to
operation classes.
Differential Revision: https://reviews.llvm.org/D72514
Lei Zhang [Fri, 10 Jan 2020 16:18:08 +0000 (11:18 -0500)]
[mlir] NFC: put C++ code emission classes in their own files
This exposes thse classes so that they can be used in interfaces.
Differential Revision: https://reviews.llvm.org/D72514
Mircea Trofin [Fri, 10 Jan 2020 23:29:48 +0000 (15:29 -0800)]
[NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal.
Summary:
The goal is to simplify experimentation on the cost model. Today,
CallAnalyzer decides 2 things: legality, and benefit. The refactoring
keeps legality assessment in CallAnalyzer, and factors benefit
evaluation out, as an extension.
Reviewers: davidxl, eraman
Reviewed By: davidxl
Subscribers: kamleshbhalui, fedor.sergeev, hiraditya, baloghadamsoftware, haicheng, a.sidorin, Szelethus, donat.nagy, dkrupp, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71733