Fangrui Song [Mon, 25 May 2020 05:19:22 +0000 (22:19 -0700)]
[MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label
Jacques Pienaar [Mon, 25 May 2020 03:42:58 +0000 (20:42 -0700)]
[mlir] Expand operand adapter to take attributes
* Enables using with more variadic sized operands;
* Generate convenience accessors for attributes;
- The accessor are named the same as their name in ODS and returns attribute
type (not convenience type) and no derived attributes.
This is first step to changing adapter to support verifying argument
constraints before the op is even created. This does not change the name of
adaptor nor does it require it except for ops with variadic operands to keep this change smaller.
Considered creating separate adapter but decided against that given operands also require attributes in general (and definitely for verification of operands and attributes).
Differential Revision: https://reviews.llvm.org/D80420
Orivej Desh [Mon, 25 May 2020 03:55:08 +0000 (20:55 -0700)]
[TargetLoweringObjectFileImpl] Use llvm::transform
Fixes a build issue with libc++ configured with _LIBCPP_RAW_ITERATORS (ADL not effective)
```
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1602:3: error: no matching function for call to 'transform'
transform(HexString.begin(), HexString.end(), HexString.begin(), tolower);
^~~~~~~~~
```
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D80475
Jake Merdich [Sun, 24 May 2020 02:21:10 +0000 (22:21 -0400)]
[clang-format][PR46043] Parse git config w/ implicit values
Summary:
https://bugs.llvm.org/show_bug.cgi?id=46043
Git's config is generally of the format 'key=val', but a setting
'key=true' can be written as just 'key'. The git-clang-format script
expects a value and crashes in this case; this change handles implicit
'true' values in the script.
Reviewers: MyDeveloperDay, krasimir, sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80486
Stephen Kelly [Sun, 12 Jan 2020 09:38:11 +0000 (09:38 +0000)]
Change default traversal in AST Matchers to ignore invisible nodes
This makes many scenarios simpler by not requiring the user to write
ignoringImplicit() all the time, nor to account for non-visible
cxxConstructExpr() and cxxMemberCalExpr() nodes. This is also, in part,
inclusive of the equivalent of adding a use of ignoringParenImpCasts()
between all expr()-related matchers in an expression.
The pre-existing traverse(TK_AsIs, ...) matcher can be used to explcitly
match on implicit/invisible nodes. See
http://lists.llvm.org/pipermail/cfe-dev/2019-December/064143.html
for more
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D72534
Craig Topper [Sun, 24 May 2020 19:34:56 +0000 (12:34 -0700)]
[X86] Remove isCommutable flag from MULX instructions.
The fixed register constraint on EDX/RDX as an input
makes this not really commutable.
Stephen Kelly [Sun, 24 May 2020 21:49:00 +0000 (22:49 +0100)]
Add missing test
Stephen Kelly [Sun, 24 May 2020 21:28:24 +0000 (22:28 +0100)]
Fix ignore-traversal to call correct method
As is done by ignoreParenImpCasts(). We were not previously calling the
correct internal method. Adjust tests to account for this.
Simon Pilgrim [Sun, 24 May 2020 17:49:39 +0000 (18:49 +0100)]
[X86][AVX] Fold extract_subvector(subv_broadcast(x),c) -> (x)
If we're extracting an subvector from a broadcasted subvector of the same type then we can use the source vector directly.
Simon Pilgrim [Sun, 24 May 2020 17:05:33 +0000 (18:05 +0100)]
[X86][AVX] Fold extract_subvector(broadcast(x),c) -> extract_subvector(broadcast(x),0) iff c != 0
If we're extracting an upper subvector from a broadcast we're better off extracting the lowest subvector instead as it avoids an actual extract instruction and might help SimplifyDemandedVectorElts further simplify the code.
Sanjay Patel [Sun, 24 May 2020 16:20:22 +0000 (12:20 -0400)]
[Pass Manager] remove EarlyCSE as clean-up for VectorCombine
EarlyCSE was added with D75145, but the motivating test is
not regressed by removing the extra pass now. That might be
because VectorCombine altered the way it processes instructions,
or it might be from (re)moving VectorCombine in the pipeline.
The extra round of EarlyCSE appears to cost approximately
0.26% in compile-time as discussed in D80236, so we need some
evidence to justify its inclusion here, but we do not have
that (yet).
I suspect that between SLP and VectorCombine, we are creating
patterns that InstCombine and/or codegen are not prepared for,
but we will need to reduce those examples and include them as
PhaseOrdering and/or test-suite benchmarks.
Florian Hahn [Sun, 24 May 2020 13:14:43 +0000 (14:14 +0100)]
[LV] Either get invariant condition OR vector condition.
Currently we unconditionally get the first lane of the condition
operand, even if we later use the full vector condition. This can result
in some unnecessary instructions being generated.
Suggested as follow-up in D80219.
Sanjay Patel [Sun, 24 May 2020 15:24:53 +0000 (11:24 -0400)]
[PhaseOrdering] adjust test to use default alias analysis with new pass manager; NFC
As discussed in D80236 - this test (like all PhaseOrdering tests?)
was intended to show that there is no difference with the new
pass manager, but the 'opt' command requires extra parameters
to make that happen.
Simon Pilgrim [Sun, 24 May 2020 15:07:46 +0000 (16:07 +0100)]
[X86] SimplifyMultipleUseDemandedBitsForTargetNode - add initial X86ISD::VSRAI handling.
This initial version only peeks through cases where we just demand the sign bit of an ashr shift, but we could generalize this further depending on how many sign bits we already have.
The pr18014.ll case is a minor annoyance - we've failed to to move the psrad/paddd after the blendvps which would have avoided the extra move, but we have still increased the ILP.
Simon Pilgrim [Sun, 24 May 2020 14:27:41 +0000 (15:27 +0100)]
AMDGPU.h - reduce TargetMachine.h include. NFC.
Replace TargetMachine.h include with forward declaration and CodeGen.h include in AMDGPU.h.
Exposes a couple of implicit dependencies that require additional forward declarations/includes.
Kang Zhang [Sun, 24 May 2020 14:05:28 +0000 (14:05 +0000)]
[PowerPC] Add some InstAlias definitions
Summary:
This patch add the InstAlias definitions for below instructions.
ADDI ADDIS ADDI8 ADDIS8
RLWINM8
ISEL ISEL8
OR OR_rec ORI ORI8 XORI8
CNTLZW8 CNTLZW8_rec
TEND TSR
RFEBB
NOR NOR_rec
MTCRF
SUBF SUBF_rec SUBFC SUBFC_rec
RLDICL_32_64
TW
Reviewed By: steven.zhang
Differential Revision: https://reviews.llvm.org/D77559
Nathan James [Sun, 24 May 2020 13:40:15 +0000 (14:40 +0100)]
[clang-tidy] Fix potential assert in use-noexcept check
Summary: Fix a potential assert in use-noexcept check if there is an issue getting the `TypeSourceInfo` as well as a small clean up.
Reviewers: aaron.ballman, alexfh, gribozavr2
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80371
Sanjay Patel [Sun, 24 May 2020 13:30:19 +0000 (09:30 -0400)]
[InstCombine] fold FP trunc into exact itofp
Similar to D79116 and rGbfd512160fe0 - if the 1st cast
is exact, then we can go directly to the destination
type because there is no double-rounding.
Sanjay Patel [Sat, 23 May 2020 14:13:50 +0000 (10:13 -0400)]
[PatternMatch] abbreviate vector inst matchers; NFC
Readability is not reduced with these opcodes/match lines,
so reduce odds of awkward wrapping from 80-col limit.
Simon Pilgrim [Sun, 24 May 2020 13:16:03 +0000 (14:16 +0100)]
AMDGPUInstPrinter.cpp - add CommandLine.h include. NFC.
Fixes implicit dependency that will be exposed by a future patch.
Florian Hahn [Sun, 24 May 2020 12:36:42 +0000 (13:36 +0100)]
[VPlan] Use VPUser for VPWidenSelectRecipe operands (NFC).
VPWidenSelectRecipe already contains a VPUser, but it is not used. This
patch updates the code related to VPWidenSelectRecipe to use VPUser for
its operands.
Reviewers: Ayal, gilr, rengolin
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D80219
Simon Pilgrim [Sun, 24 May 2020 12:57:02 +0000 (13:57 +0100)]
AMDGPUTargetObjectFile.h - remove unnecessary includes. NFC.
As we're inheriting from TargetLoweringObjectFileELF, TargetLoweringObjectFileImpl.h already declares all types we require in the overrides.
Simon Pilgrim [Sun, 24 May 2020 12:25:59 +0000 (13:25 +0100)]
AMDGPULibFunc - fix include order. NFC.
Ensure AMDGPULibFunc.h module header is first, and fix exposed missing forward declaration.
Simon Pilgrim [Sun, 24 May 2020 11:41:05 +0000 (12:41 +0100)]
LoopSimplify.h - reduce unnecessary includes to forward declarations. NFC.
Stephen Kelly [Sat, 23 May 2020 20:57:01 +0000 (21:57 +0100)]
Fix return values of some matcher functions
The old return values mean
* implicit conversion
* not being able to write sizeOfExpr().bind() for example
Stephen Kelly [Sun, 24 May 2020 11:27:03 +0000 (12:27 +0100)]
Fix skip-invisible with overloaded method calls
Stephen Kelly [Sun, 24 May 2020 10:49:13 +0000 (11:49 +0100)]
Add explicit traversal mode to matchers for implicit constructors
Simon Pilgrim [Sun, 24 May 2020 11:30:22 +0000 (12:30 +0100)]
X86Subtarget.h - remove unnecessary TargetMachine.h include. NFC.
By moving X86Subtarget::isPositionIndependent() into X86Subtarget.cpp we can remove the header dependency and move the few uses into source files.
Simon Pilgrim [Sun, 24 May 2020 11:01:58 +0000 (12:01 +0100)]
[X86] Pull out repeated DemandedBits signmask variable. NFC.
Both paths always create the same DemandedBits mask.
Simon Pilgrim [Sun, 24 May 2020 10:25:09 +0000 (11:25 +0100)]
[TargetLowering] Improve expandFunnelShift shift amount masking
For the 'inverse shift', we currently always perform a subtraction of the original (masked) shift amount.
But for the case where we are handling power-of-2 type widths, we can replace:
(sub bw-1, (and amt, bw-1) ) -> (and (xor amt, bw-1), bw-1) -> (and ~amt, bw-1)
This allows x86 shifts to fold away the and-mask.
Followup to D77301 + D80466.
http://volta.cs.utah.edu:8080/z/Nod0Gr
Differential Revision: https://reviews.llvm.org/D80489
Simon Pilgrim [Sun, 24 May 2020 10:18:20 +0000 (11:18 +0100)]
Fix Wdocumentation warnings after argument renaming. NFC.
Simon Pilgrim [Sun, 24 May 2020 09:59:33 +0000 (10:59 +0100)]
[X86] Move CONCAT_VECTORS/INSERT_SUBVECTOR actions inside loop. NFC.
CONCAT_VECTORS/INSERT_SUBVECTOR both are custom on v32i1/v64i1 like the other ops in the loop.
Simon Pilgrim [Sun, 24 May 2020 09:51:02 +0000 (10:51 +0100)]
X86TargetMachine.h - remove unnecessary X86Subtarget forward declaration. NFC.
We have to include X86Subtarget.h.
Tobias Hieta [Sun, 24 May 2020 09:29:16 +0000 (12:29 +0300)]
[LLD/MinGW]: Expose --thinlto-cache-dir
Differential Revision: https://reviews.llvm.org/D80438
Simon Pilgrim [Sun, 24 May 2020 08:41:02 +0000 (09:41 +0100)]
[X86][AVX] Call SimplifyDemandedBits on MaskedLoadSDNode with non-boolean masks
On X86 (AVX1/AVX2), non-boolean masked loads only demand the sign bit of the mask, we already do the equivalent for masked stores.
Annoyingly I can't easily handle this inside TargetLowering::SimplifyDemandedBits as this is an x86 specific case for a generic node.
Differential Revision: https://reviews.llvm.org/D80478
Craig Topper [Wed, 20 May 2020 04:05:31 +0000 (21:05 -0700)]
[X86] Add family/model for Intel Comet Lake CPUs for -march=native and function multiversioning
This adds the family/model returned by CPUID for some Intel
Comet Lake CPUs. Instruction set and tuning wise these are
the same as "skylake".
These are not in the Intel SDM yet, but these should be correct.
Craig Topper [Sun, 24 May 2020 03:23:24 +0000 (20:23 -0700)]
[X86] Fix typo in comment. NFC
Simon Pilgrim [Sun, 24 May 2020 07:08:34 +0000 (08:08 +0100)]
[X86] Improve i8 + 'slow' i16 funnel shift codegen
This is a preliminary patch before I deal with the xor+and issue raised in D77301.
We get much better code for i8/i16 funnel shifts by concatenating the operands together and performing the shift as a double width type, it avoids repeated use of the shift amount and partial registers.
fshl(x,y,z) -> (((zext(x) << bw) | zext(y)) << (z & (bw-1))) >> bw.
fshr(x,y,z) -> (((zext(x) << bw) | zext(y)) >> (z & (bw-1))) >> bw.
Alive2: http://volta.cs.utah.edu:8080/z/CZx7Cn
This doesn't do as well for i32 cases on x86_64 (the xor+and followup patch is much better) so I haven't bothered with that.
Cases with constant amounts are more dubious as well so I haven't currently bothered with those - its these kind of 'edge' cases that put me off trying to put this in TargetLowering::expandFunnelShift.
Differential Revision: https://reviews.llvm.org/D80466
Amara Emerson [Fri, 22 May 2020 22:22:29 +0000 (15:22 -0700)]
[AArch64][GlobalISel] When generating SUBS for compares, don't write to wzr/xzr.
Although writing to wzr/xzr is correct since we don't care about the result
of the sub, only the flags, doing so causes tail merge blocks to fail.
Writing to an unused virtual register instead allows the optimization to fire,
improving performance significantly on 256.bzip2.
Differential Revision: https://reviews.llvm.org/D80460
Vitaly Buka [Fri, 15 May 2020 21:44:52 +0000 (14:44 -0700)]
[NFC, StackSafety] LTO tests for MTE and StackSafety
Summary:
The test demonstrates the current state of the compiler and
I am going to resolve FIXME in followup patches.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: inglorion, hiraditya, steven_wu, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80039
Eli Friedman [Sat, 23 May 2020 22:46:28 +0000 (15:46 -0700)]
[clang driver] Spell "--export-dynamic-symbol" with two dashes.
This doesn't make a difference for linkers that support the option, but
it improves the error message from older linkers that don't support it.
Amy Kwan [Sat, 23 May 2020 21:46:33 +0000 (16:46 -0500)]
[TLI][PowerPC] Introduce TLI query to check if MULH is cheaper than MUL + SHIFT
This patch introduces a TargetLowering query, isMulhCheaperThanMulShift.
Currently in DAG Combine, it will transform mulhs/mulhu into a
wider multiply and a shift if the wide multiply is legal.
This TLI function is implemented on 64-bit PowerPC, as it is more desirable to
have multiply-high over multiply + shift for words and doublewords. Having
multiply-high can also aid in further transformations that can be done.
Differential Revision: https://reviews.llvm.org/D78271
zoecarver [Sat, 23 May 2020 21:32:12 +0000 (14:32 -0700)]
[libcxx] Fix deprecation warning by suppressing deprecated around
__test_has_construct.
In C++17 some tests started failing after
a521532aa16df2c06c91488f2a4e787586f0a611. This fixes those errors by suppressing the deprecation warning when calling `construct` in `__test_has_construct`. This is the same solution as `__has_destroy_test` already uses.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80481
Fangrui Song [Sat, 23 May 2020 21:00:33 +0000 (14:00 -0700)]
[CFIInstrInserter] Delete unneeded checks
zoecarver [Sat, 23 May 2020 21:03:04 +0000 (14:03 -0700)]
[NFC] Remove non-variadic overloads of allocator_traits::construct.
Summary:
Libcxx only supports compilers with variadics. We can safely remove all "fake" variadic overloads of allocator_traits::construct.
This also provides the correct behavior if anything other than exactly one argument is supplied to allocator_traits::construct in C++03 mode.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80067
Jonas Devlieghere [Sat, 23 May 2020 20:37:46 +0000 (13:37 -0700)]
Revert "[lldb/Interpreter] Fix another eExpressionThreadVanished warning"
This reverts commit
f2ffa33c79d3d0636d6c8eb7b5b7bcf8db7b397b. My local
checkout was behind and Eric already took care of it in the meantime.
Jonas Devlieghere [Sat, 23 May 2020 20:27:01 +0000 (13:27 -0700)]
[lldb/Interpreter] Fix another eExpressionThreadVanished warning
Fixes warning: enumeration value 'eExpressionThreadVanished' not handled
in switch [-Wswitch] in CommandInterpreter.cpp.
Jinsong Ji [Sat, 23 May 2020 19:01:37 +0000 (19:01 +0000)]
[docs] Fix warnings in ConstantInterpreter
Fixed following trivial issues that caught by warnings by adding
indents.
clang/docs/ConstantInterpreter.rst:133: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:136: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:153: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:195: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:225: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:370: WARNING: Bullet list ends
without a blank line; unexpected unindent.
clang/docs/ConstantInterpreter.rst:383: WARNING: Bullet list ends
without a blank line; unexpected unindent.
Florian Hahn [Fri, 22 May 2020 18:16:15 +0000 (19:16 +0100)]
[ValueTracking] Use assumptions in computeConstantRange.
This patch updates computeConstantRange to optionally take an assumption
cache as argument and use the available assumptions to limit the range
of the result.
Currently this is limited to assumptions that are comparisons.
Reviewers: reames, nikic, spatel, jdoerfert, lebedev.ri
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D76193
Nikita Popov [Thu, 21 May 2020 17:40:43 +0000 (19:40 +0200)]
[DwarfEHPrepare] Don't prune unreachable resumes at optnone
Disable pruning of unreachable resumes in the DwarfEHPrepare pass
at optnone. While I expect the pruning itself to be essentially free,
this does require a dominator tree calculation, that is not used for
anything else. Saving this DT construction makes for a 0.4% O0
compile-time improvement.
Differential Revision: https://reviews.llvm.org/D80400
Simon Pilgrim [Sat, 23 May 2020 18:49:38 +0000 (19:49 +0100)]
TargetLowering.h - remove unnecessary TargetMachine.h include. NFC
Replace with forward declaration and move dependency down to source files that actually need it.
Both TargetLowering.h and TargetMachine.h are 2 of the most expensive headers (top 10) in the ClangBuildAnalyzer report when building llc.
Matt Arsenault [Thu, 21 May 2020 00:05:07 +0000 (20:05 -0400)]
SimplifyCFG: Clean up optforfuzzing implementation
This should function as any other SimplifyCFGOption rather than having
the transform check and specially consider the attribute itself.
Matt Arsenault [Fri, 22 May 2020 01:04:06 +0000 (21:04 -0400)]
AMDGPU: Refine rcp/rsq intrinsic folding for modern FP rules
We have to assume undef could be an snan, which would need quieting so
returning qnan is safer than undef. Also consider strictfp, and don't
care if the result rounded.
Matt Arsenault [Fri, 22 May 2020 23:00:04 +0000 (19:00 -0400)]
HIP: Try to deal with more llvm package layouts
The various HIP builds are all inconsistent.
The default llvm install goes to ${INSTALL_PREFIX}/bin/clang, but the
rocm packaging scripts move this under
${INSTALL_PREFIX}/llvm/bin/clang. Some other builds further pollute
this with ${INSTALL_PREFIX}/bin/x86_64/clang. These should really be
consolidated, but try to handle them for now.
Matt Arsenault [Thu, 21 May 2020 01:05:47 +0000 (21:05 -0400)]
AMDGPU: Implement isConstantPhysReg
I don't think any of these registers are used in contexts where this
would do anything yet.
Matt Arsenault [Fri, 3 Jan 2020 20:26:46 +0000 (15:26 -0500)]
AMDGPU: Define mode register
This should eventually model FP mode constraints as well as the other
special fields it tracks.
Matt Arsenault [Fri, 22 May 2020 23:57:45 +0000 (19:57 -0400)]
Silence warning from unit test
This was printing about r600 not being a valid subtarget for an amdgcn
triple. This is an awkward place because r600 and amdgcn unfortunately
occupy the same target. Silence the warning by specifying an explicit
subtarget.
Fangrui Song [Sat, 16 May 2020 03:36:41 +0000 (20:36 -0700)]
[ELF] Parse SHT_GNU_verneed and respect versioned undefined symbols in shared objects
An undefined symbol in a shared object can be versioned, like `f@v1`.
We currently insert `f` as an Undefined into the symbol table, but we
should insert `f@v1` instead.
The string `v1` is inferred from SHT_GNU_versym and SHT_GNU_verneed.
This patch implements the functionality.
Failing to do this can cause two issues:
* If a versioned symbol referenced by a shared object is defined in the
executable, we will fail to export it.
* If a versioned symbol referenced by a shared object in another object
file, --no-allow-shlib-undefined may spuriously report an
"undefined reference to " error. See https://bugs.llvm.org/show_bug.cgi?id=44842
(Linking -lfftw3 -lm on Arch Linux can cause
`undefined reference to __log_finite`)
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D80059
Matt Arsenault [Sat, 23 May 2020 15:55:20 +0000 (11:55 -0400)]
TableGen: Don't reconstruct CodeGenDAGTarget
This is quite expensive and it's already available.
Just ReadLegalValueTypes is taking 4 seconds for me in a debug build
for AMDGPU's -gen-instr-info, and this was introducing a second call.
Georgii Rymar [Thu, 14 May 2020 19:46:58 +0000 (22:46 +0300)]
[yaml2obj] - Move "repeated section/fill name" check earlier.
This allows to simplify the code.
Doing checks early is generally useful.
Differential revision: https://reviews.llvm.org/D79985
Georgii Rymar [Thu, 14 May 2020 18:44:06 +0000 (21:44 +0300)]
[yaml2obj] - Add a technical prefix for each unnamed chunk.
This change does not affect the produced binary.
In this patch I assign a technical suffix to each section/fill
(i.e. chunk) name when it is empty. It allows to simplify the code
slightly and improve error messages reported.
In the code we have the section to index mapping, SN2I, which is
globally used. With this change we can use it to map "empty"
names to indexes now, what is helpful.
Differential revision: https://reviews.llvm.org/D79984
Stephen Kelly [Sun, 29 Dec 2019 19:26:11 +0000 (19:26 +0000)]
Add a way to set traversal mode in clang-query
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73037
Marek Kurdej [Sat, 23 May 2020 12:31:05 +0000 (14:31 +0200)]
[libc++] Mark __cpp_lib_hardware_interference_size as unimplemented. This fxes bug PR41423.
Summary:
As described in the bug report:
The commit
a8b9f59e8caf378d56e8bfcecdb22184cdabf42d "Implement feature test macros using a script" added test features macros for libc++. Among others, it added `__cpp_lib_hardware_interference_size`. However, there is nothing like std::hardware_constructive_interference_size nor std::hardware_destructive_interference_size, that should be in header <new>.
* https://bugs.llvm.org/show_bug.cgi?id=41423
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D80431
Michal Paszkowski [Sat, 23 May 2020 11:51:43 +0000 (13:51 +0200)]
Revert "Added a new IRCanonicalizer pass."
This reverts commit
14d358537f124a732adad1ec6edf3981dc9baece.
Michal Paszkowski [Sat, 23 May 2020 11:51:07 +0000 (13:51 +0200)]
LLVM GN Syncbot [Sat, 23 May 2020 11:05:09 +0000 (11:05 +0000)]
[gn build] Port
14d358537f1
Michal Paszkowski [Sat, 23 May 2020 00:48:55 +0000 (02:48 +0200)]
Added a new IRCanonicalizer pass.
Summary:
Added a new IRCanonicalizer pass which aims to transform LLVM modules into
a canonical form by reordering and renaming instructions while preserving the
same semantics. The canonicalizer makes it easier to spot semantic differences
when diffing two modules which have undergone different passes.
Presentation: https://www.youtube.com/watch?v=c9WMijSOEUg
Reviewed by: plotfi
Differential Revision: https://reviews.llvm.org/D66029
mydeveloperday [Sat, 23 May 2020 10:28:06 +0000 (11:28 +0100)]
[Analyzer][WebKit][NFC] Correct documentation to avoid sphinx build error
This was introduced with commit
54e91a3c7010
Nikita Popov [Tue, 19 May 2020 20:37:37 +0000 (22:37 +0200)]
[TargetPassConfig] Don't add alias analysis at optnone
When performing codegen at optnone, don't add alias analysis to
the pipeline. We don't need it, but it causes an unnecessary
dominator tree calculation.
I've also moved the module verifier call to the top so that a bunch
of disabled-at-optnone passes group more nicely.
Differential Revision: https://reviews.llvm.org/D80378
Craig Topper [Sat, 23 May 2020 04:45:09 +0000 (21:45 -0700)]
[Align] Remove operations on MaybeAlign that asserted that it had a defined value.
If the caller needs to reponsible for making sure the MaybeAlign
has a value, then we should just make the caller convert it to an Align
with operator*.
I explicitly deleted the relational comparison operators that
were being inherited from Optional. It's unclear what the meaning
of two MaybeAligns were one is defined and the other isn't
should be. So make the caller reponsible for defining the behavior.
I left the ==/!= operators from Optional. But now that exposed a
weird quirk that ==/!= between Align and MaybeAlign required the
MaybeAlign to be defined. But now we use the operator== from
Optional that takes an Optional and the Value.
Differential Revision: https://reviews.llvm.org/D80455
Fangrui Song [Sat, 23 May 2020 04:12:17 +0000 (21:12 -0700)]
[MC] Drop unneeded std::abs for DW_def_cfa_offset in DarwinX86AsmBackend::generateCompactUnwindEncoding
This clean-up is available after double negation bugs are fixed.
Fangrui Song [Sat, 23 May 2020 03:18:15 +0000 (20:18 -0700)]
[MC] Fix double negation of DW_CFA_def_cfa
Negations are incorrectly added in numerous places and the code just happens to work.
Also fix a missed DW_CFA_def_cfa_offset negation in
c693b9c321d5a40d012340619674cf790c9ac86c:
ARMAsmBackendDarwin::generateCompactUnwindEncoding
Craig Topper [Sat, 23 May 2020 03:12:57 +0000 (20:12 -0700)]
[X86] Update some av512 shift intrinsics to use "unsigned int" parameter instead of int to match Intel documentation
There are 65 that take a scalar shift amount. Intel documentation shows 60 of them taking unsigned int. There are 5 versions of srli_epi16 that use int, the 512-bit maskz and 128/256 mask/maskz.
Fixes PR45931
Differential Revision: https://reviews.llvm.org/D80251
Fangrui Song [Sat, 23 May 2020 02:57:21 +0000 (19:57 -0700)]
[MC] Fix double negation of DW_CFA_def_cfa_offset
Negations are incorrectly added in two places and the code works just
because the negations cancel each other.
Tony [Sat, 23 May 2020 02:29:57 +0000 (22:29 -0400)]
[AMDGPU] DWARF Proposal For Heterogeneous Debugging
- Change title to "DWARF Proposal For Heterogeneous Debugging".
Tony [Sat, 23 May 2020 02:01:01 +0000 (22:01 -0400)]
[AMDGPU] DWARF For Heterogeneous Debugging
- Change title to "DWARF For Heterogeneous Debugging".
- Add "Examples" section that references the AMDGPUUsage DWARF section.
- Make the "References" section a top level section.
Differential Revision: https://reviews.llvm.org/D70523
Stephen Kelly [Sat, 23 May 2020 00:28:55 +0000 (01:28 +0100)]
Add missing unit test
Stephen Kelly [Sat, 23 May 2020 00:24:56 +0000 (01:24 +0100)]
Fix mistake made while rebasing
Fangrui Song [Fri, 22 May 2020 22:51:24 +0000 (15:51 -0700)]
[MC] Change MCCFIInstruction::createDefCfaOffset to cfiDefCfaOffset which does not negate Offset
The negative Offset has caused a bunch of problems and confused quite a
few call sites. Delete the unneeded negation and fix all call sites.
Stephen Kelly [Fri, 22 May 2020 21:48:54 +0000 (22:48 +0100)]
Add some explicit use of TK_AsIs
Stephen Kelly [Thu, 21 May 2020 23:57:50 +0000 (00:57 +0100)]
Fix ignoring traversal of intermediate parens
Stephen Kelly [Thu, 21 May 2020 23:23:59 +0000 (00:23 +0100)]
Traverse-ignore invisible CXXConstructExprs with default args
Adrian Prantl [Fri, 22 May 2020 22:51:43 +0000 (15:51 -0700)]
Restrict test for DW_AT_APPLE_optimized to Darwin
Fangrui Song [Fri, 22 May 2020 22:18:05 +0000 (15:18 -0700)]
[MC] Change MCCFIInstruction::createDefCfa to cfiDefCfa which does not negate Offset
The negative Offset has caused a bunch of problems and confused quite a
few call sites. Delete the unneeded negation and fix all call sites.
Adrian Prantl [Fri, 22 May 2020 00:42:24 +0000 (17:42 -0700)]
Print a warning when stopped in a frame LLDB has no plugin for.
This patchs adds an optional warning that is printed when stopped at a
frame that was compiled in a source language that LLDB has no plugin
for.
The motivational use-case is debugging Swift code on Linux. When the
user accidentally invokes the system LLDB that was built without the
Swift plugin, it is very much non-obvious why debugging doesnt
work. This warning makes it easy to figure out what went wrong.
<rdar://problem/
56986569>
Stephen Neuendorffer [Thu, 21 May 2020 17:52:44 +0000 (10:52 -0700)]
Reapply "[lit] GoogleTest framework should report failures if test binary crashes"
This reverts commit
78dea0e8fb6cc5c0fae64d65b7f40560cab7b329.
The offending lldb test (which is a real bug exposed by this patch)
has been disabled on windows (see
a67b2faa7c4cfbceffb4213f46769c45a5a9291a)
and lldb is queued for inclusion into precommit testing, which would
have caught this.
Differential Revision: https://reviews.llvm.org/D80389
Stanislav Mekhanoshin [Fri, 22 May 2020 18:04:46 +0000 (11:04 -0700)]
[AMDGPU] Define 6 dword subregs
This prevents autogeneration of degenerate names for these.
Differential Revision: https://reviews.llvm.org/D80451
Eric Christopher [Fri, 22 May 2020 20:42:09 +0000 (13:42 -0700)]
Handle eExpressionThreadVanished in error switch to handle
covered switch warning.
Sanjay Patel [Fri, 22 May 2020 20:22:27 +0000 (16:22 -0400)]
[VectorCombine] set preserve alias analysis
As noted in D80236, moving the pass in the pipeline exposed this
shortcoming. Extra work to recalculate the alias results showed
up as a compile-time slowdown.
Louis Dionne [Thu, 21 May 2020 14:25:15 +0000 (10:25 -0400)]
[libc++] Mark __u64toa and __u32toa as noexcept
The two functions don't throw, and the generated code is better when
we explicitly tell the compiler that the functions are noexcept. This
isn't an ABI break because the signatures of the functions stay the
same with or without noexcept.
Fixes https://llvm.org/PR46016
Differential Revision: https://reviews.llvm.org/D80379
Jonas Devlieghere [Fri, 22 May 2020 20:06:36 +0000 (13:06 -0700)]
[lldb/Test] Disable APITests.exe on Windows
The generated binary (APITests.exe) is not a valid googletest binary. I
suspect it has something to do with us linking against liblldb.
Jonas Devlieghere [Fri, 22 May 2020 20:06:01 +0000 (13:06 -0700)]
[lldb/Reproducers] Make the type tests work with reproducers
Ahsan Saghir [Fri, 22 May 2020 19:35:13 +0000 (14:35 -0500)]
[PowerPC] Add support for vmsumudm
This patch adds support for Vector Multiply-Sum Unsigned Doubleword Modulo
instruction; vmsumudm.
Differential Revision: https://reviews.llvm.org/D80294
Louis Dionne [Fri, 22 May 2020 19:32:29 +0000 (15:32 -0400)]
[libc++] Fix broken tuple tests
The tests had copy-paste errors which started showing when an
unused-variable warning started being emitted after we made
the MoveOnly type constexpr (in
a4b8ee64223f).
Jean-Michel Gorius [Fri, 22 May 2020 19:26:46 +0000 (21:26 +0200)]
Revert "[CodeGen] Add support for multiple memory operands in MachineInstr::mayAlias"
This temporarily reverts commit
7019cea26dfef5882c96f278c32d0f9c49a5e516.
It seems that, for some targets, there are instructions with a lot of memory operands (probably more than would be expected). This causes a lot of buildbots to timeout and notify failed builds. While investigations are ongoing to find out why this happens, revert the changes.
Raphael Isemann [Fri, 22 May 2020 19:23:03 +0000 (21:23 +0200)]
Revert "[lldb] Enable C++14 when evaluating expressions in a C++14 frame"
This reverts commit
5f88f39ab8154682c3b1eb9d7050a9412a55d9e7. It broke these
three tests on the Window bot:
lldb-api :: commands/expression/completion/TestExprCompletion.py
lldb-api :: lang/cpp/scope/TestCppScope.py
lldb-api :: lang/cpp/standards/cpp11/TestCPP11Standard.py
Louis Dionne [Fri, 22 May 2020 15:20:27 +0000 (11:20 -0400)]
[libc++] Make MoveOnly constexpr-friendly
This is necessary when writing constexpr tests.
Kirstóf Umann [Fri, 22 May 2020 18:18:16 +0000 (20:18 +0200)]
Revert "[analyzer] Change the default output type to PD_TEXT_MINIMAL in the frontend, error if an output loc is missing for PathDiagConsumers that need it"
This reverts commit
fe1a3a7e8c8be33968b9a768666489823dabab10.
Florian Hahn [Mon, 27 Apr 2020 14:46:12 +0000 (15:46 +0100)]
[DSE,MSSA] Add additional multiblock tests.
Joe Ranieri [Fri, 22 May 2020 16:57:58 +0000 (12:57 -0400)]
[clang-tidy] Expand the list of functions in bugprone-unused-return-value
This change adds common C, C++, and POSIX functions to the clang-tidy unused return value checker.
Differential Revision: https://reviews.llvm.org/D76083