platform/upstream/llvm.git
4 years ago[MC/AsmParser] layout-interdependency.s depends on having a proper triple
Quentin Colombet [Mon, 13 Jul 2020 21:37:21 +0000 (14:37 -0700)]
[MC/AsmParser] layout-interdependency.s depends on having a proper triple

Fix the requirements for that test.

NFC

4 years ago[mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer
Nicolas Vasilache [Mon, 13 Jul 2020 15:04:09 +0000 (11:04 -0400)]
[mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer

Summary: The native alignment may generally not be used when lowering a vector.transfer to the underlying load/store operation. This revision fixes the unmasked load/store alignment to match that of the masked path.

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

4 years ago[ADT] Specialize std::swap() for SetVector
Nikita Popov [Fri, 19 Jun 2020 18:25:33 +0000 (20:25 +0200)]
[ADT] Specialize std::swap() for SetVector

This is intended to address a compile-time regression from
1eddce4177cfddc86d4696b758904443b0b4f193. A SmallPtrSet was
replaced with a SetVector there, which had an unexpected large
compile-time impact. It turns out that this structure is getting
swapped a lot, and previously this used an optimized std::swap()
specialization for SmallPtrSet. Now it ends up using the default,
triple-move based implementation, which is much more expensive.

This patch (partly) addresses the issue by specializing std::swap()
for SetVector.

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

4 years agoRetry ""[lldb-vscode] Fix TestVSCode_module""
Walter Erquinigo [Mon, 13 Jul 2020 19:10:49 +0000 (12:10 -0700)]
Retry ""[lldb-vscode] Fix TestVSCode_module""

Original commit c60216db15132401ff60c08ccef899321f63b6b6.

The test can only run on Darwin because of how it was setup, so I'm
enforcing that.

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

4 years ago[lldb] Remove unused argument (NFC)
Jonas Devlieghere [Mon, 13 Jul 2020 20:44:01 +0000 (13:44 -0700)]
[lldb] Remove unused argument (NFC)

Nobody is writing to the stream so there's no point in passing it
around.

4 years ago[MLIR] Change ODS collective params build method to provide an empty default value...
Rahul Joshi [Mon, 13 Jul 2020 18:20:27 +0000 (11:20 -0700)]
[MLIR] Change ODS collective params build method to provide an empty default value for named attributes

- Provide default value for `ArrayRef<NamedAttribute> attributes` parameter of
  the collective params build method.
- Change the `genSeparateArgParamBuilder` function to not generate build methods
  that may be ambiguous with the new collective params build method.
- This change should help eliminate passing empty NamedAttribue ArrayRef when the
  collective params build method is used
- Extend op-decl.td unit test to make sure the ambiguous build methods are not
  generated.

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

4 years ago[flang] Extended the flang driver options to include gfortran equivalents to pgf90...
AlexisPerry [Mon, 13 Jul 2020 16:32:12 +0000 (10:32 -0600)]
[flang] Extended the flang driver options to include gfortran equivalents to pgf90 specific options.

Summary: Added gfortran equivalents of pgf90's -Mfixed, -Mfree, -Mextend, -Mstandard, -Munlimited and also added -fdefault-double-8

Reviewers: sscalpone, richard.barton.arm, DavidTruby, clementval, jdoerfert

Reviewed By: sscalpone, richard.barton.arm

Subscribers: sstefan1, llvm-commits, flang-commits

Tags: #llvm, #flang

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

4 years ago[mlir] Support operations with multiple results in slicing
Thomas Raoux [Mon, 13 Jul 2020 20:24:27 +0000 (13:24 -0700)]
[mlir] Support operations with multiple results in slicing

Right now slicing would assert if an operation with multiple results is in the
slice.

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

4 years ago[gn build] Port 9908a3b9f52
LLVM GN Syncbot [Mon, 13 Jul 2020 20:18:59 +0000 (20:18 +0000)]
[gn build] Port 9908a3b9f52

4 years ago[mlir][StandardToSPIRV] Fix conversion for signed remainder
Lei Zhang [Sun, 12 Jul 2020 17:03:23 +0000 (13:03 -0400)]
[mlir][StandardToSPIRV] Fix conversion for signed remainder

Per the Vulkan's SPIR-V environment spec, "for the OpSRem and OpSMod
instructions, if either operand is negative the result is undefined."
So we cannot directly use spv.SRem/spv.SMod if either operand can be
negative. Emulate it via spv.UMod.

Because the emulation uses spv.SNegate, this commit also defines
spv.SNegate.

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

4 years agoRevert "[llvm] Native size estimator for training -Oz inliner"
Davide Italiano [Mon, 13 Jul 2020 19:59:16 +0000 (12:59 -0700)]
Revert "[llvm] Native size estimator for training -Oz inliner"

This reverts commit 83080a294ad7d145d758821bcf4354ad0cb7d299 as
it breaks the macOS modules build.

4 years agoAdd a decorator to skip tests when running under Rosetta
Adrian Prantl [Mon, 13 Jul 2020 20:09:53 +0000 (13:09 -0700)]
Add a decorator to skip tests when running under Rosetta

This allows skipping a test when running the testsuite on macOS under
the Rosetta translation layer.

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

4 years ago[lldb] Fix a CMake warning typo. NFC.
Martin Storsjö [Mon, 13 Jul 2020 19:47:31 +0000 (22:47 +0300)]
[lldb] Fix a CMake warning typo. NFC.

4 years ago[ORC] Remove a spurious reinterpret_cast.
Lang Hames [Mon, 13 Jul 2020 19:37:18 +0000 (12:37 -0700)]
[ORC] Remove a spurious reinterpret_cast.

4 years ago[llvm][NFC] Factored the default inlining advice
Mircea Trofin [Mon, 13 Jul 2020 19:14:21 +0000 (12:14 -0700)]
[llvm][NFC] Factored the default inlining advice

This is in preparation for the 'development' mode advisor. We currently
want to track what the default policy's decision would have been, this
refactoring makes it easier to do that.

4 years ago[flang] Use octal escapes for character literals in modfiles
Tim Keith [Mon, 13 Jul 2020 19:19:17 +0000 (12:19 -0700)]
[flang] Use octal escapes for character literals in modfiles

Character literals can be formatted using octal or hex escapes for
non-ascii characters. This is so that the program can be unparsed for
either pgf90 or gfortran to compile. But modfiles should not be affected
by that -- they should be consistent.

This changes causes modfiles to always have character literals formatted
with octal escapes.

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

4 years ago[PredicateInfo] Place predicate info after assume
Nikita Popov [Sat, 11 Jul 2020 20:48:26 +0000 (22:48 +0200)]
[PredicateInfo] Place predicate info after assume

Place the ssa.copy instructions for assumes after the assume,
instead of before it. Both options are valid, but placing them
afterwards prevents assumes from being replaced with assume(true).
This fixes https://bugs.llvm.org/show_bug.cgi?id=37541 in NewGVN
and will avoid a similar issue in SCCP when we handle more
predicate infos.

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

4 years ago[NewGVN] Separate passing assume tests (NFC)
Nikita Popov [Mon, 13 Jul 2020 19:05:47 +0000 (21:05 +0200)]
[NewGVN] Separate passing assume tests (NFC)

Result might not be exactly the same as under GVN, but all the
desired transforms are made.

4 years ago[NewGVN] Rename xfail tests (NFC)
Nikita Popov [Mon, 13 Jul 2020 18:48:12 +0000 (20:48 +0200)]
[NewGVN] Rename xfail tests (NFC)

Add an -xfail.ll suffix to tests marked XFAIL, so these files can
be split into passing and failing parts.

4 years ago[JITLink] Apply MSVCPError workaround to a1fc26030a42.
Lang Hames [Mon, 13 Jul 2020 18:21:40 +0000 (11:21 -0700)]
[JITLink] Apply MSVCPError workaround to a1fc26030a42.

Hopefully this will get the Windows bots building again.

4 years agoGlobalISel: Define equivalent nodes for saturating add/sub
Matt Arsenault [Sun, 12 Jul 2020 18:03:23 +0000 (14:03 -0400)]
GlobalISel: Define equivalent nodes for saturating add/sub

4 years agoGlobalISel: Implement fewerElementsVector for saturating add/sub
Matt Arsenault [Sun, 12 Jul 2020 20:11:53 +0000 (16:11 -0400)]
GlobalISel: Implement fewerElementsVector for saturating add/sub

4 years agoGlobalISel: Implement widenScalar for saturating add/sub
Matt Arsenault [Sun, 12 Jul 2020 17:58:53 +0000 (13:58 -0400)]
GlobalISel: Implement widenScalar for saturating add/sub

Add a placeholder legality rule for AMDGPU until the rest of the
actions are handled.

4 years agoAMDGPU/GlobalISel: Add baseline add/sub sat legalization tests
Matt Arsenault [Sun, 12 Jul 2020 16:49:04 +0000 (12:49 -0400)]
AMDGPU/GlobalISel: Add baseline add/sub sat legalization tests

4 years ago[clangd] Remove const_cast. NFC
Sam McCall [Mon, 13 Jul 2020 18:44:03 +0000 (20:44 +0200)]
[clangd] Remove const_cast. NFC

4 years ago[NFC] Remove unused header include
Lei Zhang [Mon, 13 Jul 2020 18:40:04 +0000 (14:40 -0400)]
[NFC] Remove unused header include

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

4 years agoFix HexagonGenExtract return status
serge-sans-paille [Thu, 9 Jul 2020 07:56:26 +0000 (09:56 +0200)]
Fix HexagonGenExtract return status

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

4 years ago[NewPM][opt] Translate -foo-analysis to require<foo-analysis>
Arthur Eubanks [Mon, 13 Jul 2020 18:10:56 +0000 (11:10 -0700)]
[NewPM][opt] Translate -foo-analysis to require<foo-analysis>

 Fixes 53 check-llvm tests under NPM.

Reviewed By: asbirlea

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

4 years ago[gn build] Port fdb69539bcd
LLVM GN Syncbot [Mon, 13 Jul 2020 18:10:37 +0000 (18:10 +0000)]
[gn build] Port fdb69539bcd

4 years ago[AST] Fix potential nullptr dereference in Expr::HasSideEffects
Jan Korous [Wed, 8 Jul 2020 22:16:21 +0000 (15:16 -0700)]
[AST] Fix potential nullptr dereference in Expr::HasSideEffects

Array returned by LambdaExpr::capture_inits() can contain nullptrs.

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

4 years agoAMDGPU/GlobalISel: Add tests for 96-bit add/sub/mul
Matt Arsenault [Sun, 12 Jul 2020 21:22:15 +0000 (17:22 -0400)]
AMDGPU/GlobalISel: Add tests for 96-bit add/sub/mul

I almost regressed these, so add tests for them.

4 years ago[llvm][NFC] ML Policies: changed the saved_model protobuf to text
Mircea Trofin [Mon, 13 Jul 2020 17:59:55 +0000 (10:59 -0700)]
[llvm][NFC] ML Policies: changed the saved_model protobuf to text

Also compacted the checkpoints (variables) to one file (plus the index).

This reduces the binary model files to just the variables and their
index. The index is very small. The variables are serialized float
arrays. When updated through training, the changes are very likely
unlocalized, so there's very little value in them being anything else
than binary.

4 years agoTableGen/GlobalISel: Emit enum names for reg class ID instead of value
Matt Arsenault [Mon, 13 Jul 2020 17:14:29 +0000 (13:14 -0400)]
TableGen/GlobalISel: Emit enum names for reg class ID instead of value

This was emitting the raw value for the reg class ID with a comment
for the actual class name. Switch to emitting the qualified enum name
instead, which obviates the need for the comment and also helps keep
the lit tests on the emitter output more stable.

4 years agoRISCV: Avoid GlobalISel build break in a future patch
Matt Arsenault [Mon, 13 Jul 2020 14:39:13 +0000 (10:39 -0400)]
RISCV: Avoid GlobalISel build break in a future patch

The GlobalISelEmitter is stricter about matching timm instruction
outputs to timm inputs (although in an accidental sort of way that
doesn't hit a proper import failure error). Also, apparently no
intrinsic patterns were importing since the ID enum declaration was
missing.

4 years ago[libc++] Implement P0551
Louis Dionne [Mon, 13 Jul 2020 15:53:48 +0000 (11:53 -0400)]
[libc++] Implement P0551

Make sure we satisfy the requirements added by P0551, and add tests to
enforce that.

4 years ago[PGO][PGSO] Add profile guided size optimization to X86ISelDAGToDAG.
Hiroshi Yamauchi [Tue, 7 Jul 2020 18:01:35 +0000 (11:01 -0700)]
[PGO][PGSO] Add profile guided size optimization to X86ISelDAGToDAG.

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

4 years ago[gn build] Port 83080a294ad
LLVM GN Syncbot [Mon, 13 Jul 2020 17:19:05 +0000 (17:19 +0000)]
[gn build] Port 83080a294ad

4 years ago[ORC] Generalize emit re-entry, stub, etc. APIs for working addr != link addr.
Lang Hames [Mon, 13 Jul 2020 04:56:45 +0000 (21:56 -0700)]
[ORC] Generalize emit re-entry, stub, etc. APIs for working addr != link addr.

This patch generalizes the APIs for writing re-entry blocks, trampolines and
stubs to allow their final linked address to differ from the address of
their initial working memory. This will allow these routines to be used with
JITLinkMemoryManagers, which will in turn allow for unification of code paths
for in-process and cross-process lazy JITing.

4 years ago[JITLink] Add a synchronous version of finalize for convenience.
Lang Hames [Mon, 13 Jul 2020 04:49:17 +0000 (21:49 -0700)]
[JITLink] Add a synchronous version of finalize for convenience.

This will be used by upcoming patches that implement indirection utils
(reentry, reentry trampolines, and stubs) on top of
JITLinkMemoryManager to unify in-process and cross-process lazy
compilation support.

4 years ago[llvm] Native size estimator for training -Oz inliner
Mircea Trofin [Mon, 29 Jun 2020 18:37:06 +0000 (11:37 -0700)]
[llvm] Native size estimator for training -Oz inliner

Summary:
This is an experimental ML-based native size estimator, necessary for
computing partial rewards during -Oz inliner policy training. Data
extraction for model training will be provided in a separate patch.

RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html

Reviewers: davidxl, jdoerfert

Subscribers: mgorny, hiraditya, mgrang, arphaman, llvm-commits

Tags: #llvm

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

4 years ago[PGO][PGSO] Add profile guided size optimization to the X86 LEA fixup.
Hiroshi Yamauchi [Tue, 7 Jul 2020 17:19:54 +0000 (10:19 -0700)]
[PGO][PGSO] Add profile guided size optimization to the X86 LEA fixup.

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

4 years ago[DAGCombiner] rot i16 X, 8 --> bswap X
Sanjay Patel [Mon, 13 Jul 2020 15:35:38 +0000 (11:35 -0400)]
[DAGCombiner] rot i16 X, 8 --> bswap X

We have this generic transform in IR (instcombine),
but as shown in PR41098:
http://bugs.llvm.org/PR41098
...the pattern may emerge in codegen too.

x86 has a potential refinement/reversal opportunity here,
but that should come later or needs a target hook to
avoid the transform. Converting to bswap is the more
specific form, so we should use it if it is available.

4 years ago[x86] add tests for bswap/rotate; NFC
Sanjay Patel [Mon, 13 Jul 2020 15:23:45 +0000 (11:23 -0400)]
[x86] add tests for bswap/rotate; NFC

4 years ago[ARM][NFC] More detailed vbsl checks in ARM & Thumb2 tests.
Pavel Iliin [Mon, 13 Jul 2020 11:37:59 +0000 (12:37 +0100)]
[ARM][NFC] More detailed vbsl checks in ARM & Thumb2 tests.

4 years ago[llvm-ar][test][AIX] Unsupport error-opening-directory.test on AIX
stevewan [Mon, 13 Jul 2020 15:58:22 +0000 (11:58 -0400)]
[llvm-ar][test][AIX] Unsupport error-opening-directory.test on AIX

Summary:
The test fails on AIX as it allows open() and read() on a directory. This patch adds `# UNSUPPORTED:
system-aix` to the test to prevent it from running on AIX.

Reviewers: sameerarora101, daltenty, ShuhongL, hubert.reinterpretcast, MaskRay, smeenai, alexshap

Reviewed By: sameerarora101, hubert.reinterpretcast, MaskRay, smeenai

Subscribers: MaskRay, rupprecht, llvm-commits

Tags: #llvm

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

4 years ago[ADT] Make Load(AP)IntFromMemory pointer argument const
Pavel Labath [Mon, 13 Jul 2020 15:15:25 +0000 (17:15 +0200)]
[ADT] Make Load(AP)IntFromMemory pointer argument const

The function does not modify this memory.

4 years agoFix llvm-test-suite failure introduced by D82550/D83122
Sanne Wouda [Mon, 13 Jul 2020 15:09:41 +0000 (16:09 +0100)]
Fix llvm-test-suite failure introduced by D82550/D83122

Apparently, isIndirectCall does not imply that getCalledFunction will be non-null

4 years ago[flang][openmp] libc++ unordered_map build fix in flang openmp static analysis
David Truby [Mon, 13 Jul 2020 15:07:22 +0000 (16:07 +0100)]
[flang][openmp] libc++ unordered_map build fix in flang openmp static analysis

Simply move the include of unordered_map from the .cpp file to the .h file

4 years ago[OPENMP]Fix compiler crash for target data directive without actual target codegen.
Alexey Bataev [Thu, 9 Jul 2020 12:34:06 +0000 (08:34 -0400)]
[OPENMP]Fix compiler crash for target data directive without actual target codegen.

Summary:
Need to privatize addresses of the captured variables when trying to
emit the body of the target data directive in no target codegen mode.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, cfe-commits, sstefan1, caomhin

Tags: #clang

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

4 years ago[ms] [llvm-ml] Restore omitted changes requested by reviewer
Eric Astor [Mon, 13 Jul 2020 14:47:30 +0000 (10:47 -0400)]
[ms] [llvm-ml] Restore omitted changes requested by reviewer

4 years ago[lldb/Utility] Rewrite Scalar::SetValueFromCString
Pavel Labath [Wed, 8 Jul 2020 13:43:07 +0000 (15:43 +0200)]
[lldb/Utility] Rewrite Scalar::SetValueFromCString

The function's reliance on host types meant that it was needlessly
complicated, and did not handle the newer (wider) types. Rewrite it in
terms of APInt/APFloat functions to save code and improve functionality.

4 years ago[ms] [llvm-ml] Add support for MASM STRUCT casting field accessors: (<TYPE> PTR ...
Eric Astor [Mon, 13 Jul 2020 14:38:39 +0000 (10:38 -0400)]
[ms] [llvm-ml] Add support for MASM STRUCT casting field accessors: (<TYPE> PTR <value>).<field>

Summary:
Add support for MASM STRUCT casting field accessors: (<TYPE> PTR <value>).<field>

Since these are operands, we add them to X86AsmParser. If/when we extend MASM support to other architectures (e.g., ARM), we will need similar changes there as well.

Reviewed By: thakis

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

4 years ago[compiler-rt][CMake] Pass down LLVM_LIT_ARGS in runtime build
Jinsong Ji [Mon, 13 Jul 2020 02:54:20 +0000 (02:54 +0000)]
[compiler-rt][CMake] Pass down LLVM_LIT_ARGS in runtime build

We should also pass down the LLVM_LIT_ARGS in runtime build mode,
so that the runtime tests can be well controlled as well.

We actually passed this down in clang/runtime/CMakeLists.txt
But not for calls from llvm/runtime/CMakeLists.txt.

Reviewed By: phosek

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

4 years ago[ms] [llvm-ml] Fix MASM support for nested unnamed STRUCTs and UNIONs
Eric Astor [Mon, 13 Jul 2020 14:36:30 +0000 (10:36 -0400)]
[ms] [llvm-ml] Fix MASM support for nested unnamed STRUCTs and UNIONs

Summary: Fix MASM support for nested unnamed STRUCTs and UNIONs

Reviewed By: thakis

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

4 years ago[ms] [llvm-ml] Improve MASM STRUCT field accessor support
Eric Astor [Mon, 13 Jul 2020 14:33:15 +0000 (10:33 -0400)]
[ms] [llvm-ml] Improve MASM STRUCT field accessor support

Summary:
Adds support for several accessors:
- `[<identifier>.<struct name>].<field>`
- `[<identifier>.<struct name>.<field>].<subfield>` (where `field` has already-defined STRUCT type)
- `[<variable>.<field>].<subfield>` (where `field` has already-defined STRUCT type)

Reviewed By: thakis

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

4 years ago[lldb/dotest] Remove the "xunit" result formatter
Pavel Labath [Fri, 10 Jul 2020 11:18:00 +0000 (13:18 +0200)]
[lldb/dotest] Remove the "xunit" result formatter

Summary:
My understanding is that this was added to make dotest interact well
with the GreenDragon bots, back when dotest was the main test driver.
Now that everything goes through lit (which has its own xunit
formatter), it seems largely irrelevant.

There are more cleanups that can be done after removing this be done
here, but this should be enough to test the waters.

Reviewers: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

4 years ago[NFC] rename to reflect F is not necessarily an Intrinsic
Sanne Wouda [Fri, 3 Jul 2020 11:37:21 +0000 (12:37 +0100)]
[NFC] rename to reflect F is not necessarily an Intrinsic

4 years ago[SLPVectorizer] handle vectorizeable library functions
Sanne Wouda [Fri, 10 Jul 2020 11:37:26 +0000 (12:37 +0100)]
[SLPVectorizer] handle vectorizeable library functions

Teaches the SLPVectorizer to use vectorized library functions for
non-intrinsic calls.

This already worked for intrinsics that have vectorized library
functions, thanks to D75878, but schedules with library functions with a
vector variant were being rejected early.

-   assume that there are no load/store dependencies between lib
    functions with a vector variant; this would otherwise prevent the
    bundle from becoming "ready"

-   check during legalization that the vector variant can be used

-   fix-up where we previously assumed that a call would be an intrinsic

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

4 years agoPre-commit tests
Sanne Wouda [Thu, 25 Jun 2020 15:02:52 +0000 (16:02 +0100)]
Pre-commit tests

Prepare to land D82550

4 years agoFix crash when getVFABIMappings is called with an indirect call instruction
Sanne Wouda [Thu, 25 Jun 2020 15:08:13 +0000 (16:08 +0100)]
Fix crash when getVFABIMappings is called with an indirect call instruction

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

4 years ago[yaml2obj] - Refactor header-sh-fields.yaml test.
Georgii Rymar [Thu, 9 Jul 2020 13:03:40 +0000 (16:03 +0300)]
[yaml2obj] - Refactor header-sh-fields.yaml test.

This refines the test to use macros. It is needed for
a follow-up change that adds a functionality to
override more fields.

Also, it is just cleaner to test each key separately.

Differential revision: https://reviews.llvm.org/D83481

4 years ago[lldb][NFC] Refactor instruction dumping out of DumpDataExtractor
Raphael Isemann [Mon, 13 Jul 2020 11:36:25 +0000 (13:36 +0200)]
[lldb][NFC] Refactor instruction dumping out of DumpDataExtractor

4 years ago[clangd] Fix DocumentSymbol ranges
Kirill Bobyrev [Mon, 13 Jul 2020 13:02:47 +0000 (15:02 +0200)]
[clangd] Fix DocumentSymbol ranges

Summary:
DocumentSymbol ranges were not previously tested and, as a result, had invalid
end location. This patch addresses the issue.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[DAGCombiner] allow load/store merging if pairs can be rotated into place
Sanjay Patel [Mon, 13 Jul 2020 12:57:00 +0000 (08:57 -0400)]
[DAGCombiner] allow load/store merging if pairs can be rotated into place

This carves out an exception for a pair of consecutive loads that are
reversed from the consecutive order of a pair of stores. All of the
existing profitability/legality checks for the memops remain between
the 2 altered hunks of code.

This should give us the same x86 base-case asm that gcc gets in
PR41098 and PR44895:
http://bugs.llvm.org/PR41098
http://bugs.llvm.org/PR44895

I think we are missing a potential subsequent conversion to use "movbe"
if the target supports that. That might be similar to what AArch64
would use to get "rev16".

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

4 years agoRevert "[DAGCombiner] allow load/store merging if pairs can be rotated into place"
Sanjay Patel [Mon, 13 Jul 2020 12:55:29 +0000 (08:55 -0400)]
Revert "[DAGCombiner] allow load/store merging if pairs can be rotated into place"

This reverts commit 591a3af5c7acc05617c0eacf6ae4f76bd8a9a6ce.
The commit message was cut off and failed to include the review citation.

4 years ago[DAGCombiner] allow load/store merging if pairs can be rotated into place
Sanjay Patel [Mon, 13 Jul 2020 12:51:09 +0000 (08:51 -0400)]
[DAGCombiner] allow load/store merging if pairs can be rotated into place

This carves out an exception for a pair of consecutive loads that are
reversed from the consecutive order of a pair of stores. All of the
existing profitability/legality checks for the memops remain between
the 2 altered hunks of code.

This should give us the same x86 base-case asm that gcc gets in
PR41098 and PR44895:i
http://bugs.llvm.org/PR41098
http://bugs.llvm.org/PR44895

I think we are missing a potential subsequent conversion to use "movbe"
if the target supports that. That might be similar to what AArch64
would use to get "rev16".

Differential Revision:

4 years ago[ARM][MVE] Refactor option -disable-mve-tail-predication
Sjoerd Meijer [Mon, 13 Jul 2020 10:53:09 +0000 (11:53 +0100)]
[ARM][MVE] Refactor option -disable-mve-tail-predication

This refactors option -disable-mve-tail-predication to take different arguments
so that we have 1 option to control tail-predication rather than several
different ones.

This is also a prep step for D82953, in which we want to reject reductions
unless that is requested with this option.

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

4 years ago[analyzer] ctu-on-demand-parsing tests: replace linux -> system-linux
Balazs Benics [Mon, 13 Jul 2020 12:29:47 +0000 (14:29 +0200)]
[analyzer] ctu-on-demand-parsing tests: replace linux -> system-linux

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

4 years ago[LLD][ELF] - Fix the test after llvm-readelf output change.
Georgii Rymar [Mon, 13 Jul 2020 12:14:06 +0000 (15:14 +0300)]
[LLD][ELF] - Fix the test after llvm-readelf output change.

An issue for llvm-readelf was fixed in
https://reviews.llvm.org/rG84a170178c4431b7536c83ff0e5ce80774d08df6

Now it produce no output for this test.

4 years ago[COFF] Error on unexpected .pdata size
Hans Wennborg [Thu, 9 Jul 2020 12:54:53 +0000 (14:54 +0200)]
[COFF] Error on unexpected .pdata size

Previously, lld would crash if the .pdata size was not an even multiple
of the expected .pdata entry size. This makes it error gracefully instead.

(We hit this in Chromium due to an assembler problem: https://crbug.com/1101577)

Differential revision: https://reviews.llvm.org/D83479

4 years ago[AMDGPU][GlobalISel] Fix subregister index for EXEC register in selectBallot.
Mirko Brkusanin [Mon, 13 Jul 2020 11:35:34 +0000 (13:35 +0200)]
[AMDGPU][GlobalISel] Fix subregister index for EXEC register in selectBallot.

Temporarily remove subregister for EXEC in selectBallot added in
https://reviews.llvm.org/D83214 to fix failures on expensive checks buildbot.

4 years ago[llvm-readobj] - Add a generic test for --dyn-relocations and fix an issue.
Georgii Rymar [Wed, 8 Jul 2020 11:54:45 +0000 (14:54 +0300)]
[llvm-readobj] - Add a generic test for --dyn-relocations and fix an issue.

We have an issue currently: --dyn-relocations always prints the following
relocation header when dumping `DynPLTRelRegion`:

"Offset  Info  Type Symbol's Value  Symbol's Name + Addend"

I.e. even for an empty object, --dyn-relocations still prints this.
It is a easy to fix bug, but we have no dedicated test case for this option.
(we have a dynamic-reloc-no-section-headers.test, which has a slightly different purpose).

This patch adds a test and fixes the behavior.

Differential revision: https://reviews.llvm.org/D83387

4 years ago[lldb][NFC] Early-exit in DWARFASTParserClang::ParseSingleMember
Raphael Isemann [Mon, 13 Jul 2020 11:14:55 +0000 (13:14 +0200)]
[lldb][NFC] Early-exit in DWARFASTParserClang::ParseSingleMember

This patch just early-exits after the 'if (num_attributes > 0)' check.

4 years ago[SVE] Ensure fixed length vector fptrunc operations bigger than NEON are not consider...
Paul Walker [Mon, 13 Jul 2020 11:16:30 +0000 (11:16 +0000)]
[SVE] Ensure fixed length vector fptrunc operations bigger than NEON are not considered legal.

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

4 years ago[lldb][NFC] Remove misleading class_language variable in DWARFASTParserClang
Raphael Isemann [Mon, 13 Jul 2020 10:22:09 +0000 (12:22 +0200)]
[lldb][NFC] Remove misleading class_language variable in DWARFASTParserClang

There is a local 'class_language' veriable in DWARFASTParserClang which is named
as if it is related to the 'class_language' member of ParsedDWARFTypeAttributes.
However, it actually only has two possible enum values: 'ObjC' (which means the
current record is a Objective-C class) or 'Unknown' (which covers all other
cases).

This is confusing for the reader and also lead to some strange code where we
have several comparisons against the value "ObjC_plus_plus" (which is always
false).

This replaces the variable with either a const bool variable (if there are
multiple checks for that condition in a function) or a direct call to the
TypeSystemClang utility method for checking if it's a Objective-C
Object/Interface type.

4 years ago[libc][benchmark] Add display option to render.py3
Andre Vieira [Mon, 13 Jul 2020 10:52:58 +0000 (11:52 +0100)]
[libc][benchmark] Add display option to render.py3

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

4 years ago[LLD][ELF][Windows] small improvement to D82567
Ben Dunbobbin [Mon, 13 Jul 2020 10:58:30 +0000 (11:58 +0100)]
[LLD][ELF][Windows] small improvement to D82567

Bail early if there is no existing output file to be overwritten.

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

4 years ago[LLD][ELF] - Allow relocation sections to appear before their target sections.
Georgii Rymar [Thu, 9 Jul 2020 10:08:13 +0000 (13:08 +0300)]
[LLD][ELF] -  Allow relocation sections to appear before their target sections.

It allows handling cases when we have SHT_REL[A] sections before target
sections in objects.

This fixes https://bugs.llvm.org/show_bug.cgi?id=46632

which says: "Normally it is not what compilers would emit. We have to support it,
because some custom tools might want to use this feature, which is not restricted by ELF gABI"

Differential revision: https://reviews.llvm.org/D83469

4 years ago[OpenCL] Defer addr space deduction for dependent type.
Anastasia Stulova [Mon, 13 Jul 2020 10:30:13 +0000 (11:30 +0100)]
[OpenCL] Defer addr space deduction for dependent type.

This patch removes deduction of address spaces in parsing
for types that depend on template parameter even if an
address space is already known. Deducing it early interferes
with template instantiation/specialization logic that uses
source address space where address space is not present.

Address space deduction for templates is therefore fully
moved to the template instantiation/specialization phase.

Patch by Ole Strohm (olestrohm)!

Tags: #clang

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

4 years ago[mlir][VectorOps] Lower vector.fma to llvm.fmuladd instead of llvm.fma
Benjamin Kramer [Mon, 13 Jul 2020 10:23:53 +0000 (12:23 +0200)]
[mlir][VectorOps] Lower vector.fma to llvm.fmuladd instead of llvm.fma

Summary:
These are semantically equivalent, but fmuladd allows decaying the op
into fmul+fadd if there is no fma instruction available. llvm.fma lowers
to scalar calls to libm fmaf, which is a lot slower.

Reviewers: nicolasvasilache, aartbik, ftynse

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[AMDGPU][GlobalISel] Select llvm.amdgcn.ballot
Mirko Brkusanin [Mon, 13 Jul 2020 09:44:18 +0000 (11:44 +0200)]
[AMDGPU][GlobalISel] Select llvm.amdgcn.ballot

Select ballot intrinsic for GlobalISel.

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

4 years ago[clang] Include type specifiers in typo correction when checking isCXXDeclarationSpec...
Haojian Wu [Mon, 13 Jul 2020 10:05:09 +0000 (12:05 +0200)]
[clang] Include type specifiers in typo correction when checking isCXXDeclarationSpecifiers.

- add more tests (the test added in https://github.com/llvm/llvm-project/commit/2f448467e4254ddc3191136c968e6054bc009b88 is weak);
- improve the `MyTemplate<type_typo, int>();` case, with this patch, typo correction
  suggests the type decl, and no regressions found.

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

4 years ago[SVE][Codegen] Add a helper function for pointer increment logic
Kerry McLaughlin [Mon, 13 Jul 2020 09:08:40 +0000 (10:08 +0100)]
[SVE][Codegen] Add a helper function for pointer increment logic

Summary:
Helper used when splitting load & store operations to calculate
the pointer + offset for the high half of the split

Reviewers: efriedma, sdesmalen, david-arm

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, psnobl, llvm-commits

Tags: #llvm

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

4 years ago[clang][RecoveryExpr] Clarify the dependence-bits documentation.
Haojian Wu [Thu, 9 Jul 2020 10:55:46 +0000 (12:55 +0200)]
[clang][RecoveryExpr] Clarify the dependence-bits documentation.

The expr dependent-bits described that the expression somehow
depends on a template paramter.

With RecoveryExpr, we have generalized it to "the expression depends on
a template parameter, or an error".  This patch updates/cleanups all related
comments of dependence-bits.

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

4 years ago[clangd] Add metrics for recovery-expr type propagation.
Haojian Wu [Mon, 13 Jul 2020 09:26:45 +0000 (11:26 +0200)]
[clangd] Add metrics for recovery-expr type propagation.

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

4 years agoFix bad doxygen result for class clang::ento::CallEvent and its derived classes
Ella Ma [Mon, 13 Jul 2020 09:22:16 +0000 (12:22 +0300)]
Fix bad doxygen result for class clang::ento::CallEvent and its derived classes

Summary: Fix bug https://bugs.llvm.org/show_bug.cgi?id=44753. This
patch is a workaround of a Doxygen bug, so that it can correctly
generate documents for class clang::ento::CallEvent and its derived
classes.

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

4 years ago[GlobalISel][InlineAsm] Fix buildCopy for inputs
Petar Avramovic [Mon, 13 Jul 2020 08:52:33 +0000 (10:52 +0200)]
[GlobalISel][InlineAsm] Fix buildCopy for inputs

Check that input size matches size of destination reg class.
Attempt to extend input size when needed.

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

4 years ago[MLIR][Shape] Lower `shape.any`
Frederik Gossen [Mon, 13 Jul 2020 08:28:13 +0000 (08:28 +0000)]
[MLIR][Shape] Lower `shape.any`

Lower `shape.any` to its first operand.

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

4 years ago[clangd] Fix tests build for GCC5
Aleksandr Platonov [Mon, 13 Jul 2020 07:04:29 +0000 (09:04 +0200)]
[clangd] Fix tests build for GCC5

Summary:
Build log:
```
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::PreamblePatchTest_Define_Test::TestBody()’:
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"\012        #define BAR\012        [[BAR]]"’ from ‘const char*’ to ‘llvm::StringLitera ’
   };
   ^
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"#line 0 \".*main.cpp\"\012#line 2\012#define         BAR\012"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"\012        #define BAR \\\012\012        [[BAR]]"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"#line 0 \".*main.cpp\"\012#line 2\012#define         BAR\012"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"\012        #define \\\012                BAR\012        [[BAR]]"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:267:3: error: could not convert ‘(const char*)"#line 0 \".*main.cpp\"\012#line 3\012#define         BAR\012"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::PreamblePatchTest_LocateMacroAtWorks_Test::TestBody()’:
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
   };
   ^
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #define $def^FOO\012            $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #define $def^FOO\012            #undef $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #define $def^FOO\012            #undef FOO\012            $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #define \\\012              $def^FOO\012            $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #\\\012              define /* FOO */\\\012              /* FOO */ $def^FOO\012            $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"#define FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:357:3: error: could not convert ‘(const char*)"\012            #define BAR\012            #define $def^FOO\012            $use^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::PreamblePatchTest_RefsToMacros_Test::TestBody()’:
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
   };
   ^
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)"\012            #define ^FOO\012            ^[[FOO]]"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)"#define FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)"\012            #define BAR\012            #define ^FOO\012            ^[[FOO]]"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:445:3: error: could not convert ‘(const char*)"\012            #define ^FOO\012            #undef ^FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp: In member function ‘virtual void clang::clangd::{anonymous}::PreamblePatch_ModifiedBounds_Test::TestBody()’:
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)""’ from ‘const char*’ to ‘llvm::StringLiteral’
   };
   ^
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)"\012            #define FOO\012            FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)"#define FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)"#define BAR"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)"\012            #define FOO\012            #undef FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
llvm-project/clang-tools-extra/clangd/unittests/PreambleTests.cpp:512:3: error: could not convert ‘(const char*)"#define FOO"’ from ‘const char*’ to ‘llvm::StringLiteral’
```

Patch by @ArcsinX !

Reviewers: kadircet, sammccall

Reviewed By: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[InstCombine] Improve select -> phi canonicalization: consider more blocks
Max Kazantsev [Mon, 13 Jul 2020 04:14:59 +0000 (11:14 +0700)]
[InstCombine] Improve select -> phi canonicalization: consider more blocks

We can try to replace select with a Phi not in its parent block alone,
but also in blocks of its arguments. We benefit from it when select's
argument is a Phi.

Differential Revision: https://reviews.llvm.org/D83284
Reviewed By: nikic

4 years ago[PowerPC] Enhance tests for D83276. NFC.
Kai Luo [Mon, 13 Jul 2020 04:31:04 +0000 (04:31 +0000)]
[PowerPC] Enhance tests for D83276. NFC.

4 years ago[PowerPC] Support constrained conversion in SPE target
Qiu Chaofan [Mon, 13 Jul 2020 04:15:44 +0000 (12:15 +0800)]
[PowerPC] Support constrained conversion in SPE target

This patch adds support for constrained int/fp conversion between
signed/unsigned i32 and f32/f64.

Reviewed By: jhibbits

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

4 years ago[MC][RISCV] Set UseIntegratedAssembler to true
Fangrui Song [Mon, 13 Jul 2020 04:04:31 +0000 (21:04 -0700)]
[MC][RISCV] Set UseIntegratedAssembler to true

to align with most other targets. Also, -fintegrated-as is the default
for clang -target riscv*.

4 years ago[OpenMP] Add firstprivate as a default data-sharing attribute to clang
Atmn Patel [Mon, 13 Jul 2020 03:19:40 +0000 (22:19 -0500)]
[OpenMP] Add firstprivate as a default data-sharing attribute to clang

This implements the default(firstprivate) clause as defined in OpenMP
Technical Report 8 (2.22.4).

Reviewed By: jdoerfert, ABataev

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

4 years agoRevert "Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression"
David Blaikie [Mon, 13 Jul 2020 03:29:19 +0000 (20:29 -0700)]
Revert "Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression"

Broke buildbots since I hadn't updated this patch in a while. Sorry for
the noise.

This reverts commit 49e5f603d40083dce9c05796e3cde3a185c3beba.

4 years agoRename/refactor isIntegerConstantExpression to getIntegerConstantExpression
David Blaikie [Mon, 23 Mar 2020 22:07:51 +0000 (15:07 -0700)]
Rename/refactor isIntegerConstantExpression to getIntegerConstantExpression

There is a version that just tests (also called
isIntegerConstantExpression) & whereas this version is specifically used
when the value is of interest (a few call sites were actually refactored
to calling the test-only version) so let's make the API look more like
it.

Reviewers: aaron.ballman

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

4 years ago[X86] Rename X86_CPU_TYPE_COMPAT_ALIAS/X86_CPU_TYPE_COMPAT/X86_CPU_SUBTYPE_COMPAT...
Craig Topper [Sun, 12 Jul 2020 23:58:27 +0000 (16:58 -0700)]
[X86] Rename X86_CPU_TYPE_COMPAT_ALIAS/X86_CPU_TYPE_COMPAT/X86_CPU_SUBTYPE_COMPAT macros. NFC

Remove _COMPAT. Drop the ARCHNAME. Remove the non-COMPAT versions
that are no longer needed.

We now only use these macros in places where we need compatibility
with libgcc/compiler-rt. So we don't need to call out _COMPAT
specifically.

4 years ago[clang] Add -Wsuggest-override
Logan Smith [Sun, 12 Jul 2020 22:38:37 +0000 (15:38 -0700)]
[clang] Add -Wsuggest-override

This patch adds `-Wsuggest-override`, which allows for more aggressive enforcement of modern C++ best practices, as well as better compatibility with gcc, which has had its own `-Wsuggest-override` since version 5.1.

Clang already has `-Winconsistent-missing-override`, which only warns in the case where there is at least one function already marked `override` in a class. This warning strengthens that warning by suggesting the `override` keyword regardless of whether it is already present anywhere.

The text between suggest-override and inconsistent-missing-override is now shared, using `TextSubstitution` for the entire diagnostic text.

Reviewed By: dblaikie

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

4 years ago[Attributor] Add AAValueSimplifyCallSiteArgument::manifest
Shinji Okumura [Sun, 12 Jul 2020 10:11:49 +0000 (19:11 +0900)]
[Attributor] Add AAValueSimplifyCallSiteArgument::manifest

Reviewed By: jdoerfert

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

4 years agoBump the default target CPU for i386-freebsd to i686
Dimitry Andric [Sun, 12 Jul 2020 18:32:26 +0000 (20:32 +0200)]
Bump the default target CPU for i386-freebsd to i686

Summary:
Similar to what we have done downstream, some time ago:
https://svnweb.freebsd.org/changeset/base/353936

This followed some discussions on the freebsd-arch mailing lists, and
most people agreed that it was a better default, and also it worked
around several issues where clang generated libcalls to 64 bit atomic
primitives, instead of using cmpxchg8b.

Reviewers: emaste, brooks, rsmith

Reviewed By: emaste

Subscribers: arichardson, krytarowski, jfb, cfe-commits

Tags: #clang

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