Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW20-21) #3779

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

Merged
merged 1,751 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1751 commits
Select commit Hold shift + click to select a range
e092165
[AIX] Implement AIX special bitfield related alignment rules
xling-liao May 17, 2021
f4c0fdc
[AMDGPU] Set unused dst_sel to '?' in the encoding
rampitec May 14, 2021
fded6f7
[LoopUnroll] Add multi-exit test which does not exit through latch.
fhahn May 17, 2021
af6511d
[OpenMP] Fixed Bug 49356
shiltian May 17, 2021
5f58322
[HWASan] Build separate LAM runtime on x86_64.
morehouse May 14, 2021
1417dda
[llvm][doc] fix header for read/write_register intrinsics in LangRef
ftynse May 17, 2021
02c2468
[Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX cp.asyn…
nyalloc May 17, 2021
f226e28
[Clang][NVPTX] Add NVPTX intrinsics and builtins for CUDA PTX redux.s…
May 17, 2021
08068dd
[mlir][tosa] Fix tosa.avg_pool2d lowering to normalize correctly
rsuderman May 17, 2021
18cb17c
[HIP] Fix spack detection
yxsamliu May 15, 2021
43f6e04
Make `mlir::OpState::operator bool` explicit
joker-eph May 17, 2021
d97bab6
[HWASan] Don't build alias mode on non-x86.
morehouse May 17, 2021
0633d5c
[LoopIdiom] 'logical right-shift until zero' ('count active bits') "o…
LebedevRI May 17, 2021
2182eda
[LLDB] Switch from using member_clang_type.GetByteSize() to member_ty…
shafik May 17, 2021
cd220a0
[NewPM] Add C bindings for new pass manager
junlarsen May 17, 2021
bd5751f
Reset the wakeup timeout when we re-enter the continue wait.
jimingham May 15, 2021
0b33977
Revert "[NewPM] Add C bindings for new pass manager"
nico May 17, 2021
14dfb38
[Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable
May 17, 2021
ebcf030
[analyzer] Engine: fix crash with SEH __leave keyword
AbbasNS May 17, 2021
648f34a
Merge with mainline.
lattner May 17, 2021
4a12248
[lld/mac] Honor REFERENCED_DYAMICALLY, set it on __mh_execute_header
nico May 17, 2021
84c4715
Merge from 'sycl' to 'sycl-web' (#1)
asudarsa May 17, 2021
5879da4
[mlir][sparse] replace experimental flag with inplace attribute
aartbik May 15, 2021
0c557db
[NewPM] Add C bindings for new pass manager
junlarsen May 17, 2021
24bf554
Add type function for ConstShape op.
jpienaar May 17, 2021
c870e36
gn build: Only build the hwasan runtime in aliasing mode on x86.
pcc May 17, 2021
0f41778
[AArch64] Support customizing stack protector guard
nickdesaulniers May 17, 2021
e9f600f
[InstCombine] add tests for fneg-of-select; NFC
rotateright May 17, 2021
3cdd05e
[InstCombine] fold fnegs around select
rotateright May 17, 2021
11c857c
[gn build] Port 0c557db61711
llvmgnsyncbot May 17, 2021
3a0b6dc
Revert "[Clang] -Wunused-but-set-parameter and -Wunused-but-set-varia…
aeubanks May 17, 2021
c24436f
Merge from 'main' to 'sycl-web' (#46)
asudarsa May 17, 2021
1eb78a6
[NFC][scudo] Clang-format tests
vitalybuka May 17, 2021
6791a6b
Revert "X86: support Swift Async context"
hctim May 17, 2021
02286d9
[lldb] Document ctrl-f for completing show-autosuggestion
kastiglione May 15, 2021
65271ff
[lld][MinGW] Introduce aliases for -Bdynamic and -Bstatic
zero9178 May 17, 2021
698568b
[clang CodeGen] Don't crash on large atomic function parameter.
efriedma-quic May 6, 2021
82b5281
[Driver][test] Don't assume integrated-as
May 17, 2021
e2e1a78
[mlir][NFC] Remove stale `createLowerAffinePass` declaration
River707 May 17, 2021
6e1c1da
[WebAssembly] Nullify DBG_VALUE_LISTs in DebugValueManager
aheejin May 16, 2021
ceb1ac9
[test] Free triple in PassBuilderBindingsTest
aeubanks May 17, 2021
b6320ee
Do actual DCE in LoopUnroll (try 3)
preames May 17, 2021
3dd49ec
[AArch64][SVE] Implement extractelement of i1 vectors.
efriedma-quic Sep 14, 2020
af5247c
[ADT] Factor out in_place_t and expose in Optional ctor
slinder1 Apr 5, 2021
a6d3987
[ADT] Add new type traits for type pack indexes
slinder1 Apr 14, 2021
82a3883
Revert "Reset the wakeup timeout when we re-enter the continue wait."
jimingham May 17, 2021
b99e2c5
[clang][AVR] Redefine [u]int16_t to be compatible with avr-gcc
benshi001 May 17, 2021
3cf7983
[RISCV][test] Add new tests of or/xor in the zbs extension
benshi001 May 17, 2021
c23ce54
[LV] Unconditionally branch from middle to scalar preheader if the sc…
preames May 17, 2021
d16da73
Revert "[LV] Unconditionally branch from middle to scalar preheader i…
preames May 17, 2021
45764ef
[AMDGPU] Do not check denorm for LDS FP atomic with unsafe flag
rampitec May 12, 2021
6d3e3ae
[LV] Unconditionally branch from middle to scalar preheader if the sc…
preames May 17, 2021
bc588f9
[lld/mac] Inline a check
nico May 17, 2021
1b4d5b3
[lldb/API] Use a valid LineEntry object in SBCompileUnit::FindLineEnt…
medismailben May 18, 2021
a91fb43
[mlir][tosa] Cleanup of tosa.rescale lowering to linalg
rsuderman May 18, 2021
fcffd08
[Matrix] Fold the transpose into the matmul operand used to fetch sca…
anemet Dec 11, 2020
cc64ece
[NFC][OpaquePtr] Avoid using PointerType::getElementType() in VectorU…
aeubanks May 14, 2021
9f7d552
[NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGl…
aeubanks May 17, 2021
29bef8e
[Polly] Add support for -polly-dump-before(-file) with the NPM.
Meinersbur May 18, 2021
c2f8e13
Merge from 'sycl' to 'sycl-web'
May 18, 2021
7bed58d
[Inliner] Copy attributes when deoptimize intrinsic is inlined
May 17, 2021
ad568f4
[Polly] Add support for -polly-dump-after(-file) with the NPM.
Meinersbur May 18, 2021
2d1f2ba
Revert "[ADT] Add new type traits for type pack indexes"
sstamenova May 18, 2021
ed9d707
Revert "[LV] Unconditionally branch from middle to scalar preheader i…
preames May 18, 2021
5a9b25e
[lld][WebAssembly] Refactor input chunk class hierarchy. NFC
sbc100 May 14, 2021
15d4ed6
[PowerPC] only check the load instruction result number 0.
May 17, 2021
ab1f6ff
[GVN] Improve analysis for missed optimization remark
anemet May 18, 2021
dc2c6cf
[lld][MachO] Adjust isCodeSection signature
May 18, 2021
57c660f
[Statepoint Lowering] Cleanup: remove unused option statepoint-always…
May 18, 2021
3bc2b97
[AMDGPU][libomptarget] Remove unused global variables
pdhaliwal-amd May 17, 2021
797ad70
[Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1
tentzen May 18, 2021
d7503c3
[AMDGPU][Libomptarget] Rename & move g_executables to private
pdhaliwal-amd May 17, 2021
00a1007
sanitizer_common/symbolizer: fix crashes during exit
dvyukov May 14, 2021
81fdc73
[LV] Return both fixed and scalable Max VF from computeMaxVF.
sdesmalen-arm May 18, 2021
b3d3832
[RDA] Fix printing of regs / reg units. NFC
davemgreen May 18, 2021
2e92f1a
[NFC][scudo] Reduce test region size on MIPS32
vitalybuka May 18, 2021
bbea361
[lldb][NFC] Remove all uses of StringRef::withNullAsEmpty in LLDB
Teemperor May 18, 2021
88ee91c
[ASTimporter] Remove decl from lookup only if it has decl context
May 18, 2021
dfd929d
[mlir][docs] Fix broken link to Toy example
marbre May 18, 2021
cc1a636
[VPlan] Add VPUserID to distinguish between recipes and others.
fhahn May 18, 2021
175bdf1
[RISCV] Fix operand order in fixed-length VM(OR|AND)NOT patterns
frasercrmck May 17, 2021
d017d12
[lldb][NFC] Cleanup IRForTarget member initializers
Teemperor May 18, 2021
e89b60f
Update MSVC version number in preprocessor check
nealsid May 18, 2021
3f3642a
[CodeGen] Avoid unused variable warning in Release builds. NFCI.
d0k May 18, 2021
092a3ce
[AMDGPU] Fix typo in comment
jayfoad May 18, 2021
fa765a0
[mlir] Add folder for complex.ReOp and complex.ImOp.
akuegel May 18, 2021
a1e6565
[lit] Stop using PATH to lookup clang/lld/lldb unless requested
jh7370 May 17, 2021
20e1577
[lld] Add a feature for each lld variant when use_lld is called
jh7370 May 6, 2021
642d2f0
[OpenCL] Fix initialization of __constant constructors without arguments
OleStrohm May 17, 2021
f8dbd61
[mlir][Linalg] Drop spuriously long matmul_column_major benchmark
nicolasvasilache May 18, 2021
2ab513c
[SYCL] Enable `opencl_global_[host,device]` attributes for SYCL
bader Apr 13, 2021
d70cbd1
[AMDGPU] Regenerate wave32.ll tests
RKSimon May 18, 2021
81606ab
Revert rGd70cbd1ce9b426f2c7e0e0f900769bbcbb300a95 "[AMDGPU] Regenerat…
RKSimon May 18, 2021
07fea1e
[CostModel][X86] Add missing check prefixes from cast.ll
RKSimon May 18, 2021
f79f04a
[CostModel][X86] Add scalar truncation cost checks
RKSimon May 18, 2021
fff84d3
[LV] Add test which sinks a load a across an aliasing store.
fhahn May 14, 2021
095c520
[lld/mac] Propagate -(un)exported_symbol(s_list) to privateExtern in …
nico May 18, 2021
560b709
[X86][AVX] Cleanup AVX2 vector integer truncation costs
RKSimon May 18, 2021
dd7575b
[LLD] [MinGW] Pass the canExitEarly parameter through properly
mstorsjo May 18, 2021
38e2359
[NFC] Removed unused VFInfo comparison operator
david-arm May 18, 2021
9f4f012
[libcxx][test] Attempt to make debug mode tests more bulletproof
chbessonova Apr 18, 2021
3cc3960
[X86] AMD Zen 3: cap LoopMicroOpBufferSize to workaround PR50384 (qua…
LebedevRI May 18, 2021
82f248d
[ADT] Remove StringRef::withNullAsEmpty
Teemperor May 18, 2021
7d64493
[DebugInfo][test] Check specific func name to ignore codegen differences
May 18, 2021
ba1509d
Recommit X86: support Swift Async context
TNorthover Jan 12, 2021
6381664
Introduce SYCL 2020 mode
AaronBallman May 18, 2021
c42580b
[ORC] Don't try to obtain a ref to a non-existent buffer.
lhames May 17, 2021
bd6c93c
[ORC-RT] Add compiler abstraction header for the ORC runtime.
lhames May 18, 2021
9e5f3dd
[ORC-RT] Add apply_tuple utility.
lhames May 18, 2021
8998a8a
[clang-offload-bundler] Add sections and set section flags using one …
sndmitriev May 18, 2021
892497c
[GlobalISel] Simplify G_ICMP to true/false when the result is known
May 14, 2021
ccbac06
Speculatively fix failing tests from 6381664580080f015bc0c2ec647853f6…
AaronBallman May 18, 2021
b30a60e
Merge commit 'aaf2c7b518b3606139171aca3fd030287039cedd' into llvmspir…
vmaksimo May 18, 2021
a3917d3
[MLIR][Affine] Privatize certain escaping memrefs
May 18, 2021
75ea0ab
[X86] AMD Zen 3: fix MULX modelling - don't forget about WriteIMulH (…
LebedevRI May 18, 2021
58c57e1
[AArch64][GlobalISel] Prefer mov for s32->s64 G_ZEXT
May 17, 2021
85f8698
[gn build] Add target for PassesBindingsTest
aeubanks May 18, 2021
5c29148
[test] Speculative fix for bots
aeubanks May 18, 2021
99c0f16
[X86] Use Skylake Server model for x86-64-v4 so we have full instruct…
RKSimon May 18, 2021
c3530e7
Revert "[test] Speculative fix for bots"
aeubanks May 18, 2021
3043be9
[IR] Add a Location to BlockArgument.
lattner May 16, 2021
e81f09f
[InstCombine] add tests for funnel shift miscompile; NFC
rotateright May 18, 2021
16cbc80
[gn build] Rename PassesBindingsTests and add it to unittests
aeubanks May 18, 2021
0b031ee
[test] Speculative fix for bots (round 2)
aeubanks May 18, 2021
6d949a9
[InstCombine] restrict funnel shift match to avoid miscompile
rotateright May 18, 2021
5781f9a
[NFC] Format PassesBindingsTests CMake like other unittests
aeubanks May 18, 2021
855b42d
[IntegerAttr] Add helpers for working with LLVM's APSInt type.
lattner May 18, 2021
b4ead2c
[lld/mac] Correctly set nextdefsym
nico May 17, 2021
2919222
[Driver] Delete -mimplicit-it=
MaskRay May 18, 2021
5e1421b
[flang] Implement MATMUL in the runtime
klausler May 17, 2021
e81334a
[LICM] Remove MaybePromotable set (PR50367)
nikic May 17, 2021
8cd199b
[flang] Accept OPEN(ACCESS='APPEND') legacy extension even without wa…
klausler May 17, 2021
a33687e
[RuntimeDyld] Add allowStubs/allowZeroSyms
rafaelauler May 18, 2021
c7f4642
[X86][AVX] Add variable-permute test case from PR50356
RKSimon May 18, 2021
0f544be
AMDGPU/NFC: Replace EF_AMDGPU_MACH_AMDGCN_RESERVED_0X3E with EF_AMDGP…
kzhuravl May 18, 2021
8dd5ef0
[clang-repl] Better match the underlying architecture.
vgvassilev May 18, 2021
45b7cf9
[lld][WebAssembly] Enable string tail merging in debug sections
sbc100 May 12, 2021
d0902a8
[X86][AVX] createVariablePermute - correctly extend same-sized-vector…
RKSimon May 18, 2021
876d49b
[lld][WebAssembly] Convert test to assembly. NFC.
sbc100 May 18, 2021
f9ea3eb
[mlir-lsp-server] Add support for recording text document versions
River707 May 18, 2021
ac2226b
[PDB] Improve error handling when writes fail
rnk May 18, 2021
832f7af
[CMake] Use -O0 for unittests under full LTO as well
petrhosek May 18, 2021
6013d84
[OpaquePtr] Make loads and stores work with opaque pointers
aeubanks May 13, 2021
fd5e79f
[MinGW] Fix the cmake condition for -mbig-obj
mati865 May 18, 2021
6b9524a
[NewPM] Don't mark AA analyses as preserved
aeubanks May 6, 2021
9f57675
[compiler-rt] [builtins] Provide a SEH specific __gcc_personality_seh0
mstorsjo May 14, 2021
ec4706b
[SystemZ] [z/OS] Add XPLINK64 Calling Convention to SystemZ
Everybody0523 May 18, 2021
4e297dc
AMDGPU/Docs: Remove reserved MACH 0x3E (it is no longer reserved), so…
kzhuravl May 18, 2021
b86302e
[MSan] Set zeroext on call arguments to msan functions with zeroext p…
aeubanks May 18, 2021
6c9f073
Merge from 'main' to 'sycl-web' (#5)
asudarsa May 18, 2021
1c7f323
[TargetLowering] Only inspect attributes in the arguments for ArgList…
aeubanks May 4, 2021
bc7d15c
[NFC] Use ArgListEntry indirect types more in ISel lowering
aeubanks May 2, 2021
b9d25cc
[docs] Fix broken docs after 1c7f32334
aeubanks May 18, 2021
93cb71a
[mlir-docs] Add a blurb on recursion during pattern application
River707 May 18, 2021
2257e4a
[mlir] Allow derived rewrite patterns to define a non-virtual `initia…
River707 May 18, 2021
7d15c49
[x86] trim zeros from constants for readability; NFC
rotateright May 18, 2021
62eec33
[x86] add FMF propagation test for target-specific intrinsic; NFC
rotateright May 18, 2021
8e93d10
scudo: Test realloc on increasing size buffers.
pcc May 18, 2021
0683329
[Demangle][Rust] Parse named types
tmiasko May 18, 2021
b42400c
[Demangle][Rust] Parse array type
tmiasko May 18, 2021
a84c65c
[Demangle][Rust] Parse slice type
tmiasko May 18, 2021
774de7a
[Demangle][Rust] Parse tuples
tmiasko May 18, 2021
fad9480
Merge from 'sycl' to 'sycl-web' (#3)
asudarsa May 18, 2021
5f2b276
Default stack alignment of x86 NaCl to 16 bytes
Fabian-Sommer May 18, 2021
c6c41b7
Merge from 'sycl' to 'sycl-web' (#1)
May 18, 2021
4fedb3a
[symbolizer] Added StartAddress for the resolved function.
orlov-alex May 18, 2021
57f4088
[Demangle][Rust] Speculative fix for bot build failure
tmiasko May 19, 2021
ff99fdf
[OpenMP] Stabilize OpenMP/parallel_for_codegen.cpp test (NFC)
mikerice1969 May 18, 2021
886629a
[SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO
xur-llvm May 18, 2021
09ac352
[gn build] Port 886629a8c9e5
llvmgnsyncbot May 18, 2021
fa2fc21
Merge from 'main' to 'sycl-web' (#32)
asudarsa May 18, 2021
a32e39a
Fix a buildbot failure from commit 886629a8
xur-llvm May 18, 2021
e130fbe
[libc++] Some fixes to the <bit> utilities.
Quuxplusone May 12, 2021
06b40e8
[libc++] Alphabetize header inclusions and include-what-you-use <__de…
Quuxplusone May 13, 2021
7c2f582
Apply [[standalone_debug]] to some types in the STL.
amykhuang Mar 15, 2021
861d69a
[mlir] Speed up Lexer::getEncodedSourceLocation
River707 May 18, 2021
58369fc
Add a helper function to convert LogicalResult to int for return from…
tkoeppe May 18, 2021
528bc10
[X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB
weiguozhi May 19, 2021
68abc3d
[Attributor] Change AAExecutionDomain to only accept intrinsics
jhuber6 May 19, 2021
80d981e
Revert "[IR] Add a Location to BlockArgument." and follow-on commit
zygoloid May 19, 2021
851d02f
Enhance InferShapedTypeOpInterface to make it accessible during diale…
May 19, 2021
b5a80a0
[CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC
vvereschaka May 19, 2021
7faabe5
[Utils][vim] Highlight CHECK-EMPTY: & CHECK-COUNT: directives
zsrkmyn May 19, 2021
0c509db
[NewPM] Add options to PrintPassInstrumentation
aeubanks May 7, 2021
e2b3659
[mlir][Linalg] Break unnecessary dependency through unused `outs` ten…
May 19, 2021
c742d8d
[libfuzzer] Update doc mentioning removed flags.
vitalybuka May 19, 2021
fb7ec1f
[mlir] Use VectorTransferPermutationMapLoweringPatterns in VectorToSCF
matthias-springer May 17, 2021
60a097e
Fix sanitizer test errors from commit 886629a8
xur-llvm May 19, 2021
9f36306
[clang-tidy] Fix a crash on invalid code for memset-usage check.
hokein May 18, 2021
729e18c
[NFCI] SimplifyCFGPass: mergeEmptyReturnBlocks(): use DeleteDeadBlocks()
LebedevRI May 19, 2021
ca2c245
[RISCV] Support INSERT_VECTOR_ELT into i1 vectors
frasercrmck May 18, 2021
f24f140
[llvm-objcopy] Add support for '--' for delimiting options from input…
sndmitriev May 19, 2021
a4eb24c
[NFCI][SimplifyCFG] simplifyCommonResume(): use DeleteDeadBlock()
LebedevRI May 19, 2021
00f90e3
[NFCI][SimplifyCFG] simplifySingleResume(): use DeleteDeadBlock()
LebedevRI May 19, 2021
69a43e5
[NFCI][SimplifyCFG] simplifyReturn(): use DeleteDeadBlock()
LebedevRI May 19, 2021
57d20cb
[NFCI][SimplifyCFG] simplifyUnreachable(): use DeleteDeadBlock()
LebedevRI May 19, 2021
4f86aa6
[LV] Add -scalable-vectorization=<option> flag.
sdesmalen-arm Apr 8, 2021
c1dc267
MachineBasicBlock: add liveout iterator aware of which liveins are de…
TNorthover May 11, 2021
e102fd5
Reformat GSYMCreator.cpp
sfc-gh-sgiesecke May 7, 2021
f29c4c6
Avoid calculating the string hash twice in GsymCreator::insertString.
sfc-gh-sgiesecke May 14, 2021
4ea4d9c
Move FunctionInfo in addFunctionInfo rather than copying.
sfc-gh-sgiesecke May 14, 2021
81b2fcf
Use a non-recursive mutex in GsymCreator.
sfc-gh-sgiesecke May 14, 2021
ca23a38
[X86] Limit X86InterleavedAccessGroup to handle the same type case only
phoebewang May 19, 2021
479ea2a
[analyzer] Check the checker name, rather than the ProgramPointTag wh…
Szelethus May 18, 2021
1230b4c
[x86] Fix FMF propagation test
frgossen May 19, 2021
c1eaa11
tsan: mark sigwait as blocking
dvyukov May 7, 2021
a0be081
[NFC][SimplifyCFG] removeEmptyCleanup(): use BasicBlock::phis()
LebedevRI May 19, 2021
bb5d613
[NFCI][SimplifyCFG] removeEmptyCleanup(): streamline PHI node updating
LebedevRI May 19, 2021
8c2b535
[NFCI][SimplifyCFG] removeEmptyCleanup(): use DeleteDeadBlock()
LebedevRI May 19, 2021
722c39f
[HIP] Tighten checks in hip-include-path.hip test case
bjope May 18, 2021
8c71792
[X86] Remove copy + paste typos in AtomWriteResPair comment.
RKSimon May 19, 2021
222314d
[X86] Atom (pre-SLM) doesn't support PTEST instructions
RKSimon May 19, 2021
f5b5426
[clang] Fix a crash on CheckArgAlignment.
hokein May 19, 2021
c98833c
Reapply "[clang][deps] Support inferred modules"
Bigcheese May 19, 2021
6025663
[SDAG] propagate FMF from target-specific IR intrinsics
rotateright May 19, 2021
d59a2a3
[ARM][NEON] Combine base address updates for vst1x intrinsics
chbessonova May 6, 2021
7e95a56
Remove scalable vector assert from InnerLoopVectorizer::setDebugLocFr…
david-arm May 19, 2021
66513e2
Revert "[X86] Limit X86InterleavedAccessGroup to handle the same type…
phoebewang May 19, 2021
6825bfe
[mlir][Vector] NFC - Drop vector EDSC usage
nicolasvasilache May 19, 2021
fd4ef79
[llvm][AArch64][SVE] Model FFR-using intrinsics with inaccessiblemem
peterwaller-arm May 13, 2021
52a7797
Revert "[GlobalISel] Simplify G_ICMP to true/false when the result is…
nico May 19, 2021
ff95486
[lldb][NFC] Remove sample test boilerplate from TestBreakOnCPP11Initi…
Teemperor May 19, 2021
0bab7b2
[lldb] Encode `bool` as unsigned int
werat May 18, 2021
9a2769d
[mir][Python][linalg] Support OpDSL extensions in C++.
May 19, 2021
b14f9a1
[X86][Atom] Fix vector integer shift by immediate resource/throughputs
RKSimon May 19, 2021
ab4e04a
[X86][AVX] createVariablePermute - generalize the PR50356 fix for sma…
RKSimon May 19, 2021
9dd861a
[nfc] [lldb] 1/2: Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT…
jankratochvil May 19, 2021
d131081
[lldb] 2/2: Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rngli…
jankratochvil May 19, 2021
707fc2e
Revert rG528bc10e95d5f9d6a338f9bab5e91d7265d1cf05 : "[X86FixupLEAs] T…
RKSimon May 19, 2021
9d09d20
Reapply "[X86] Limit X86InterleavedAccessGroup to handle the same typ…
phoebewang May 19, 2021
d30dfa8
[clang][patch] Add support for option -fextend-arguments={32,64}: wid…
May 19, 2021
d254467
Revert "Revert "Align tests with the codegen changes""
vmaksimo May 19, 2021
bed4a63
Update CHECK result in coro-zero-alloca test to match current output
vmaksimo May 19, 2021
9477044
Use arrayidx instead ptridx to align with the community
vmaksimo May 19, 2021
3996975
Merge remote-tracking branch 'intel_llvm/sycl' into llvmspirv_pulldown
vmaksimo May 19, 2021
5871858
Merge from 'main' to 'sycl-web' (#15)
asudarsa May 19, 2021
ba79374
Merge from 'sycl' to 'sycl-web' (#1)
asudarsa May 19, 2021
bd75d69
Merge from 'sycl' to 'sycl-web' (#8)
May 19, 2021
f703571
Merge from 'main' to 'sycl-web' (#4)
asudarsa May 19, 2021
86645b4
Merge from 'main' to 'sycl-web' (#116)
asudarsa May 20, 2021
457ea73
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
vmaksimo May 20, 2021
b6fcaff
Fix Driver/sycl.c test
vmaksimo May 20, 2021
424c80c
Translate the llvm.fshr intrinsic function
MochalovaAn Apr 5, 2021
87b05a3
Fix warning when build by clang
Apr 19, 2021
4c65c65
[SPIRV] Align fshl.ll test with the Khronos version
May 20, 2021
44c3aa5
Disable OpenMP remarks* tests until they fixed in upstream
vmaksimo May 21, 2021
87b317f
Fix CUDA build
vmaksimo May 21, 2021
0621c56
Fix parameterized PI CUDA unittests with empty parameter
May 24, 2021
0365bd4
Merge remote-tracking branch 'intel_llvm/sycl' into llvmspirv_pulldown
vmaksimo May 24, 2021
fa2d83f
Fix typo
vmaksimo May 25, 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.
5 changes: 3 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ llvm::Optional<int64_t> ClangTidyCheck::OptionsView::getEnumInt(

StringRef Value = Iter->getValue().Value;
StringRef Closest;
unsigned EditDistance = -1;
unsigned EditDistance = 3;
for (const auto &NameAndEnum : Mapping) {
if (IgnoreCase) {
if (Value.equals_lower(NameAndEnum.second))
Expand All @@ -159,7 +159,8 @@ llvm::Optional<int64_t> ClangTidyCheck::OptionsView::getEnumInt(
EditDistance = 0;
continue;
}
unsigned Distance = Value.edit_distance(NameAndEnum.second);
unsigned Distance =
Value.edit_distance(NameAndEnum.second, true, EditDistance);
if (Distance < EditDistance) {
EditDistance = Distance;
Closest = NameAndEnum.second;
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/altera/AlteraTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "IdDependentBackwardBranchCheck.h"
#include "KernelNameRestrictionCheck.h"
#include "SingleWorkItemBarrierCheck.h"
#include "StructPackAlignCheck.h"
Expand All @@ -23,6 +24,8 @@ namespace altera {
class AlteraModule : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<IdDependentBackwardBranchCheck>(
"altera-id-dependent-backward-branch");
CheckFactories.registerCheck<KernelNameRestrictionCheck>(
"altera-kernel-name-restriction");
CheckFactories.registerCheck<SingleWorkItemBarrierCheck>(
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 @@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS

add_clang_library(clangTidyAlteraModule
AlteraTidyModule.cpp
IdDependentBackwardBranchCheck.cpp
KernelNameRestrictionCheck.cpp
SingleWorkItemBarrierCheck.cpp
StructPackAlignCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
//===--- IdDependentBackwardBranchCheck.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 "IdDependentBackwardBranchCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace altera {

void IdDependentBackwardBranchCheck::registerMatchers(MatchFinder *Finder) {
// Prototype to identify all variables which hold a thread-variant ID.
// First Matcher just finds all the direct assignments of either ID call.
const auto ThreadID = expr(hasDescendant(callExpr(callee(functionDecl(
anyOf(hasName("get_global_id"), hasName("get_local_id")))))));

const auto RefVarOrField = forEachDescendant(
stmt(anyOf(declRefExpr(to(varDecl())).bind("assign_ref_var"),
memberExpr(member(fieldDecl())).bind("assign_ref_field"))));

Finder->addMatcher(
compoundStmt(
// Bind on actual get_local/global_id calls.
forEachDescendant(
stmt(
anyOf(declStmt(hasDescendant(varDecl(hasInitializer(ThreadID))
.bind("tid_dep_var"))),
binaryOperator(allOf(
isAssignmentOperator(), hasRHS(ThreadID),
hasLHS(anyOf(
declRefExpr(to(varDecl().bind("tid_dep_var"))),
memberExpr(member(
fieldDecl().bind("tid_dep_field")))))))))
.bind("straight_assignment"))),
this);

// Bind all VarDecls that include an initializer with a variable DeclRefExpr
// (in case it is ID-dependent).
Finder->addMatcher(
stmt(forEachDescendant(
varDecl(hasInitializer(RefVarOrField)).bind("pot_tid_var"))),
this);

// Bind all VarDecls that are assigned a value with a variable DeclRefExpr (in
// case it is ID-dependent).
Finder->addMatcher(
stmt(forEachDescendant(binaryOperator(
allOf(isAssignmentOperator(), hasRHS(RefVarOrField),
hasLHS(anyOf(
declRefExpr(to(varDecl().bind("pot_tid_var"))),
memberExpr(member(fieldDecl().bind("pot_tid_field"))))))))),
this);

// Second Matcher looks for branch statements inside of loops and bind on the
// condition expression IF it either calls an ID function or has a variable
// DeclRefExpr. DeclRefExprs are checked later to confirm whether the variable
// is ID-dependent.
const auto CondExpr =
expr(anyOf(hasDescendant(callExpr(callee(functionDecl(
anyOf(hasName("get_global_id"),
hasName("get_local_id")))))
.bind("id_call")),
hasDescendant(stmt(anyOf(declRefExpr(to(varDecl())),
memberExpr(member(fieldDecl())))))))
.bind("cond_expr");
Finder->addMatcher(stmt(anyOf(forStmt(hasCondition(CondExpr)),
doStmt(hasCondition(CondExpr)),
whileStmt(hasCondition(CondExpr))))
.bind("backward_branch"),
this);
}

IdDependentBackwardBranchCheck::IdDependencyRecord *
IdDependentBackwardBranchCheck::hasIdDepVar(const Expr *Expression) {
if (const auto *Declaration = dyn_cast<DeclRefExpr>(Expression)) {
// It is a DeclRefExpr, so check if it's an ID-dependent variable.
const auto *CheckVariable = dyn_cast<VarDecl>(Declaration->getDecl());
auto FoundVariable = IdDepVarsMap.find(CheckVariable);
if (FoundVariable == IdDepVarsMap.end())
return nullptr;
return &(FoundVariable->second);
}
for (const auto *Child : Expression->children())
if (const auto *ChildExpression = dyn_cast<Expr>(Child))
if (IdDependencyRecord *Result = hasIdDepVar(ChildExpression))
return Result;
return nullptr;
}

IdDependentBackwardBranchCheck::IdDependencyRecord *
IdDependentBackwardBranchCheck::hasIdDepField(const Expr *Expression) {
if (const auto *MemberExpression = dyn_cast<MemberExpr>(Expression)) {
const auto *CheckField =
dyn_cast<FieldDecl>(MemberExpression->getMemberDecl());
auto FoundField = IdDepFieldsMap.find(CheckField);
if (FoundField == IdDepFieldsMap.end())
return nullptr;
return &(FoundField->second);
}
for (const auto *Child : Expression->children())
if (const auto *ChildExpression = dyn_cast<Expr>(Child))
if (IdDependencyRecord *Result = hasIdDepField(ChildExpression))
return Result;
return nullptr;
}

void IdDependentBackwardBranchCheck::saveIdDepVar(const Stmt *Statement,
const VarDecl *Variable) {
// Record that this variable is thread-dependent.
IdDepVarsMap[Variable] =
IdDependencyRecord(Variable, Variable->getBeginLoc(),
Twine("assignment of ID-dependent variable ") +
Variable->getNameAsString());
}

void IdDependentBackwardBranchCheck::saveIdDepField(const Stmt *Statement,
const FieldDecl *Field) {
// Record that this field is thread-dependent.
IdDepFieldsMap[Field] = IdDependencyRecord(
Field, Statement->getBeginLoc(),
Twine("assignment of ID-dependent field ") + Field->getNameAsString());
}

void IdDependentBackwardBranchCheck::saveIdDepVarFromReference(
const DeclRefExpr *RefExpr, const MemberExpr *MemExpr,
const VarDecl *PotentialVar) {
// If the variable is already in IdDepVarsMap, ignore it.
if (IdDepVarsMap.find(PotentialVar) != IdDepVarsMap.end())
return;
std::string Message;
llvm::raw_string_ostream StringStream(Message);
StringStream << "inferred assignment of ID-dependent value from "
"ID-dependent ";
if (RefExpr) {
const auto *RefVar = dyn_cast<VarDecl>(RefExpr->getDecl());
// If variable isn't ID-dependent, but RefVar is.
if (IdDepVarsMap.find(RefVar) != IdDepVarsMap.end())
StringStream << "variable " << RefVar->getNameAsString();
}
if (MemExpr) {
const auto *RefField = dyn_cast<FieldDecl>(MemExpr->getMemberDecl());
// If variable isn't ID-dependent, but RefField is.
if (IdDepFieldsMap.find(RefField) != IdDepFieldsMap.end())
StringStream << "member " << RefField->getNameAsString();
}
IdDepVarsMap[PotentialVar] =
IdDependencyRecord(PotentialVar, PotentialVar->getBeginLoc(), Message);
}

void IdDependentBackwardBranchCheck::saveIdDepFieldFromReference(
const DeclRefExpr *RefExpr, const MemberExpr *MemExpr,
const FieldDecl *PotentialField) {
// If the field is already in IdDepFieldsMap, ignore it.
if (IdDepFieldsMap.find(PotentialField) != IdDepFieldsMap.end())
return;
std::string Message;
llvm::raw_string_ostream StringStream(Message);
StringStream << "inferred assignment of ID-dependent member from "
"ID-dependent ";
if (RefExpr) {
const auto *RefVar = dyn_cast<VarDecl>(RefExpr->getDecl());
// If field isn't ID-dependent, but RefVar is.
if (IdDepVarsMap.find(RefVar) != IdDepVarsMap.end())
StringStream << "variable " << RefVar->getNameAsString();
}
if (MemExpr) {
const auto *RefField = dyn_cast<FieldDecl>(MemExpr->getMemberDecl());
if (IdDepFieldsMap.find(RefField) != IdDepFieldsMap.end())
StringStream << "member " << RefField->getNameAsString();
}
IdDepFieldsMap[PotentialField] = IdDependencyRecord(
PotentialField, PotentialField->getBeginLoc(), Message);
}

IdDependentBackwardBranchCheck::LoopType
IdDependentBackwardBranchCheck::getLoopType(const Stmt *Loop) {
switch (Loop->getStmtClass()) {
case Stmt::DoStmtClass:
return DoLoop;
case Stmt::WhileStmtClass:
return WhileLoop;
case Stmt::ForStmtClass:
return ForLoop;
default:
return UnknownLoop;
}
}

void IdDependentBackwardBranchCheck::check(
const MatchFinder::MatchResult &Result) {
// The first half of the callback only deals with identifying and storing
// ID-dependency information into the IdDepVars and IdDepFields maps.
const auto *Variable = Result.Nodes.getNodeAs<VarDecl>("tid_dep_var");
const auto *Field = Result.Nodes.getNodeAs<FieldDecl>("tid_dep_field");
const auto *Statement = Result.Nodes.getNodeAs<Stmt>("straight_assignment");
const auto *RefExpr = Result.Nodes.getNodeAs<DeclRefExpr>("assign_ref_var");
const auto *MemExpr = Result.Nodes.getNodeAs<MemberExpr>("assign_ref_field");
const auto *PotentialVar = Result.Nodes.getNodeAs<VarDecl>("pot_tid_var");
const auto *PotentialField =
Result.Nodes.getNodeAs<FieldDecl>("pot_tid_field");

// Save variables and fields assigned directly through ID function calls.
if (Statement && (Variable || Field)) {
if (Variable)
saveIdDepVar(Statement, Variable);
else if (Field)
saveIdDepField(Statement, Field);
}

// Save variables assigned to values of Id-dependent variables and fields.
if ((RefExpr || MemExpr) && PotentialVar)
saveIdDepVarFromReference(RefExpr, MemExpr, PotentialVar);

// Save fields assigned to values of ID-dependent variables and fields.
if ((RefExpr || MemExpr) && PotentialField)
saveIdDepFieldFromReference(RefExpr, MemExpr, PotentialField);

// The second part of the callback deals with checking if a branch inside a
// loop is thread dependent.
const auto *CondExpr = Result.Nodes.getNodeAs<Expr>("cond_expr");
const auto *IDCall = Result.Nodes.getNodeAs<CallExpr>("id_call");
const auto *Loop = Result.Nodes.getNodeAs<Stmt>("backward_branch");
if (!Loop)
return;
LoopType Type = getLoopType(Loop);
if (CondExpr) {
if (IDCall) { // Conditional expression calls an ID function directly.
diag(CondExpr->getBeginLoc(),
"backward branch (%select{do|while|for}0 loop) is ID-dependent due "
"to ID function call and may cause performance degradation")
<< Type;
return;
}
// Conditional expression has DeclRefExpr(s), check ID-dependency.
IdDependencyRecord *IdDepVar = hasIdDepVar(CondExpr);
IdDependencyRecord *IdDepField = hasIdDepField(CondExpr);
if (IdDepVar) {
// Change one of these to a Note
diag(IdDepVar->Location, IdDepVar->Message, DiagnosticIDs::Note);
diag(CondExpr->getBeginLoc(),
"backward branch (%select{do|while|for}0 loop) is ID-dependent due "
"to variable reference to %1 and may cause performance degradation")
<< Type << IdDepVar->VariableDeclaration;
} else if (IdDepField) {
diag(IdDepField->Location, IdDepField->Message, DiagnosticIDs::Note);
diag(CondExpr->getBeginLoc(),
"backward branch (%select{do|while|for}0 loop) is ID-dependent due "
"to member reference to %1 and may cause performance degradation")
<< Type << IdDepField->FieldDeclaration;
}
}
}

} // namespace altera
} // namespace tidy
} // namespace clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//===--- IdDependentBackwardBranchCheck.h - clang-tidy ----------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_IDDEPENDENTBACKWARDBRANCHCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_IDDEPENDENTBACKWARDBRANCHCHECK_H

#include "../ClangTidyCheck.h"

namespace clang {
namespace tidy {
namespace altera {

/// Finds ID-dependent variables and fields used within loops, and warns of
/// their usage. Using these variables in loops can lead to performance
/// degradation.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/altera-id-dependent-backward-branch.html
class IdDependentBackwardBranchCheck : public ClangTidyCheck {
private:
enum LoopType { UnknownLoop = -1, DoLoop = 0, WhileLoop = 1, ForLoop = 2 };
// Stores information necessary for printing out source of error.
struct IdDependencyRecord {
IdDependencyRecord(const VarDecl *Declaration, SourceLocation Location,
const llvm::Twine &Message)
: VariableDeclaration(Declaration), Location(Location),
Message(Message.str()) {}
IdDependencyRecord(const FieldDecl *Declaration, SourceLocation Location,
const llvm::Twine &Message)
: FieldDeclaration(Declaration), Location(Location),
Message(Message.str()) {}
IdDependencyRecord() = default;
const VarDecl *VariableDeclaration = nullptr;
const FieldDecl *FieldDeclaration = nullptr;
SourceLocation Location;
std::string Message;
};
// Stores the locations where ID-dependent variables are created.
std::map<const VarDecl *, IdDependencyRecord> IdDepVarsMap;
// Stores the locations where ID-dependent fields are created.
std::map<const FieldDecl *, IdDependencyRecord> IdDepFieldsMap;
/// Returns an IdDependencyRecord if the Expression contains an ID-dependent
/// variable, returns a nullptr otherwise.
IdDependencyRecord *hasIdDepVar(const Expr *Expression);
/// Returns an IdDependencyRecord if the Expression contains an ID-dependent
/// field, returns a nullptr otherwise.
IdDependencyRecord *hasIdDepField(const Expr *Expression);
/// Stores the location an ID-dependent variable is created from a call to
/// an ID function in IdDepVarsMap.
void saveIdDepVar(const Stmt *Statement, const VarDecl *Variable);
/// Stores the location an ID-dependent field is created from a call to an ID
/// function in IdDepFieldsMap.
void saveIdDepField(const Stmt *Statement, const FieldDecl *Field);
/// Stores the location an ID-dependent variable is created from a reference
/// to another ID-dependent variable or field in IdDepVarsMap.
void saveIdDepVarFromReference(const DeclRefExpr *RefExpr,
const MemberExpr *MemExpr,
const VarDecl *PotentialVar);
/// Stores the location an ID-dependent field is created from a reference to
/// another ID-dependent variable or field in IdDepFieldsMap.
void saveIdDepFieldFromReference(const DeclRefExpr *RefExpr,
const MemberExpr *MemExpr,
const FieldDecl *PotentialField);
/// Returns the loop type.
LoopType getLoopType(const Stmt *Loop);

public:
IdDependentBackwardBranchCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};

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

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_IDDEPENDENTBACKWARDBRANCHCHECK_H
Loading