Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW40) #2565

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,001 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1001 commits
Select commit Hold shift + click to select a range
179e15d
[SystemZ] Optimize bcmp calls (PR47420)
davidbolvansky Sep 25, 2020
b5a3b90
[SCEV] Add support for `x == constant` to CollectCondition.
fhahn Sep 24, 2020
2d128b0
[NFC] Fix build warnings
jurahul Sep 25, 2020
62c3727
[profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR
vedantk Sep 8, 2020
b5e87c9
[AArch64][GlobalISel] Add selection support for <8 x s16> G_INSERT_V…
aemerson Sep 25, 2020
76eb163
Sema: remove unnecessary parameter for SwiftName handling (NFCI)
compnerd Sep 24, 2020
7d0556f
Fix DISubprogram-v4.ll after e17f52d623cc146b7d9bf5a2e02965043508b4c4
MaskRay Sep 25, 2020
9b86b70
[PowerPC] Add accumulator register class and instructions
Sep 25, 2020
6caf3fb
Fix Assembler/disubprogram.ll after e17f52d623cc146b7d9bf5a2e02965043…
MaskRay Sep 25, 2020
c1f8568
[MLIR] Fix for updating function signature in normalizing memrefs
imaihal Sep 25, 2020
6cb0d23
AArch64/GlobalISel: Narrow stack passed argument access size
arsenm Sep 25, 2020
8055ae3
Revert "Add a verifier check that rejects non-distinct DISubprogram f…
adrian-prantl Sep 25, 2020
4f1897c
Move PassBuilder::registerParseTopLevelPipelineCallback out-of-line
zmodem Sep 25, 2020
3a69ebf
[SCEV] Add another test using info from loop guards for BTC with NE.
fhahn Sep 25, 2020
7d274aa
[SCEV] Add support for `x != 0` to CollectCondition.
fhahn Sep 25, 2020
55c4ff9
OpaquePtr: Add type to sret attribute
arsenm Sep 23, 2020
d2f1f53
[flang][OpenMP] Place the insertion point to the start of the block
SouraVX Sep 25, 2020
06104cb
[NFC] Fix comment for DataOp
clementval Sep 25, 2020
e4e673e
[lld-macho] Implement support for PIC
int3 Sep 5, 2020
f23f512
[lld-macho] Support -bundle
int3 Sep 1, 2020
c7c9776
[lld-macho] Allow the entry symbol to be dynamically bound
int3 Sep 17, 2020
62a3f0c
[lld-macho] Support absolute symbols
int3 Sep 18, 2020
643ec67
[lld-macho] Always include custom syslibroot when running tests
int3 Sep 19, 2020
2c2a749
[lld-macho] Ignore a few more undocumented flags
int3 Aug 12, 2020
d216607
[Coroutine] Split PHI Nodes in `cleanuppad` blocks in a way that obey…
dpaoliello Sep 25, 2020
89fe083
[WebAssembly] Check features before making SjLj vars thread-local
tlively Sep 25, 2020
6cd4a4c
[lldb] Pass reference instead of pointer in protected SBAddress methods.
JDevlieghere Sep 25, 2020
137597d
Add a verifier check that rejects non-distinct DISubprogram function
adrian-prantl Sep 24, 2020
d3f6972
[LoopReroll][NewPM] Port -loop-reroll to NPM
aeubanks Sep 19, 2020
2a0ca17
[InstCombine] collectBitParts - add fshl/fshr handling
RKSimon Sep 25, 2020
15645d0
[IRSim] Adding basic implementation of llvm-sim.
AndrewLitteken Sep 17, 2020
994ef4e
[InstCombine] Fix test name to match type. NFCI.
RKSimon Sep 25, 2020
9ff9c1d
[InstCombine] matchRotate - support (uniform) constant rotation amoun…
RKSimon Sep 25, 2020
7fa464f
Fix copy+paste typo in doxygen parameter name to fix Wdocumentation. …
RKSimon Sep 25, 2020
69c6f6b
Revert "[IRSim] Adding basic implementation of llvm-sim."
AndrewLitteken Sep 25, 2020
a83eb04
[lsan] Add interceptor for pthread_detach.
mvanotti Sep 25, 2020
1bec6eb
Add support for firmware/standalone LC_NOTE "main bin spec" corefiles
jasonmolenda Sep 25, 2020
152ff37
[msan] Skip memcpy interceptor called by gethostname
vitalybuka Sep 25, 2020
58cdbf5
Sema: add support for `__attribute__((__swift_private__))`
compnerd Sep 14, 2020
b65966c
Add the ability to write target stop-hooks using the ScriptInterpreter.
jimingham Sep 22, 2020
4600e21
[AArch64][SVE] Drop "argmemonly" from gather/scatter with vector base.
efriedma-quic Sep 23, 2020
48961ba
[TRE][NFC] Refactor Basic Block Processing
laytonio Sep 25, 2020
51cad04
C API: functions to get mask of a ShuffleVector
cdisselkoen Sep 25, 2020
8bd205b
[LangRef] Clarify the behavior of memory access instructions when poi…
aqjune Sep 20, 2020
0291c47
[RISCV] Fix formatting (NFC)
ebahapo Sep 25, 2020
b5f4653
[IR] Improve the description for Constant::isNormalFP to list all thi…
topperc Sep 24, 2020
97702c3
[Object][MachO] Refine the interface of Slice
Sep 25, 2020
764c1b7
[RISCV] Scheduler description for Bullet
Sep 25, 2020
a000580
[RISCV] Update driver tests
ebahapo Sep 25, 2020
67782a0
[lldb/bindings] Fix -Wformat after D88123
MaskRay Sep 26, 2020
2dba546
[AArch64][GlobalISel] Add a few more vector type combinations for shi…
aemerson Sep 26, 2020
83e3ea2
[LowerTypeTests][NewPM] Add constructor that uses command line flags
aeubanks Sep 17, 2020
546e460
[AArch64][GlobalISel] If a G_BUILD_VECTOR operands are all G_CONSTANT…
aemerson Sep 26, 2020
ebb1092
[Clang][OpenMP] Added support for nowait target in CodeGen via regula…
shiltian Sep 26, 2020
7641952
Common code preparation for tblgen-types patch
teqdruid Sep 26, 2020
63c58c2
[bindings/go] Fix TestAttributes after D88241
MaskRay Sep 26, 2020
96318f6
[Driver] Perform Linux distribution detection only once
dmantipov Sep 26, 2020
2ca0ea1
[Driver] Fix formatting as suggested by clang-format (NFC)
dmantipov Sep 26, 2020
c0f8e4c
[SelectionDAG] Add guard to automatically insert flags
ecnelises Sep 26, 2020
c6c5629
[CodeGen] Do not call `emitGlobalConstantLargeInt` for constant requi…
atanasyan Sep 24, 2020
8d5b289
[LoopDelete][Assume] Allow deleting loops with assumes
Ralender Sep 26, 2020
6314f41
[FPEnv] Evaluate constant expressions under non-default rounding modes
spavloff Sep 17, 2020
b2c0193
[DSE] Add tests with lifetime.end that only mark parts of the obj as …
fhahn Sep 26, 2020
8f0466e
[DSE] Unify & fix mem terminator location checks.
fhahn Sep 26, 2020
50a3df5
[TableGen] Add/edit Doxygen comments to match "TableGen Backend Devel…
Sep 24, 2020
f91b9c0
Run test on particular target only
spavloff Sep 26, 2020
decc194
MachineCSE.cpp - use auto const& iterators in for-range loops to avoi…
RKSimon Sep 25, 2020
a61272a
[DAG] Fold vector mul(x,0)/mul(x,1) to a clearing mask
RKSimon Sep 26, 2020
010c445
[X86] Cleanup check-prefixes for vector-mul.ll tests
RKSimon Sep 26, 2020
93628ea
[mlir] Fix passes.md's naming & add missing
jpienaar Sep 26, 2020
57b871f
[mlir] Updates to generate dialect rather than op docs
jpienaar Sep 26, 2020
584d919
[mlir] Fix capitalization typo
jpienaar Sep 26, 2020
46b671a
[gn build] update TODO
nico Sep 26, 2020
915310b
Revert "[DSE] Switch to MemorySSA-backed DSE by default."
fhahn Sep 26, 2020
98c5eeb
[InstCombine] Add basic vector test coverage for icmp_eq/ne zero comb…
RKSimon Sep 26, 2020
c2921d1
[flang] SAVE statement should not apply to nested scoping units
rikigigi Sep 26, 2020
f702a6f
Thread safety analysis: Improve documentation for ASSERT_CAPABILITY
ryanofsky Sep 26, 2020
6d374cf
[X86] Add 64-bit target tests
RKSimon Sep 26, 2020
400bdbc
[ConstraintElimination] Internalize function/class and delete an impl…
MaskRay Sep 26, 2020
4855018
Fix sphinx warnings in AttributeReference, NFC
aaronpuchert Sep 26, 2020
6f24774
[NFC][PowerPC] Change PPCSubTarget (introduced from D87671) to Subtarget
amy-kwan Sep 25, 2020
20e9c36
Internalize functions from various tools. NFC
MaskRay Sep 26, 2020
55f7273
[LLVM-C] Turn a ShuffleVector Constant Into a Getter.
CodaFi Sep 26, 2020
c8f6c0f
[Machinesink] add one more profitable loop related pattern
Sep 26, 2020
ba950ad
Update Kaleidoscope: Change headers
Sep 27, 2020
d78c4d9
[X86] Add more test cases to inline-asm-flag-output.ll. NFC
topperc Sep 27, 2020
82420b4
[DivRemPairs] Use DenseMapBase::find instead of operator[]. NFC
MaskRay Sep 27, 2020
7156938
[AArch64][GlobalISel] Use the look-through constant helper for the sh…
aemerson Sep 27, 2020
f229bf2
[Legalize][X86] Improve nnan fmin/fmax vector reduction
nikic Sep 12, 2020
5811d72
[AArch64][GlobalISel] Promote scalar G_SHL constant shift amounts to …
aemerson Sep 27, 2020
e779427
Fix MIPS and MIPS64 ABI to use ConstString in their register info arr…
nomtats Sep 27, 2020
ababcd2
[llvm-objcopy][NFC] refactor error handling. part 2.
avl-llvm Sep 23, 2020
de55ebe
Typo fix; NFC
AaronBallman Sep 27, 2020
71f25ac
[InstSimplify] add tests for fcmp with casted op; NFC
rotateright Sep 26, 2020
645c53a
[ValueTracking] enhance isKnownNeverInfinity to understand sitofp
rotateright Sep 27, 2020
816b0a9
[CostModel] add cl option to check size and latency costs; NFC
rotateright Sep 27, 2020
d9499c8
[X86] Regenerate i128 sdiv tests and add i686 coverage.
RKSimon Sep 27, 2020
2d7a12f
[X86] Add some basic i128 udiv test coverage
RKSimon Sep 27, 2020
c8abf1c
[CVP] Pass context instruction when narrowing div/rem
nikic Sep 27, 2020
9b959b5
[LVI] Require context instruction in external API (NFCI)
nikic Sep 27, 2020
709d03f
[LVI] Clarify getValueAt/getValueInBlock doc comments (NFC)
nikic Sep 27, 2020
4f6e119
[CVP] Make srem test more robust (NFC)
nikic Sep 27, 2020
7b78206
[InstCombine] Simplify code. NFCI.
d0k Sep 27, 2020
50bd71e
[NewPM] Port ConstraintElimination to the new pass manager
MaskRay Sep 27, 2020
fe79061
[LVI][CVP] Use block value when simplifying icmps
nikic Aug 30, 2020
01bde73
[CVP] Remove unnecessary block splits in tests (NFC)
nikic Sep 27, 2020
0103df7
[OpenMP] Add Missing _static Director for OpenMP Documentation
jhuber6 Sep 27, 2020
155ac33
[BuildLibCalls] Add noalias for strcat and stpcpy
davidbolvansky Sep 27, 2020
3d2bab1
[mlir][openacc] Remove detach and delete operands from acc.data
clementval Sep 28, 2020
12ab4f8
[mlir][openacc] Switch to assembly format for acc.data
clementval Sep 28, 2020
fa08afc
[mlir][openacc] Add if, deviceptr operands and default attribute
clementval Sep 28, 2020
9dcd96f
Canonicalize declaration pointers when forming APValues.
zygoloid Sep 2, 2020
df2a1f2
Add profiling support for APValues.
zygoloid Sep 2, 2020
1598595
[Test] Add tests where we can replace condition with invariants
xortator Sep 28, 2020
a2578e9
Revert "Reland [CodeGen] emit CG profile for COFF object file"
aeubanks Sep 28, 2020
dd3ba72
[PowerPC] Add tests for `select` patterns. NFC.
Sep 28, 2020
68ba962
Merge from 'master' to 'sycl-web'
Sep 28, 2020
3c94626
Merge from 'sycl' to 'sycl-web' (#1)
Sep 28, 2020
bafdd11
[SVE] Replace / operator in TypeSize/ElementCount with divideCoeffici…
david-arm Sep 11, 2020
b3a722e
[Coroutines] Reuse storage for local variables with non-overlapping l…
ChuanqiXu9 Sep 28, 2020
070a1d5
[lldb] Remove nothreadallow from SWIG's __str__ wrappers to work arou…
Teemperor Sep 28, 2020
e4b9867
[ARM] Expand cannotInsertWDLSTPBetween to the last instruction
davemgreen Sep 28, 2020
f39f92c
[ARM][MVE] tail-predication: overflow checks for elementcount, cont'd
Sep 24, 2020
7e5a356
[Coroutines] Remove unused includes. NFC.
d0k Sep 28, 2020
ea0f66e
[obj2yaml][yaml2obj] - Stop recognizing SHT_MIPS_ABIFLAGS on non-MIPS…
Sep 25, 2020
cabee89
[lldb] Reference STL types in import-std-module tests
Teemperor Sep 28, 2020
dab9917
[yaml2obj][obj2yaml] - Add a support for SHT_ARM_EXIDX section.
Sep 23, 2020
0c671bf
[InstCombine] Add tests for vector rotate by constants with undefs.
RKSimon Sep 28, 2020
286d3fc
[AMDGPU] Split R600 and GCN bfi patterns
jayfoad Sep 24, 2020
2806f58
[AMDGPU] Make bfi patterns divergence-aware
jayfoad Sep 24, 2020
bab1a17
[AMDGPU] Add bfi immediate pattern
jayfoad Sep 24, 2020
40e86ca
[PowerPC] Clean-up mayRaiseFPException bits
ecnelises Sep 28, 2020
0b44bb8
[lldb][NFC] Minor cleanup in CxxModuleHandler::tryInstantiateStdTemplate
Teemperor Sep 28, 2020
9b2364e
Revert 1291215b
vladimirlaz Sep 28, 2020
018066d
[clangd] Add a tweak for filling in enumerators of a switch statement.
tadeokondrak Sep 28, 2020
31b3f32
[gn build] Port 018066d9475
llvmgnsyncbot Sep 28, 2020
6b5198f
[X86] Simplify broadcast mask detection with isUndefOrEqual helper.
RKSimon Sep 28, 2020
e0820d8
[X86] Flip isShuffleEquivalent argument order to match isTargetShuffl…
RKSimon Sep 28, 2020
a48f607
[AArch64] Generate .note.gnu.property based on module flags.
DanielKristofKiss Sep 28, 2020
0ad793f
[SCEV] Also use info from assumes in applyLoopGuards.
fhahn Sep 28, 2020
dabb14c
[InstCombine] matchRotate - allow undef in uniform constant rotation …
RKSimon Sep 28, 2020
1696dd2
[ARM][MVE] Enable tail-predication by default
Sep 28, 2020
bf890dc
[clang] Don't emit "no member" diagnostic if the lookup fails on an i…
hokein Sep 28, 2020
fdfe324
[clang-tidy] IncludeInserter: allow <> in header name
alexfh Sep 28, 2020
4ba0061
[llvm-readobj/elf] - Fix the PREL31 relocation computation used for d…
Sep 28, 2020
d3a8e33
[AMDGPU] Reformat SITargetLowering::isSDNodeSourceOfDivergence. NFC.
jayfoad Sep 28, 2020
3d1d089
[NFC][ARM] Factor out some logic for LoLoops.
sparker-arm Sep 28, 2020
63ee42a
[InstCombine] matchRotate - force splat of uniform constant rotation …
RKSimon Sep 28, 2020
c372809
[TableGen] Improved messages in PseudoLoweringEmitter.
Sep 25, 2020
ba8911d
[ValueTracking] Fix analyses to update CxtI to be phi's incoming edge…
aqjune Sep 26, 2020
9b0b096
[SVE] Lower fixed length VECREDUCE_[UMAX|UMIN] to Scalable
Sep 28, 2020
675431b
[ARM] Added more patterns to generate SSAT/USAT with shift
MeeraN7 Sep 28, 2020
509fba7
[llvm] Fix unused variable in non-debug configurations
tpopp Sep 28, 2020
e82a008
[ARM][LowOverheadLoops] Cleanup and re-arrange
sparker-arm Sep 25, 2020
0e0a0c8
[AMDGPU] Reformat AMDGPUTargetLowering::isSDNodeAlwaysUniform. NFC.
jayfoad Sep 28, 2020
5dbf80c
[clang][codegen] Annotate `correctly-rounded-divide-sqrt-fp-math` fn-…
darkbuck Sep 28, 2020
f775fe5
Revert "Add the ability to write target stop-hooks using the ScriptIn…
JDevlieghere Sep 28, 2020
b5f7e9e
[clangd] Add a trained DecisionForest for code completion.
usx95 Sep 22, 2020
06bc685
[ubsan] nullability-arg: Fix crash on C++ member pointers
vedantk Sep 25, 2020
07b7a24
[unittests] Preserve LD_LIBRARY_PATH in crash recovery test
miyuki Sep 28, 2020
37ef225
[AArch64] Reuse map iterator instead of double lookup. NFC
jroelofs Sep 28, 2020
76753a5
Add FunctionType to MLIR C and Python bindings.
stellaraccident Sep 28, 2020
a8b55b6
[clangd] Use Decision Forest to score code completions.
usx95 Sep 22, 2020
ad4f11a
[InstCombine] Add basic trunc(shr(trunc(x),c)) tests
RKSimon Sep 28, 2020
a52e780
[GlobalISel] Combine (xor (and x, y), y) -> (and (not x), y)
Sep 18, 2020
f55a518
[AArch64][GlobalISel] Support shifted register form in emitTST
Sep 11, 2020
1121a58
[CostModel] split handling of intrinsics from other calls
rotateright Sep 28, 2020
745abbb
[CostModel] move early exit for free intrinsics
rotateright Sep 28, 2020
9d7ec46
[AArch64][GlobalISel] Infer whether G_PHI is going to be a FPR in reg…
Sep 23, 2020
4c41fb5
[WebAssembly] Use wasm::Signature for in ObjectWriter (NFC)
aheejin Sep 28, 2020
d047bb1
[InstCombine] Add trunc(shr(trunc(x),c)) non-uniform vector tests
RKSimon Sep 28, 2020
06e68f0
[AddressSanitizer] Copy type metadata to prevent miscompilation
ddcc Sep 26, 2020
9b1666f
[clangd] Rename evaluate() to evaluateHeuristics()
usx95 Sep 28, 2020
6c81683
Revert "[AArch64][GlobalISel] Add selection support for <8 x s16> G_…
aemerson Sep 28, 2020
83dc53d
[AArch64] reuse another map iterator. NFC
jroelofs Sep 28, 2020
54759ce
[mlir] [VectorOps] changes to printing support for integers
aartbik Sep 28, 2020
e851aeb
scudo: Re-order Allocator fields for improved performance. NFCI.
pcc Sep 25, 2020
0c82fa6
[python][tests] Fix string comparison with "is"
chfast Sep 28, 2020
33125cf
[CostModel] fill in arguments as part of intrinsic attribute constructor
rotateright Sep 28, 2020
0156914
[PowerPC] Legalize v256i1 and v512i1 and implement load and store of …
Sep 28, 2020
8b95bd3
[lldb] Enable markdown support for documentation
JDevlieghere Sep 28, 2020
6e54918
Once we've found a firmware binary and loaded it, don't search more
jasonmolenda Sep 28, 2020
c37a8ac
[CostModel] remove hack for intrinsic cost based on cost type
rotateright Sep 28, 2020
b59dff4
[wasm] Move WasmTraits.h to BinaryFormat
d0k Sep 28, 2020
46fdaac
[libc++] Fix heap UaF issue in coroutine test
ldionne Sep 28, 2020
93ba330
[libc++] Add UNSUPPORTED markup to atomic test in single-threaded mode
ldionne Sep 28, 2020
59f8ac3
[libc++] Replace uses of __libcpp_allocate by std::allocator<>
ldionne Sep 28, 2020
bd19876
[COFF] Aliases resolve directly to defined external targets
ericastor Sep 28, 2020
2f768a6
[InstCombine] Regenerate cast tests. NFC.
RKSimon Sep 28, 2020
288c577
[X86] Use inlineasm flag output for the _bittest* intrinsics.
topperc Sep 28, 2020
e962895
[mlir] [VectorOps] Relaxed restrictions on vector.reduction types eve…
aartbik Sep 28, 2020
5aa56b2
Revert "Revert "[AArch64][GlobalISel] Add selection support for <8 x …
aemerson Sep 28, 2020
974551d
[lldb] Add print_function import
JDevlieghere Sep 28, 2020
e7549da
Fix a think-o with the numerical suffixes in the docs for init_priority.
AaronBallman Sep 28, 2020
d897351
[gn build] Re-run CompletionModelCodegen when input json files change
nico Sep 28, 2020
25affb0
[CMake][AIX] Limit tools in external project build
daltenty Aug 20, 2020
0823219
[GlobalISel] Add support for lowering of vector G_SELECT and use for …
aemerson Sep 26, 2020
e5ef523
[X86] Add tests for D87883. NFC
topperc Sep 28, 2020
e53196b
[X86] Add support for calling SimplifyDemandedBits on the input of PD…
topperc Sep 28, 2020
d092c91
[libc++] Fix constexpr dynamic allocation on GCC 10
ldionne Sep 28, 2020
2d657d1
[libcxx] Don't pass -s to libtool
petrhosek Sep 28, 2020
a975be0
[mlir][shape] Make conversion passes more consistent.
silvasean Sep 24, 2020
bd08a87
[EHStreamer] Simplify sharedTypeIDs with std::mismatch
MaskRay Sep 28, 2020
e46d74b
[CVP] Allow two transforms in one invocation
preames Sep 28, 2020
e72d792
Guard `find_library(tensorflow_c_api ...)` by checking for TENSORFLOW…
joker-eph Sep 28, 2020
1e86d63
[clang] Selectively ena/disa-ble format-insufficient-args warning
jkorous-apple Sep 16, 2020
f668a84
[scudo][standalone] Remove unused atomic_compare_exchange_weak
Sep 28, 2020
93936da
[mlir][Affine][VectorOps] Fix super vectorizer utility (D85869)
dcaballe Sep 28, 2020
665dc40
Attempt to clear some msan errors in the libcxx atomic tests.
ogiroux Sep 28, 2020
ee80615
[clang][driver][AIX] Set compiler-rt as default rtlib
daltenty Sep 3, 2020
54d9f74
BPF: move AbstractMemberAccess and PreserveDIType passes to EP_EarlyA…
yonghong-song Sep 3, 2020
efd0472
BuildVectorType with a dependent (array) type is crashing the compile…
zahiraam Sep 28, 2020
7380532
[RegisterCoalescer] Pass Undefs to extendToIndices()
ruiling Sep 15, 2020
6fd8c69
[clang] Update warning-wall.c test
jkorous-apple Sep 29, 2020
c375635
Ensure that we don't compute linkage for an anonymous class too early if
zygoloid Sep 29, 2020
727c422
[gn build] Port 54d9f743c8b
llvmgnsyncbot Sep 29, 2020
9f9f89d
Remove dependency from LLVM Dialect on the OpenMP dialect
joker-eph Sep 28, 2020
cc6d1f8
[clangd] When finding refs for a renaming alias, do not return refs t…
HighCommander4 Sep 7, 2020
bbb5dc4
[mlir][openacc] Add acc.data operation verifier
clementval Sep 29, 2020
10eb3bf
Skip -fPIE for AMDGPU and HIP toolchain
yxsamliu Sep 28, 2020
b9f2b3b
[AArch64][GlobalISel] Scalarize <2 x s64> G_MUL since we don't have n…
aemerson Sep 28, 2020
187658b
Recommit "[HIP] Change default --gpu-max-threads-per-block value to 1…
yxsamliu Sep 29, 2020
5a3023a
[HIP] Return non-zero value for invalid target ID
yxsamliu Sep 27, 2020
ca1ce39
BPF: explicitly specify bpfel triple for certain tests
yonghong-song Sep 29, 2020
f3ead88
[MLIR][OpenMP] Removed the ambiguity in flush op assembly syntax
kiranktp Sep 29, 2020
c942095
[OpenMP][FIX] Verify compatible types for declare variant calls
jdoerfert Sep 27, 2020
d266fd9
[IndVars] Remove exiting conditions that are trivially true/false
xortator Sep 29, 2020
e862e78
[NFC] Use assert instead of checking the guaranteed condition
xortator Sep 29, 2020
da036b4
[Docs][NewPM] Add note about required passes
aeubanks Sep 25, 2020
4fc69ab
Revert "[OpenMP][FIX] Verify compatible types for declare variant calls"
jdoerfert Sep 29, 2020
80ed4b5
Merge from 'master' to 'sycl-web'
Sep 29, 2020
a4b1fde
[X86] Add known bits test for PEXT. NFC
topperc Sep 29, 2020
82da0ca
[X86] Add computeKnownBits support for PEXT.
topperc Sep 29, 2020
bc868da
[Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do no…
dmantipov Sep 29, 2020
98ef7e2
This reduces code duplication between CGObjCMac.cpp and Mangle.cpp
ellishg Sep 29, 2020
840942c
Merge from 'sycl' to 'sycl-web' (#1)
Sep 29, 2020
4c19b89
[NFC][ARM] Comments and lambdas
sparker-arm Sep 29, 2020
86a20d9
Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one."
fhahn Sep 28, 2020
b76df59
Revert "Recommit "[SCCP] Do not replace deref'able ptr with un-deref'…
fhahn Sep 29, 2020
297ec61
[IsKnownNonZero] Handle the case with non-constant phi nodes
Sep 24, 2020
eb9f7c2
Revert "OpaquePtr: Add type to sret attribute"
tpopp Sep 29, 2020
05d8b12
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
vmaksimo Sep 29, 2020
3e26932
Merge commit 'b76df593eb660d1e4c9f1384a75b404ee5bcd06f' into llvmspir…
vmaksimo Sep 29, 2020
7e0b9e3
updates for OpenCL C 3.0
bashbaug Sep 23, 2020
4643f5b
Support function pointers in constant struct value
zuban32 Sep 20, 2020
c623ec4
Fix global ctor/dtor translation from SPIRV to LLVM IR
wenju-he Sep 20, 2020
c4c20a3
Translate empty LLVM module to empty SPIR-V module
Fznamznon Sep 17, 2020
02ae8b9
Move some includes from SPIRVDebug.h to .cpp files
svenvh Sep 25, 2020
f617e9e
Remove unused includes
svenvh Sep 25, 2020
81963e8
Merge commit 'eb9f7c28e5fe' into llvmspirv_pulldown
vmaksimo Oct 1, 2020
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
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ d8f0e6caa91e230a486c948ab643174e40bdf215

# Cleanup __config indention. NFC.
2b772b930e097ed6f06d698a51e291c7fd318baa

# Fixing whitespace problems
94b2dd0998230c758abd92c99d3700c971f7a31a

# Wiped out some non-ascii characters that snuck into the copyright.
5b08a8a43254ed30bd953e869b0fd9fc1e8b82d0
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ void StringFindStartswithCheck::check(const MatchFinder::MatchResult &Result) {
// Create a preprocessor #include FixIt hint (CreateIncludeInsertion checks
// whether this already exists).
Diagnostic << IncludeInserter.createIncludeInsertion(
Source.getFileID(ComparisonExpr->getBeginLoc()), AbseilStringsMatchHeader,
false);
Source.getFileID(ComparisonExpr->getBeginLoc()),
AbseilStringsMatchHeader);
}

void StringFindStartswithCheck::registerPPCallbacks(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_clang_library(clangTidyCppCoreGuidelinesModule
NarrowingConversionsCheck.cpp
NoMallocCheck.cpp
OwningMemoryCheck.cpp
PreferMemberInitializerCheck.cpp
ProBoundsArrayToPointerDecayCheck.cpp
ProBoundsConstantArrayIndexCheck.cpp
ProBoundsPointerArithmeticCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "NarrowingConversionsCheck.h"
#include "NoMallocCheck.h"
#include "OwningMemoryCheck.h"
#include "PreferMemberInitializerCheck.h"
#include "ProBoundsArrayToPointerDecayCheck.h"
#include "ProBoundsConstantArrayIndexCheck.h"
#include "ProBoundsPointerArithmeticCheck.h"
Expand Down Expand Up @@ -66,6 +67,8 @@ class CppCoreGuidelinesModule : public ClangTidyModule {
"cppcoreguidelines-non-private-member-variables-in-classes");
CheckFactories.registerCheck<OwningMemoryCheck>(
"cppcoreguidelines-owning-memory");
CheckFactories.registerCheck<PreferMemberInitializerCheck>(
"cppcoreguidelines-prefer-member-initializer");
CheckFactories.registerCheck<ProBoundsArrayToPointerDecayCheck>(
"cppcoreguidelines-pro-bounds-array-to-pointer-decay");
CheckFactories.registerCheck<ProBoundsConstantArrayIndexCheck>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ InitVariablesCheck::InitVariablesCheck(StringRef Name,
: ClangTidyCheck(Name, Context),
IncludeInserter(Options.getLocalOrGlobal("IncludeStyle",
utils::IncludeSorter::IS_LLVM)),
MathHeader(Options.get("MathHeader", "math.h")) {}
MathHeader(Options.get("MathHeader", "<math.h>")) {}

void InitVariablesCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "IncludeStyle", IncludeInserter.getStyle());
Expand Down Expand Up @@ -103,7 +103,7 @@ void InitVariablesCheck::check(const MatchFinder::MatchResult &Result) {
InitializationString);
if (AddMathInclude) {
Diagnostic << IncludeInserter.createIncludeInsertion(
Source.getFileID(MatchedDecl->getBeginLoc()), MathHeader, false);
Source.getFileID(MatchedDecl->getBeginLoc()), MathHeader);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
//===--- PreferMemberInitializerCheck.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 "PreferMemberInitializerCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace cppcoreguidelines {

static bool isControlStatement(const Stmt *S) {
return isa<IfStmt, SwitchStmt, ForStmt, WhileStmt, DoStmt, ReturnStmt,
GotoStmt, CXXTryStmt, CXXThrowExpr>(S);
}

static bool isNoReturnCallStatement(const Stmt *S) {
const auto *Call = dyn_cast<CallExpr>(S);
if (!Call)
return false;

const FunctionDecl *Func = Call->getDirectCallee();
if (!Func)
return false;

return Func->isNoReturn();
}

static bool isLiteral(const Expr *E) {
return isa<StringLiteral, CharacterLiteral, IntegerLiteral, FloatingLiteral,
CXXBoolLiteralExpr, CXXNullPtrLiteralExpr>(E);
}

static bool isUnaryExprOfLiteral(const Expr *E) {
if (const auto *UnOp = dyn_cast<UnaryOperator>(E))
return isLiteral(UnOp->getSubExpr());
return false;
}

static bool shouldBeDefaultMemberInitializer(const Expr *Value) {
if (isLiteral(Value) || isUnaryExprOfLiteral(Value))
return true;

if (const auto *DRE = dyn_cast<DeclRefExpr>(Value))
return isa<EnumConstantDecl>(DRE->getDecl());

return false;
}

static const std::pair<const FieldDecl *, const Expr *>
isAssignmentToMemberOf(const RecordDecl *Rec, const Stmt *S) {
if (const auto *BO = dyn_cast<BinaryOperator>(S)) {
if (BO->getOpcode() != BO_Assign)
return std::make_pair(nullptr, nullptr);

const auto *ME = dyn_cast<MemberExpr>(BO->getLHS()->IgnoreParenImpCasts());
if (!ME)
return std::make_pair(nullptr, nullptr);

const auto *Field = dyn_cast<FieldDecl>(ME->getMemberDecl());
if (!Field)
return std::make_pair(nullptr, nullptr);

if (isa<CXXThisExpr>(ME->getBase()))
return std::make_pair(Field, BO->getRHS()->IgnoreParenImpCasts());
} else if (const auto *COCE = dyn_cast<CXXOperatorCallExpr>(S)) {
if (COCE->getOperator() != OO_Equal)
return std::make_pair(nullptr, nullptr);

const auto *ME =
dyn_cast<MemberExpr>(COCE->getArg(0)->IgnoreParenImpCasts());
if (!ME)
return std::make_pair(nullptr, nullptr);

const auto *Field = dyn_cast<FieldDecl>(ME->getMemberDecl());
if (!Field)
return std::make_pair(nullptr, nullptr);

if (isa<CXXThisExpr>(ME->getBase()))
return std::make_pair(Field, COCE->getArg(1)->IgnoreParenImpCasts());
}

return std::make_pair(nullptr, nullptr);
}

PreferMemberInitializerCheck::PreferMemberInitializerCheck(
StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
IsUseDefaultMemberInitEnabled(
Context->isCheckEnabled("modernize-use-default-member-init")),
UseAssignment(OptionsView("modernize-use-default-member-init",
Context->getOptions().CheckOptions)
.get("UseAssignment", false)) {}

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

void PreferMemberInitializerCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
cxxConstructorDecl(hasBody(compoundStmt()), unless(isInstantiated()))
.bind("ctor"),
this);
}

void PreferMemberInitializerCheck::check(
const MatchFinder::MatchResult &Result) {
const auto *Ctor = Result.Nodes.getNodeAs<CXXConstructorDecl>("ctor");
const auto *Body = cast<CompoundStmt>(Ctor->getBody());

const CXXRecordDecl *Class = Ctor->getParent();
SourceLocation InsertPos;
bool FirstToCtorInits = true;

for (const Stmt *S : Body->body()) {
if (S->getBeginLoc().isMacroID()) {
StringRef MacroName =
Lexer::getImmediateMacroName(S->getBeginLoc(), *Result.SourceManager,
getLangOpts());
if (MacroName.contains_lower("assert"))
return;
}
if (isControlStatement(S))
return;

if (isNoReturnCallStatement(S))
return;

if (const auto *CondOp = dyn_cast<ConditionalOperator>(S)) {
if (isNoReturnCallStatement(CondOp->getLHS()) ||
isNoReturnCallStatement(CondOp->getRHS()))
return;
}

const FieldDecl *Field;
const Expr *InitValue;
std::tie(Field, InitValue) = isAssignmentToMemberOf(Class, S);
if (Field) {
if (IsUseDefaultMemberInitEnabled && getLangOpts().CPlusPlus11 &&
Ctor->isDefaultConstructor() &&
(getLangOpts().CPlusPlus20 || !Field->isBitField()) &&
(!isa<RecordDecl>(Class->getDeclContext()) ||
!cast<RecordDecl>(Class->getDeclContext())->isUnion()) &&
shouldBeDefaultMemberInitializer(InitValue)) {
auto Diag =
diag(S->getBeginLoc(), "%0 should be initialized in an in-class"
" default member initializer")
<< Field;

SourceLocation FieldEnd =
Lexer::getLocForEndOfToken(Field->getSourceRange().getEnd(), 0,
*Result.SourceManager, getLangOpts());
Diag << FixItHint::CreateInsertion(FieldEnd,
UseAssignment ? " = " : "{")
<< FixItHint::CreateInsertionFromRange(
FieldEnd,
CharSourceRange(InitValue->getSourceRange(), true))
<< FixItHint::CreateInsertion(FieldEnd, UseAssignment ? "" : "}");

SourceLocation SemiColonEnd =
Lexer::findNextToken(S->getEndLoc(), *Result.SourceManager,
getLangOpts())
->getEndLoc();
CharSourceRange StmtRange =
CharSourceRange::getCharRange(S->getBeginLoc(), SemiColonEnd);

Diag << FixItHint::CreateRemoval(StmtRange);
} else {
auto Diag =
diag(S->getBeginLoc(), "%0 should be initialized in a member"
" initializer of the constructor")
<< Field;

bool AddComma = false;
if (!Ctor->getNumCtorInitializers() && FirstToCtorInits) {
SourceLocation BodyPos = Ctor->getBody()->getBeginLoc();
SourceLocation NextPos = Ctor->getBeginLoc();
do {
InsertPos = NextPos;
NextPos = Lexer::findNextToken(NextPos, *Result.SourceManager,
getLangOpts())
->getLocation();
} while (NextPos != BodyPos);
InsertPos = Lexer::getLocForEndOfToken(
InsertPos, 0, *Result.SourceManager, getLangOpts());

Diag << FixItHint::CreateInsertion(InsertPos, " : ");
} else {
bool Found = false;
for (const auto *Init : Ctor->inits()) {
if (Init->isMemberInitializer()) {
if (Result.SourceManager->isBeforeInTranslationUnit(
Field->getLocation(), Init->getMember()->getLocation())) {
InsertPos = Init->getSourceLocation();
Found = true;
break;
}
}
}

if (!Found) {
if (Ctor->getNumCtorInitializers()) {
InsertPos = Lexer::getLocForEndOfToken(
(*Ctor->init_rbegin())->getSourceRange().getEnd(), 0,
*Result.SourceManager, getLangOpts());
}
Diag << FixItHint::CreateInsertion(InsertPos, ", ");
} else {
AddComma = true;
}
}
Diag << FixItHint::CreateInsertion(InsertPos, Field->getName())
<< FixItHint::CreateInsertion(InsertPos, "(")
<< FixItHint::CreateInsertionFromRange(
InsertPos,
CharSourceRange(InitValue->getSourceRange(), true))
<< FixItHint::CreateInsertion(InsertPos, ")");
if (AddComma)
Diag << FixItHint::CreateInsertion(InsertPos, ", ");

SourceLocation SemiColonEnd =
Lexer::findNextToken(S->getEndLoc(), *Result.SourceManager,
getLangOpts())
->getEndLoc();
CharSourceRange StmtRange =
CharSourceRange::getCharRange(S->getBeginLoc(), SemiColonEnd);

Diag << FixItHint::CreateRemoval(StmtRange);
FirstToCtorInits = false;
}
}
}
}

} // namespace cppcoreguidelines
} // namespace tidy
} // namespace clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//===--- PreferMemberInitializerCheck.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_CPPCOREGUIDELINES_PREFERMEMBERINITIALIZERCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PREFERMEMBERINITIALIZERCHECK_H

#include "../ClangTidyCheck.h"

namespace clang {
namespace tidy {
namespace cppcoreguidelines {

/// Finds member initializations in the constructor body which can be placed
/// into the initialization list instead.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-prefer-member-initializer.html
class PreferMemberInitializerCheck : public ClangTidyCheck {
public:
PreferMemberInitializerCheck(StringRef Name, ClangTidyContext *Context);
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
return LangOpts.CPlusPlus;
}
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;

const bool IsUseDefaultMemberInitEnabled;
const bool UseAssignment;
};

} // namespace cppcoreguidelines
} // namespace tidy
} // namespace clang

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PREFERMEMBERINITIALIZERCHECK_H
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ void ProBoundsConstantArrayIndexCheck::check(
IndexRange.getBegin().getLocWithOffset(-1)),
", ")
<< FixItHint::CreateReplacement(Matched->getEndLoc(), ")")
<< Inserter.createMainFileIncludeInsertion(GslHeader,
/*IsAngled=*/false);
<< Inserter.createMainFileIncludeInsertion(GslHeader);
}
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace modernize {

namespace {

constexpr char StdMemoryHeader[] = "memory";
constexpr char ConstructorCall[] = "constructorCall";
constexpr char ResetCall[] = "resetCall";
constexpr char NewExpression[] = "newExpression";
Expand Down Expand Up @@ -47,7 +46,7 @@ MakeSmartPtrCheck::MakeSmartPtrCheck(StringRef Name, ClangTidyContext *Context,
Inserter(Options.getLocalOrGlobal("IncludeStyle",
utils::IncludeSorter::IS_LLVM)),
MakeSmartPtrFunctionHeader(
Options.get("MakeSmartPtrFunctionHeader", StdMemoryHeader)),
Options.get("MakeSmartPtrFunctionHeader", "<memory>")),
MakeSmartPtrFunctionName(
Options.get("MakeSmartPtrFunction", MakeSmartPtrFunctionName)),
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)) {}
Expand Down Expand Up @@ -430,9 +429,7 @@ void MakeSmartPtrCheck::insertHeader(DiagnosticBuilder &Diag, FileID FD) {
if (MakeSmartPtrFunctionHeader.empty()) {
return;
}
Diag << Inserter.createIncludeInsertion(
FD, MakeSmartPtrFunctionHeader,
/*IsAngled=*/MakeSmartPtrFunctionHeader == StdMemoryHeader);
Diag << Inserter.createIncludeInsertion(FD, MakeSmartPtrFunctionHeader);
}

} // namespace modernize
Expand Down
Loading