Simon Pilgrim [Sun, 19 Apr 2020 13:41:25 +0000 (14:41 +0100)]
X86DisassemblerDecoder.h - remove unused forward declaration. NFC.
Fangrui Song [Sun, 19 Apr 2020 15:46:47 +0000 (08:46 -0700)]
[CMake] Delete HAVE_SCHED_GETAFFINITY and HAVE_CPU_COUNT
sched_getaffinity (Linux specific) has been available
* in glibc since 2002-08-08 (commit
972e719e8154eec5f543b027e2a08dfa285d55d5)
* in musl since the initial check-in.
Sanjay Patel [Sun, 19 Apr 2020 14:42:08 +0000 (10:42 -0400)]
[InstSimplify] add tests for logic+icmp folds for nullptr; NFC
See discussion in D78430.
Sanjay Patel [Sun, 19 Apr 2020 14:19:37 +0000 (10:19 -0400)]
[x86] avoid build warning for enum mismatch; NFC
gcc may warn here because X86ISD::NodeType is specified as "unsigned",
but ISD::NodeType is a naked C enum (although passed as an "unsigned"
throughout SDAG).
Florian Hahn [Sun, 19 Apr 2020 14:11:25 +0000 (15:11 +0100)]
[LAA] Remove unnecessary includes (NFC).
Simon Pilgrim [Sun, 19 Apr 2020 13:29:35 +0000 (14:29 +0100)]
X86MCTargetDesc.h - remove unnecessary includes and forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:28:52 +0000 (14:28 +0100)]
X86.h - remove unused forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:20:53 +0000 (14:20 +0100)]
X86SelectionDAGInfo.h - remove unnecessary includes and forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:03:29 +0000 (14:03 +0100)]
X86TargetTransformInfo.h - remove unnecessary includes. NFC.
David Green [Sun, 19 Apr 2020 12:21:01 +0000 (13:21 +0100)]
[ARM] Regenerate tests. NFC
Simon Pilgrim [Sun, 19 Apr 2020 12:34:58 +0000 (13:34 +0100)]
[X86][SSE] getFauxShuffle - don't combine shuffles with small truncated scalars (PR45604)
getFauxShuffle attempts to combine INSERT_VECTOR_ELT(TRUNCATE/EXTEND(EXTRACT_VECTOR_ELT(x))) patterns into a target shuffle chain.
PR45604 identified an issue where the scalar was truncated to a size smaller than the destination vector element and then zero extended back, which requires the upper bits to be zero'd which we don't currently do.
To avoid the bug I've added an early out in these truncation cases, a future commit should allow us to handle this by inserting the necessary SM_SentinelZero padding.
Sam McCall [Sun, 19 Apr 2020 12:33:00 +0000 (14:33 +0200)]
[clangd] Add index export to dexp
Summary: Add a command to dexp that exports index data in chosen format (e.g. YAML).
Reviewers: sammccall
Subscribers: kbobyrev, mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D77385
Sanjay Patel [Sun, 19 Apr 2020 12:32:02 +0000 (08:32 -0400)]
[x86] use vector instructions to lower more FP->int->FP casts
This is an enhancement to D77895 to avoid another
round-trip from XMM->GPR->XMM. This time we handle
the case of starting/ending with an f64 and casting
to signed i32 as the intermediate value.
It's a bit more involved than I initially assumed
because we need to use target-specific opcodes to
represent the non-standard cast ops.
Differential Revision: https://reviews.llvm.org/D78362
Sam McCall [Sun, 19 Apr 2020 12:22:23 +0000 (14:22 +0200)]
[clangd] Extend YAML Serialization
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D77938
Sanjay Patel [Sun, 19 Apr 2020 12:06:17 +0000 (08:06 -0400)]
[VectorCombine] transform bitcasted shuffle to wider elements
bitcast (shuf V, MaskC) --> shuf (bitcast V), MaskC'
This is the widen shuffle elements enhancement to D76727.
It builds on the analysis and simplifications in
D77881 and rG6a7e958a423e.
The phase ordering tests show that we can simplify inverse
shuffles across a binop in both directions (widen/narrow or
narrow/widen) now.
There's another potential transform visible in some of the
remaining TODOs - move a bitcasted operand of a shuffle
after the shuffle.
Differential Revision: https://reviews.llvm.org/D78371
Sanjay Patel [Fri, 17 Apr 2020 18:05:04 +0000 (14:05 -0400)]
[InstSimplify] add tests for logic-of-icmp with min/max constant; NFC
See PR45510:
https://bugs.llvm.org/show_bug.cgi?id=45510
We had partial coverage for some of these patterns, so removing duplicate tests
with the complete set in the new test file.
Simon Pilgrim [Sun, 19 Apr 2020 12:13:54 +0000 (13:13 +0100)]
[X86][SSE] Add test case for PR45604
Simon Pilgrim [Sun, 19 Apr 2020 11:38:41 +0000 (12:38 +0100)]
SelectionDAGBuilder.h - remove unused includes + forward declarations. NFC.
Replace SelectionDAG.h include with SelectionDAG forward declaration.
Simon Pilgrim [Sun, 19 Apr 2020 11:17:56 +0000 (12:17 +0100)]
X86InstrFMA3Info.h - remove unnecessary includes. NFC.
There were a number of cpp files explicitly relying on X86InstrFMA3Info.h to include the X86.h header - so I've had to add it locally.
Simon Pilgrim [Sun, 19 Apr 2020 10:52:31 +0000 (11:52 +0100)]
InstrEmitter.h - reduce SelectionDAG.h include to SelectionDAGNodes.h include.
Add SDDbgLabel/TargetLowering forward declarations.
Add the full SelectionDAG.h include to InstrEmitter.cpp.
Simon Pilgrim [Sun, 19 Apr 2020 10:38:50 +0000 (11:38 +0100)]
X86AsmPrinter.h - cleanup includes and forward declarations. NFC.
Reduce X86Subtarget.h/MCCodeEmitter.h/TargetMachine.h includes to forward declarations
Add explicit X86Subtarget.h/TargetMachine.h includes to X86AsmPrinter.cpp/X86MCInstLower.cpp
Remove unused MCSymbol forward declaration
Simon Pilgrim [Sun, 19 Apr 2020 10:13:26 +0000 (11:13 +0100)]
DebugHandlerBase.h - reduce MachineInstr.h include to DebugLoc.h include.
We were only including MachineInstr.h for DebugLoc.h. This exposes an implicit include dependency in BTFDebug.h where I've had to add the MachineInstr.h include.
Simon Pilgrim [Sun, 19 Apr 2020 10:00:30 +0000 (11:00 +0100)]
BuildLibCalls.h - remove unnecessary TargetLibraryInfo forward declaration. NFC
We already have to include the TargetLibraryInfo.h header.
Simon Pilgrim [Sun, 19 Apr 2020 09:55:23 +0000 (10:55 +0100)]
TypeBasedAliasAnalysis.h - replace InstrTypes.h include with forward declaration. NFC.
Benjamin Kramer [Sun, 19 Apr 2020 09:48:28 +0000 (11:48 +0200)]
Remove remaining callers of CreateShuffleVector with unsigned indices and mark it as deprecated
No functionality change intended.
Simon Pilgrim [Sun, 19 Apr 2020 09:29:38 +0000 (10:29 +0100)]
OMPConstants.h - replace StringRef.h include with forward declaration. NFC.
Florian Hahn [Sun, 19 Apr 2020 07:56:08 +0000 (08:56 +0100)]
[ValueLattice] Add struct for merge options.
This makes it easier to extend the merge options in the future and also
reduces the risk of accidentally setting a wrong option.
Reviewers: efriedma, nikic, reames, davide
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D78368
Uday Bondhugula [Sun, 19 Apr 2020 05:40:31 +0000 (11:10 +0530)]
[MLIR] NFC Fix/clarify line in const usage rationale doc
Update misleading line in conclusions. Although the application to IR
objects is stated earlier, the concluding section contradicts it in
isolation.
Differential Revision: https://reviews.llvm.org/D78446
Uday Bondhugula [Sun, 19 Apr 2020 05:21:58 +0000 (10:51 +0530)]
[MLIR] Mark dominance methods const
This change is in line with MLIR's coding style
https://mlir.llvm.org/getting_started/DeveloperGuide/
and also consistent with the dominance methods in LLVM.
Differential Revision: https://reviews.llvm.org/D78445
Craig Topper [Sun, 19 Apr 2020 06:14:59 +0000 (23:14 -0700)]
[CallSite removal][PtrUseVisitor] Use visitCallBase instead of visitCallSite. NFC
Craig Topper [Sun, 19 Apr 2020 05:24:55 +0000 (22:24 -0700)]
[SyntheticCountsPropagation] Remove unnecessary includes and add a LLVM license header. NFC
Noticed while looking for CallSite.h uses to remove.
Mehdi Amini [Sun, 19 Apr 2020 04:54:31 +0000 (04:54 +0000)]
Fix broken website link: Use absolute URL to point back to the source on GitHub
Mehdi Amini [Sun, 19 Apr 2020 04:52:37 +0000 (04:52 +0000)]
Fix broken doc links to DefiningAttributesAndTypes.md after move to Tutorials/
Mehdi Amini [Sun, 19 Apr 2020 04:51:03 +0000 (04:51 +0000)]
Fix broken doc links to QuickstartRewrites.md after move under Tutorials
Mehdi Amini [Sun, 19 Apr 2020 04:47:15 +0000 (04:47 +0000)]
Fix relative links in Rationale docs following move to subfolder
Mehdi Amini [Sun, 19 Apr 2020 04:44:49 +0000 (04:44 +0000)]
Fix broken docs links by using relative paths in the Linalg Rationale
Mehdi Amini [Sun, 19 Apr 2020 04:42:08 +0000 (04:42 +0000)]
Fix broken doc links (Rationale.md -> Rationale/Rationale.md)
Mehdi Amini [Sun, 19 Apr 2020 04:37:26 +0000 (04:37 +0000)]
Fix broken docs links (WritingAPass.md was renamed PassManagement.md)
Carl Ritson [Sun, 19 Apr 2020 01:02:58 +0000 (10:02 +0900)]
[Dominators] Facilitate updates to MachinePostDominatorTree
Summary:
Add getBase accessor so that underlying tree can be
manipulated in a similar manner to MachineDominatorTree.
Reviewers: kuhar, arsenm, hliao, nhaehnle
Reviewed By: kuhar
Subscribers: lkail, mgorny, hiraditya, wdng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77967
Mircea Trofin [Sun, 19 Apr 2020 00:47:37 +0000 (17:47 -0700)]
[llvm][NFC] Dereferencing before cast-ing in ProfileSummaryInfoTest
Incorporated feedback from https://reviews.llvm.org/D78414
LemonBoy [Sat, 18 Apr 2020 19:55:18 +0000 (12:55 -0700)]
[PowerPC] Don't use rldicl for PPC32
According to https://www.ibm.com/support/knowledgecenter/ssw_aix_72/assembler/idalangref_rldicl_rletdw_instrs.html rldicl should not be used when targeting 32bit CPUs.
Reviewed By: #powerpc, nemanjai, MaskRay
Differential Revision: https://reviews.llvm.org/D77946
Nico Weber [Sun, 19 Apr 2020 00:22:52 +0000 (20:22 -0400)]
add more temporary logging for a bot-only failure
Lang Hames [Sat, 18 Apr 2020 20:56:13 +0000 (13:56 -0700)]
[ORC] Add example showing how to initialize/deinitialize a JITDylib with LLJIT.
Lang Hames [Sat, 18 Apr 2020 20:54:05 +0000 (13:54 -0700)]
[ORC] Add a convenience method to create a JITEvaluatedSymbol from a pointer.
This can be used to reduce boilerplate code, especially when defining absolute
symbols.
Lang Hames [Sat, 18 Apr 2020 04:19:11 +0000 (21:19 -0700)]
[ORC] Replace LLJIT::defineAbsolute with an LLJIT::define convenience method.
LLJIT::defineAbsolute did not mangle its Name argument, which is inconsistent
with the behavior of other LLJIT methods (e.g. lookup). Since it is currently
unused anyway, this commit replaces it with a generic 'define' convenience
method for adding MaterializationUnits to the main JITDylib. This simplifies
use of the generic absoluteSymbols function (as well as the symbolAlias,
reexports and other functions that generate MaterializationUnits) with LLJIT.
Ayal Zaks [Wed, 15 Apr 2020 14:04:01 +0000 (17:04 +0300)]
[LV] Mark first-order recurrences as allowed exits
First-order recurrences require special treatment when they are live-out;
such treatment is provided by fixFirstOrderRecurrence(), so they should be
included in AllowedExit set.
(Should probably have been included originally in D16197.)
Fixes PR45526: AllowedExit set is used by prepareToFoldTailByMasking() to
check whether the treatment for live-outs also holds when folding the tail,
which is not (yet) the case for first-order recurrences.
Differential Revision: https://reviews.llvm.org/D78210
Craig Topper [Sat, 18 Apr 2020 20:28:25 +0000 (13:28 -0700)]
Recommit "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"
With a tweak to avoid a linker error for passing
MaxAlignmentExponent by reference to std::min.
Simon Pilgrim [Fri, 17 Apr 2020 11:40:45 +0000 (12:40 +0100)]
UnrollLoop.h - replace StringRef.h/ValueMapper.h includes with forward declarations. NFC.
Nikita Popov [Sat, 18 Apr 2020 20:36:38 +0000 (22:36 +0200)]
[ValueLattice] Remove unnecessary ConstVal nulling (NFC)
ConstVal is not an owned pointer, so setting it to nullptr is not
actually doing anything. If we switch to a state that does not use
ConstVal, the value does not matter.
Split out from D78425.
Nikita Popov [Thu, 16 Apr 2020 20:22:14 +0000 (22:22 +0200)]
[PredicateInfo] Factor out PredicateInfoBuilder (NFC)
When running IPSCCP on a module with many small functions, memory
usage is dominated by PredicateInfo, which is a huge structure
(partially due to some unfortunate nested SmallVector use). However,
most of it is actually only temporary state needed to build
predicate info, and does not need to be retained after initial
construction.
This patch factors out the predicate building logic and state
into a separate PrediceInfoBuilder, with the extra bonus that
it does not need to live in the header anymore.
Differential Revision: https://reviews.llvm.org/D78326
Craig Topper [Sat, 18 Apr 2020 20:23:29 +0000 (13:23 -0700)]
Revert "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"
This reverts commit
e00cfe254d99629ec344031adfe1878a84f3b0b3.
Seems to be causing a linker error on the build bots.
kpdev [Fri, 17 Apr 2020 06:26:29 +0000 (09:26 +0300)]
[scudo] Silent warning for u64 -> u32 convertion
Error is raised because of using -Werror=convertion
Craig Topper [Sat, 18 Apr 2020 18:57:50 +0000 (11:57 -0700)]
[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI
We previously clamped the trailing zero count to 31 bits. And
then clamped the final alignment to MaximumAlignment which is
1 << 29.
This patch simplifies this to just clamp the trailing zero to
29 using MaxAlignmentExponent.
I was looking into changing this function to use Align/MaybeAlign
and noticed this.
Differential Revision: https://reviews.llvm.org/D78418
LemonBoy [Sat, 18 Apr 2020 18:31:38 +0000 (11:31 -0700)]
[DebugInfo] Change DIEnumerator payload type from int64_t to APInt
This allows the representation of arbitrarily large enumeration values.
See https://lists.llvm.org/pipermail/llvm-dev/2017-December/119475.html for context.
Reviewed By: andrewrk, aprantl, MaskRay
Differential Revision: https://reviews.llvm.org/D62475
Uday Bondhugula [Sat, 18 Apr 2020 10:51:07 +0000 (16:21 +0530)]
[MLIR] NFC affine for op tiling cleanup / utility rename
Rename mlir::tileCodeGen -> mlir::tilePerfectlyNested to be consistent.
NFC clean up tiling utility code, drop dead code, better comments.
Expose isPerfectlyNested and reuse.
Differential Revision: https://reviews.llvm.org/D78423
Mircea Trofin [Sat, 18 Apr 2020 02:35:05 +0000 (19:35 -0700)]
[llvm][NFC][CallSite] Remove CallSite from ProfileSummary
Summary: Depends on D78395.
Reviewers: craig.topper, dblaikie, wmi, davidxl
Subscribers: eraman, hiraditya, haicheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78414
Florian Hahn [Sat, 18 Apr 2020 18:44:54 +0000 (19:44 +0100)]
[SCCP] Drop unused early exit from visitStoreInst (NFC).
There are no lattice values associated with store instructions
directly. They will never get marked as overdefined.
Uday Bondhugula [Sat, 18 Apr 2020 13:37:19 +0000 (19:07 +0530)]
[MLIR] Make isPerfectlyNested check more efficient
Make mlir::isPerfectlyNested more efficient; use O(1) check instead of
O(N) size() method.
Differential Revision: https://reviews.llvm.org/D78428
Markus Böck [Sat, 18 Apr 2020 15:23:37 +0000 (08:23 -0700)]
[llvm-objdump] Demangle C++ Symbols in branch and call targets
Currently C++ symbols are demangled in the symbol table as well as in
the disassembly and relocations. This patch adds demangling of C++
symbols in targets of calls and branches making it easier to decipher
control flow in disassembly. This also matches up with GNUobjdump's
behavior
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D77957
Louis Dionne [Fri, 17 Apr 2020 20:43:35 +0000 (16:43 -0400)]
[libc++] Use proper shell escaping in the executors
This was originally committed as
f8452ddfcc33 and reverted in
7cb1aa9d9368.
The issue was that shell builtins were being escaped too, and apparently
Bash won't execute a builtin when it is quoted e.g. '!'. Instead, it
thinks it's a command and it can't find it.
Re-committing the change with that issue fixed.
Tobias Hieta [Sat, 18 Apr 2020 15:06:37 +0000 (08:06 -0700)]
[ELF][ARM] Increase default max-page-size from 4096 to 6536
See http://lists.llvm.org/pipermail/llvm-dev/2020-April/140549.html
For the record, GNU ld changed to 64k max page size in 2014
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=
7572ca8989ead4c3425a1500bc241eaaeffa2c89
"[RFC] ld/ARM: Increase maximum page size to 64kB"
Android driver forced 4k page size in AArch64 (D55029) and ARM (D77746).
A binary linked with max-page-size=4096 does not run on a system with a
higher page size configured. There are some systems out there that do
this and it leads to the binary getting `Killed!` by the kernel.
In the non-linker-script cases, when linked with -z noseparate-code
(default), the max-page-size increase should not cause any size
difference. There may be some VMA usage differences, though.
Reviewed By: psmith, MaskRay
Differential Revision: https://reviews.llvm.org/D77330
Denis Khalikov [Wed, 15 Apr 2020 19:02:41 +0000 (22:02 +0300)]
[mlir][vulkan-runner] Simplify vulkan launch call op.
Summary:
Workgroup size is written into the kernel. So to properly modelling
vulkan launch, we have to skip local workgroup size for vulkan launch
call op.
Differential Revision: https://reviews.llvm.org/D78307
vgxbj [Fri, 10 Apr 2020 12:24:21 +0000 (20:24 +0800)]
[Object] Change uint32_t getSymbolFlags() to Expected<uint32_t> getSymbolFlags().
This change enables getSymbolFlags() to return errors which benefit error reporting in clients.
Differential Revision: https://reviews.llvm.org/D77860
Florian Hahn [Tue, 14 Apr 2020 17:55:39 +0000 (18:55 +0100)]
[SCCP] Add additional tests for structs, conditional prop and widening.
This patch adds a few additional test cases with cases subsequent patches
will improve on.
Florian Hahn [Sat, 18 Apr 2020 12:48:53 +0000 (13:48 +0100)]
[SCCP] Drop unused early exit from visitReturnInst (NFC).
There are no lattice values associated with return instructions
directly. They will never get marked as overdefined.
Simon Pilgrim [Sat, 18 Apr 2020 12:36:37 +0000 (13:36 +0100)]
HeatUtils.h - remove unnecessary includes. NFC.
Replace with BlockFrequencyInfo/Function forward declarations
Move BlockFrequencyInfo.h include to HeatUtils.cpp
Florian Hahn [Sat, 18 Apr 2020 12:31:17 +0000 (13:31 +0100)]
[ValueLattice] Use 8 bits for Tag.
Suggested as follow-up in D78145 post-commit to be more machine friendly.
Luís Marques [Sat, 18 Apr 2020 11:51:25 +0000 (12:51 +0100)]
[CMake][NFC] Clean up CheckAtomic.cmake
`CheckAtomic.cmake` was skipping the test of whether atomics work in MSVC
without an atomics library (they do), but not setting the value of
`HAVE_CXX_ATOMICS_WITHOUT_LIB`. That caused build issues when trying to land
D69869. I fixed that issue in
f128f442a3d, by adding an `elseif(MSVC)`, as
was being done below in the 64-bit atomics check. That minimal fix did work,
but it kept various inconsistencies between the original atomics check and
the 64-bit one. This patch now makes the checks follow the same structure,
cleaning them up.
Differential Revision: https://reviews.llvm.org/D74767
Simon Pilgrim [Sat, 18 Apr 2020 11:27:02 +0000 (12:27 +0100)]
IRReader.h - remove unnecessary StringRef forward declaration. NFC.
We need to include StringRef.h.
Simon Pilgrim [Sat, 18 Apr 2020 11:09:46 +0000 (12:09 +0100)]
[cmake] LLVMPasses - add include/llvm header path
Pick up all the Pass headers in the root for MSVC projects
Simon Pilgrim [Sat, 18 Apr 2020 11:09:21 +0000 (12:09 +0100)]
[cmake] LLVMDWARFLinker - add include/llvm/DWARFLinker header path
Pick up the DWARFLinker headers in MSVC projects
Simon Pilgrim [Sat, 18 Apr 2020 10:55:01 +0000 (11:55 +0100)]
[cmake] LLVMMIRParser - add include/llvm/CodeGen/LLVMMIRParser header path
Pick up the CodeGen/MIRParser headers in MSVC projects
Simon Pilgrim [Sat, 18 Apr 2020 10:50:04 +0000 (11:50 +0100)]
[cmake] LLVMGlobalISel - add include/llvm/CodeGen/GlobalISel header path
Pick up the GlobalISel headers in MSVC projects
Simon Pilgrim [Sat, 18 Apr 2020 09:15:08 +0000 (10:15 +0100)]
[cmake] LLVMAsmParser - add include/llvm/ASMParser header path
Copy + paste typo meant we were picking up the include/llvm/Analysis path instead
Simon Pilgrim [Sat, 18 Apr 2020 09:12:13 +0000 (10:12 +0100)]
[cmake] LLVMFrontendOpenMP - fix include/llvm/Frontend/OpenMP header path
Correctly pick up the OMP*.h headers in MSVC projects
Nikita Popov [Sat, 18 Apr 2020 09:22:44 +0000 (11:22 +0200)]
Revert "ADT: SmallVector size/capacity use word-size integers when elements are small"
This reverts commit
b8d08e961df1d229872c785ebdbc8367432e9752.
This change causes a 1% compile-time and 1% memory usage regression:
http://llvm-compile-time-tracker.com/compare.php?from=
73b7dd1fb3c17a4ac4b1f1e603f26fa708009649&to=
b8d08e961df1d229872c785ebdbc8367432e9752&stat=instructions
http://llvm-compile-time-tracker.com/compare.php?from=
73b7dd1fb3c17a4ac4b1f1e603f26fa708009649&to=
b8d08e961df1d229872c785ebdbc8367432e9752&stat=max-rss
Florian Hahn [Sat, 18 Apr 2020 09:19:04 +0000 (10:19 +0100)]
[LV] Invalidate cost model decisions along with interleave groups.
Cost-modeling decisions are tied to the compute interleave groups
(widening decisions, scalar and uniform values). When invalidating the
interleave groups, those decisions also need to be invalidated.
Otherwise there is a mis-match during VPlan construction.
VPWidenMemoryRecipes created initially are left around w/o converting them
into VPInterleave recipes. Such a conversion indeed should not take place,
and these gather/scatter recipes may in fact be right. The crux is leaving around
obsolete CM_Interleave (and dependent) markings of instructions along with
their costs, instead of recalculating decisions, costs, and recipes.
Alternatively to forcing a complete recompute later on, we could try
to selectively invalidate the decisions connected to the interleave
groups. But we would likely need to run the uniform/scalar value
detection parts again anyways and the extra complexity is probably not
worth it.
Fixes PR45572.
Reviewers: gilr, rengolin, Ayal, hsaito
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D78298
Jan Kratochvil [Sat, 18 Apr 2020 08:44:33 +0000 (10:44 +0200)]
[lldb] [testsuite] Fix a regression of TestCppScope.py
This is a regression since:
[lldb][NFC] Modernize lang/cpp/scope test
acb0b99c8e4f1dc65a7f1e26da9db77239a67da7
rGacb0b99c8e4f
File "/home/jkratoch/redhat/llvm-monorepo/lldb/test/API/lang/cpp/scope/TestCppScope.py", line 19, in test
self.assertEqual(global_var_names, expected_var_names)
AssertionError: Lists differ: ['C::a', 'A::a', 'B::a', '::a'... != ['A::a', 'B::a', 'C::a', '::a'...
First differing element 0:
C::a
A::a
- ['C::a', 'A::a', 'B::a', '::a']
+ ['A::a', 'B::a', 'C::a', '::a']
ManualDWARFIndex using NameToDIE does not sort alphabetically:
// This is only for uniqueness, not lexicographical ordering, so we can
// just compare pointers.
return uintptr_t(lhs.GetCString()) < uintptr_t(rhs.GetCString());
Luís Marques [Sat, 18 Apr 2020 08:26:15 +0000 (09:26 +0100)]
[RISCV][PowerPC] Fix google/benchmark benchmark::cycleclock::Now
Cherrypick the upstream fix commit a77d5f7 onto llvm/utils/benchmark
and libcxx/utils/google-benchmark.
This fixes LLVM's 32-bit RISC-V compilation, and the issues
mentioned in https://github.com/google/benchmark/pull/955
An additional cherrypick of ecc1685 fixes some minor formatting
issues introduced by the preceding commit.
Differential Revision: https://reviews.llvm.org/D78084
Anchu Rajendran [Sat, 18 Apr 2020 06:09:34 +0000 (11:39 +0530)]
[flang]Implemented Semantic Checkes for 5 data constraints
Summary:
C874, C875, C878, C880 and C881 checks are implemented.
Differential Revision: https://reviews.llvm.org/D78008
Shengchen Kan [Sat, 18 Apr 2020 06:40:46 +0000 (14:40 +0800)]
[MC][X86] Disable branch align in non-text section
Summary:
The instruction in non-text section can not be executed, so they will not affect performance.
In addition, their encoding values are treated as data, so we should not touch them.
Reviewers: MaskRay, reames, LuoYuanke, jyknight
Reviewed By: MaskRay
Subscribers: annita.zhang, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77971
Jan Kratochvil [Sat, 18 Apr 2020 06:32:12 +0000 (08:32 +0200)]
[lldb] [testsuite] Fix TestFixIts.py on Linux
Since D77214 there is a testsuite regression for TestFixIts.py
on Fedora 31 x86_64.
File "/home/jkratoch/redhat/llvm-monorepo/lldb/test/API/commands/expression/fixits/TestFixIts.py", line 148, in test_with_target
self.assertEquals(value.GetError().GetCString(), "error: No value")
AssertionError: 'error: error: Multiple internal symbols found for \'d\'\nid = {0x00000d2a}, ran [truncated]... != 'error: No value'
That is because Fedora glibc incl. libm.so contains also ELF debug
symbols and there exists a 'd' symbol:
(gdb) p d
$1 = {i = {0,
1076887552}, d = 16}
(gdb) p &d
$2 = (const number *) 0x7ffff78e8bc0 <d>
(gdb) info sym 0x7ffff78e8bc0
d in section .rodata of /lib64/libm.so.6
$ nm /lib64/libm.so.6 |grep ' d$'
00000000000bfbc0 r d
00000000000caa20 r d
00000000000caa20 r d
00000000000caa20 r d
glibc-build$ for i in `find -name "*.o"`;do nm 2>/dev/null $i|grep ' d$' && echo $i;done
0000000000000080 r d
./math/s_atan-fma4.o
0000000000000080 r d
./math/s_atan-avx.o
0000000000000080 r d
./math/s_atan.o
Petr Hosek [Sat, 18 Apr 2020 00:34:08 +0000 (17:34 -0700)]
[CMake] Set UBSAN_LINK_FLAGS for ubsan
This variable is being used, but it's not being set (it's only set
for ubsan_minimal, but not ubsan). This addresses a regression that
was introduced in D78325.
Differential Revision: https://reviews.llvm.org/D78410
Richard Smith [Sat, 18 Apr 2020 03:25:15 +0000 (20:25 -0700)]
When making modules transitively visible, don't take into account
whether they have missing header files.
Whether a module's headers happen to be present on the local file system
should make no difference to whether we make its contents visible when
importing another module that re-exports it. If we have an up-to-date
AST file that we can load, that's all that matters.
This fixes the ability to header syntax checking for modular headers in
C++20 mode (or in prior modes where -fmodules-local-submodule-visibility
is enabled but -fmodules is not).
Richard Smith [Fri, 17 Apr 2020 23:23:41 +0000 (16:23 -0700)]
Rename IsMissingRequirement to IsUnimportable and set it for shadowed
modules too.
This more accurately reflects the semantics of this flag, as distinct
from "IsAvailable", which (in an explicit modules world) only describes
whether a module is buildable, not whether it's importable.
Richard Smith [Wed, 8 Apr 2020 21:03:40 +0000 (14:03 -0700)]
Change deprecated -fsanitize-recover flag to apply to all sanitizers, not just UBSan.
Summary:
This flag has been deprecated, with an on-by-default warning encouraging
users to explicitly specify whether they mean "all" or ubsan for 5 years
(released in Clang 3.7). Change it to mean what we wanted and
undeprecate it.
Also make the argument to -fsanitize-trap optional, and likewise default
it to 'all', and express the aliases for these flags in the .td file
rather than in code. (Plus documentation updates for the above.)
Reviewers: kcc
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77753
Andrew Litteken [Fri, 10 Apr 2020 01:06:38 +0000 (18:06 -0700)]
fix to outline cfi instruction when can be grouped in a tail call
[MachineOutliner] fix test for excluding CFI and add test to include CFI in outlining
New test to check that we only outline CFI instruction if all CFI
Instructions in the function would be captured by the outlining
adding x86 tests analagous to AARCH64 cfi tests
Revision: https://reviews.llvm.org/D77852
Brad Moody [Sat, 18 Apr 2020 05:09:30 +0000 (00:09 -0500)]
[ADT] Fix bug in BitVector and SmallBitVector DenseMap hashing.
BitVectors and SmallBitVectors with equal contents but different
capacities were getting different hashes.
Reviewed By: aganea
Differential Revision: https://reviews.llvm.org/D77038
Craig Topper [Sat, 18 Apr 2020 03:45:58 +0000 (20:45 -0700)]
[X86] Clean up some mir tests with INLINEASM to avoid regdef or to correct the immediate for the regdef.
The immediate used for the regdef is the encoding for the register
class in the enum generated by tablegen. This encoding will change
any time a new register class is added. Since the number is part
of the input, this means it can become stale.
This change modifies some test to avoid this kind of immediate
all together. And updates one test to use the current encoding of
GR64.
Lucy Fox [Sat, 18 Apr 2020 00:41:51 +0000 (17:41 -0700)]
[MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.
Summary:
The tests referred to in Chapter 3 of the tutorial were missing from the tutorial test
directory; this adds those missing tests. This also cleans up some stale directory paths and code
snippets used throughout the tutorial.
Differential Revision: https://reviews.llvm.org/D76809
Lucy Fox [Sat, 18 Apr 2020 00:12:25 +0000 (17:12 -0700)]
[MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.
Summary:
The tests referred to in Chapter 3 of the tutorial were missing from the tutorial test
directory; this adds those missing tests. This also cleans up some stale directory paths and code
snippets used throughout the tutorial.
Differential Revision: https://reviews.llvm.org/D76809
Lucy Fox [Wed, 25 Mar 2020 22:10:31 +0000 (15:10 -0700)]
[MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.
Summary:
The tests referred to in Chapter 3 of the tutorial were missing from the tutorial test
directory; this adds those missing tests. This also cleans up some stale directory paths and code
snippets used throughout the tutorial.
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, aartbik, liufengdb, Joonsoo, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D76809
Mircea Trofin [Fri, 17 Apr 2020 17:55:45 +0000 (10:55 -0700)]
[llvm][NFC][CallSite] Remove CallSite from Evaluator.
Reviewers: craig.topper, dblaikie
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78395
Nico Weber [Sat, 18 Apr 2020 02:06:01 +0000 (22:06 -0400)]
add temporary logging to help diagnose a bot-only failure
Peter Collingbourne [Tue, 28 Jan 2020 02:43:46 +0000 (18:43 -0800)]
scudo: Add support for diagnosing memory errors when memory tagging is enabled.
Introduce a function __scudo_get_error_info() that may be called to interpret
a crash resulting from a memory error, potentially in another process,
given information extracted from the crashing process. The crash may be
interpreted as a use-after-free, buffer overflow or buffer underflow.
Also introduce a feature to optionally record a stack trace for each
allocation and deallocation. If this feature is enabled, a stack trace for
the allocation and (if applicable) the deallocation will also be available
via __scudo_get_error_info().
Differential Revision: https://reviews.llvm.org/D77283
Reid Kleckner [Wed, 15 Apr 2020 16:54:22 +0000 (09:54 -0700)]
[COFF] Assign unique identifiers to ObjFiles from LTO
Use the unique filenames that are used when /lldsavetemps is passed.
After this change, module names for LTO blobs in PDBs will be unique.
Visual Studio and probably other debuggers expect module names to be
unique.
Revert some changes from
1e0b158db (2017) that are no longer necessary
after removing MSVC LTO support.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D78221
Craig Topper [Sat, 18 Apr 2020 00:07:19 +0000 (17:07 -0700)]
[AbstractCallSite] Fix some doxygen comments I failed to update when ImmutableCallSite was replaced with CallBase.
Also fix an 80 column violation.
Matt Arsenault [Fri, 6 Sep 2019 22:27:40 +0000 (18:27 -0400)]
AMDGPU: Remove custom node for RSQ_LEGACY
Directly select from the intrinsic. This wasn't getting much value
from the custom node.
Erich Keane [Fri, 17 Apr 2020 23:31:58 +0000 (16:31 -0700)]
Add SemaTemplateDeduction.cpp to /bigobj
According to Nathaniel McVicar on the review for D73967,
SematTemplateDeduction hit the 16 bit COFF limit. This adds it to the
/bigobj list.
Andrew Browne [Fri, 17 Apr 2020 23:11:13 +0000 (16:11 -0700)]
ADT: SmallVector size/capacity use word-size integers when elements are small
SmallVector currently uses 32bit integers for size and capacity to reduce
sizeof(SmallVector). This limits the number of elements to UINT32_MAX.
For a SmallVector<char>, this limits the SmallVector size to only 4GB.
Buffering bitcode output uses SmallVector<char>, but needs >4GB output.
This changes SmallVector size and capacity to conditionally use word-size
integers if the element type is small (<4 bytes). For larger elements types,
the vector size can reach ~16GB with 32bit size.
Making this conditional on the element type provides both the smaller
sizeof(SmallVector) for larger types which are unlikely to grow so large,
and supports larger capacities for smaller element types.
This change also includes a fix for the bug where a SmallVector with 32bit
size has reached UINT32_MAX elements, and cannot provide guaranteed growth.
Context:
// Double the size of the allocated memory, guaranteeing space for at
// least one more element or MinSize if specified.
void grow(size_t MinSize = 0) { this->grow_pod(MinSize, sizeof(T)); }
void push_back(const T &Elt) {
if (LLVM_UNLIKELY(this->size() >= this->capacity()))
this->grow();
memcpy(reinterpret_cast<void *>(this->end()), &Elt, sizeof(T));
this->set_size(this->size() + 1);
}
When grow is called in push_back() without a MinSize specified, this is
relying on the guarantee of space for at least one more element.
There is an edge case bug where the SmallVector is already at its maximum size
and push_back() calls grow() with default MinSize of zero. Grow is unable to
provide space for one more element, but push_back() assumes the additional
element it will be available. This can result in silent memory corruption, as
this->end() will be an invalid pointer and the program may continue executing.
An alternative to this fix would be to remove the default argument from
grow(), which would mean several changing grow() to grow(this->size()+1)
in several places.
No test case added because it would require allocating a large ammount.
Differential Revision: https://reviews.llvm.org/D77621