Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/merge upstream 20210401 #45

Merged
merged 2,212 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2212 commits
Select commit Hold shift + click to select a range
7c2e58f
[NFC][scudo] Produce debug info
vitalybuka Mar 30, 2021
c352a2b
[lli] Add option -lljit-platform=Inactive to disable platform support…
weliveindetail Mar 30, 2021
083b0f1
[AMDGPU] Update AMDGPU PAL usage documentation
trenouf Mar 30, 2021
1a2d25f
Revert "[lldb/DWARF] Simplify DIE extraction code slightly"
labath Mar 30, 2021
275df61
[X86] Pass to transform tdpbsud&tdpbusd&tdpbuud intrinsics to scalar …
yubingex007-a11y Mar 24, 2021
4ca8607
[InstructionCost] Don't conflate Invalid costs with Unknown costs.
sdesmalen-arm Mar 30, 2021
0c63b86
Revert "[X86] Pass to transform tdpbsud&tdpbusd&tdpbuud intrinsics to…
yubingex007-a11y Mar 30, 2021
ad613b1
[docs] remove references to checking out svn repos
nunoplopes Mar 30, 2021
1cbba53
[ObjC][CodeGen] Fix missing debug info in situations where an instanc…
Teemperor Mar 30, 2021
6919c58
[lldb] Add a test for Obj-C properties with conflicting names
Teemperor Mar 30, 2021
6d2fb3c
[clangd] Perform merging for stale symbols in MergeIndex
kadircet Mar 12, 2021
c4d39f6
[AArch64][SVE] Lower fixed length EXTRACT_VECTOR_ELT
Mar 23, 2021
a7dde4c
[AArch64][SVE] Lower fixed length INSERT_VECTOR_ELT
Mar 29, 2021
d1486e6
[lldb] Change CreateHostNativeRegisterContextLinux argument type
labath Mar 30, 2021
8e7df99
Revert "[loop-idiom] Hoist loop memcpys to loop preheader"
krasimirgg Mar 30, 2021
98f6cbd
[ASTImporter] Import member specialization/instantiation of enum decls
Mar 26, 2021
c42c67a
Re-apply "[lli] Make -jit-kind=orc the default JIT engine"
weliveindetail Mar 30, 2021
a08c773
[LoopVectorize] Add support for scalable vectorization of induction v…
david-arm Mar 10, 2021
2aba2f1
[RegAlloc] Add a test with use in statepoint expected to be on stack.
Mar 30, 2021
d4b3380
[ARM] Handle Splats in MVE lane interleaving
davemgreen Mar 30, 2021
243fe0d
[lli] Leaving two EH frame tests with MCJIT only after PowerPC failure
weliveindetail Mar 30, 2021
42c3b5e
Fix cleanup error in TestVSCode_disconnect.test_launch
omjavaid Mar 30, 2021
8315890
[gn build] (semi-manually) port 51fa9e0fd984
nico Mar 30, 2021
f71ed5d
NFC: Migrate PartialInlining to work on InstructionCost
sdesmalen-arm Feb 25, 2021
6b4b1dc
[LoopUnswitch] Simplify branch condition if it is select with constan…
aqjune Mar 30, 2021
c5109d3
Fix path in test added in e0577b3130a646b0ee090c04a40400483031c7a9 to…
dyung Mar 30, 2021
e694e19
[x86] enhance matching of pmaddwd
rotateright Mar 30, 2021
a99b8ae
[clang] [PR49736] [C++2b] Correctly reject lambdas with requires clau…
mkurdej Mar 30, 2021
64bb9cf
[lldb] [Process/gdb-remote] Fix TID reading to use U64
mgorny Mar 30, 2021
6b3fb47
Move test to X86 directory
ostannard Mar 30, 2021
c51e91e
Revert "[Passes] Add relative lookup table converter pass"
krasimirgg Mar 30, 2021
69473d6
[gn build] Port c51e91e04681
llvmgnsyncbot Mar 30, 2021
2b30bd2
clang-format: [JS] do not collapse - - to --.
mprobst Mar 29, 2021
1696b8a
[OPENMP]Fix PR48740: OpenMP declare reduction in C does not require a…
alexey-bataev Mar 29, 2021
efa7df1
[Analyzer] Track RValue expressions
Mar 25, 2021
9037730
[analyzer] Support allocClassWithName in OSObjectCStyleCast checker
SavchenkoValeriy Mar 29, 2021
180e9e5
[libc++] Add a CI job to test the Runtimes build
ldionne Mar 16, 2021
af7e1f0
[analyzer] Fix crash when reasoning about C11 atomics (PR49422)
SavchenkoValeriy Mar 24, 2021
6c1a803
[lldb] [server] Support for multiprocess extension
mgorny Mar 30, 2021
1c3b74f
[AMDGPU] Remove outdated TODOs. NFC
Flakebi Mar 30, 2021
ce03a86
[lldb] Remove linux/mips debugging support
labath Mar 29, 2021
80fb743
[test, HardwareLoops] Fix use of var defined in CHECK-NOT
Mar 28, 2021
f584633
Added static verification for Linalg Ops.
inho9606 Mar 30, 2021
8b5b03c
[test, LoopVectorize] Fix use of var defined in CHECK-NOT
Mar 28, 2021
bd334c7
[OPENMP]Fix test checks for 32bit targets, NFC.
alexey-bataev Mar 30, 2021
04b766d
[lldb/test] Deflake TestGdbRemote_vContThreads even more
labath Mar 30, 2021
9d25ce7
[OpenCL] Fix parsing of opencl-c.h in CL 3.0
kpet Mar 26, 2021
bc4b0fc
[clang-format] Fix east const pointer alignment of operators
gix Mar 30, 2021
1363fb8
[Docs] Update googletest docs link.
oToToT Mar 30, 2021
a6950c3
[test, ARM] Fix use of var defined in CHECK-NOT
Mar 28, 2021
77d81c2
[libc] Fix msan/asan memcpy reentrancy
gchatelet Mar 30, 2021
bbae066
[lldb] Fix TestStopOnSharedlibraryEvents.py on linux
labath Mar 30, 2021
9709186
[lldb] Add missing include in TestGdbRemote_vContThreads test
labath Mar 30, 2021
0bbe2a3
[lldb] More missing includes in TestGdbRemote_vContThreads
labath Mar 30, 2021
f069000
[RISCV] Remove floating point condition code legalization from lowerF…
topperc Mar 30, 2021
292816d
[RISCV] Don't set the SplatOperand flag on intrinsics that take a shi…
topperc Mar 30, 2021
9ca0b01
Remove dead CHECK-ERR line.
nlewycky Mar 30, 2021
a9968c0
[NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions
tmatheson-arm Mar 15, 2021
f5e9be6
[GlobalISel] Implement lowering for G_ROTR and G_ROTL.
aemerson Mar 26, 2021
a33fcaf
[RISCV] Pass 'half' in the lower 16 bits of an f32 value when F exten…
topperc Mar 30, 2021
c62ef12
[lldb] [test] Mark more lldb-server tests xfail on Windows
mgorny Mar 30, 2021
c8e56f3
Add -disable-verify flag to llvm-link.
nlewycky Mar 25, 2021
7a4d630
Add a "register_runtime" method to the mlir.execution_engine and show…
joker-eph Mar 30, 2021
e3d3327
[lldb] Remove reproducer from previous test run
JDevlieghere Mar 30, 2021
7004311
[GlobalISel][AArch64] Combine G_SEXT_INREG + right shift -> G_SBFX
Mar 23, 2021
eae3b2a
[clang][cli] Fix round-trip of OPT_plugin_arg
john-brawn-arm Mar 30, 2021
3e3fc43
[CSSPGO] Top-down processing order based on full profile.
htyu Mar 29, 2021
2299873
[SamplePGO] Keeping prof metadata for IndirectBrInst
Mar 30, 2021
6c9fbcf
[mlir] Linalg: add tile interchange flag to test-linalg-codegen-strat…
ezhulenev Mar 26, 2021
f13f050
[DebugInfo] Support for signed constants inside DIExpression
SouraVX Mar 24, 2021
91887cd
[AArch64][GlobalISel] Combine funnel shifts to rotates.
aemerson Mar 24, 2021
1bc9084
[AArch64][GlobalISel] Define some legalization rules for G_ROTR and G…
aemerson Mar 28, 2021
a35c2c7
[GlobalISel] Implement fewerElements legalization for vector reductions.
aemerson Feb 21, 2021
d857a81
[VPlan] Use SetVector for VPExternalDefs to prevent non-determinism.
huihzhang Mar 30, 2021
79ae419
[InstCombine] add test for abs() demanded bits; NFC
rotateright Mar 30, 2021
c2ebad8
[InstCombine] add fold for demand of low bit of abs()
rotateright Mar 30, 2021
73adc05
[GlobalISel] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off bu…
MaskRay Mar 30, 2021
3ad6dd5
[clang] Use decltype((E)) for compound requirement type constraint
mizvekov Mar 8, 2021
ae217bf
Conditionalize the JIT test dependency
dwblaikie Mar 30, 2021
eb4967c
[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests
luismarques Mar 30, 2021
e2c7bf0
[OPENMP]Fix PR48607: Crash during clang openmp codegen for firstpriva…
alexey-bataev Mar 30, 2021
3a6365a
[ARM] Add FeatureHasNoBranchPredictor for Thumb1 cores
davemgreen Mar 30, 2021
c06a8f9
[libc++] Include <__config_site> from <__config>
ldionne Jun 26, 2020
b7899ba
[OPENMP51]Initial support for the dispatch directive.
mikerice1969 Mar 23, 2021
58cbb22
[docs] Fix up dead clang-format links after monorepo move. NFC
jroelofs Mar 30, 2021
d535a05
[ThinLTO] During module importing, close one source module before open
wmi-11 Mar 29, 2021
427d359
[lld-macho][NFC] Drop unnecessary macho:: namespace prefix on unambig…
gkmhub Mar 30, 2021
a360a97
Fix deletion of operations through the rewriter in a pattern matching…
joker-eph Mar 30, 2021
ee176d2
[www] Color Clang 11 and Clang 12 features as green and not yellow, and
zygoloid Mar 30, 2021
eabd55b
[lld-link] Enable addrsig table in COFF lto
ZequanWu Mar 30, 2021
1705136
Fix pluralization error in diagnostic, and move C++ testcase to proper
zygoloid Mar 30, 2021
d87384f
[www] Fix build of attribute documentation.
zygoloid Mar 30, 2021
c5f1749
Delete checked-in generated copy of diagnostic reference.
zygoloid Mar 30, 2021
144ec1c
[WebAssembly] Encode numbers in ULEB128 in event section
aheejin Mar 30, 2021
d6d3d21
[LLDB] Add support for Arm64/Linux dynamic register sets
omjavaid Mar 30, 2021
1164b4e
[LLDB] Arm64/Linux Add MTE and Pointer Authentication registers
omjavaid Mar 30, 2021
9ab6771
[LLDB] Arm64/Linux test case for MTE and Pointer Authentication regset
omjavaid Mar 30, 2021
c23ee77
[www] List both the regular and expanded form of %diff in the
zygoloid Mar 31, 2021
0b69756
[trace][intel-pt] Implement trace start and trace stop
walter-erquinigo Nov 9, 2020
fb0b19c
Reland "[gn build] port 48e4b0f (__config_site)"
nico Mar 31, 2021
f59ba08
[StructLayout] Use TrailingObjects to allocate space for MemberOffsets.
topperc Mar 30, 2021
9eef0fa
Fix test expectations for %diff documentation.
zygoloid Mar 31, 2021
3a83b8b
[JITLink] Add a setProtectionFlags method to jitlink::Section.
lhames Mar 31, 2021
a4ee79c
Fix errors in 0b69756110db444282c40ea16929186b2910c3b1
walter-erquinigo Mar 31, 2021
99fd066
[clang][Sema] Don't try to initialize implicit variable of invalid an…
TaWeiTu Mar 31, 2021
431a40e
[LoopUnswitch] Assert that branch condition is either and/or but not …
aqjune Mar 31, 2021
0599870
[RISCV] Remove some unused ImmLeafs. NFC
topperc Mar 31, 2021
0d7fd9f
[GlobalISel] Fix Wint-in-bool-context warning (NFC)
nullptr-cpp Mar 31, 2021
5db19cc
[RISCV] simm12_plus1 should not inherit from Operand. NFC
topperc Mar 31, 2021
3e5ee19
[SimpleLoopUnswitch] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTION…
MaskRay Mar 31, 2021
d332bbe
[Utils][Emacs] Improve syntax highlight
Mar 31, 2021
eb51dd7
[Coroutine] [Debug] Insert dbg.declare to entry.resume to print alloc…
ChuanqiXu9 Mar 31, 2021
0269a40
[JITLink] Switch from StringRef to ArrayRef<char>, add some generic x…
lhames Mar 31, 2021
4e0045c
libc: Default LIBC_INSTALL_PREFIX to ${CMAKE_INSTALL_PREFIX}
nathanchance Mar 31, 2021
9a9214f
[mlir] Add C and python API for is_registered_operation.
stellaraccident Mar 31, 2021
ec235dd
[JITLink] Delete copy and move constructors for jitlink::Section.
lhames Mar 31, 2021
7acfd85
[libcxx] [test] Don't add dirs from the LIB env var to PATH
mstorsjo Mar 24, 2021
32ca5a0
[RISCV] Refine pre-define macro tests
tclin914 Mar 31, 2021
4a0a85b
[libcxx] [test] Fix tests of <cuchar> that unexpectedly succeed on wi…
mstorsjo Mar 20, 2021
7588ed3
[X86] Regenerate test to add missing @PLT
topperc Mar 31, 2021
afed50a
[X86] Add test cases for PR48768 and D94856. NFC
topperc Mar 31, 2021
465b9a4
Revert "Revert "[mlir] Introduce CloneOp and adapt test cases in Buff…
pifon2a Mar 31, 2021
43b9fa3
[mlir][Linalg][Python] Create the body of builtin named Linalg ops
nicolasvasilache Mar 30, 2021
8fa570c
[WebAssembly] Fix incorrect DW_TAG_pointer_type size in test
arichardson Mar 31, 2021
ce193ea
[asan] Remove FreeBSD XFAIL from asan-sigbus.cpp test
arichardson Mar 31, 2021
44ce487
[TableGen] Emit more helpful error messages on empty type set
arichardson Mar 31, 2021
b5995fc
[OpenCL] Limit popcount to OpenCL 1.2 and above
svenvh Mar 31, 2021
95f8135
[mlir] Change vector.transfer_read/write "masked" attribute to "in_bo…
matthias-springer Mar 31, 2021
52e0150
[AArch64] Avoid SCALAR_TO_VECTOR for single FP constant vector.
fhahn Mar 31, 2021
49c0ab6
[clang][Checkers] Extend PthreadLockChecker state dump (NFC).
balazske Mar 31, 2021
3ccbd4f
NFC: Change getUserCost to return InstructionCost
sdesmalen-arm Jan 20, 2021
936d1e9
[ASTImporter][NFC] Improve test coverage
Mar 31, 2021
5d0e9dd
[AMDGPU][GlobalISel] Add support for global atomicrmw fadd
jayfoad Mar 1, 2021
98d0703
Revert "[LLDB] Skip TestVSCode_disconnect.test_launch arm/linux"
omjavaid Mar 31, 2021
10fc6e4
[RISCV] Add support for the stepvector intrinsic
frasercrmck Mar 30, 2021
9d474be
[ASTImporter][NFC] Fix duplicated symbols in "Improve test coverage"
Mar 31, 2021
ce548aa
[X86] AMD Zen 3 has macro fusion
LebedevRI Mar 31, 2021
d2d6720
[InlineCost] Remove TODO comment that consider other forms of savings…
taoliq Mar 31, 2021
feb6f2c
Revert "[LLDB] Arm64/Linux test case for MTE and Pointer Authenticati…
omjavaid Mar 31, 2021
71b648f
Revert "[LLDB] Arm64/Linux Add MTE and Pointer Authentication registers"
omjavaid Mar 31, 2021
8396aeb
[Test] Auto-update test checks
xortator Mar 31, 2021
2f56e1c
NFC: Change getTypeBasedIntrinsicCost to return InstructionCost
sdesmalen-arm Jan 22, 2021
2f6f249
NFC: Change getIntrinsicInstrCost to return InstructionCost
sdesmalen-arm Jan 22, 2021
ffcb4b4
Revert "[clang][Checkers] Extend PthreadLockChecker state dump (NFC)."
balazske Mar 31, 2021
9f4022f
[libc++] Avoid <climits> dependency in <thread>
jsonn Feb 18, 2021
dc7ebd2
[C++2b] Support size_t literals
Mar 27, 2021
b6d0529
[CostModel] Align the cost model for intrinsics for scalable/fixed-wi…
sdesmalen-arm Jan 25, 2021
7108b2d
[SVE] Fix LoopVectorizer test scalalable-call.ll
sdesmalen-arm Feb 23, 2021
a8cf32b
[RISCV] Add XFAIL riscv32 for known issue with the old pass manager
luismarques Mar 31, 2021
3bdd674
[libc++] Mark convert_copy.pass.cpp as UNSUPPORTED on clang-13 (i.e. …
Quuxplusone Mar 31, 2021
5018e15
[clang][parser] Allow GNU-style attributes in explicit template...
tbaederr Mar 3, 2021
4e52daa
[AArch64][SVE] Add tests for UREM/SREM using fixed SVE types
brads55 Mar 24, 2021
07a6d07
[InstCombine] add tests for srem+abs; NFC
rotateright Mar 31, 2021
1462bdf
[InstCombine] fold abs(srem X, 2)
rotateright Mar 31, 2021
f38a9d6
[WebAssembly] Raname a test and fix comments
aheejin Mar 31, 2021
09b2419
[llvm-jitlink] Fix -Wunused-function on Windows
aeubanks Mar 30, 2021
04f10ab
[RISCV] Add isel patterns to select vsub_vx intrinsic to vadd.vi if i…
topperc Mar 31, 2021
a991ee3
[AMDGPU] Use a common check prefix for some image tests. NFC.
jayfoad Mar 31, 2021
b138cf1
[AMDGPU] Add some image tests with enable-prt-strict-null disabled. NFC.
jayfoad Mar 31, 2021
2a8b7ca
[RISCV] Add RISCVISD opcodes for CLZW and CTZW.
topperc Mar 31, 2021
563cdea
[LTO][Legacy] Decouple option parsing from LTOCodeGenerator
Mar 31, 2021
50b8634
[X86] Improve optimizeCompareInstr for signed comparisons after BMI/T…
topperc Mar 31, 2021
00c0c8c
[PowerPC] [MLICM] Enable hoisting of caller preserved registers on AIX
scui-ibm Mar 31, 2021
437958d
[X86] Improve SMULO/UMULO codegen for vXi8 vectors.
topperc Mar 31, 2021
ae7b1e8
[SCEV] Handle unreachable binop when matching shift recurrence
preames Mar 31, 2021
df0b97d
[ValueTracking] Add with.overflow intrinsics to poison analysis funct…
aqjune Mar 31, 2021
45783d0
[WebAssembly] Implement i64x2 comparisons
tlively Mar 31, 2021
fcf6800
[Driver] Move detectLibcxxIncludePath to ToolChain
petrhosek Sep 22, 2020
888c506
Move non-spec TOSA operators into TosaUtilOps.td
sjarus Mar 31, 2021
fe5c4a0
[LoopVectorize] Use SetVector to track uniform uses to prevent non-de…
huihzhang Mar 31, 2021
7f8da07
[flang] Refine checks for pointer initialization targets
klausler Mar 31, 2021
10847f6
[SLP]Add a test for the bug in `getVectorElementSize()`, NFC.
alexey-bataev Mar 31, 2021
807b019
[ConstantFolding] Fixing addo/subo with undef
georgemitenkov Mar 31, 2021
9c61c76
[mlir][cse] do not replace operands in previously simplified operations
youngar Mar 29, 2021
9e00b66
[SelectionDAG] Remove unneeded vector resize from the end of FoldCons…
topperc Mar 31, 2021
4ced958
[SLP]Update test checks, NFC
alexey-bataev Mar 31, 2021
09aed38
[lld-macho][nfc] Test that -ObjC will import bitcode with category se…
int3 Mar 31, 2021
9b6dde8
[lld-macho] Parallelize UUID hash computation
int3 Mar 31, 2021
98f08e7
[tests] Exercise cases where SCEV can use trip counts to refine ashr/…
preames Mar 31, 2021
66da4f6
[OPENMP]Fix PR48658: [OpenMP 5.0] Compiler crash when OpenMP atomic s…
alexey-bataev Mar 30, 2021
a28e835
[OPENMP]Fix PR48885: Crash in passing firstprivate args to tasks on A…
alexey-bataev Mar 29, 2021
2c3cf62
Make TableGenGlobalISel an object library
aaronpuchert Mar 31, 2021
e8d8754
Revert "Make TableGenGlobalISel an object library"
preames Mar 31, 2021
43ded90
[NFC][LoopRotation] Count the number of instructions hoisted/cloned i…
LebedevRI Mar 31, 2021
e927053
[test, InferFunctionAttrs] Fix use of var defined in CHECK-NOT
Mar 28, 2021
e470147
[dfsan] Set sigemptyset's return label to be 0
stephan-yichao-zhao Mar 31, 2021
a879a1b
[mlir][tosa] Add tosa.reciprocal and tosa.sigmoid lowerings
NatashaKnk Mar 31, 2021
1c268a8
[X86] add dwarf annotation for inline stack probe
YangKeao Mar 31, 2021
c88ee1a
[RISCV] Add UnsupportedSchedZfh multiclass to reduce duplicate lines …
topperc Mar 31, 2021
777a58e
Support {S,U}REMEqFold before legalization
nagisa Oct 3, 2020
115a42a
Add debug printers for KnownBits [nfc]
preames Mar 31, 2021
3cc3c0f
Add support to -Wa,--version in clang
jcai19 Mar 31, 2021
0f70a17
[tests] Add tests for ashr/lshr recurrences in isKnownNonZero
preames Mar 31, 2021
4af4828
[ValueTracking] Handle non-zero ashr/lshr recurrences
preames Mar 31, 2021
f1e4e2f
[lld][MachO] Refactor handling of subsections
Mar 31, 2021
bf2479c
Revert "Add support to -Wa,--version in clang"
nickdesaulniers Apr 1, 2021
62b74f7
[GVN][NFC] Refactor analyzeLoadFromClobberingWrite
ksyx Mar 31, 2021
565b28f
[GVN][NFC] Pre-commit test for D93503
kawashima-fj Mar 31, 2021
5fac7c6
[GVN] Propagate llvm.access.group metadata of loads
kawashima-fj Mar 31, 2021
a821999
[clang][APINotes] Fix -Wunused-function warning (NFC)
nullptr-cpp Apr 1, 2021
dfc8da1
[lldb] Remove LLDB_CAPTURE_REPRODUCER override
JDevlieghere Apr 1, 2021
bfcd218
[debug-info] support new tuning debugger type DBX for XCOFF DWARF
Mar 26, 2021
54c3c2e
[lldb-vscode] Consistently use return EXIT_SUCCESS and EXIT_FAILURE (…
JDevlieghere Apr 1, 2021
b7e2c2a
[lldb-vscode] Use LLVM's ScopeExit to ensure we always terminate the …
JDevlieghere Apr 1, 2021
d182893
[lldb] Remove references to LLDB_CAPTURE_REPRODUCER
JDevlieghere Apr 1, 2021
630818a
[NFC] Disambiguate LI in GVN
xortator Apr 1, 2021
a1d8377
[NFC] Undo some erroneous renamings
xortator Apr 1, 2021
5c703f0
[libc++] Build and test with -Wundef warning. NFC.
mkurdej Apr 1, 2021
3bea730
[lldb] Fix compilation with gcc-6.5
labath Apr 1, 2021
e1d4fb1
[lldb] Fix build errors from 3bea7306e8
labath Apr 1, 2021
335d2df
[mlir][Python][Linalg] Add missing attributes to linalg ops
nicolasvasilache Mar 31, 2021
92e7771
[WebAssembly] Invert branch condition on xor input
sparker-arm Mar 31, 2021
1d463c2
[Driver] Fix architecture triplets and search paths for Linux x32
hvdijk Apr 1, 2021
1ed53d4
[LoopFlatten] Do not report CFG analyses as up-to-date
Apr 1, 2021
88a5b35
Revert "Revert "[LLDB] Arm64/Linux Add MTE and Pointer Authentication…
omjavaid Mar 31, 2021
dd2a63e
Revert "Revert "[LLDB] Arm64/Linux test case for MTE and Pointer Auth…
omjavaid Apr 1, 2021
b468f0e
[LLDB] Fix sync issue in TestVSCode_launch.test_progress_events
omjavaid Apr 1, 2021
dc53715
[MLIR][Affine] Add utility to check if the slice is valid
Apr 1, 2021
e3a1330
[NFC] Add tests for scalable vectorization of loops with large stride…
david-arm Mar 23, 2021
df4fa53
[clang][Checkers] Extend PthreadLockChecker state dump (NFC).
balazske Apr 1, 2021
6be8662
[SLP] Add test cases for missing SLP vectorization on AArch64.
fhahn Apr 1, 2021
0f5ebbc
[AMDGPU][MC] Added flag to identify VOP instructions which have a sin…
dpreobra Apr 1, 2021
f7aeace
[X86][SSE] Add isHorizOp helper function. NFCI.
RKSimon Mar 31, 2021
3013198
[X86][SSE] Enable (F)HADD/SUB handling to SimplifyMultipleUseDemanded…
RKSimon Mar 31, 2021
abbe80f
[X86][SSE] Fold HOP(HOP(X,X),HOP(Y,Y)) -> HOP(PERMUTE(HOP(X,Y)),PERMU…
RKSimon Apr 1, 2021
cd95343
[AMDGPU][MC][GFX10][GFX90A] Corrected _e32/_e64 suffices
dpreobra Apr 1, 2021
fcea418
[lldb] [test] Mark lldb-server multiprocess tests as LLGS cat
mgorny Apr 1, 2021
48e3da1
[lldb] Rewrite TestAutoInstallMainExecutable logic
labath Apr 1, 2021
ce98a05
[SLP]Remove `else` after `return`, NFC.`
alexey-bataev Apr 1, 2021
bad5ee1
[lldb] Make TestLoadUsingLazyBind work on linux
labath Apr 1, 2021
7c541a1
[OpenCL][Docs] Added a label for C++ libs section and example link
Apr 1, 2021
dc14e89
[flang] Move .f77 to the list of fixed-form file extensions
banach-space Mar 29, 2021
77d625f
[DAG] MergeInnerShuffle with BinOps - sometimes accept undef mask ele…
RKSimon Apr 1, 2021
c03696d
[SLP]Improve and fix getVectorElementSize.
alexey-bataev Mar 30, 2021
65c8bfb
[AMDGPU] Enable output modifiers for double precision instructions
bcahoon Mar 25, 2021
0934fa4
[AArch64][SVE] SVE functions should use the SVE calling convention fo…
brads55 Mar 30, 2021
2f45e63
[AArch64][SVE] Improve codegen for select nodes with fixed types
brads55 Mar 25, 2021
7b921a6
[AsmParser][SystemZ][z/OS] Add in support to accept "#" as part of an…
aniprasad Apr 1, 2021
1ea9fa8
[clang][parser] Set source ranges for GNU-style attributes
tbaederr Mar 25, 2021
908a267
Revert "[clang][parser] Set source ranges for GNU-style attributes"
tbaederr Apr 1, 2021
ce61def
[regalloc] Ensure Query::collectInterferringVregs is called before in…
mtrofin Mar 9, 2021
e2c6621
[deref-at-point] restrict inference of dereferenceability based on al…
preames Apr 1, 2021
b1fbfd9
[AMDGPU] Small cleanup to constructRetValue and its caller. NFC.
jayfoad Apr 1, 2021
802c5ce
[lldb] Un-XFAIL TestAutoInstallMainExecutable on Windows
sstamenova Apr 1, 2021
7a4abc0
[LoopVectorize] auto-generate complete checks; NFC
rotateright Apr 1, 2021
56b39af
[OpenMP51][DOCS] Mark "add present modifier in defaultmap clause" as
chichunchen Apr 1, 2021
9783437
[tests] Cover the most basic cases of nosync inference
preames Apr 1, 2021
9f61dff
Merge commit '97834378852b1eeef34fae7c9354a7f33327004e' into feature/…
kaz7 Jul 6, 2021
4d61045
[VE] Fix types of multiclass template arguments in TableGen files
kaz7 Jul 6, 2021
63cef7f
[VE][tti] fix: report vregs outside expensive-vector mode
simoll Jul 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void ExpandModularHeadersPPCallbacks::HasInclude(SourceLocation Loc, StringRef,
void ExpandModularHeadersPPCallbacks::PragmaOpenCLExtension(
SourceLocation NameLoc, const IdentifierInfo *, SourceLocation StateLoc,
unsigned) {
// FIME: Figure out whether it's the right location to parse to.
// FIXME: Figure out whether it's the right location to parse to.
parseToLocation(NameLoc);
}
void ExpandModularHeadersPPCallbacks::PragmaWarning(SourceLocation Loc,
Expand All @@ -256,7 +256,7 @@ void ExpandModularHeadersPPCallbacks::MacroExpands(const Token &MacroNameTok,
const MacroDefinition &,
SourceRange Range,
const MacroArgs *) {
// FIME: Figure out whether it's the right location to parse to.
// FIXME: Figure out whether it's the right location to parse to.
parseToLocation(Range.getBegin());
}
void ExpandModularHeadersPPCallbacks::MacroDefined(const Token &MacroNameTok,
Expand All @@ -271,12 +271,12 @@ void ExpandModularHeadersPPCallbacks::MacroUndefined(
void ExpandModularHeadersPPCallbacks::Defined(const Token &MacroNameTok,
const MacroDefinition &,
SourceRange Range) {
// FIME: Figure out whether it's the right location to parse to.
// FIXME: Figure out whether it's the right location to parse to.
parseToLocation(Range.getBegin());
}
void ExpandModularHeadersPPCallbacks::SourceRangeSkipped(
SourceRange Range, SourceLocation EndifLoc) {
// FIME: Figure out whether it's the right location to parse to.
// FIXME: Figure out whether it's the right location to parse to.
parseToLocation(EndifLoc);
}
void ExpandModularHeadersPPCallbacks::If(SourceLocation Loc, SourceRange,
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-tidy/GlobList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace tidy;
// Returns true if GlobList starts with the negative indicator ('-'), removes it
// from the GlobList.
static bool consumeNegativeIndicator(StringRef &GlobList) {
GlobList = GlobList.trim(" \r\n");
GlobList = GlobList.trim();
if (GlobList.startswith("-")) {
GlobList = GlobList.substr(1);
return true;
Expand All @@ -27,7 +27,7 @@ static bool consumeNegativeIndicator(StringRef &GlobList) {
// removes it and the trailing comma from the GlobList.
static llvm::Regex consumeGlob(StringRef &GlobList) {
StringRef UntrimmedGlob = GlobList.substr(0, GlobList.find(','));
StringRef Glob = UntrimmedGlob.trim(' ');
StringRef Glob = UntrimmedGlob.trim();
GlobList = GlobList.substr(UntrimmedGlob.size() + 1);
SmallString<128> RegexText("^");
StringRef MetaChars("()^$|*+?.[]\\{}");
Expand Down
2 changes: 2 additions & 0 deletions clang-tools-extra/clang-tidy/altera/AlteraTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "KernelNameRestrictionCheck.h"
#include "SingleWorkItemBarrierCheck.h"
#include "StructPackAlignCheck.h"
#include "UnrollLoopsCheck.h"

using namespace clang::ast_matchers;

Expand All @@ -28,6 +29,7 @@ class AlteraModule : public ClangTidyModule {
"altera-single-work-item-barrier");
CheckFactories.registerCheck<StructPackAlignCheck>(
"altera-struct-pack-align");
CheckFactories.registerCheck<UnrollLoopsCheck>("altera-unroll-loops");
}
};

Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/altera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_clang_library(clangTidyAlteraModule
KernelNameRestrictionCheck.cpp
SingleWorkItemBarrierCheck.cpp
StructPackAlignCheck.cpp
UnrollLoopsCheck.cpp

LINK_LIBS
clangTidy
Expand Down
277 changes: 277 additions & 0 deletions clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
//===--- UnrollLoopsCheck.cpp - clang-tidy --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "UnrollLoopsCheck.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <math.h>

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace altera {

UnrollLoopsCheck::UnrollLoopsCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
MaxLoopIterations(Options.get("MaxLoopIterations", 100U)) {}

void UnrollLoopsCheck::registerMatchers(MatchFinder *Finder) {
const auto HasLoopBound = hasDescendant(
varDecl(allOf(matchesName("__end*"),
hasDescendant(integerLiteral().bind("cxx_loop_bound")))));
const auto CXXForRangeLoop =
cxxForRangeStmt(anyOf(HasLoopBound, unless(HasLoopBound)));
const auto AnyLoop = anyOf(forStmt(), whileStmt(), doStmt(), CXXForRangeLoop);
Finder->addMatcher(
stmt(allOf(AnyLoop, unless(hasDescendant(stmt(AnyLoop))))).bind("loop"),
this);
}

void UnrollLoopsCheck::check(const MatchFinder::MatchResult &Result) {
const auto *Loop = Result.Nodes.getNodeAs<Stmt>("loop");
const auto *CXXLoopBound =
Result.Nodes.getNodeAs<IntegerLiteral>("cxx_loop_bound");
const ASTContext *Context = Result.Context;
switch (unrollType(Loop, Result.Context)) {
case NotUnrolled:
diag(Loop->getBeginLoc(),
"kernel performance could be improved by unrolling this loop with a "
"'#pragma unroll' directive");
break;
case PartiallyUnrolled:
// Loop already partially unrolled, do nothing.
break;
case FullyUnrolled:
if (hasKnownBounds(Loop, CXXLoopBound, Context)) {
if (hasLargeNumIterations(Loop, CXXLoopBound, Context)) {
diag(Loop->getBeginLoc(),
"loop likely has a large number of iterations and thus "
"cannot be fully unrolled; to partially unroll this loop, use "
"the '#pragma unroll <num>' directive");
return;
}
return;
}
if (isa<WhileStmt, DoStmt>(Loop)) {
diag(Loop->getBeginLoc(),
"full unrolling requested, but loop bounds may not be known; to "
"partially unroll this loop, use the '#pragma unroll <num>' "
"directive",
DiagnosticIDs::Note);
break;
}
diag(Loop->getBeginLoc(),
"full unrolling requested, but loop bounds are not known; to "
"partially unroll this loop, use the '#pragma unroll <num>' "
"directive");
break;
}
}

enum UnrollLoopsCheck::UnrollType
UnrollLoopsCheck::unrollType(const Stmt *Statement, ASTContext *Context) {
const DynTypedNodeList Parents = Context->getParents<Stmt>(*Statement);
for (const DynTypedNode &Parent : Parents) {
const auto *ParentStmt = Parent.get<AttributedStmt>();
if (!ParentStmt)
continue;
for (const Attr *Attribute : ParentStmt->getAttrs()) {
const auto *LoopHint = dyn_cast<LoopHintAttr>(Attribute);
if (!LoopHint)
continue;
switch (LoopHint->getState()) {
case LoopHintAttr::Numeric:
return PartiallyUnrolled;
case LoopHintAttr::Disable:
return NotUnrolled;
case LoopHintAttr::Full:
return FullyUnrolled;
case LoopHintAttr::Enable:
return FullyUnrolled;
case LoopHintAttr::AssumeSafety:
return NotUnrolled;
case LoopHintAttr::FixedWidth:
return NotUnrolled;
case LoopHintAttr::ScalableWidth:
return NotUnrolled;
}
}
}
return NotUnrolled;
}

bool UnrollLoopsCheck::hasKnownBounds(const Stmt *Statement,
const IntegerLiteral *CXXLoopBound,
const ASTContext *Context) {
if (isa<CXXForRangeStmt>(Statement))
return CXXLoopBound != nullptr;
// Too many possibilities in a while statement, so always recommend partial
// unrolling for these.
if (isa<WhileStmt, DoStmt>(Statement))
return false;
// The last loop type is a for loop.
const auto *ForLoop = dyn_cast<ForStmt>(Statement);
if (!ForLoop)
llvm_unreachable("Unknown loop");
const Stmt *Initializer = ForLoop->getInit();
const Expr *Conditional = ForLoop->getCond();
const Expr *Increment = ForLoop->getInc();
if (!Initializer || !Conditional || !Increment)
return false;
// If the loop variable value isn't known, loop bounds are unknown.
if (const auto *InitDeclStatement = dyn_cast<DeclStmt>(Initializer)) {
if (const auto *VariableDecl =
dyn_cast<VarDecl>(InitDeclStatement->getSingleDecl())) {
APValue *Evaluation = VariableDecl->evaluateValue();
if (!Evaluation || !Evaluation->hasValue())
return false;
}
}
// If increment is unary and not one of ++ and --, loop bounds are unknown.
if (const auto *Op = dyn_cast<UnaryOperator>(Increment))
if (!Op->isIncrementDecrementOp())
return false;

if (isa<BinaryOperator>(Conditional)) {
const auto *BinaryOp = dyn_cast<BinaryOperator>(Conditional);
const Expr *LHS = BinaryOp->getLHS();
const Expr *RHS = BinaryOp->getRHS();
// If both sides are value dependent or constant, loop bounds are unknown.
return LHS->isEvaluatable(*Context) != RHS->isEvaluatable(*Context);
}
return false; // If it's not a binary operator, loop bounds are unknown.
}

const Expr *UnrollLoopsCheck::getCondExpr(const Stmt *Statement) {
if (const auto *ForLoop = dyn_cast<ForStmt>(Statement))
return ForLoop->getCond();
if (const auto *WhileLoop = dyn_cast<WhileStmt>(Statement))
return WhileLoop->getCond();
if (const auto *DoWhileLoop = dyn_cast<DoStmt>(Statement))
return DoWhileLoop->getCond();
if (const auto *CXXRangeLoop = dyn_cast<CXXForRangeStmt>(Statement))
return CXXRangeLoop->getCond();
llvm_unreachable("Unknown loop");
}

bool UnrollLoopsCheck::hasLargeNumIterations(const Stmt *Statement,
const IntegerLiteral *CXXLoopBound,
const ASTContext *Context) {
// Because hasKnownBounds is called before this, if this is true, then
// CXXLoopBound is also matched.
if (isa<CXXForRangeStmt>(Statement)) {
assert(CXXLoopBound && "CXX ranged for loop has no loop bound");
return exprHasLargeNumIterations(CXXLoopBound, Context);
}
const auto *ForLoop = dyn_cast<ForStmt>(Statement);
assert(ForLoop && "Unknown loop");
const Stmt *Initializer = ForLoop->getInit();
const Expr *Conditional = ForLoop->getCond();
const Expr *Increment = ForLoop->getInc();
int InitValue;
// If the loop variable value isn't known, we can't know the loop bounds.
if (const auto *InitDeclStatement = dyn_cast<DeclStmt>(Initializer)) {
if (const auto *VariableDecl =
dyn_cast<VarDecl>(InitDeclStatement->getSingleDecl())) {
APValue *Evaluation = VariableDecl->evaluateValue();
if (!Evaluation || !Evaluation->isInt())
return true;
InitValue = Evaluation->getInt().getExtValue();
}
}
assert(isa<BinaryOperator>(Conditional) &&
"Conditional is not a binary operator");
int EndValue;
const auto *BinaryOp = dyn_cast<BinaryOperator>(Conditional);
if (!extractValue(EndValue, BinaryOp, Context))
return true;

double Iterations;

// If increment is unary and not one of ++, --, we can't know the loop bounds.
if (const auto *Op = dyn_cast<UnaryOperator>(Increment)) {
if (Op->isIncrementOp())
Iterations = EndValue - InitValue;
else if (Op->isDecrementOp())
Iterations = InitValue - EndValue;
else
llvm_unreachable("Unary operator neither increment nor decrement");
}

// If increment is binary and not one of +, -, *, /, we can't know the loop
// bounds.
if (const auto *Op = dyn_cast<BinaryOperator>(Increment)) {
int ConstantValue;
if (!extractValue(ConstantValue, Op, Context))
return true;
switch (Op->getOpcode()) {
case (BO_AddAssign):
Iterations = ceil(float(EndValue - InitValue) / ConstantValue);
break;
case (BO_SubAssign):
Iterations = ceil(float(InitValue - EndValue) / ConstantValue);
break;
case (BO_MulAssign):
Iterations = 1 + (log(EndValue) - log(InitValue)) / log(ConstantValue);
break;
case (BO_DivAssign):
Iterations = 1 + (log(InitValue) - log(EndValue)) / log(ConstantValue);
break;
default:
// All other operators are not handled; assume large bounds.
return true;
}
}
return Iterations > MaxLoopIterations;
}

bool UnrollLoopsCheck::extractValue(int &Value, const BinaryOperator *Op,
const ASTContext *Context) {
const Expr *LHS = Op->getLHS();
const Expr *RHS = Op->getRHS();
Expr::EvalResult Result;
if (LHS->isEvaluatable(*Context))
LHS->EvaluateAsRValue(Result, *Context);
else if (RHS->isEvaluatable(*Context))
RHS->EvaluateAsRValue(Result, *Context);
else
return false; // Cannot evalue either side.
if (!Result.Val.isInt())
return false; // Cannot check number of iterations, return false to be
// safe.
Value = Result.Val.getInt().getExtValue();
return true;
}

bool UnrollLoopsCheck::exprHasLargeNumIterations(const Expr *Expression,
const ASTContext *Context) {
Expr::EvalResult Result;
if (Expression->EvaluateAsRValue(Result, *Context)) {
if (!Result.Val.isInt())
return false; // Cannot check number of iterations, return false to be
// safe.
// The following assumes values go from 0 to Val in increments of 1.
return Result.Val.getInt() > MaxLoopIterations;
}
// Cannot evaluate Expression as an r-value, so cannot check number of
// iterations.
return false;
}

void UnrollLoopsCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "MaxLoopIterations", MaxLoopIterations);
}

} // namespace altera
} // namespace tidy
} // namespace clang
Loading