Alex Zinenko [Fri, 26 Jun 2020 13:27:46 +0000 (15:27 +0200)]
[mlir] Modernize LLVM dialect rountrip test
This test largely predates MLIR testing guidelines. Update it to match the
guidelines. In particular, avoid pattern-matching SSA value names, avoid
unnecessary CHECK-NEXT, relax assumptions about the form of SSA names.
Value-returning operations are still matched agaist _any_ name in order to
check that the operation indeed produces values.
Differential Revision: https://reviews.llvm.org/D82656
Kadir Cetinkaya [Sat, 27 Jun 2020 09:12:51 +0000 (11:12 +0200)]
[clangd][Hover] Dont crash on null types
Reviewers: hokein, sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82701
Nico Weber [Mon, 29 Jun 2020 01:49:07 +0000 (21:49 -0400)]
Revert "[clang-tidy] Reworked enum options handling(again)"
This reverts commit
b9306fd042ce1c11d84f05d2124dfdc65b8331fe
and follow-up
42a51587c79a673045aec3586f4070630e5e7af3.
It seems to build check-clang-tools on macOS, see comments on
https://reviews.llvm.org/D82188
Fady Ghanim [Thu, 4 Jun 2020 19:55:17 +0000 (15:55 -0400)]
[Clang][OpenMP][OMPBuilder] Moving OMP allocation and cache creation code to OMPBuilderCBHelpers
Summary:
Modified the OMPBuilderCBHelpers in the following ways:
- Moved location of class definition and deleted all constructors
- Moved OpenMP-specific address allocation of local variables
- Moved threadprivate variable creation for the current thread
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79676
Sergey Dmitriev [Sun, 28 Jun 2020 22:24:33 +0000 (15:24 -0700)]
[NFC] CallGraph related cleanup
Summary: Tidy up some CallGraph-related code in preparation for D82572.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82686
Nikita Popov [Sun, 28 Jun 2020 16:35:13 +0000 (18:35 +0200)]
[SimplifyCFG] Make test more robust (NFC)
Avoid changing this test if blocks get merged.
Nikita Popov [Sun, 28 Jun 2020 18:50:02 +0000 (20:50 +0200)]
[SimplifyCFG] Regenerate test checks (NFC)
Craig Topper [Sun, 28 Jun 2020 18:06:40 +0000 (11:06 -0700)]
[X86] Explicitly add popcnt feature to Intel CPUs with SSE4.2 in the frontend.
Previously we inferred it if sse4.2 ended up being enabled after
all feature processing. But writing -march=nehalem -mno-sse4.2
should have popcnt enabled.
cgyurgyik [Sun, 28 Jun 2020 17:33:56 +0000 (12:33 -0500)]
[libc] This commit fixes the strcmp fuzzing test. It uses a single input and
splits it into two by using the value of the first byte to determine the
length of the first string. Reviewed-by: PaulkaToast, Differential
Revision: https://reviews.llvm.org/D82427
Summary:
[libc] Since only one input is given, it is necessary to split the string into two containers so that they can be compared for the purposes of this fuzz test. This is done in the following manner:
1. Take the value of the first byte; this is size1. (Credits to @PaulkaToast for this idea).
2. size2 is the value of size - size1.
3. Copy the characters to new containers, data1 and data2 with corresponding sizes.
4. Add a null terminator to the first container, and verify the second container has a null terminator.
5. Verify output of strcmp.
A simpler alternative considered was simply splitting the input data into two, but this means the two strings are always within +- 1 character of each other. This above implementation avoids this.
ninja check-libc was run; no issues.
Reviewers: PaulkaToast, sivachandra
Reviewed By: PaulkaToast
Subscribers: mgorny, tschuett, ecnelises, libc-commits, PaulkaToast
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D82427
Roman Lebedev [Sun, 28 Jun 2020 17:31:14 +0000 (20:31 +0300)]
[NFC][ScalarEvolution] Add a test showing SCEV failure to recognize 'urem'
While InstCombine trivially converts that `srem` into a `urem`,
it might happen later than wanted. SCEV should recognize this natively.
Xun Li [Sun, 21 Jun 2020 03:29:10 +0000 (20:29 -0700)]
[Coroutines] Optimize the lifespan of temporary co_await object
Summary:
If we ever assign co_await to a temporary variable, such as foo(co_await expr),
we generate AST that looks like this: MaterializedTemporaryExpr(CoawaitExpr(...)).
MaterializedTemporaryExpr would emit an intrinsics that marks the lifetime start of the
temporary storage. However such temporary storage will not be used until co_await is ready
to write the result. Marking the lifetime start way too early causes extra storage to be
put in the coroutine frame instead of the stack.
As you can see from https://godbolt.org/z/zVx_eB, the frame generated for get_big_object2 is 12K, which contains a big_object object unnecessarily.
After this patch, the frame size for get_big_object2 is now only 8K. There are still room for improvements, in particular, GCC has a 4K frame for this function. But that's a separate problem and not addressed in this patch.
The basic idea of this patch is during CoroSplit, look for every local variable in the coroutine created through AllocaInst, identify all the lifetime start/end markers and the use of the variables, and sink the lifetime.start maker to the places as close to the first-ever use as possible.
Reviewers: lewissbaker, modocache, junparser
Reviewed By: junparser
Subscribers: hiraditya, llvm-commits, rsmith, ChuanqiXu, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82314
Sanjay Patel [Sun, 28 Jun 2020 16:44:44 +0000 (12:44 -0400)]
[VectorCombine] add test for scalable vectors; NFC
Sanjay Patel [Sun, 28 Jun 2020 16:43:11 +0000 (12:43 -0400)]
Revert "[VectorCombine] add test for scalable vectors; NFC"
This reverts commit
700ec6b848c02ca3de9751d63a7a5a26671c3fe9.
An extra test diff snuck here.
Sanjay Patel [Sun, 28 Jun 2020 16:41:37 +0000 (12:41 -0400)]
[VectorCombine] add test for scalable vectors; NFC
Sanjay Patel [Fri, 26 Jun 2020 21:14:43 +0000 (17:14 -0400)]
[x86] add tests for rsqrt opportunities; NFC
Esme-Yi [Sun, 28 Jun 2020 16:26:05 +0000 (16:26 +0000)]
[NFC][PowerPC] Add run lines to test DivRemPairsPass.
Nikita Popov [Sun, 28 Jun 2020 14:16:35 +0000 (16:16 +0200)]
[InstCombine] Add tests for assume implication (NFC)
Nathan James [Sun, 28 Jun 2020 14:18:08 +0000 (15:18 +0100)]
[clang-tidy] Update lang restrictions on perf module
Nikita Popov [Sun, 28 Jun 2020 13:04:02 +0000 (15:04 +0200)]
[LVI] Refactor value from icmp cond handling (NFC)
Rewrite this in a way that is more amenable to extension.
Nikita Popov [Sun, 28 Jun 2020 12:54:30 +0000 (14:54 +0200)]
[CVP] Add tests for icmp or and/or edge conds (NFC)
Simon Pilgrim [Sun, 28 Jun 2020 12:00:15 +0000 (13:00 +0100)]
[X86] combineScalarToVector - handle (v2i64 scalar_to_vector(aextload)) as well as (v2i64 scalar_to_vector(aext))
We already fold (v2i64 scalar_to_vector(aext)) -> (v2i64 bitcast(v4i32 scalar_to_vector(x))), this adds support for similar aextload cases and also handles v2f64 cases that wrap the i64 extension behind bitcasts.
Fixes the remaining issue with PR39016
madhur13490 [Sun, 28 Jun 2020 11:52:33 +0000 (11:52 +0000)]
Revert accidentally landed patch citing o build errors
Summary: This reverts commit
c73966c2f79290e4eefe6e481f7bc94dd6ca4437.
Reviewers:
Subscribers:
madhur13490 [Sat, 27 Jun 2020 18:36:25 +0000 (18:36 +0000)]
Improve stack object printing. NFC.
Reviewers: madhur13490
Reviewed By: madhur13490
Subscribers: qcolombet, arsenm, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82712
dfukalov [Fri, 12 Jun 2020 10:49:18 +0000 (13:49 +0300)]
SpeculativeExecution: fix incorrect debug info move
Summary:
Debug info related instructions got zero cost so hoisted unconditionally
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=46267
Reviewers: arsenm, nhaehnle, chandlerc, aprantl
Reviewed By: aprantl
Subscribers: ormris, uabelho, wdng, aprantl, hiraditya, llvm-commits
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D81730
Simon Pilgrim [Sun, 28 Jun 2020 11:11:38 +0000 (12:11 +0100)]
[X86] Rename dagcombine-cse.ll i386 test prefix X86 instead of X32.
Nathan James [Sun, 28 Jun 2020 10:02:19 +0000 (11:02 +0100)]
Fix build errors after
b9306fd0
Nathan James [Sun, 28 Jun 2020 09:18:32 +0000 (10:18 +0100)]
[clang-tidy] Reworked enum options handling(again)
Following on from D77085, I was never happy with the passing a mapping to the option get/store functions. This patch addresses this by using explicit specializations to handle the serializing and deserializing of enum options.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82188
Nathan James [Sun, 28 Jun 2020 08:49:39 +0000 (09:49 +0100)]
[clang][docs] Remove untracked files from formatted status
Currently on http://clang.llvm.org/docs/ClangFormattedStatus.html there are format stats on files no actually inside the tree but generated by build scripts. These are usually copied from somewhere else. Right now for example there are files from `llvm/utils/release/llvm-package...`. Adding these files bloats the list while not giving an accurate representation of how formatted the repo is.
This addresses this issue by checking the git index and ignoring any folder that doesn't contain tracked files.
I'm still unsure whether it would be better to just do away with the `os.walk` method and just check over every file returned from `git ls-index <project-root>`.
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D82707
Chen Zheng [Sun, 28 Jun 2020 07:16:57 +0000 (03:16 -0400)]
[MachineLICM] testcase for hoisting rematerializable instruction, nfc
Brad Smith [Sun, 28 Jun 2020 01:14:44 +0000 (21:14 -0400)]
Add OpenBSD support to be able to retrieve the thread id
Mike Edwards [Sat, 27 Jun 2020 21:57:04 +0000 (14:57 -0700)]
[LIT] Correcting max-failures option in lit documentation.
Benjamin Kramer [Sat, 27 Jun 2020 21:24:28 +0000 (23:24 +0200)]
[RISCV] Silence unused variable warning in Release builds. NFC.
Nikita Popov [Sat, 27 Jun 2020 20:42:43 +0000 (22:42 +0200)]
[ValueTracking] Use a switch statement (NFC)
Simon Pilgrim [Sat, 27 Jun 2020 18:10:13 +0000 (19:10 +0100)]
[X86] SimplifyDemandedVectorEltsForTargetNode - merge shuffle/pack lower demanded elements handling.
Generalize the vector operand extraction code for shuffle/pack ops - we can assume that the vector operands are the same width as the result, and any non-vector values can be reused directly in the smaller width op.
Hsiangkai Wang [Thu, 4 Jun 2020 19:11:52 +0000 (03:11 +0800)]
[RISCV] Support experimental v extensions.
This follows the design as discussed on the mailing lists in the
following RFC:
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138364.html
Support for the vector 'v' extension v0.8.
Differential revision: https://reviews.llvm.org/D81188
Hsiangkai Wang [Thu, 24 Oct 2019 04:29:28 +0000 (12:29 +0800)]
[RISCV] Assemble/Disassemble v-ext instructions.
Assemble/disassemble RISC-V V extension instructions according to
latest version spec in https://github.com/riscv/riscv-v-spec/.
I have tested this patch using GNU toolchain. The encoding is aligned
to GNU assembler output. In this patch, there is a test case for each
instruction at least.
The V register definition is just for assemble/disassemble. Its type
is not important in this stage. I think it will be reviewed and modified
as we want to do codegen for scalable vector types.
This patch does not include Zvamo, Zvlsseg, and Zvediv.
Differential revision: https://reviews.llvm.org/D69987
Roman Lebedev [Sat, 27 Jun 2020 14:14:15 +0000 (17:14 +0300)]
[Analysis] isDereferenceableAndAlignedPointer(): don't crash on `bitcast <1 x ???*> to ???*`
Simon Pilgrim [Sat, 27 Jun 2020 14:56:01 +0000 (15:56 +0100)]
Update polly tests to use -disable-basicaa to -disable-basic-aa
These were missed in rG4cd19a6e15120cb
Simon Pilgrim [Sat, 27 Jun 2020 14:06:49 +0000 (15:06 +0100)]
[X86][AVX] SimplifyDemandedVectorEltsForTargetNode - reduce width of X86ISD::VPERMIL2
If we don't need the elements of the upper lanes, reduce the width of the X86ISD::VPERMIL2 node.
Simon Pilgrim [Sat, 27 Jun 2020 13:43:03 +0000 (14:43 +0100)]
[X86][AVX] SimplifyDemandedVectorEltsForTargetNode - reduce width of X86ISD::VPERMILPV
If we don't need the elements of the upper lanes, reduce the width of the X86ISD::VPERMILPV node.
mydeveloperday [Sat, 27 Jun 2020 11:16:05 +0000 (12:16 +0100)]
[clang-format] NFC 1% improvement in the overall clang-formatted status
lh123 [Sat, 27 Jun 2020 10:58:03 +0000 (18:58 +0800)]
Revert "[Docs] Fix typo and test git commit access. NFC."
This reverts commit
c19e82c6b38b74c56d595cb69582b7c3727762b5.
Simon Pilgrim [Sat, 27 Jun 2020 10:27:16 +0000 (11:27 +0100)]
ThreadPool.h - remove unused BitVector.h include. NFC.
mydeveloperday [Sat, 27 Jun 2020 10:35:22 +0000 (11:35 +0100)]
[clang-format] [PR462254] fix indentation of default and break correctly in whitesmiths style
Summary:
https://bugs.llvm.org/show_bug.cgi?id=46254
Reviewed By: curdeius, jbcoe
Differential Revision: https://reviews.llvm.org/D8201
Simon Pilgrim [Sat, 27 Jun 2020 10:16:25 +0000 (11:16 +0100)]
FileCollector.h - reduce Twine.h include to forward declaration. NFC.
Simon Pilgrim [Sat, 27 Jun 2020 10:03:57 +0000 (11:03 +0100)]
[DAG] reduceBuildVecExtToExtBuildVec - don't combine if it would break a splat.
reduceBuildVecExtToExtBuildVec was breaking a splat(zext(x)) pattern into buildvector(x, 0, x, 0, ..) resulting in much more complex insert+shuffle codegen.
We already go to some lengths to avoid this in SimplifyDemandedVectorElts etc. when we encounter splat buildvectors.
It should be OK to fold all splat(aext(x)) patterns - we might need to tighten this if we find a case where we mustn't introduce a buildvector(x, undef, x, undef, ..) but I can't find one.
Fixes PR46461.
Simon Pilgrim [Sat, 27 Jun 2020 09:42:44 +0000 (10:42 +0100)]
[X86] Add PR46461 test case
Simon Pilgrim [Sat, 27 Jun 2020 09:36:37 +0000 (10:36 +0100)]
[X86] Add AVX tests buildvec-insertvec.ll
Simon Pilgrim [Sat, 27 Jun 2020 09:30:05 +0000 (10:30 +0100)]
Fix unused type alias warning. NFC.
The "using InsertPointTy" line is an unnecessary copy + paste from other builder tests.
David Zarzycki [Tue, 23 Jun 2020 09:43:51 +0000 (05:43 -0400)]
Reland: [clang driver] Move default module cache from system temporary directory
This fixes a unit test. Otherwise here is the original commit:
1) Shared writable directories like /tmp are a security problem.
2) Systems provide dedicated cache directories these days anyway.
3) This also refines LLVM's cache_directory() on Darwin platforms to use
the Darwin per-user cache directory.
Reviewers: compnerd, aprantl, jakehehrlich, espindola, respindola, ilya-biryukov, pcc, sammccall
Reviewed By: compnerd, sammccall
Subscribers: hiraditya, llvm-commits, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D82362
Simon Pilgrim [Sat, 27 Jun 2020 09:12:20 +0000 (10:12 +0100)]
Error.h - GenericBinaryError - pass Twine arg by reference not value.
This allows us to reduce the Twine.h include to a forward declaration.
Simon Pilgrim [Sat, 27 Jun 2020 09:01:48 +0000 (10:01 +0100)]
CompileOnDemandLayer.h - remove unused Twine.h include. NFC.
Simon Pilgrim [Sat, 27 Jun 2020 08:59:05 +0000 (09:59 +0100)]
IndirectionUtils.h - reduce Twine.h include to forward declaration. NFC.
Simon Pilgrim [Sat, 27 Jun 2020 08:57:03 +0000 (09:57 +0100)]
MCSectionWasm.h - reduce includes to forward declarations. NFC.
Simon Pilgrim [Sat, 27 Jun 2020 08:47:34 +0000 (09:47 +0100)]
AsmPrinter.h - reduce includes to forward declarations. NFC.
Nikita Popov [Sun, 14 Jun 2020 20:49:57 +0000 (22:49 +0200)]
[IR] Store attributes that are available "somewhere" (NFC)
I noticed that for some benchmarks we spend quite a bit of time
inside AttributeList::hasAttrSomewhere(), mainly when checking
for the "returned" attribute. Most of the time the attribute will
not be present, in which case this function has to walk through
the whole attribute list and check for the attribute at each index.
This patch adds a cache of all "available somewhere" attributes
inside AttributeListImpl. This makes the structure 12 bytes larger,
but I don't think that's problematic, as attribute lists are uniqued.
Compile-time in terms of instructions retired improves by 0.4% on
average, but >1% for sqlite.
Differential Revision: https://reviews.llvm.org/D81867
Simon Pilgrim [Fri, 26 Jun 2020 15:31:38 +0000 (16:31 +0100)]
AsmWriter - printConstVCalls/printNonConstVCalls - avoid std::vector pass by value. NFCI.
Roman Lebedev [Sat, 27 Jun 2020 08:34:58 +0000 (11:34 +0300)]
[SCEV] Make SCEVAddExpr actually always return pointer type if there is pointer operand (PR46457)
Summary:
The added assertion fails on the added test without the fix.
Reduced from test-suite/MultiSource/Benchmarks/MiBench/office-ispell/correct.c
In IR, getelementptr, obviously, takes pointer as it's base,
and returns a pointer.
When creating an SCEV expression, SCEV operands are sorted in hope
that it increases folding potential, and at the same time SCEVAddExpr's
type is the type of the last(!) operand.
Which means, in some exceedingly rare cases, pointer operand may happen to
end up not being the last operand, and as a result SCEV for GEP
will suddenly have a non-pointer return type.
We should ensure that does not happen.
In the end, actually storing the `Type *`, at the cost of increasing
memory footprint of `SCEVAddExpr`, appears to be the solution.
We can't just store a 'is a pointer' bit and create pointer type
on the fly since we don't have data layout in getType().
Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=46457 | PR46457 ]]
Reviewers: efriedma, mkazantsev, reames, nikic
Reviewed By: efriedma
Subscribers: hiraditya, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82633
Roman Lebedev [Sat, 27 Jun 2020 08:34:58 +0000 (11:34 +0300)]
[NFCI][SCEV] getPointerBase(): de-recursify
Summary:
This is boringly straight-forward, each iteration we see if
V is some expression that we can look into, and if it has
a single pointer operand, then set V to that operand
and repeat.
Reviewers: efriedma, mkazantsev, reames, nikic
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82632
Melanie Blower [Fri, 26 Jun 2020 16:23:45 +0000 (09:23 -0700)]
Reland D81869 "Modify FPFeatures to use delta not absolute settings"
This reverts commit
defd43a5b393bb63a902042adf578081b03b171d.
with correction to solve msan report
To solve https://bugs.llvm.org/show_bug.cgi?id=46166 where the
floating point settings in PCH files aren't compatible, rewrite
FPFeatures to use a delta in the settings rather than absolute settings.
With this patch, these floating point options can be benign.
Reviewers: rjmccall
Differential Revision: https://reviews.llvm.org/D81869
Fady Ghanim [Sat, 27 Jun 2020 06:43:04 +0000 (02:43 -0400)]
[OpenMP][OMPBuilder] Remove unused variable in Unittest
Relating to buildbot errors to commit
82b8236cf248ef91968b67d18af23890322cde43
Gui Andrade [Sat, 27 Jun 2020 06:46:04 +0000 (06:46 +0000)]
[MSAN] Handle x86 {round,min,max}sd intrinsics
These need special handling over the simple vector intrinsics as they
behave more like a shuffle operation: taking the top half of the vector
from one input, and the bottom half separately. Previously, these were
being handled as though all bits of all operands were combined.
Differential Revision: https://reviews.llvm.org/D82398
Gui Andrade [Sat, 27 Jun 2020 06:24:32 +0000 (06:24 +0000)]
[Docs] BitCodeFormat.rst: List missing attribute codes
Craig Topper [Sat, 27 Jun 2020 06:32:17 +0000 (23:32 -0700)]
[X86] Add MOVBE and RDRND features to BDVER4.
Only 6 years behind gcc. https://gcc.gnu.org/legacy-ml/gcc-patches/2014-08/msg00231.html
Found while working on improving how we define CPU features for
clang and auditing for correctness.
Fady Ghanim [Thu, 4 Jun 2020 16:24:29 +0000 (12:24 -0400)]
[OpenMP][OMPBuilder] Adding privatization related `createXXXX` to OMPBuilder
lh123 [Sat, 27 Jun 2020 05:35:59 +0000 (13:35 +0800)]
[Docs] Fix typo and test git commit access. NFC.
Fangrui Song [Sat, 27 Jun 2020 03:55:44 +0000 (20:55 -0700)]
[BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa"
Fangrui Song [Sat, 27 Jun 2020 03:41:37 +0000 (20:41 -0700)]
[BasicAA] Rename deprecated -basicaa to -basic-aa
Follow-up to D82607
Revert an accidental change (empty.ll) of D82683
Fangrui Song [Sat, 27 Jun 2020 03:31:47 +0000 (20:31 -0700)]
[ELF] --warn-backrefs: check that D79300 fixed an issue due to `mb = {}`
D79300 forgot to change `getBuffer().empty()` in LazyObjFile::parse to
`fetched`. This caused incorrect iterating after the current LazyObjFile was
fetched. This issue is benign and can just cause loss of "undefined symbols"
and "backward reference" diagnostics.
Before D79300 `mb = {}` caused --warn-backrefs-exclude to be useless for
a fetched LazyObjFile.
Add two test cases.
Arthur Eubanks [Fri, 26 Jun 2020 22:10:30 +0000 (15:10 -0700)]
[NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN
Summary: Following https://reviews.llvm.org/D82607.
Reviewers: ychen
Subscribers: asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82688
Arthur Eubanks [Fri, 26 Jun 2020 22:06:47 +0000 (15:06 -0700)]
[NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination
Summary: Following https://reviews.llvm.org/D82607.
Reviewers: ychen
Subscribers: george.burgess.iv, asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82689
Nico Weber [Sat, 27 Jun 2020 02:30:24 +0000 (22:30 -0400)]
Revert "Disable a JSONTest.Integers test with all MSVCs, PR46470"
This reverts commit
63bcf89125fdfe8a41b0125454b006b49abb0184.
Turns out the more targeted disablement in the previous change
was good enough.
Alexander Shaposhnikov [Sat, 27 Jun 2020 00:22:15 +0000 (17:22 -0700)]
[llvm-install-name-tool] Add support for -rpath option
This diff implements -rpath option for llvm-install-name-tool
which replaces the rpath value in the specified Mach-O binary.
Patch by Sameer Arora!
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D82051
Vedant Kumar [Wed, 24 Jun 2020 18:33:28 +0000 (11:33 -0700)]
[InstCombine] Drop debug loc in TryToSinkInstruction (reland)
Summary:
The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug
location of an instruction if the instruction either remains in its
basic block, or if its basic block is folded into a predecessor that
branches unconditionally".
TryToSinkInstruction doesn't seem to satisfy the criteria as it's
sinking an instruction to some successor block. Preserving the debug loc
can make single-stepping appear to go backwards, or make a breakpoint
hit on that location happen "too late" (since single-stepping from that
breakpoint can cause the function to return unexpectedly).
So, drop the debug location.
This was reverted in
ee3620643dfc because it removed source locations
from inlinable calls, breaking a verifier rule. I've added an exception
for calls because the alternative (setting a line 0 location) is not
better. I tested the updated patch by completing a stage2 RelWithDebInfo
build.
Reviewers: aprantl, davide
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82487
Alex Lorenz [Fri, 26 Jun 2020 22:33:56 +0000 (15:33 -0700)]
[darwin][driver] NFC, split addStartObjectFileArgs into multiple functions
Alex Lorenz [Fri, 26 Jun 2020 21:57:00 +0000 (14:57 -0700)]
[darwin][driver] Do not link with libarclite when building for Apple Silicon macOS
peter klausler [Fri, 26 Jun 2020 19:58:05 +0000 (12:58 -0700)]
[flang] Fix line continuation after bare labels (fm200.f)
Fixed-form line continuation was not working when the
preceding line was a bare label.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D82687
Nico Weber [Sat, 27 Jun 2020 00:02:04 +0000 (20:02 -0400)]
Disable a JSONTest.Integers test with all MSVCs, PR46470
Nico Weber [Fri, 26 Jun 2020 23:57:52 +0000 (19:57 -0400)]
Disable a JSONTest.Integers test with newer MSVCs, PR46470
Craig Topper [Fri, 26 Jun 2020 23:41:30 +0000 (16:41 -0700)]
[X86] Don't disable xsave when avx is disabled. Implicitly enable xsave with avx is enabled and xsave wasn't explciitly disabled
CPUs with avx always have xsave, but some CPUs without avx also
have xsave. So we shouldn't disable xsave just because avx is
disabled. This would prevent xsave from being enabled with
-march=native on CPUs with xsave and not avx.
But we also don't want -mavx -mno-avx to leave xsave eanabled.
So only enable xsave if avx is enabled after processing all features.
I thought about just not turning xsave on with avx at all, but
there might be someone out there depending on it.
Puyan Lotfi [Fri, 26 Jun 2020 23:30:25 +0000 (16:30 -0700)]
[NFCi] Fixing build failures on Windows due to std::tie used w/o proper include.
From https://reviews.llvm.org/D81236 /
https://github.com/llvm/llvm-project/commit/
55fe7b79bb7fab49af3720840224c0720bdb03c6
std::tie is used without including <tuple>. This patch includes <tuple>
so that some downstream Windows bots succesfully build.
Jonas Devlieghere [Fri, 26 Jun 2020 22:55:13 +0000 (15:55 -0700)]
[lldb/Test] Disable eh-frame-augment-noop.test on macOS
The test fails on Darwin because a different Asynchronous UnwindPlan is
chosen:
Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly
insn profiling'`
instead of what the test expects:
Asynchronous (not restricted to call-sites) UnwindPlan is 'eh_frame
CFI'
Arthur Eubanks [Fri, 26 Jun 2020 22:45:23 +0000 (15:45 -0700)]
Fix full-store-partial-alias.ll
Accidentally renamed -disable-basicaa -> -disable-basic-aa
Matt Arsenault [Fri, 26 Jun 2020 20:02:25 +0000 (16:02 -0400)]
LLParser: Accept align(N) as new syntax for parameter attribute
Every other value parameter attribute uses parentheses, so accept this
as the preferred modern syntax. Updating everything to use the new
syntax is left for a future change.
Matt Arsenault [Wed, 10 Jun 2020 14:40:35 +0000 (10:40 -0400)]
AMDGPU/GlobalISel: Fix some legalization of < dword vector stores
This avoids many instances of failing to legalize a vector truncstore
of <4 x s8> to 2 bytes. We don't perfectly handle every truncstore
yet, largely because the given set of legalization actions can't
actually differentiate between changing the result type and changing
the memory type.
Vedant Kumar [Fri, 26 Jun 2020 21:58:58 +0000 (14:58 -0700)]
Revert "[InstCombine] Drop debug loc in TryToSinkInstruction"
This reverts commit
903cf140d0118cf0d3f0f6f8967c6a20d9c5be6b.
This might be causing verifier failures on the bots, such as: "inlinable
function call in a function with debug info must have a !dbg location"
--
http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/16976/steps/bootstrap%20clang/logs/stdio
Arthur Eubanks [Fri, 26 Jun 2020 21:58:41 +0000 (14:58 -0700)]
[NewPM][BasicAA] basicaa -> basic-aa in Transforms/SLPVectorizer
Following https://reviews.llvm.org/D82607.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D82681
Arthur Eubanks [Fri, 26 Jun 2020 21:58:01 +0000 (14:58 -0700)]
[NewPM][BasicAA] basicaa -> basic-aa in Analysis/BasicAA
Following https://reviews.llvm.org/D82607.
Reviewed By: ychen
Differential Revision: https://reviews.llvm.org/D82683
Yuanfang Chen [Fri, 26 Jun 2020 21:55:00 +0000 (14:55 -0700)]
[MemorySSA] Update comment in PassBuilder
Is teaching the LoopFullUnrollPass to preserve MemorySSA very hard or
just impossible?
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D82618
Vedant Kumar [Thu, 18 Jun 2020 21:17:07 +0000 (14:17 -0700)]
[debugify] Demote an error about empty locations to a warning
In https://reviews.llvm.org/D81198, we outlined a number of scenarios
where dropping debug locations is appropriate. Stop issuing an error
when this happens.
Steven Wu [Fri, 26 Jun 2020 21:53:23 +0000 (14:53 -0700)]
[compiler-rt] Fix mismatched #if/#endif comments
Fix a mismatched #if/#endif comments from my previous commit.
Matt Arsenault [Fri, 12 Jun 2020 12:49:18 +0000 (08:49 -0400)]
GlobalISel: Don't fail translate on weak cmpxchg
The translation of cmpxchg added by
9481399c0fd2c198c81b92636c0dcff7d4c41df2 specifically skipped weak
cmpxchg due to not understanding the meaning. Weak cmpxchg was added
in
420a216817def01816186910a2e35885c9201951. As explained in the
commit message, the weak mode is implicit in how
ATOMIC_CMP_SWAP_WITH_SUCCESS is lowered. If it's expanded to a regular
ATOMIC_CMP_SWAP, it's replaced with a strong cmpxchg.
This handling seems weird to me, but this was already following the
DAG behavior. I would expect the strong IR instruction to not have the
boolean output. Failing that, I might expect the IRTranslator to emit
ATOMIC_CMP_SWAP and a constant for the boolean.
Tony [Wed, 24 Jun 2020 08:11:01 +0000 (04:11 -0400)]
[AMDGPU] Define DWARF encoding for condition code registers
Summary:
- Define DWARF register numbers for vector and scalar condition codes.
- Document intended purpose of reserved DWARF register numbers.
Reviewers: yaxunl, kzhuravl, arsenm, rampitec, b-sumner
Subscribers: jvesely, wdng, nhaehnle, aprantl, dstuttard, tpr, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82519
JF Bastien [Fri, 26 Jun 2020 20:48:51 +0000 (13:48 -0700)]
[NFC] Bump ObjCOrBuiltinIDBits to 15
We're now hitting this because we're at the limit for number of builtins:
clang/lib/Basic/IdentifierTable.cpp:39:1: error: static_assert failed due to requirement '2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1))' "Insufficient ObjCOrBuiltinID Bits"
static_assert(2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1)),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bump it to 15 so whoever adds a builtin next (as I am, or as anyone else might) doesn't merge conflict over each other.
Francesco Petrogalli [Fri, 26 Jun 2020 20:06:06 +0000 (20:06 +0000)]
[sve][acle] Recommit https://reviews.llvm.org/D82501
The original patch was reverted in
https://github.com/llvm/llvm-project/commit/
ff5ccf258e297df29f32d6b5e4fa0a7b95c44f9c
as it was missing the C tests that got accidentally missing.
This patch is a NFC of https://reviews.llvm.org/D82501, together with
the SVE ACLE tests for the C intrinsics of svreinterpret for brain
float types.
Amy Huang [Mon, 11 May 2020 21:13:37 +0000 (14:13 -0700)]
Extend or truncate __ptr32/__ptr64 pointers when dereferenced.
Summary:
A while ago I implemented the functionality to lower Microsoft __ptr32
and __ptr64 pointers, which are stored as 32-bit and 64-bit pointer
and are extended/truncated to the appropriate pointer size when
dereferenced.
This patch adds an addrspacecast to cast from the __ptr32/__ptr64
pointer to a default address space when dereferencing.
Bug: https://bugs.llvm.org/show_bug.cgi?id=42359
Reviewers: hans, arsenm, RKSimon
Subscribers: wdng, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81517
Vedant Kumar [Wed, 24 Jun 2020 18:33:28 +0000 (11:33 -0700)]
[InstCombine] Drop debug loc in TryToSinkInstruction
Summary:
The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug
location of an instruction if the instruction either remains in its
basic block, or if its basic block is folded into a predecessor that
branches unconditionally".
TryToSinkInstruction doesn't seem to satisfy the criteria as it's
sinking an instruction to some successor block. Preserving the debug loc
can make single-stepping appear to go backwards, or make a breakpoint
hit on that location happen "too late" (since single-stepping from that
breakpoint can cause the function to return unexpectedly).
So, drop the debug location.
Reviewers: aprantl, davide
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82487
Francesco Petrogalli [Fri, 26 Jun 2020 20:10:15 +0000 (20:10 +0000)]
Revert "[sve][acle] Add reinterpret intrinsics for brain float."
This reverts commit
a15722c5ce4759c12960fe434ee6bd8aac70bb16.
The commmit has to be reverted because I accidentally submit
https://reviews.llvm.org/D82501 without the C tests that were added in
an early version of the patch.
Melanie Blower [Fri, 26 Jun 2020 20:17:45 +0000 (13:17 -0700)]
More corrections to documented spelling of ffinite-math to ffinite-math-only
Florian Hahn [Fri, 26 Jun 2020 16:51:51 +0000 (17:51 +0100)]
[VPlan] Add & use VPValue for VPWidenGEPRecipe operands (NFC).
This patch adds VPValue version of the GEP's operands to
VPWidenGEPRecipe and uses them during code-generation.
Reviewers: Ayal, gilr, rengolin
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D80220