Fangrui Song [Wed, 26 Jan 2022 06:15:44 +0000 (22:15 -0800)]
[ELF] maybeCompress: replace vector<uint8_t> with unique_ptr<uint8_t[]>. NFC
And mention that it is zero-initialized. I do not notice a speed-up if
changed to be uninitialized by forcing the zero filler in writeTo.
wangpc [Wed, 26 Jan 2022 06:04:53 +0000 (14:04 +0800)]
[regalloc] Fix assertion error when LiveInterval is empty
When evicting interference, it causes an asseertion error
since LiveIntervals::intervalIsInOneMBB assumes that input
is not empty.
This patch fixed bug mentioned in D118020.
Reviewed By: MatzeB
Differential Revision: https://reviews.llvm.org/D118124
luxufan [Fri, 14 Jan 2022 15:02:27 +0000 (23:02 +0800)]
[MC] Support constant offset for symbol PendingFixup
This patch add support relocation offset of sym+constant(like `foo+4`) form for pending fixup.
In the past, llvm-mc ignored the constant in sym+constant form, for `foo+4`, `4` would be ignored. And test case
```
.text
ret
nop
nop
.reloc foo+4, R_RISCV_32, 6
.data
.globl foo
foo:
.word 0
.word 0
.word 0
```
when run `llvm-mc -filetype=obj -triple=riscv64 %s | llvm-readobj -r`
The output is
```
Relocations [
Section (3) .rela.text {
0x0 R_RISCV_32 - 0x6
}
]
```
After applying this patch, the output is
```
Relocations [
Section (3) .rela.text {
0x4 R_RISCV_32 - 0x6
}
]
```
Differential Revision: https://reviews.llvm.org/D117316
Hongtao Yu [Wed, 26 Jan 2022 00:11:41 +0000 (16:11 -0800)]
[CSSPGO] Adjust SampleContextFrameVector to be a shorter SmallVector
It appears that some memory saving can be archived by tweaking the existing `SampleContextFrameVector` setup. Below are memory usage for two benchmarks before and after this change.
1. Medium benchmark:
- Before:
```
note: After computeSizeForProfiledFunctions
note: VM: 12.50 GB RSS: 11.02 GB
note: After generateProbeBasedProfile
note: **VM: 30.56 GB RSS: 29.08 GB**
note: After postProcessProfiles
note: VM: 31.91 GB RSS: 30.43 GB
```
- After:
```
note: After computeSizeForProfiledFunctions
note: VM: 12.26 GB RSS: 10.80 GB
note: After generateProbeBasedProfile
note: **VM: 28.76 GB RSS: 27.29 GB**
note: After postProcessProfiles
note: VM: 30.12 GB RSS: 28.66 GB
```
2. Large benchmark:
- Before:
```
note: After computeSizeForProfiledFunctions
note: VM: 106.28 GB RSS: 91.25 GB
note: After generateProbeBasedProfile
note: **VM: 245.19 GB RSS: 224.30 GB**
note: After postProcessProfiles
note: VM: 254.96 GB RSS: 221.58 GB
```
- After:
```
note: After computeSizeForProfiledFunctions
note: VM: 105.95 GB RSS: 91.04 GB
note: After generateProbeBasedProfile
note: VM: **234.29 GB RSS: 215.39 GB**
note: After postProcessProfiles
note: VM: 244.03 GB RSS: 213.45 GB
```
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D118203
Qiu Chaofan [Wed, 26 Jan 2022 05:23:21 +0000 (13:23 +0800)]
[PowerPC] Emit gnu_attribute according to float-abi metadata
According to GNU as documentation, PowerPC supports some .gnu_attribute
tags to represent the vector and float ABI type in the object file.
Some linkers like GNU ld respects the attribute and will prevent objects
with conflicting ABIs being linked.
This patch emits gnu_attribute value in assembly printer according to
the float-abi metadata. More attributes for soft-fp, hard single/double
and even vector ABI need to be supported in the future.
Reviewed By: jsji
Differential Revision: https://reviews.llvm.org/D117193
Micah Weston [Wed, 26 Jan 2022 04:21:48 +0000 (04:21 +0000)]
[AArch64] Fixes ADD/SUB opt bug and abstracts shared behavior in MIPeepholeOpt for ADD, SUB, and AND.
This fixes a bug where (SUBREG_TO_REG 0 (MOVi32imm <negative-number>) sub_32)
would generate invalid code since the top 32-bits were not zeroed when inspecting the
immediate value. A new test was added for this case.
Change to abstract shared behavior in MIPeepholeOpt. Both
visitAND and visitADDSUB attempt to split an RR instruction with an immediate
operand into two RI instructions with the immediate split.
The differing behavior lies in how the immediate is split into two pieces and
how the new instructions are built. The rest of the behavior (adding new VRegs,
checking for the MOVImm, constraining reg classes, removing old intructions)
are shared between the operations.
The new helper function splitTwoPartImm implements the shared behavior and
delegates differing behavior to two function objects passed by the caller.
One function object splits the immediate into two values and returns the
opcode to use if it is a valid split. The other function object builds
the new instructions.
I felt this abstraction would help since I believe it will help reduce the
code repetition when adding new instructions of the pattern, such as
SUBS for this conditional optimization.
Tested it locally by running check all with compiler-rt, mlir, clang-tools-extra,
flang, llvm, and clang enabled.
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D118000
ly [Wed, 26 Jan 2022 03:49:50 +0000 (11:49 +0800)]
[NFC][llvm] Align the comment
Reviewed By: luismarques
Differential Revision: https://reviews.llvm.org/D116579
Puyan Lotfi [Wed, 26 Jan 2022 03:15:00 +0000 (19:15 -0800)]
[lld][macho][NFC] Make MachO/start-end.s test less britle by checking for _main:
In start-end.s there is a lit check line `# SEG: _main` to begin the
check at the start of the function main where `_main` is the Darwin name
mangling for C main. Because the text file that FileCheck is getting as
input has the path of the compiler build in it from llvm-mc and
llvm-objdump, and because of the lack of a trailing colon in this check
line we end up inadvertently matching against the line of text with the
compiler path in it in the case where said path contains "_main" some
place. This can be very likely if the compiler branch has "main" or
"_main" in it.
To fix this I include the training : since that will match on the
function label and not the path line.
luxufan [Fri, 14 Jan 2022 14:03:23 +0000 (22:03 +0800)]
[MC] Put the Pending Fixups into location symbol's fragment
Differential Revision: https://reviews.llvm.org/D117317
Chuanqi Xu [Wed, 26 Jan 2022 02:53:50 +0000 (10:53 +0800)]
[C++20] [Modules] Only check decls under namespace scope in CheckRedeclarationExported
Since only the decls inhabit in a namespace scope could be exported, it
is not meaningful to check it in CheckRedeclarationExported, which
implements [module.interface]/p6.
Reviewed By: urnathan
Differential Revision: https://reviews.llvm.org/D118120
Giorgis Georgakoudis [Wed, 26 Jan 2022 01:31:35 +0000 (20:31 -0500)]
[OMPIRBuilder] Generate aggregate argument for parallel region outlined functions
Summary:
This patch modifies code generation in OpenMPIRBuilder to pass arguments
to the parallel region outlined function in an aggregate (struct),
besides the global_tid and bound_tid arguments. It depends on the
updated CodeExtractor (see D96854) for support. It mirrors functionality
of Clang codegen (see D102107).
Differential Revision: https://reviews.llvm.org/D110114
Giorgis Georgakoudis [Wed, 26 Jan 2022 01:08:19 +0000 (20:08 -0500)]
[CodeExtractor] Enable partial aggregate arguments
Summary:
Enable CodeExtractor to construct output functions that partially
aggregate inputs/outputs in their argument list. A use case is the
OMPIRBuilder to create outlined functions for parallel regions that
aggregate in a struct the payload variables for the region while passing
as scalars thread and bound identifiers.
Differential Revision: https://reviews.llvm.org/D96854
Zakk Chen [Tue, 25 Jan 2022 15:54:39 +0000 (07:54 -0800)]
[RISCV][NFC] Add getVLOperand for RVV intrinsics.
Use the VLOperand information to get the VL.
Differential Revision: https://reviews.llvm.org/D118156
Zakk Chen [Tue, 25 Jan 2022 08:08:21 +0000 (00:08 -0800)]
[RISCV] Add the passthru operand for RVV nomask load intrinsics.
The goal is support tail and mask policy in RVV builtins.
We focus on IR part first.
If the passthru operand is undef, we use tail agnostic, otherwise
use tail undisturbed.
Co-Authored-by: Hsiangkai Wang <Hsiangkai@gmail.com>
Reviewers: craig.topper, frasercrmck
Differential Revision: https://reviews.llvm.org/D117647
Kirill Stoimenov [Wed, 26 Jan 2022 00:57:40 +0000 (00:57 +0000)]
[ASan] Added a unit test for D118184.
To make sure the the libraries are there for executable and not there for DSOs.
Reviewed By: kda
Differential Revision: https://reviews.llvm.org/D118205
Andrew Litteken [Wed, 26 Jan 2022 00:41:18 +0000 (18:41 -0600)]
[NFC][IROutliner] fix namespace and unused variable
Arthur O'Dwyer [Sat, 22 Jan 2022 17:18:51 +0000 (12:18 -0500)]
[libc++] [test] Fix LWG3146 "Excessive unwrapping in std::ref/cref"
Drive-by constexprify the existing tests, too.
Differential Revision: https://reviews.llvm.org/D117953
Andrew Litteken [Sun, 2 Jan 2022 22:25:43 +0000 (16:25 -0600)]
[IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region.
We use the same similarity scheme we used for branch instructions for phi nodes, and allow them to be outlined. There is not a lot of special handling needed for these phi nodes when outlining, as they simply act as outputs. The code extractor does not currently allow for non entry blocks within the extracted region to have predecessors, so there are not conflicts to handle with respect to predecessors no longer contained in the function.
Recommit of
515eec3553b02533e9a88ee84bc245d5415163da
Reviewers: paquette
Differential Revision: https://reviews.llvm.org/D106997
Andrew Litteken [Wed, 26 Jan 2022 00:23:38 +0000 (18:23 -0600)]
Revert "[IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region."
This reverts commit
515eec3553b02533e9a88ee84bc245d5415163da.
By mistake, commit message was not complete.
Andrew Litteken [Sun, 2 Jan 2022 22:25:43 +0000 (16:25 -0600)]
[IRSim][IROutliner] Add support for outlining PHINodes with the rest of the region.
Andrew Litteken [Wed, 26 Jan 2022 00:18:27 +0000 (18:18 -0600)]
Revert "[IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions"
This reverts commit
8de76bd569732acae6a10fdcb0152a49f7d4cd39.
Reverting due to failure of different-intrinsics.ll on lld-x86_64-win buildbot.
Kirill Stoimenov [Tue, 25 Jan 2022 21:33:55 +0000 (21:33 +0000)]
[ASan] Not linking asan_static library for DSO.
Without this change DSOs fail to link because of missing asan_report_(load|store)n functions.
Reviewed By: kda
Differential Revision: https://reviews.llvm.org/D118184
Dávid Bolvanský [Tue, 25 Jan 2022 22:21:15 +0000 (23:21 +0100)]
Reland "[AlwaysInliner] Enable call site inlining to make flatten attribute working again (#53360)"
Rob Suderman [Tue, 25 Jan 2022 23:54:49 +0000 (15:54 -0800)]
[mlir] Fold tensor.reshape operations into tensor.from_elements.
There is not much of a benefit to reshape a from element vs reloading it.
Updated to progagate shape manipulations into the output type of
tensor.from_elements.
Reviewed By: NatashaKnk
Differential Revision: https://reviews.llvm.org/D118201
Sam McCall [Fri, 7 Jan 2022 03:15:07 +0000 (04:15 +0100)]
[clangd] Add designator inlay hints for initializer lists.
These make the init lists appear as if designated initialization was used.
Example:
ExpectedHint{"param: ", "arg"}
becomes
ExpectedHint{.Label="param: ", .RangeName="arg"}
Differential Revision: https://reviews.llvm.org/D116786
Andrew Litteken [Thu, 23 Dec 2021 00:07:43 +0000 (18:07 -0600)]
[IRSim][IROutliner] Allowing Intrinsic Calls to be Used in Similarity Matching and Outlined Regions
Due to some complications with lifetime, and assume-like intrinsics, intrinsics were not included as outlinable instructions. This patch opens up most intrinsics, excluding lifetime and assume-like intrinsics, to be outlined. For similarity, it is required that the intrinsic IDs, and the intrinsics names match exactly, as well as the function type. This puts intrinsics in a different class than normal call instructions (https://reviews.llvm.org/D109448), where the name will no longer have to match.
This also adds an additional command line flag debug option to disable outlining intrinsics.
Reviewers: paquette, jroelofs
Differential Revision: https://reviews.llvm.org/D109450
Jordan Rupprecht [Tue, 25 Jan 2022 22:27:25 +0000 (14:27 -0800)]
Zahira Ammarguellat [Tue, 23 Nov 2021 22:58:03 +0000 (14:58 -0800)]
Add support for sycl_special_class attribute.
Special classes such as accessor, sampler, and stream need additional
implementation when they are passed from host to device.
This patch is adding a new attribute “sycl_special_class” used to mark
SYCL classes/struct that need the additional compiler handling.
Dávid Bolvanský [Tue, 25 Jan 2022 22:13:46 +0000 (23:13 +0100)]
Revert "[AlwaysInliner] Enable call site inlining to make flatten attribute working again (#53360)"
This reverts commit
ceec4383681c42bfd3d06a6913ce7554bea160b0. Clang tests fail.
Dávid Bolvanský [Tue, 25 Jan 2022 21:47:16 +0000 (22:47 +0100)]
[AlwaysInliner] Enable call site inlining to make flatten attribute working again (#53360)
Problem: Migration to new PM broke flatten attribute.
This is one use case why LLVM should support inlining call-site with alwaysinline. The flatten attribute is nowdays broken, so we should either land patch like this one or remove everything related to flatten attribute from Clang.
Second use case is something like "per call site inlining intrinsics" to control inlining even more; mentioned in
https://lists.llvm.org/pipermail/cfe-dev/2018-September/059232.html
Fixes https://github.com/llvm/llvm-project/issues/53360
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D117965
Adrian Prantl [Tue, 25 Jan 2022 21:53:14 +0000 (13:53 -0800)]
Revert accidentally pushed commit. It was not yet reviewed.
"Fix UB in DwarfExpression::emitLegacyZExt()"
This reverts commit
e37de5d36e3190283916604342b029859129e2a4.
Adrian Prantl [Tue, 25 Jan 2022 21:52:44 +0000 (13:52 -0800)]
Add missing include diagnosed by the modules build.
Adrian Prantl [Tue, 25 Jan 2022 21:29:22 +0000 (13:29 -0800)]
Fix UB in DwarfExpression::emitLegacyZExt()
A shift-left > 63 triggers a UBSAN failure. This patch kicks the can
down the road (to the consumer) by emitting a more compact
representation of the shift computation in DWARF expressions.
Differential Revision: https://reviews.llvm.org/D118183
Nico Weber [Tue, 25 Jan 2022 21:36:38 +0000 (16:36 -0500)]
Revert "[NFC] Use an llvm::DenseMap instead of std::map in CategorizedHelpPrinter::printOptions"
This reverts commit
6427f4c52c31cc36004b14825e6598cd4a43f385.
Breaks a bunch of tests, see e.g. http://45.33.8.238/linux/66340/step_7.txt
or https://lab.llvm.org/buildbot/#/builders/139/builds/16807
Nico Weber [Tue, 25 Jan 2022 21:31:57 +0000 (16:31 -0500)]
Revert "Fix build issue in assert mode introduced by
6427f4c52c31cc36004"
This reverts commit
d65a3b3265d058ce1f0ac82fa4d0826bf1b2bbaf.
Breaks build everywhere, see e.g. http://45.33.8.238/linux/66344/step_4.txt
or https://lab.llvm.org/buildbot/#/builders/139/builds/16811
serge-sans-paille [Tue, 25 Jan 2022 21:25:57 +0000 (22:25 +0100)]
Fix build issue in assert mode introduced by
6427f4c52c31cc36004
After
6427f4c52c31cc36004, one should use SortedCategories to check category
validity.
Andrew Litteken [Sun, 2 Jan 2022 20:31:47 +0000 (14:31 -0600)]
[IRSim][IROutliner] Adding support for recognizing and outlining indirect function calls, and function calls with different names, but the same type
The outliner currently requires that function calls not be indirect calls, and have that the function name, and function type must match, as well as other attributes such as calling conventions. This patch treats called functions as values, and just another operand, and named function calls as constants. This allows functions to be treated like any other constant, or input and output into the outlined functions.
There are also debugging flags added to enforce the old behaviors where indirect calls not be allowed, and to enforce the old rule that function calls names must also match.
Reviewers: paquette, jroelofs
Differential Revision: https://reviews.llvm.org/D109448
Paweł Bylica [Sun, 23 Jan 2022 17:24:17 +0000 (18:24 +0100)]
[test][DAGCombine] Add tests for cmp+add -> addcarry
Tests for https://reviews.llvm.org/D118037.
Ellis Hoag [Tue, 25 Jan 2022 20:29:11 +0000 (12:29 -0800)]
[InstrProf][Correlator] Do not compress names when reading debug info
There is no need to compress the names string when correlating with
debug info since InstrProfReader will immediately uncompress it anyway.
This also removes the dependency on zlib in this case.
Reviewed By: kyulee
Differential Revision: https://reviews.llvm.org/D118176
serge-sans-paille [Tue, 25 Jan 2022 20:48:51 +0000 (15:48 -0500)]
[NFC] Use an llvm::DenseMap instead of std::map in CategorizedHelpPrinter::printOptions
serge-sans-paille [Tue, 25 Jan 2022 09:32:33 +0000 (04:32 -0500)]
Remove unused <algorithm> include
Fangrui Song [Tue, 25 Jan 2022 20:39:32 +0000 (12:39 -0800)]
[docs] HowToCrossCompileLLVM.rst: prefer --target= over legacy -target
Louis Dionne [Tue, 25 Jan 2022 20:26:32 +0000 (15:26 -0500)]
[libc++][NFC] Fix typo
Dávid Bolvanský [Tue, 25 Jan 2022 20:24:05 +0000 (21:24 +0100)]
[NFC] Added test with select with unpredictable metadata; regenerate x86-cmov-converter.ll
Tue Ly [Tue, 25 Jan 2022 14:54:01 +0000 (09:54 -0500)]
[libc] Make logf function correctly rounded for all rounding modes.
Make logf function correctly rounded for all rounding modes.
Reviewed By: sivachandra, zimmermann6, santoshn, jpl169
Differential Revision: https://reviews.llvm.org/D118149
Aleksandr Platonov [Tue, 25 Jan 2022 19:46:25 +0000 (22:46 +0300)]
[analyzer] Don't specify PLUGIN_TOOL for analyzer plugins
Analyzer plugins explicitly export clang_registerCheckers and clang_analyzerAPIVersionString symbols, so we don't need to specify a tool to link agains.
Also, without this patch MSVC build fails with cmake flags -DLLVM_ENABLE_PLUGINS=On -DCLANG_PLUGINS_SUPPORT=On -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=On
```
[936/936] Linking CXX shared module bin\SampleAnalyzerPlugin.dll
FAILED: bin/SampleAnalyzerPlugin.dll
cmd.exe /C "cd . && "D:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=tools\clang\lib\Analysis\plugins\SampleAnalyzer\CMakeFiles\SampleAnalyzerPlugin.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\Hostx64\x64\link.exe /nologo tools\clang\lib\Analysis\plugins\SampleAnalyzer\CMakeFiles\SampleAnalyzerPlugin.dir\MainCallChecker.cpp.obj /out:bin\SampleAnalyzerPlugin.dll /implib:lib\SampleAnalyzerPlugin.lib /pdb:bin\SampleAnalyzerPlugin.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /DEF:"D:/work/llvm-project-original/build-plugins/tools/clang/lib/Analysis/plugins/SampleAnalyzer/SampleAnalyzerPlugin.def" lib\clang.lib lib\clangAnalysis.lib lib\clangAST.lib lib\clangStaticAnalyzerCore.lib lib\clangStaticAnalyzerFrontend.lib lib\clangStaticAnalyzerCheckers.lib lib\clangStaticAnalyzerCore.lib lib\clangCrossTU.lib lib\clangIndex.lib lib\clangFormat.lib lib\clangToolingInclusions.lib lib\clangFrontend.lib lib\clangDriver.lib version.lib lib\clangParse.lib lib\clangSerialization.lib lib\clangSema.lib lib\clangAnalysis.lib lib\clangEdit.lib lib\LLVMOption.lib lib\clangToolingCore.lib lib\clangRewrite.lib lib\clangASTMatchers.lib lib\clangAST.lib lib\clangLex.lib lib\clangBasic.lib lib\LLVMFrontendOpenMP.lib lib\LLVMScalarOpts.lib lib\LLVMAggressiveInstCombine.lib lib\LLVMInstCombine.lib lib\LLVMTransformUtils.lib lib\LLVMAnalysis.lib lib\LLVMProfileData.lib lib\LLVMDebugInfoDWARF.lib lib\LLVMObject.lib lib\LLVMBitReader.lib lib\LLVMCore.lib lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMMCParser.lib lib\LLVMMC.lib lib\LLVMDebugInfoCodeView.lib lib\LLVMTextAPI.lib lib\LLVMBinaryFormat.lib lib\LLVMSupport.lib psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib delayimp.lib -delayload:shell32.dll -delayload:ole32.dll lib\LLVMDemangle.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\Hostx64\x64\link.exe /nologo tools\clang\lib\Analysis\plugins\SampleAnalyzer\CMakeFiles\SampleAnalyzerPlugin.dir\MainCallChecker.cpp.obj /out:bin\SampleAnalyzerPlugin.dll /implib:lib\SampleAnalyzerPlugin.lib /pdb:bin\SampleAnalyzerPlugin.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /DEF:D:/work/llvm-project-original/build-plugins/tools/clang/lib/Analysis/plugins/SampleAnalyzer/SampleAnalyzerPlugin.def lib\clang.lib lib\clangAnalysis.lib lib\clangAST.lib lib\clangStaticAnalyzerCore.lib lib\clangStaticAnalyzerFrontend.lib lib\clangStaticAnalyzerCheckers.lib lib\clangStaticAnalyzerCore.lib lib\clangCrossTU.lib lib\clangIndex.lib lib\clangFormat.lib lib\clangToolingInclusions.lib lib\clangFrontend.lib lib\clangDriver.lib version.lib lib\clangParse.lib lib\clangSerialization.lib lib\clangSema.lib lib\clangAnalysis.lib lib\clangEdit.lib lib\LLVMOption.lib lib\clangToolingCore.lib lib\clangRewrite.lib lib\clangASTMatchers.lib lib\clangAST.lib lib\clangLex.lib lib\clangBasic.lib lib\LLVMFrontendOpenMP.lib lib\LLVMScalarOpts.lib lib\LLVMAggressiveInstCombine.lib lib\LLVMInstCombine.lib lib\LLVMTransformUtils.lib lib\LLVMAnalysis.lib lib\LLVMProfileData.lib lib\LLVMDebugInfoDWARF.lib lib\LLVMObject.lib lib\LLVMBitReader.lib lib\LLVMCore.lib lib\LLVMRemarks.lib lib\LLVMBitstreamReader.lib lib\LLVMMCParser.lib lib\LLVMMC.lib lib\LLVMDebugInfoCodeView.lib lib\LLVMTextAPI.lib lib\LLVMBinaryFormat.lib lib\LLVMSupport.lib psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib delayimp.lib -delayload:shell32.dll -delayload:ole32.dll lib\LLVMDemangle.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:bin\SampleAnalyzerPlugin.dll.manifest" failed (exit code 1169) with the following output:
clangStaticAnalyzerCore.lib(BugReporter.cpp.obj) : error LNK2005: "public: __cdecl clang::ento::PathSensitiveBugReport::PathSensitiveBugReport(class clang::ento::BugType const &,class llvm::StringRef,class llvm::StringRef,class clang::ento::ExplodedNode const *,class clang::ento::PathDiagnosticLocation,class clang::Decl const *)" (??0PathSensitiveBugReport@ento@clang@@QEAA@AEBVBugType@12@VStringRef@llvm@@1PEBVExplodedNode@12@VPathDiagnosticLocation@12@PEBVDecl@2@@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(BugReporter.cpp.obj) : error LNK2005: "private: virtual void __cdecl clang::ento::BugType::anchor(void)" (?anchor@BugType@ento@clang@@EEAAXXZ) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(SVals.cpp.obj) : error LNK2005: "public: class clang::FunctionDecl const * __cdecl clang::ento::SVal::getAsFunctionDecl(void)const " (?getAsFunctionDecl@SVal@ento@clang@@QEBAPEBVFunctionDecl@3@XZ) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(ProgramState.cpp.obj) : error LNK2005: "void __cdecl clang::ento::ProgramStateRelease(class clang::ento::ProgramState const *)" (?ProgramStateRelease@ento@clang@@YAXPEBVProgramState@12@@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(ProgramState.cpp.obj) : error LNK2005: "void __cdecl clang::ento::ProgramStateRetain(class clang::ento::ProgramState const *)" (?ProgramStateRetain@ento@clang@@YAXPEBVProgramState@12@@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(Environment.cpp.obj) : error LNK2005: "public: __cdecl clang::ento::EnvironmentEntry::EnvironmentEntry(class clang::Stmt const *,class clang::LocationContext const *)" (??0EnvironmentEntry@ento@clang@@QEAA@PEBVStmt@2@PEBVLocationContext@2@@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(Environment.cpp.obj) : error LNK2005: "public: class clang::ento::SVal __cdecl clang::ento::Environment::getSVal(class clang::ento::EnvironmentEntry const &,class clang::ento::SValBuilder &)const " (?getSVal@Environment@ento@clang@@QEBA?AVSVal@23@AEBVEnvironmentEntry@23@AEAVSValBuilder@23@@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(CheckerManager.cpp.obj) : error LNK2005: "public: void __cdecl clang::ento::CheckerManager::_registerForPreStmt(class clang::ento::CheckerFn<void __cdecl(class clang::Stmt const *,class clang::ento::CheckerContext &)>,bool (__cdecl*)(class clang::Stmt const *))" (?_registerForPreStmt@CheckerManager@ento@clang@@QEAAXV?$CheckerFn@$$A6AXPEBVStmt@clang@@AEAVCheckerContext@ento@2@@Z@23@P6A_NPEBVStmt@3@@Z@Z) already defined in clang.lib(clang.exe)
clangStaticAnalyzerCore.lib(CoreEngine.cpp.obj) : error LNK2005: "protected: class clang::ento::ExplodedNode * __cdecl clang::ento::NodeBuilder::generateNodeImpl(class clang::ProgramPoint const &,class llvm::IntrusiveRefCntPtr<class clang::ento::ProgramState const >,class clang::ento::ExplodedNode *,bool)" (?generateNodeImpl@NodeBuilder@ento@clang@@IEAAPEAVExplodedNode@23@AEBVProgramPoint@3@V?$IntrusiveRefCntPtr@$$CBVProgramState@ento@clang@@@llvm@@PEAV423@_N@Z) already defined in clang.lib(clang.exe)
LLVMSupport.lib(SmallVector.cpp.obj) : error LNK2005: "protected: void __cdecl llvm::SmallVectorBase<unsigned int>::grow_pod(void *,unsigned __int64,unsigned __int64)" (?grow_pod@?$SmallVectorBase@I@llvm@@IEAAXPEAX_K1@Z) already defined in clang.lib(clang.exe)
LLVMSupport.lib(FoldingSet.cpp.obj) : error LNK2005: "protected: __cdecl llvm::FoldingSetBase::~FoldingSetBase(void)" (??1FoldingSetBase@llvm@@IEAA@XZ) already defined in clang.lib(clang.exe)
clangAST.lib(ASTImporter.cpp.obj) : error LNK2005: "public: __cdecl clang::ASTImporter::ASTImporter(class clang::ASTContext &,class clang::FileManager &,class clang::ASTContext &,class clang::FileManager &,bool,class std::shared_ptr<class clang::ASTImporterSharedState>)" (??0ASTImporter@clang@@QEAA@AEAVASTContext@1@AEAVFileManager@1@01_NV?$shared_ptr@VASTImporterSharedState@clang@@@std@@@Z) already defined in clang.lib(clang.exe)
clangAST.lib(ASTImporter.cpp.obj) : error LNK2005: "public: class llvm::Expected<class clang::Decl *> __cdecl clang::ASTImporter::Import(class clang::Decl *)" (?Import@ASTImporter@clang@@QEAA?AV?$Expected@PEAVDecl@clang@@@llvm@@PEAVDecl@2@@Z) already defined in clang.lib(clang.exe)
clangAST.lib(ExternalASTSource.cpp.obj) : error LNK2005: "public: virtual __cdecl clang::ExternalASTSource::~ExternalASTSource(void)" (??1ExternalASTSource@clang@@UEAA@XZ) already defined in clang.lib(clang.exe)
clangAST.lib(ExternalASTSource.cpp.obj) : error LNK2005: "public: virtual void __cdecl clang::ExternalASTSource::CompleteRedeclChain(class clang::Decl const *)" (?CompleteRedeclChain@ExternalASTSource@clang@@UEAAXPEBVDecl@2@@Z) already defined in clang.lib(clang.exe)
clangAST.lib(ExternalASTSource.cpp.obj) : error LNK2005: "public: virtual void __cdecl clang::ExternalASTSource::CompleteType(class clang::ObjCInterfaceDecl *)" (?CompleteType@ExternalASTSource@clang@@UEAAXPEAVObjCInterfaceDecl@2@@Z) already defined in clang.lib(clang.exe)
...
```
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D116966
Pavel Labath [Tue, 25 Jan 2022 19:49:55 +0000 (20:49 +0100)]
[lldb] Fix ProcessKDPLog for the logging refactor
Argyrios Kyrtzidis [Tue, 25 Jan 2022 01:49:37 +0000 (17:49 -0800)]
[cmake] Some NFC changes in preparation for accomodating `Ninja Multi-Config`
* Use `MATCHES` so that `Ninja Multi-Config` generator also satisfies the Ninja check
* Pull out a couple of values into variables, inside `function(tablegen project ofn)`, NFC
Differential Revision: https://reviews.llvm.org/D118100
MaheshRavishankar [Tue, 25 Jan 2022 19:44:54 +0000 (11:44 -0800)]
[mlir][Linalg] Add couple of convenience methods to `LinalgInterface`.
Add methods to
- Get block argument that is tied with an opOperand
- Get the yield value that is tied with a output opOperand.
Differential Revision: https://reviews.llvm.org/D118085
Yitzhak Mandelbaum [Wed, 29 Dec 2021 15:46:43 +0000 (15:46 +0000)]
[libTooling] Adds more support for constructing object access expressions.
This patch adds a `buildAccess` function, which constructs a string with the
proper operator to use based on the expression's form and type. It also adds two
predicates related to smart pointers, which are needed by `buildAccess` but are
also of general value.
We deprecate `buildDot` and `buildArrow` in favor of the more general
`buildAccess`. These will be removed in a future patch.
Differential Revision: https://reviews.llvm.org/D116377
MaheshRavishankar [Tue, 25 Jan 2022 18:58:53 +0000 (10:58 -0800)]
[mlir][Linalg] Fix incorrect fusion with reshape ops by linearization.
Fusion of reshape ops by linearization incorrectly inverted the
indexing map before linearizing dimensions. This leads to incorrect
indexing maps used in the fused operation.
Differential Revision: https://reviews.llvm.org/D117908
JackAKirk [Mon, 24 Jan 2022 20:32:36 +0000 (12:32 -0800)]
[CUDA,NVPTX] Corrected fragment size for tf32 LD B matrix.
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D118023
Petr Hosek [Tue, 25 Jan 2022 17:37:14 +0000 (09:37 -0800)]
[CMake] Set sanitizer test C++ library on Linux
We always want to use the in-tree libc++ for tests.
Differential Revision: https://reviews.llvm.org/D118161
Andrew Litteken [Wed, 22 Dec 2021 23:42:10 +0000 (17:42 -0600)]
[IROutliner] Disallow outlining calls that return twice.
Functions that return twice can cause the IR Outliner to miscompile the given program. These function rely on information about the stack to be the same, and this may not necessarily be the case if called from an outlined function. So, we simply call these instructions illegal for the outliner to remove.
Reviewers: paquette
Differential Revision: https://reviews.llvm.org/D110007
Ellis Hoag [Tue, 25 Jan 2022 04:08:35 +0000 (20:08 -0800)]
[InstrProf][correlation] Read DWARFv5 `OP_addrx` location
Correctly read `OP_addrx` type encodings for DWARFv5 locations.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D118098
Mark de Wever [Tue, 25 Jan 2022 18:59:24 +0000 (19:59 +0100)]
[libc++][nfc] Update formatting of some tests.
These tests were formatted with older clang-format settings, this
updates them to the current settings.
In order to implement P2216 a lot of changes to these tests are
required. This makes it easier to review those patches.
David Tenty [Tue, 25 Jan 2022 04:20:18 +0000 (23:20 -0500)]
[compiler-rt][profile][AIX] pass extra link opts for test
The AIX linker doesn't export any symbols by default, so an export list is usually used. Since clang doesn't have the tools to auto-generate an export list yet, just pass the linker an extra opt to tell it to export everything. This is generally not recommended for real shared libs, but is fine for the purpose of this test.
Differential Revision: https://reviews.llvm.org/D118101
Benjamin Kramer [Tue, 25 Jan 2022 18:36:52 +0000 (19:36 +0100)]
[Support] #include <new> for std::align_val_t
This is only used when aligned new is enabled.
MaheshRavishankar [Tue, 25 Jan 2022 18:36:34 +0000 (10:36 -0800)]
[mlir][Linalg] Disallow ops with index semantics in `PushExpandingReshape`.
This pattern is not written to handle operations with `linalg.index`
operations in its body, i.e. operations that have index semantics.
Differential Revision: https://reviews.llvm.org/D117856
Casey Carter [Sun, 2 Jan 2022 05:53:37 +0000 (21:53 -0800)]
[libcxx][test] Use bool allocators for vector<bool>::get_allocator test
... to be consistent with other `get_allocator` tests, and to avoid requiring `vector<T, allocator<U>>` to be valid.
Fangrui Song [Tue, 25 Jan 2022 18:29:04 +0000 (10:29 -0800)]
[ELF] Parallelize --compress-debug-sections=zlib
When linking a Debug build clang (265MiB SHF_ALLOC sections, 920MiB uncompressed
debug info), in a --threads=1 link "Compress debug sections" takes 2/3 time and
in a --threads=8 link "Compress debug sections" takes ~70% time.
This patch splits a section into 1MiB shards and calls zlib `deflake` parallelly.
DEFLATE blocks are a bit sequence. We need to ensure every shard starts
at a byte boundary for concatenation. We use Z_SYNC_FLUSH for all shards
but the last to flush the output to a byte boundary. (Z_FULL_FLUSH can
be used as well, but Z_FULL_FLUSH clears the hash table which just
wastes time.)
The last block requires the BFINAL flag. We call deflate with Z_FINISH
to set the flag as well as flush the output to a byte boundary. Under
the hood, all of Z_SYNC_FLUSH, Z_FULL_FLUSH, and Z_FINISH emit a
non-compressed block (called stored block in zlib). RFC1951 says "Any
bits of input up to the next byte boundary are ignored."
In a --threads=8 link, "Compress debug sections" is 5.7x as fast and the total
speed is 2.54x. Because the hash table for one shard is not shared with the next
shard, the output is slightly larger. Better compression ratio can be achieved
by preloading the window size from the previous shard as dictionary
(`deflateSetDictionary`), but that is overkill.
```
# 1MiB shards
% bloaty clang.new -- clang.old
FILE SIZE VM SIZE
-------------- --------------
+0.3% +129Ki [ = ] 0 .debug_str
+0.1% +105Ki [ = ] 0 .debug_info
+0.3% +101Ki [ = ] 0 .debug_line
+0.2% +2.66Ki [ = ] 0 .debug_abbrev
+0.0% +1.19Ki [ = ] 0 .debug_ranges
+0.1% +341Ki [ = ] 0 TOTAL
# 2MiB shards
% bloaty clang.new -- clang.old
FILE SIZE VM SIZE
-------------- --------------
+0.2% +74.2Ki [ = ] 0 .debug_line
+0.1% +72.3Ki [ = ] 0 .debug_str
+0.0% +69.9Ki [ = ] 0 .debug_info
+0.1% +976 [ = ] 0 .debug_abbrev
+0.0% +882 [ = ] 0 .debug_ranges
+0.0% +218Ki [ = ] 0 TOTAL
```
Bonus in not using zlib::compress
* we can compress a debug section larger than 4GiB
* peak memory usage is lower because for most shards the output size is less
than 50% input size (all less than 55% for a large binary I tested, but
decreasing the initial output size does not decrease memory usage)
Reviewed By: ikudrin
Differential Revision: https://reviews.llvm.org/D117853
serge-sans-paille [Tue, 25 Jan 2022 14:53:40 +0000 (09:53 -0500)]
Cleanup header dependencies of llvm/Support/Compiler.h
<new> and <cstdef> were introduced in
aa60b3fd875c3 but the dependency
is now dead.
As a consequence you may need to include <new> where you use it while it
was auto-included as an implicit dependency before.
The impact on the codebase is small, as <new> is a very small header
(<100 SLOC) but it gets included everywhere, so that somehow counts (?)
Mark de Wever [Tue, 25 Jan 2022 18:23:48 +0000 (19:23 +0100)]
[libc++][doc] Update format implementation status.
eopXD [Fri, 21 Jan 2022 19:29:10 +0000 (11:29 -0800)]
[Clang][RISCV] Guard vmulh, vsmul correctly
According to v-spec 1.0, `vmulh`, `vmulhu`, `vmulhsu` and `vsmul` are
NOT supported for EEW=64 in Zve64*.
This patch tries to guard it correctly.
Authored by: Craig Topper <craig.topper@sifive.com> @craig.topper
Co-Authored by: Eop Chen <eop.chen@sifive.com> @eopXD
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117913
David Green [Tue, 25 Jan 2022 18:10:09 +0000 (18:10 +0000)]
[AArch64] Add extra vecreduce.add tests, including extending reductions. NFC
This is all the reductions from i8 -> i64 with either sign or zero
extensions.
Zinovy Nis [Sat, 15 Jan 2022 13:07:51 +0000 (16:07 +0300)]
[clang-tidy] [bugprone-assert-side-effect] Ignore list for functions/methods
A semicolon-separated list of the names of functions or methods to be considered as not having side-effects was added for bugprone-assert-side-effect. It can be used to exclude methods like iterator::begin/end from being considered as having side-effects.
Differential Revision: https://reviews.llvm.org/D116478
Jonas Devlieghere [Tue, 25 Jan 2022 17:58:36 +0000 (09:58 -0800)]
[lldb] Only include mach headers on Darwin
David Blaikie [Tue, 25 Jan 2022 17:55:48 +0000 (09:55 -0800)]
Improve relnotes for the DWARFv5 default change
eopXD [Sat, 22 Jan 2022 08:46:36 +0000 (00:46 -0800)]
[RISCV] Don't allow i64 vector div by constant to use mulh with Zve64x
EEW=64 of mulh and its vairants requires V extension.
Authored by: Craig Topper <craig.topper@sifive.com> @craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117947
Steven Wan [Tue, 25 Jan 2022 17:38:42 +0000 (12:38 -0500)]
Disable Go binding test on AIX
Disable the Go binding test on AIX because building the binding on AIX with Clang is currently unsupported.
Reviewed By: ZarkoCA
Differential Revision: https://reviews.llvm.org/D117505
Jonas Devlieghere [Thu, 18 Nov 2021 22:25:23 +0000 (14:25 -0800)]
[lldb] Use new dyld SPIs to query the shared cache local symbols
rdar://
85492172
Andrew Litteken [Wed, 22 Dec 2021 21:37:48 +0000 (15:37 -0600)]
[IROutliner] Allowing Phi Nodes in exit blocks
In addition to having multiple exit locations, there can be multiple blocks leading to the same exit location, which results in a potential phi node. If we find that multiple blocks within the region branch to the same block outside the region, resulting in a phi node, the code extractor pulls this phi node into the function and uses it as an output.
We make sure that this phi node is given an output slot, and that the two values are removed from the outputs if they are not used anywhere else outside of the region. Across the extracted regions, the phi nodes are combined into a single block for each potential output block, similar to the previous patch.
Reviewers: paquette
Differential Revision: https://reviews.llvm.org/D106995
Ashley Hedberg [Tue, 25 Jan 2022 15:42:49 +0000 (15:42 +0000)]
Add assert on End iteration distance to Rewriter::getRewrittenText.
I currently have code that is crashing in the second std::advance call,
and it was not straightforward to identify the problem, as the first line
of the stacktrace is in RopePieceBTreeIterator::operator++:
```
*** SIGILL; stack trace: ***
PC: clang/include/clang/Rewrite/Core/RewriteRope.h:119 clang::RopePieceBTreeIterator::operator++()
../include/c++/v1/__iterator/advance.h:35 std::__u::__advance<>()
../include/c++/v1/__iterator/advance.h:65 std::__u::advance<>()
clang/lib/Rewrite/Rewriter.cpp:228 clang::Rewriter::getRewrittenText()
clang/include/clang/Rewrite/Core/Rewriter.h:106 clang::Rewriter::getRewrittenText()
```
Adding an assertion produces a friendlier error message for the caller.
Reviewed By: gribozavr2
Differential Revision: https://reviews.llvm.org/D117579
Leonard Grey [Mon, 24 Jan 2022 22:27:56 +0000 (17:27 -0500)]
[lld-macho] Move order file and call graph sorting into SectionPriorities
See https://reviews.llvm.org/D117354 for context and discussion.
Leonard Grey [Mon, 24 Jan 2022 21:51:51 +0000 (16:51 -0500)]
[lld-macho] Rename CallGraphSort.{h,cpp} to SectionPriorities
This is in preparation for moving the code that parses and processes
order files into this file.
See https://reviews.llvm.org/D117354 for context and discussion.
Adrian Prantl [Tue, 25 Jan 2022 17:08:13 +0000 (09:08 -0800)]
Add missing include diagnosed by moduels build.
Alex Brachet [Tue, 25 Jan 2022 16:37:43 +0000 (16:37 +0000)]
[libc][NFC] Workaround clang assertion in inline asm
The clobber list "cc" is added to inline assembly to workaround a clang assertion that triggers when building with a clang built with assertions enabled. See bug [53391](https://github.com/llvm/llvm-project/issues/53391).
See https://godbolt.org/z/z3bc6a9PM showing functionally same output assembly.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D118099
Stanislav Gatev [Mon, 24 Jan 2022 16:17:22 +0000 (16:17 +0000)]
[clang][dataflow] Add a transfer function for InitListExpr
This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.
Reviewed-by: xazax.hun
Differential Revision: https://reviews.llvm.org/D118119
Ben Langmuir [Tue, 25 Jan 2022 00:05:49 +0000 (16:05 -0800)]
Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT
Add missing dependency on llvm-jitlink when building compiler-rt with
LLVM_BUILD_EXTERNAL_COMPILER_RT. Previously we would
non-deterministically fail the tests due to the missing binary.
rdar://
87247681
Differential Revision: https://reviews.llvm.org/D118087
Simon Pilgrim [Tue, 25 Jan 2022 16:23:10 +0000 (16:23 +0000)]
[X86] Regenerate avx-vbroadcast.ll
Remove '' around mattr to stop update script crash and use X86 prefixes instead of X32
Nikita Popov [Tue, 25 Jan 2022 16:20:26 +0000 (17:20 +0100)]
[SanitizerCoverage] Avoid pointer element type access
Use the load/store type instead.
serge-sans-paille [Tue, 25 Jan 2022 14:53:09 +0000 (09:53 -0500)]
Always use df_iterator_default_set as default set type for [i]df_ext_iterator
This is consistent with other default values in this file.
serge-sans-paille [Tue, 25 Jan 2022 14:52:15 +0000 (09:52 -0500)]
[NFC] Refine header dependencies of llvm/ADT/Any.h
Tue Ly [Tue, 25 Jan 2022 02:35:25 +0000 (21:35 -0500)]
[libc] Implement log10f correctly rounded for all rounding modes.
Based on RLIBM implementation similar to logf and log2f. Most of the exceptional inputs are the exact powers of 10.
Reviewed By: sivachandra, zimmermann6, santoshn, jpl169
Differential Revision: https://reviews.llvm.org/D118093
Sean Fertile [Thu, 20 Jan 2022 18:30:42 +0000 (13:30 -0500)]
[PowerPC][AIX] Override markFunctionEnd()
During fast-isel calling 'markFunctionEnd' in the base class will call
tidyLandingPads. This can cause an issue where we have determined that
we need ehinfo and emitted a traceback table with the bits set to
indicate that we will be emitting the ehinfo, but the tidying deletes
all landing pads. In this case we end up emitting a reference to
__ehinfo.N symbol, but not emitting a definition to said symbol and the
resulting file fails to assemble.
Differential Revision: https://reviews.llvm.org/D117040
Simon Pilgrim [Tue, 25 Jan 2022 14:58:20 +0000 (14:58 +0000)]
[X86][AVX] Add PR47194 shuffle test case
Balázs Kéri [Tue, 25 Jan 2022 14:09:31 +0000 (15:09 +0100)]
[clang-tidy] Change code of SignalHandlerCheck (NFC).
Using clang::CallGraph to get the called functions.
This makes a better foundation to improve support for
C++ and print the call chain.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D118016
Florian Hahn [Tue, 25 Jan 2022 14:49:17 +0000 (14:49 +0000)]
[GVN] Add tests for loop load PRE through select.
Jim Lin [Tue, 25 Jan 2022 07:05:43 +0000 (15:05 +0800)]
[clang-tidy] Pop Files only if FileChangeReason is ExitFile
enum FileChangeReason has four possible type EnterFile, ExitFile,
SystemHeaderPragma and RenameFile,
It should pop the back element of Files only if FileChangeReason is ExitFile.
Nikita Popov [Tue, 25 Jan 2022 14:20:32 +0000 (15:20 +0100)]
[SLC] Fix pointer diff type in sprintf() optimization
We should always be calculating a byte-wise difference here.
Previously this calculated the pointer difference while taking
the pointer element type into account, which is incorrect.
Benjamin Kramer [Tue, 25 Jan 2022 14:17:07 +0000 (15:17 +0100)]
[mlir] Move duplicated BufferizableOpInterface::kBufferLayoutAttrName defs to a single place
Sebastian Neubauer [Mon, 24 Jan 2022 17:46:33 +0000 (18:46 +0100)]
[AMDGPU] Only match correct type for a16
Addresses are floats when a sampler is present and unsigned integers
when no sampler is present.
Therefore, only zext instructions, not sext instructions should match.
Also match integer constants that can be truncated.
Differential Revision: https://reviews.llvm.org/D118043
Nikita Popov [Tue, 25 Jan 2022 13:52:01 +0000 (14:52 +0100)]
[MemProf] Avoid pointer element type access
Determine the masked load/store access type from the value type
of the intrinsics, rather than the pointer element type. For
cleanliness, include the access type in InterestingMemoryAccess.
Nikita Popov [Tue, 25 Jan 2022 13:39:22 +0000 (14:39 +0100)]
[OpenMPIRBuilderTest] Avoid some pointer element type accesses (NFC)
Use isOpaqueOrPointeeTypeMatches() instead, where possible.
Hans Wennborg [Mon, 24 Jan 2022 14:25:17 +0000 (15:25 +0100)]
Add llvm-dwp to LLVM_TOOLCHAIN_TOOLS
since it qualifies as a toolchain tool rather than "internal llvm tool".
This will make it part of builds which set the
LLVM_INSTALL_TOOLCHAIN_ONLY cmake option, such as the Windows installer.
Differential revision: https://reviews.llvm.org/D118042
Nikita Popov [Tue, 25 Jan 2022 13:31:51 +0000 (14:31 +0100)]
[AsmParserTest] Avoid pointer element type accesses (NFC)
Use isOpaqueOrPointeeTypeEquals() instead.
Nikita Popov [Tue, 25 Jan 2022 13:25:48 +0000 (14:25 +0100)]
[GlobalISel] Avoid pointer element type access during InlineAsm lowering
Same change as has been made for the SDAG lowering.
Christian Kühnel [Mon, 13 Dec 2021 15:14:31 +0000 (15:14 +0000)]
[NFC][clangd] cleaning up llvm-qualified-auto
This is a cleanup of all llvm-qualified-auto findings.
This patch was created by automatically applying the fixes from
clang-tidy.
Differential Revision: https://reviews.llvm.org/D113898
Matthias Springer [Tue, 25 Jan 2022 13:05:35 +0000 (22:05 +0900)]
[mlir][linalg][bufferize] Support tensor.from_elements
This is mostly a copy of the existing tensor.from_elements bufferization. Once TensorInterfaceImpl.cpp is moved to the tensor dialect, the existing rewrite pattern can be deleted.
Differential Revision: https://reviews.llvm.org/D117775
Matthias Springer [Tue, 25 Jan 2022 13:05:10 +0000 (22:05 +0900)]
[mlir][linalg][bufferize] Support tensor.generate
This is mostly a copy of the existing tensor.generate bufferization. Once TensorInterfaceImpl.cpp is moved to the tensor dialect, the existing rewrite pattern can be deleted.
Differential Revision: https://reviews.llvm.org/D117770