Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW35) #2362

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 990 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
990 commits
Select commit Hold shift + click to select a range
ff107ee
[AArch64] Update a code comment incorrectly referring to zero_reg. NFC
bjope Aug 20, 2020
707138d
[clangd] Remove useless stderr logging.
gislan Aug 20, 2020
4457398
[clangd] Don't crash on `#pragma clang __debug parser_crash`
ArcsinX Aug 20, 2020
03ded54
Fix -allow-enabling-analyzer-alpha-checkers always being passed to ru…
Aug 20, 2020
9109311
[lldb] Forcefully complete a type when adding typedefs
labath Aug 19, 2020
adf0b8c
Revert "[compiler-rt] Compile assembly files as ASM not C"
Teemperor Aug 20, 2020
816097e
[LV] Allow tail folded reduction selects to remain in the loop
davemgreen Aug 20, 2020
2bac004
Add triples to fixed-point tests which lacked them.
bevin-hansson Aug 20, 2020
1ecf120
[index-while-building] Fix build with -DBUILD_SHARED_LIBS=True
asb Aug 20, 2020
8a8a2dd
[lldb/Utility] Simplify Scalar handling of float types
labath Aug 17, 2020
7f00938
lld docs config: Use a list key in html_sidebars
zmodem Aug 20, 2020
ba32915
[SyntaxTree] Add support for `MemberExpression`
Aug 19, 2020
a4ef9e8
[SyntaxTree] Unify logic for generating `id-expression`
Aug 20, 2020
e4e983e
[SyntaxTree] Split tests related to Namespace
Aug 18, 2020
ed8982d
[libc][NFC] Switch math tests to the new ULP based tolerance.
Aug 20, 2020
4aaf772
[PeepholeOptimizer] Remove dead code
jayfoad Aug 20, 2020
87bf0b0
[libc] Add a class called NormalFloat which represents normalized flo…
Aug 19, 2020
0de3d0c
[lldb][asan] Mark destructor as virtual to allow subclasses.
rupprecht Aug 20, 2020
364cd76
[NFC] Expose the -Oz module optimization pipeline to opt
mtrofin Aug 19, 2020
3497860
[AMDGPU] Remove uses of Register::isPhysicalRegister/isVirtualRegister
jayfoad Aug 20, 2020
ea2e682
[NFC][InstCombine] Tests for PHI-of-insertvalue's
LebedevRI Aug 20, 2020
3149ec0
[RISCV] Enable MCCodeEmitter instruction predicate verifier
jrtc27 Aug 20, 2020
ffadd30
[gn build] Port 1a995a0af3c
llvmgnsyncbot Aug 20, 2020
ac63959
[SVE] Lower fixed length vXi8/vXi16 SDIV to scalable
Aug 20, 2020
22e63cb
[lldb] tab completion for breakpoint names
MrHate Aug 20, 2020
58c08c4
Test commit
tambry Aug 20, 2020
ddde8be
[llvm-dwarfdump] --statistics: switch to json::OStream. NFC
MaskRay Aug 17, 2020
6222a28
[TSan][Darwin] Enable test on non-macOS platforms
Aug 14, 2020
8372e47
[NFCI][SVE] Move fixed length i32/i64 SDIV tests
Aug 20, 2020
d9b062a
[TSan][Darwin] Remove unnecessary lit substitution
Aug 14, 2020
b74b80b
[PowerPC][PCRelative] Thread Local Storage Support for General Dynamic
kamaub Jun 22, 2020
54d8ded
allSGPRSpillsAreDead() should use actual FP/BP frame indices
RamNalamothu Aug 20, 2020
18b2180
AMDGPU/GlobalISel: Legalize odd sized loads with widening
arsenm Jun 26, 2020
79ce9bb
CodeGen: Don't drop AA metadata when splitting MachineMemOperands
arsenm Aug 8, 2020
cff0db0
[X86] Enable constexpr on POPCNT intrinsics (PR31446)
RKSimon Aug 20, 2020
74ca527
Fix a couple of typos. NFC
jroelofs Aug 20, 2020
921c1b7
[lldb] Provide GetHomeDirectory wrapper in Host::FileSystem (NFC)
JDevlieghere Aug 20, 2020
2b0f40b
[llvm-dwarfdump] Fix a typo: witin -> within
MaskRay Aug 20, 2020
dc693a0
[MLIR][SPIRVToLLVM] Removed std to llvm patterns from the conversion
georgemitenkov Aug 20, 2020
b587ca9
[test] Replace `yaml2obj >` with `yaml2obj -o` and remove unneeded in…
MaskRay Aug 20, 2020
ed17b6f
[lldb] Extract FileSystem initialization code into helper (NFC)
JDevlieghere Aug 20, 2020
4e266ea
Make DWARFExpression::GetLocationExpression public
EricSL Aug 20, 2020
cca3f3d
[MLIR] Add affine.parallel folder and normalizer
Aug 20, 2020
038edf6
Don't reject uses of void-returning consteval functions.
zygoloid Aug 20, 2020
3d82c9b
Fix 32 bit build broken by D85990 by dropping align from filecheck pa…
JonChesterfield Aug 20, 2020
9670029
[ELF] Keep st_type for symbol assignment
MaskRay Aug 20, 2020
1f3c92f
[compiler-rt][Darwin] Refactor minimum deployment target substitutions
Aug 12, 2020
efeb65d
Fix up clangd after Clang 038edf6029bafe70b1f7165abe2b0e61ddf506b3.
zygoloid Aug 20, 2020
53aff8d
[Darwin][iOS] Enable test on non-macOS platforms
Aug 20, 2020
7092398
Improve pretty-printing for APValues of void type.
zygoloid Aug 20, 2020
1283dca
[GISel] Correct the known bits of G_ANYEXT
bogner Aug 21, 2020
34fe961
Fix msan build
vitalybuka Aug 21, 2020
ea9bf46
[NFC][libFuzzer] Try to fix test on Windows
vitalybuka Aug 21, 2020
7ac737e
[HeaderSearch] Fix processing #import-ed headers multiple times with …
vsapsai May 20, 2020
66c882e
Revert "[libFuzzer] Fix value-profile-load test."
vitalybuka Aug 21, 2020
c90ca0c
[lldb] Implement WorkingDirectoryProvider in terms of DirectoryProvid…
JDevlieghere Aug 20, 2020
73af341
[lldb] Capture and load home directory from the reproducer.
JDevlieghere Aug 20, 2020
95e18b2
[PowerPC] Fix a typo for InstAlias of mfsprg
zhangkangcool Aug 21, 2020
fe86dbb
[clang]: Remove assertion which checks explicit declaration
gousemoodhin Aug 21, 2020
e2ab5bc
[runtimes] Allow LLVM_BUILTIN_TARGETS to include Darwin
smeenai Aug 20, 2020
5257a60
[amdgpu] Add codegen support for HIP dynamic shared memory.
darkbuck Jun 24, 2020
290e399
[DWARFYAML] Add support for emitting multiple abbrev tables.
higuoxing Aug 21, 2020
16f27e1
[cmake] Don't use ld.lld when targeting Darwin
smeenai Aug 21, 2020
e151acc
[DWARFYAML] Add support for emitting multiple abbrev tables.
higuoxing Aug 20, 2020
f7ff0ac
[DWARFYAML] Add support for referencing different abbrev tables.
higuoxing Aug 21, 2020
7d9a162
[ADT] Allow IsSizeLessThanThresholdT for incomplete types. NFC
Aug 21, 2020
6d242a7
Revert "[DWARFYAML] Add support for referencing different abbrev tabl…
higuoxing Aug 21, 2020
21f8d41
Refactor Reduction Tree Pass
msifontes Aug 21, 2020
a54eb9b
[Polly] Update isl to isl-0.22.1-416-g61d6dc75.
Meinersbur Aug 21, 2020
c1bc4fb
[lldb] Simplify CMake logic with LLVM's append_if function
JDevlieghere Aug 21, 2020
e0b220d
[lldb] Remove redundant call to FindBacktrace (NFC)
JDevlieghere Aug 21, 2020
6ad3de3
[lldb] Fix a new -Wdocumetnation issues (NFC)
JDevlieghere Aug 21, 2020
927da43
Allow multiple calls to InitLLVM() (NFC)
joker-eph Aug 21, 2020
df9a9bb
[X86] Correct the implementation of the testFeature macro in getIntel…
topperc Aug 21, 2020
9103978
[PowerPC] Add readflm/setflm intrinsics to Clang
ecnelises Aug 21, 2020
2b69efd
[ARM][LV] Add a preferPredicatedReductionSelect target hook
davemgreen Aug 21, 2020
acf0bb4
[ARM][CostModel] Select instruction costs.
sparker-arm Aug 18, 2020
85c15f1
[SyntaxTree] Add support for `this`
Aug 20, 2020
a0e92ff
[DSE,MemorySSA] Split off partial tracking from isOverwite.
fhahn Aug 21, 2020
80e9dd0
[llvm-readobj] - Change how we create DynRegionInfo objects. NFCI.
Aug 20, 2020
e1cd7ca
[lldb] Tab completion for process load/unload
MrHate Aug 21, 2020
4725158
[SimplifyCFG] Cost required selects
sparker-arm Aug 21, 2020
33bb80b
[X86] ia32intrin.h - pull out common attributes into defines. NFCI.
RKSimon Aug 21, 2020
18bc400
[NewPM][PassInstrumentation] Add PreservedAnalyses parameter to After…
Aug 21, 2020
90e0a02
[Attributor][NFC] run update_test_checks with --check-attributes.
Aug 21, 2020
98de0d2
[AMDGPU] Apply llvm-prefer-register-over-unsigned from clang-tidy
jayfoad Aug 21, 2020
f7e4e87
[DSE,MemorySSA] Regenerate check lines for atomic.ll tests.
fhahn Aug 21, 2020
c6863a4
[X86] Enable constexpr on POPCNT intrinsics (PR31446)
RKSimon Aug 21, 2020
0819a64
[SelectionDAG] Better legalization for FSHL and FSHR
jayfoad Mar 31, 2020
5d7c5a5
[NFC] Port InstCount pass to new pass manager
LebedevRI Jul 17, 2020
9f73506
[DSE,MemorySSA] Handle atomicrmw/cmpxchg conservatively.
fhahn Aug 21, 2020
c8e6bf0
[X86] Enable constexpr on BSWAP intrinsics (PR31446)
RKSimon Aug 21, 2020
c66b82f
[llvm-readelf] - Start recognizing 'PT_OPENBSD_*' segment types.
Aug 19, 2020
5bd1feb
[AMDGPU] Fix alignment requirements for 96bit and 128bit local loads …
mbrkusanin Aug 21, 2020
f5cd7ec
[AMDGPU] Reorganize GCN subtarget features for unaligned access
mbrkusanin Aug 21, 2020
d17ea67
[AMDGPU][GlobalISel] Fix 96 and 128 local loads and stores
mbrkusanin Aug 21, 2020
0654ff7
[AMDGPU] Use ds_read/write_b96/b128 when possible for SDag
mbrkusanin Aug 21, 2020
9e6c09c
[RISCV] Fix inaccurate annotations on PseudoBRIND
lewis-revill Aug 21, 2020
9ffc412
[X86] Enable constexpr on BITSCAN intrinsics (PR31446)
RKSimon Aug 21, 2020
1dd85e9
[NFC] Add SimplifyCFG for ARM
sparker-arm Aug 21, 2020
f5643dc
Recommit: [DWARFYAML] Add support for referencing different abbrev ta…
higuoxing Aug 21, 2020
b488935
[clangd] Discard diagnostics from another SourceManager.
gislan Aug 11, 2020
3f7985e
[AMDGPU][MC][NFC][DOC] Updated AMD GPU assembler syntax description.
dpreobra Aug 21, 2020
519b0e3
[PowerPC] Pre-commit FISel with PC-Rel test
nemanjai Aug 21, 2020
aa456a6
[llvm-readobj/elf] - Refine the code for broken PT_DYNAMIC segment di…
Aug 20, 2020
57903cf
[compiler-rt][RISCV] Use muldi3 builtin assembly implementation
luismarques Aug 21, 2020
88dd7c8
[llvm-readelf][test] - Refine the merged.test
Aug 20, 2020
bfc6d8b
[NFC][SimplifyCFG] Formatting and variable rename
sparker-arm Aug 21, 2020
8881849
[LoopIdiom,LSR] Add additional tests for SCEVExpander cleanups.
fhahn Aug 21, 2020
a4c3ed4
Correctly emit dwoIDs after ASTFileSignature refactoring (D81347)
Teemperor Aug 21, 2020
4665901
[AST][RecoveryExpr] Fix a bogus unused diagnostic when the type is pr…
hokein Aug 21, 2020
36dbb8f
[SVE] Lower fixed length UDIV to scalable
Aug 21, 2020
8eded24
Recommit "[SCEVExpander] Add helper to clean up instrs inserted while…
fhahn Aug 21, 2020
c1dd5df
Revert "Correctly emit dwoIDs after ASTFileSignature refactoring (D81…
Teemperor Aug 21, 2020
1beb11c
[SyntaxTree] Use annotations in Statement tests
Aug 21, 2020
a081868
[AIX][XCOFF] emit symbol visibility for xcoff object file.
Aug 21, 2020
365f861
[PowerPC][PCRelative] Thread Local Storage Support for Initial Exec
kamaub Jun 16, 2020
bc72a3a
[Constants] Handle FNeg in getWithOperands.
fhahn Aug 21, 2020
72d0f09
[gn build] Port 57903cf0933 -- https://reviews.llvm.org/rG57903cf0933
nico Aug 21, 2020
7a527f1
Teach AttachPreviousImpl to inherit MSInheritanceAttr attribute
gargvaibhav64 Aug 21, 2020
2799031
[lldb] Skip PDB and NativePDB tests with reproducers
JDevlieghere Aug 21, 2020
7ed3286
[LibFuzzer] [tests] [Darwin] Use the pthread library from the SDK
Aug 21, 2020
58c305f
Revert "Teach AttachPreviousImpl to inherit MSInheritanceAttr attribute"
AaronBallman Aug 21, 2020
63d9d56
[InstCombine] Move handling of gc.relocate in a gc.statepoint
Aug 12, 2020
8831e34
Revert "[libFuzzer] Fix arguments of InsertPartOf/CopyPartOf calls in…
Aug 21, 2020
50aae46
Update my email address.
sunfishcode Aug 21, 2020
08249d7
[lldb] Fix TestAPILog.py for reproducer replay
JDevlieghere Aug 21, 2020
36ee9a3
[mlir][GPUToVulkan] Fix signature of bindMemRef function for f16
ThomasRaoux Aug 21, 2020
02e02f5
[LLD][PowerPC] Add check in LLD to produce an error for missing TLSGD…
stefanp-synopsys Aug 20, 2020
670063e
Preserve the error message when MemoryBuffer creation fails
agrue Aug 21, 2020
a5b7b8c
[PowerPC] Support constrained scalar sitofp/uitofp
ecnelises Aug 21, 2020
cc62373
[ASan][Darwin] Enable test on additional platforms
Aug 21, 2020
57e0ef1
[lldb] Make it a fatal error when %lldb cannot be substituted
JDevlieghere Aug 21, 2020
0cadd16
Forgot to update the test case for ppc64-tls-missing-gdld.s for 02e02…
stefanp-synopsys Aug 21, 2020
06cad82
PrintStackTrace: don't symbolize if LLVM_DISABLE_SYMBOLIZATION is set
MaskRay Aug 20, 2020
cf6adec
[llvm-mca][NFC] Refactor views to separate data collection from print…
Aug 19, 2020
9e362bb
[InstCombine] Remove unused entries in gc-live bundle of statepoint
Aug 14, 2020
aca191c
Re-land 7a527f17776be78ec44b88e82b39afb65fc148e4 with fixes.
gargvaibhav64 Aug 21, 2020
9a9a092
[AMDGPU] Avoid sorting stalls in regbank-reassign
rampitec Aug 20, 2020
c0ec37e
[docs] Move the label for __builtin_shufflevector below __builtin_dum…
topperc Aug 21, 2020
5e3fd47
[Cloning] Fix to cloning DISubprograms.
amykhuang Aug 21, 2020
e21a22a
[Attributor] fix AANoUndef initialization
okuraofvegetable Aug 21, 2020
52e758f
[lldb] Fix build error in TestSimulatorPlatform.py
JDevlieghere Aug 21, 2020
7ea0ee3
[DomTree] Avoid creating an empty GD to reduce compile time.
alinas Aug 21, 2020
65fcc0e
[Attributor] Function seed allow list
kuterd Aug 21, 2020
b37db11
MachineSSAUpdater: Allow initialization with just a register class
nhaehnle May 18, 2020
b79889c
[opt][NewPM] Add basic-aa in legacy PM compatibility mode
aeubanks Aug 18, 2020
e0c01e6
New TableGen Programmer's Reference document
Aug 21, 2020
17cd344
Fix two bugs in TGParser::ParseValue
nhaehnle Aug 21, 2020
d3a49b0
[lldb] Remove --rerun-all-issues as its functionality no longer exists
JDevlieghere Aug 21, 2020
5eff21c
[NFC][documentation] clarify comment in test
christetreault-llvm Aug 21, 2020
503deec
Temporairly revert "[SimplifyCFG][LoopRotate] SimplifyCFG: disable co…
LebedevRI Aug 21, 2020
196e6f9
Replace TableGen range piece punctuator with '...'
Aug 21, 2020
02bf563
Fix swig scripts install target name
aadsm Aug 19, 2020
72ddaed
[Attributor][test] Add REQUIRES: asserts after D86129
MaskRay Aug 21, 2020
f55ad39
[DomTree] Extend update API to allow a post CFG view.
alinas Feb 26, 2020
b26b32b
lld: link libatomic if needed for Timer
cuviper Aug 17, 2020
6a64079
Fix llvm/test/tools/lto/hide-linkonce-odr.ll
Aug 21, 2020
86fc193
[lldb] Don't pass --rerun-all-issues on Windows.
JDevlieghere Aug 22, 2020
f91d18e
[DebugInfo][flang]Added support for representing Fortran assumed leng…
SouraVX Aug 20, 2020
12edd4b
Fix arm bot failure after f91d18eaa946b2
SouraVX Aug 22, 2020
b8cc449
[MLIR][NFC] Update MLIR vim syntax file - std ops + types
bondhugula Aug 21, 2020
7646a67
[DebugInfo][test] Move distringtype.ll to X86/ subdir to fix failures…
MaskRay Aug 22, 2020
b65ba70
[MLIR][SPIRVToLLVM] Updated the documentation for the conversion
georgemitenkov Aug 22, 2020
5e7e216
[DSE,MemorySSA] Use BatchAA for AA queries.
fhahn Aug 22, 2020
1ce07cd
Instantiate Error in Target::GetEntryPointAddress() only when necessary
DimitryAndric Aug 21, 2020
fba06e3
[LiveDebugValues][NFC] Move LiveDebugValues source for refactor
jmorse Aug 22, 2020
cfc76d2
[gn build] Port fba06e3c85a
llvmgnsyncbot Aug 22, 2020
df5335a
[clang-tidy] readability-simplify-boolean-expr detects negated literals
njames93 Aug 22, 2020
436a35a
[docs] Replace "constexpr expressions" with "constant expressions".
RKSimon Aug 22, 2020
2fc7c85
[DAGCombiner] clean up merge of truncated stores; NFC
rotateright Aug 21, 2020
ec06b38
[InstCombine] canonicalize 'not' ops before logical shifts
rotateright Aug 22, 2020
2ceac91
Enable constexpr on ROTATELEFT/ROTATERIGHT builtin intrinsics (PR47249)
RKSimon Aug 22, 2020
e7d9182
Enable constexpr on BITREVERSE builtin intrinsics (PR47249)
RKSimon Aug 22, 2020
20bb9fe
[LiveDebugValues] Install an implementation-picking LiveDebugValues pass
jmorse Aug 22, 2020
eeb4636
[gn build] Port 20bb9fe565a
llvmgnsyncbot Aug 22, 2020
2d9be9e
Fix some builds after 20bb9fe565a
jmorse Aug 22, 2020
42b993d
[X86] ia32intrin.h - pull out common attributes used in cast helpers …
RKSimon Aug 22, 2020
901e331
GlobalISel: Merge FewerElements for G_BUILD_VECTOR/G_CONCAT_VECTORS
arsenm Aug 3, 2020
6983741
[Polly] Fix use-after-free.
Meinersbur Aug 22, 2020
8e06bf6
[Polly] Ensure consistent Scop::InstStmtMap. NFC.
Meinersbur Aug 22, 2020
bb894b9
[lldb] Extract reproducer providers & co into their own header.
JDevlieghere Aug 22, 2020
c0c3caf
[flang] Fix assert on bad character kind
tskeith Aug 22, 2020
2aaa5a5
[flang][msvc] Disambiguate injected class name.
Meinersbur Aug 22, 2020
7fef40d
[llvm-reduce] make llvm-reduce save the best reduction it has when it…
Ralender Aug 22, 2020
ae6f788
[LiveDebugValues] Add instruction-referencing LDV implementation
jmorse Aug 22, 2020
21ad3c4
[gn build] Port ae6f7882403
llvmgnsyncbot Aug 22, 2020
5d8eede
Move Py_buffer_RAII to .h file so SWIG 2 doesnt have to parse it
aadsm Aug 22, 2020
60bcec4
[LiveDebugValues] Delete unneeded copy constructor after D83047
MaskRay Aug 22, 2020
93af370
Follow-up build fix for rGae6f78824031
jmorse Aug 22, 2020
c1dc44f
[AArch64] add tests for store merge of truncs; NFC
rotateright Aug 22, 2020
542db87
[libunwind] Ensure enough alignment for unw_cursor_t for SEH build co…
mstorsjo Aug 17, 2020
207d449
[flang][msvc] Split class declaration and constexpr variable definiti…
Meinersbur Aug 22, 2020
54f5a4e
[LLD][COFF] Reset outputSections for successive runs
baszalmstra Aug 22, 2020
8b14db6
Revert "[Polly] Ensure consistent Scop::InstStmtMap. NFC."
Meinersbur Aug 22, 2020
79cb289
[DAGCombiner] add early exit for store merging of truncs
rotateright Aug 22, 2020
481c3b8
[llvm-dwarfdump] --statistics: break lines and indent by 2
MaskRay Aug 21, 2020
ba93844
[DebugInfo][test] Fix dwarf-callsite-related-attrs.ll after llvm-dwar…
MaskRay Aug 22, 2020
cc7bf9b
[X86] Allow 32-bit mode only CPUs with -mtune on 64-bit targets
topperc Aug 22, 2020
3c1b2e3
[libunwind] Make findUnwindSectionsByPhdr static
rprichard Aug 23, 2020
12541b5
Use TranslateFromMLIRRegistration for SPIRV roundtrip (NFC)
joker-eph Aug 23, 2020
96cb8cd
Refactor `mlir-translate` to extract the `main()` logic in a helper o…
joker-eph Aug 23, 2020
f164534
Add a `dialect_registration` callback for "translations" registered w…
joker-eph Aug 23, 2020
5238193
Create ${swig_target}-scripts target instead of lldb-python-scripts
aadsm Aug 22, 2020
50927f3
Reword the documentation for the `mlirTranslateMain` API (NFC)
joker-eph Aug 23, 2020
f8e0e5d
[X86] Enable constexpr on _cast fp<-> uint intrinsics (PR31446)
RKSimon Aug 23, 2020
f76adc2
[docs] Add an initial (non-exhaustive) list of intrinsics that can be…
RKSimon Aug 23, 2020
b014cc0
[ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples
weliveindetail Aug 14, 2020
55208f5
[analyzer] Add modeling for unque_ptr::get()
vrnithinkumar Aug 23, 2020
1d0fa79
[DAGCombiner] restrict store merge of truncs to early combining
rotateright Aug 23, 2020
2843c9f
[DSE,MemorySSA] Keep single DL instance in DSEState (NFC).
fhahn Aug 23, 2020
a1dc3d2
[X86] Enable constexpr on ROTL/ROTR intrinsics (PR31446)
RKSimon Aug 23, 2020
bef6841
[X86][FastISel] Support materializing floating-point constants for la…
MaskRay Aug 23, 2020
51a8282
[llvm-reduce] Skip terminators when reducing instructions.
fhahn Aug 23, 2020
b899d13
[NFC][InstCombine] Add tests for negation of freeze
LebedevRI Aug 23, 2020
f6decfa
[InstCombine] Negator: freeze is freely negatible if it's operand is …
LebedevRI Aug 23, 2020
f6615b2
Update FIR registration to not rely on the global MLIR dialect regist…
joker-eph Aug 23, 2020
86bbf8e
[flang][openacc] Fix wait-argument for wait clause + add tests
clementval Aug 24, 2020
2b37174
[clang][Driver] Implement AddClangSystemIncludeArgs and HasNativeLLVM…
brad0 Aug 24, 2020
bf3577e
[clang][Driver] Implement addLibCxxIncludePaths and getCompilerRT for…
brad0 Aug 24, 2020
f93b42a
[NFC][OpenMP] Remove outdated comments about potential issues
shiltian Aug 24, 2020
41ba9d7
[PowerPC] Support constrained vector fp/int conversion
ecnelises Aug 24, 2020
960cbc5
[DAGCombine] Remove dead node when it is created by getNegatedExpression
Aug 24, 2020
fed6107
[PowerPC] Allow constrained FP intrinsics in mightUseCTR
ecnelises Aug 24, 2020
1bc45b2
[PowerPC] Support lowering int-to-fp on ppc_fp128
ecnelises Aug 24, 2020
4b92aab
Merge remote-tracking branch sycl-web into llvmspirv_pulldown
vladimirlaz Aug 24, 2020
3137c29
Add initial python bindings for attributes.
stellaraccident Aug 19, 2020
fd48567
[LiveDebugVariables] Internalize class DbgVariableValue. NFC
MaskRay Aug 24, 2020
b999400
[SCEV] Add operand methods to Cast and UDiv
sparker-arm Aug 18, 2020
6107069
Add an assertion to protect against missing Dialect registration in a…
joker-eph Aug 24, 2020
e286c60
[SCEV] Attempt to fix windows buildbots
sparker-arm Aug 24, 2020
7a4e26a
[SelectionDAG] Fix miscompile bug in expandFunnelShift
bjope Aug 22, 2020
8ce450d
[NFCI][SimplifyCFG] Combine select costs and checks
sparker-arm Aug 24, 2020
0f0be3f
Add support for AVR attiny441 and attiny841
ixoo Aug 24, 2020
2e194fe
[SCEV] Still trying to fix windows buildbots
sparker-arm Aug 24, 2020
0e301fd
[lldb/Utility] Remove some Scalar type accessors
labath Aug 20, 2020
3d1b000
[lld] s/dyn_cast/isa in InputSection.cpp
labath Aug 24, 2020
a47a4fe
[SYCL] fix build of unittests after LLVM commit a52173a3
vladimirlaz Aug 24, 2020
bc51f1d
Add new SPIRVEntry interface method accessing decs
DmitryBushev Aug 14, 2020
e05477a
New ctor for SPIRVDecorate & SPIRVDecorateGeneric
DmitryBushev Aug 14, 2020
f540cf1
New decorations for VCFloatControl
DmitryBushev Aug 14, 2020
c0fe5ad
Improve SPIRVToLLVM::transOCLBuiltinFromVariable
Fznamznon Aug 18, 2020
7c0f43c
Fix translation of llvm.ptr.annotation (#678)
vmaksimo Aug 20, 2020
26f350e
Update DebugInfo test after LLVM change
svenvh Aug 19, 2020
b200eef
Update for ElementCount LLVM API change
svenvh Aug 20, 2020
fe69514
Fix translation of non 32/64-bit constants
bader Aug 20, 2020
158175f
Add contribution guidelines (#608)
AlexeySachkov Aug 24, 2020
c410139
Merge commit master into llvmspirv_pulldown
vladimirlaz Aug 24, 2020
271a1f0
Fix CUDA build after LLVM commit c37145ca
vladimirlaz Aug 24, 2020
024bd73
[SCEV] Still (again) trying to fix buildbots
sparker-arm Aug 24, 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 12 additions & 8 deletions clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ AST_POLYMORPHIC_MATCHER(
if (PrefixPosition == StringRef::npos)
return false;
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
static const char *AbseilLibraries[] = {
"algorithm", "base", "container", "debugging", "flags",
"hash", "iterator", "memory", "meta", "numeric",
"random", "strings", "synchronization", "time", "types",
"utility"};
return std::any_of(
std::begin(AbseilLibraries), std::end(AbseilLibraries),
[&](const char *Library) { return Path.startswith(Library); });
static const char *AbseilLibraries[] = {"algorithm", "base",
"container", "debugging",
"flags", "hash",
"iterator", "memory",
"meta", "numeric",
"random", "status",
"strings", "synchronization",
"time", "types",
"utility"};
return llvm::any_of(AbseilLibraries, [&](const char *Library) {
return Path.startswith(Library);
});
}

} // namespace ast_matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ static bool hasAnyNestedLocalQualifiers(QualType Type) {
}

SourceRange UseTrailingReturnTypeCheck::findReturnTypeAndCVSourceRange(
const FunctionDecl &F, const ASTContext &Ctx, const SourceManager &SM,
const LangOptions &LangOpts) {
const FunctionDecl &F, const TypeLoc &ReturnLoc, const ASTContext &Ctx,
const SourceManager &SM, const LangOptions &LangOpts) {

// We start with the range of the return type and expand to neighboring
// qualifiers (const, volatile and restrict).
Expand All @@ -274,6 +274,35 @@ SourceRange UseTrailingReturnTypeCheck::findReturnTypeAndCVSourceRange(
return {};
}

// If the return type is a constrained 'auto' or 'decltype(auto)', we need to
// include the tokens after the concept. Unfortunately, the source range of an
// AutoTypeLoc, if it is constrained, does not include the 'auto' or
// 'decltype(auto)'. If the return type is a plain 'decltype(...)', the
// source range only contains the first 'decltype' token.
auto ATL = ReturnLoc.getAs<AutoTypeLoc>();
if ((ATL && (ATL.isConstrained() ||
ATL.getAutoKeyword() == AutoTypeKeyword::DecltypeAuto)) ||
ReturnLoc.getAs<DecltypeTypeLoc>()) {
SourceLocation End =
expandIfMacroId(ReturnLoc.getSourceRange().getEnd(), SM);
SourceLocation BeginNameF = expandIfMacroId(F.getLocation(), SM);

// Extend the ReturnTypeRange until the last token before the function
// name.
std::pair<FileID, unsigned> Loc = SM.getDecomposedLoc(End);
StringRef File = SM.getBufferData(Loc.first);
const char *TokenBegin = File.data() + Loc.second;
Lexer Lexer(SM.getLocForStartOfFile(Loc.first), LangOpts, File.begin(),
TokenBegin, File.end());
Token T;
SourceLocation LastTLoc = End;
while (!Lexer.LexFromRawLexer(T) &&
SM.isBeforeInTranslationUnit(T.getLocation(), BeginNameF)) {
LastTLoc = T.getLocation();
}
ReturnTypeRange.setEnd(LastTLoc);
}

// If the return type has no local qualifiers, it's source range is accurate.
if (!hasAnyNestedLocalQualifiers(F.getReturnType()))
return ReturnTypeRange;
Expand Down Expand Up @@ -317,7 +346,7 @@ SourceRange UseTrailingReturnTypeCheck::findReturnTypeAndCVSourceRange(
return ReturnTypeRange;
}

bool UseTrailingReturnTypeCheck::keepSpecifiers(
void UseTrailingReturnTypeCheck::keepSpecifiers(
std::string &ReturnType, std::string &Auto, SourceRange ReturnTypeCVRange,
const FunctionDecl &F, const FriendDecl *Fr, const ASTContext &Ctx,
const SourceManager &SM, const LangOptions &LangOpts) {
Expand All @@ -327,14 +356,14 @@ bool UseTrailingReturnTypeCheck::keepSpecifiers(
if (!F.isConstexpr() && !F.isInlineSpecified() &&
F.getStorageClass() != SC_Extern && F.getStorageClass() != SC_Static &&
!Fr && !(M && M->isVirtualAsWritten()))
return true;
return;

// Tokenize return type. If it contains macros which contain a mix of
// qualifiers, specifiers and types, give up.
llvm::Optional<SmallVector<ClassifiedToken, 8>> MaybeTokens =
classifyTokensBeforeFunctionName(F, Ctx, SM, LangOpts);
if (!MaybeTokens)
return false;
return;

// Find specifiers, remove them from the return type, add them to 'auto'.
unsigned int ReturnTypeBeginOffset =
Expand Down Expand Up @@ -367,14 +396,12 @@ bool UseTrailingReturnTypeCheck::keepSpecifiers(
ReturnType.erase(TOffsetInRT, TLengthWithWS);
DeletedChars += TLengthWithWS;
}

return true;
}

void UseTrailingReturnTypeCheck::registerMatchers(MatchFinder *Finder) {
auto F = functionDecl(unless(anyOf(hasTrailingReturn(), returns(voidType()),
returns(autoType()), cxxConversionDecl(),
cxxMethodDecl(isImplicit()))))
auto F = functionDecl(
unless(anyOf(hasTrailingReturn(), returns(voidType()),
cxxConversionDecl(), cxxMethodDecl(isImplicit()))))
.bind("Func");

Finder->addMatcher(F, this);
Expand All @@ -397,11 +424,17 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
if (F->getLocation().isInvalid())
return;

// Skip functions which return just 'auto'.
const auto *AT = F->getDeclaredReturnType()->getAs<AutoType>();
if (AT != nullptr && !AT->isConstrained() &&
AT->getKeyword() == AutoTypeKeyword::Auto &&
!hasAnyNestedLocalQualifiers(F->getDeclaredReturnType()))
return;

// TODO: implement those
if (F->getDeclaredReturnType()->isFunctionPointerType() ||
F->getDeclaredReturnType()->isMemberFunctionPointerType() ||
F->getDeclaredReturnType()->isMemberPointerType() ||
F->getDeclaredReturnType()->getAs<DecltypeType>() != nullptr) {
F->getDeclaredReturnType()->isMemberPointerType()) {
diag(F->getLocation(), Message);
return;
}
Expand Down Expand Up @@ -435,7 +468,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
// discards user formatting and order of const, volatile, type, whitespace,
// space before & ... .
SourceRange ReturnTypeCVRange =
findReturnTypeAndCVSourceRange(*F, Ctx, SM, LangOpts);
findReturnTypeAndCVSourceRange(*F, FTL.getReturnLoc(), Ctx, SM, LangOpts);
if (ReturnTypeCVRange.isInvalid())
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ class UseTrailingReturnTypeCheck : public ClangTidyCheck {
const SourceManager &SM,
const LangOptions &LangOpts);
SourceRange findReturnTypeAndCVSourceRange(const FunctionDecl &F,
const TypeLoc &ReturnLoc,
const ASTContext &Ctx,
const SourceManager &SM,
const LangOptions &LangOpts);
bool keepSpecifiers(std::string &ReturnType, std::string &Auto,
void keepSpecifiers(std::string &ReturnType, std::string &Auto,
SourceRange ReturnTypeCVRange, const FunctionDecl &F,
const FriendDecl *Fr, const ASTContext &Ctx,
const SourceManager &SM, const LangOptions &LangOpts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,28 @@ const char SimplifyConditionDiagnostic[] =
const char SimplifyConditionalReturnDiagnostic[] =
"redundant boolean literal in conditional return statement";

const CXXBoolLiteralExpr *getBoolLiteral(const MatchFinder::MatchResult &Result,
StringRef Id) {
const auto *Literal = Result.Nodes.getNodeAs<CXXBoolLiteralExpr>(Id);
return (Literal && Literal->getBeginLoc().isMacroID()) ? nullptr : Literal;
const Expr *getBoolLiteral(const MatchFinder::MatchResult &Result,
StringRef Id) {
if (const Expr *Literal = Result.Nodes.getNodeAs<CXXBoolLiteralExpr>(Id))
return Literal->getBeginLoc().isMacroID() ? nullptr : Literal;
if (const auto *Negated = Result.Nodes.getNodeAs<UnaryOperator>(Id)) {
if (Negated->getOpcode() == UO_LNot &&
isa<CXXBoolLiteralExpr>(Negated->getSubExpr()))
return Negated->getBeginLoc().isMacroID() ? nullptr : Negated;
}
return nullptr;
}

internal::BindableMatcher<Stmt> literalOrNegatedBool(bool Value) {
return expr(anyOf(cxxBoolLiteral(equals(Value)),
unaryOperator(hasUnaryOperand(ignoringParenImpCasts(
cxxBoolLiteral(equals(!Value)))),
hasOperatorName("!"))));
}

internal::Matcher<Stmt> returnsBool(bool Value, StringRef Id = "ignored") {
auto SimpleReturnsBool =
returnStmt(has(cxxBoolLiteral(equals(Value)).bind(Id)))
.bind("returns-bool");
auto SimpleReturnsBool = returnStmt(has(literalOrNegatedBool(Value).bind(Id)))
.bind("returns-bool");
return anyOf(SimpleReturnsBool,
compoundStmt(statementCountIs(1), has(SimpleReturnsBool)));
}
Expand Down Expand Up @@ -269,16 +281,25 @@ std::string replacementExpression(const MatchFinder::MatchResult &Result,
return asBool(getText(Result, *E), NeedsStaticCast);
}

const CXXBoolLiteralExpr *stmtReturnsBool(const ReturnStmt *Ret, bool Negated) {
const Expr *stmtReturnsBool(const ReturnStmt *Ret, bool Negated) {
if (const auto *Bool = dyn_cast<CXXBoolLiteralExpr>(Ret->getRetValue())) {
if (Bool->getValue() == !Negated)
return Bool;
}
if (const auto *Unary = dyn_cast<UnaryOperator>(Ret->getRetValue())) {
if (Unary->getOpcode() == UO_LNot) {
if (const auto *Bool =
dyn_cast<CXXBoolLiteralExpr>(Unary->getSubExpr())) {
if (Bool->getValue() == Negated)
return Bool;
}
}
}

return nullptr;
}

const CXXBoolLiteralExpr *stmtReturnsBool(const IfStmt *IfRet, bool Negated) {
const Expr *stmtReturnsBool(const IfStmt *IfRet, bool Negated) {
if (IfRet->getElse() != nullptr)
return nullptr;

Expand Down Expand Up @@ -423,7 +444,7 @@ void SimplifyBooleanExprCheck::matchBoolCondition(MatchFinder *Finder,
StringRef BooleanId) {
Finder->addMatcher(
ifStmt(unless(isInTemplateInstantiation()),
hasCondition(cxxBoolLiteral(equals(Value)).bind(BooleanId)))
hasCondition(literalOrNegatedBool(Value).bind(BooleanId)))
.bind(IfStmtId),
this);
}
Expand All @@ -433,8 +454,8 @@ void SimplifyBooleanExprCheck::matchTernaryResult(MatchFinder *Finder,
StringRef TernaryId) {
Finder->addMatcher(
conditionalOperator(unless(isInTemplateInstantiation()),
hasTrueExpression(cxxBoolLiteral(equals(Value))),
hasFalseExpression(cxxBoolLiteral(equals(!Value))))
hasTrueExpression(literalOrNegatedBool(Value)),
hasFalseExpression(literalOrNegatedBool(!Value)))
.bind(TernaryId),
this);
}
Expand Down Expand Up @@ -465,12 +486,12 @@ void SimplifyBooleanExprCheck::matchIfAssignsBool(MatchFinder *Finder,
auto SimpleThen =
binaryOperator(hasOperatorName("="), hasLHS(anyOf(VarAssign, MemAssign)),
hasLHS(expr().bind(IfAssignVariableId)),
hasRHS(cxxBoolLiteral(equals(Value)).bind(IfAssignLocId)));
hasRHS(literalOrNegatedBool(Value).bind(IfAssignLocId)));
auto Then = anyOf(SimpleThen, compoundStmt(statementCountIs(1),
hasAnySubstatement(SimpleThen)));
auto SimpleElse =
binaryOperator(hasOperatorName("="), hasLHS(anyOf(VarRef, MemRef)),
hasRHS(cxxBoolLiteral(equals(!Value))));
hasRHS(literalOrNegatedBool(!Value)));
auto Else = anyOf(SimpleElse, compoundStmt(statementCountIs(1),
hasAnySubstatement(SimpleElse)));
if (ChainedConditionalAssignment)
Expand All @@ -495,7 +516,7 @@ void SimplifyBooleanExprCheck::matchCompoundIfReturnsBool(MatchFinder *Finder,
hasAnySubstatement(
ifStmt(hasThen(returnsBool(Value)), unless(hasElse(stmt())))),
hasAnySubstatement(returnStmt(has(ignoringParenImpCasts(
cxxBoolLiteral(equals(!Value)))))
literalOrNegatedBool(!Value))))
.bind(CompoundReturnId)))
.bind(Id),
this);
Expand Down Expand Up @@ -529,10 +550,10 @@ void SimplifyBooleanExprCheck::registerMatchers(MatchFinder *Finder) {
void SimplifyBooleanExprCheck::check(const MatchFinder::MatchResult &Result) {
if (Result.Nodes.getNodeAs<TranslationUnitDecl>("top"))
Visitor(this, Result).TraverseAST(*Result.Context);
else if (const CXXBoolLiteralExpr *TrueConditionRemoved =
else if (const Expr *TrueConditionRemoved =
getBoolLiteral(Result, ConditionThenStmtId))
replaceWithThenStatement(Result, TrueConditionRemoved);
else if (const CXXBoolLiteralExpr *FalseConditionRemoved =
else if (const Expr *FalseConditionRemoved =
getBoolLiteral(Result, ConditionElseStmtId))
replaceWithElseStatement(Result, FalseConditionRemoved);
else if (const auto *Ternary =
Expand Down Expand Up @@ -574,17 +595,15 @@ void SimplifyBooleanExprCheck::issueDiag(
}

void SimplifyBooleanExprCheck::replaceWithThenStatement(
const MatchFinder::MatchResult &Result,
const CXXBoolLiteralExpr *TrueConditionRemoved) {
const MatchFinder::MatchResult &Result, const Expr *TrueConditionRemoved) {
const auto *IfStatement = Result.Nodes.getNodeAs<IfStmt>(IfStmtId);
issueDiag(Result, TrueConditionRemoved->getBeginLoc(),
SimplifyConditionDiagnostic, IfStatement->getSourceRange(),
getText(Result, *IfStatement->getThen()));
}

void SimplifyBooleanExprCheck::replaceWithElseStatement(
const MatchFinder::MatchResult &Result,
const CXXBoolLiteralExpr *FalseConditionRemoved) {
const MatchFinder::MatchResult &Result, const Expr *FalseConditionRemoved) {
const auto *IfStatement = Result.Nodes.getNodeAs<IfStmt>(IfStmtId);
const Stmt *ElseStatement = IfStatement->getElse();
issueDiag(Result, FalseConditionRemoved->getBeginLoc(),
Expand Down Expand Up @@ -631,7 +650,7 @@ void SimplifyBooleanExprCheck::replaceCompoundReturnWithCondition(
for (++After; After != Compound->body_end() && *Current != Ret;
++Current, ++After) {
if (const auto *If = dyn_cast<IfStmt>(*Current)) {
if (const CXXBoolLiteralExpr *Lit = stmtReturnsBool(If, Negated)) {
if (const Expr *Lit = stmtReturnsBool(If, Negated)) {
if (*After == Ret) {
if (!ChainedConditionalReturn && BeforeIf)
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ class SimplifyBooleanExprCheck : public ClangTidyCheck {

void
replaceWithThenStatement(const ast_matchers::MatchFinder::MatchResult &Result,
const CXXBoolLiteralExpr *BoolLiteral);
const Expr *BoolLiteral);

void
replaceWithElseStatement(const ast_matchers::MatchFinder::MatchResult &Result,
const CXXBoolLiteralExpr *FalseConditionRemoved);
const Expr *FalseConditionRemoved);

void
replaceWithCondition(const ast_matchers::MatchFinder::MatchResult &Result,
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_tidy_invocation(f, clang_tidy_binary, checks, tmpdir, build_path,
extra_arg, extra_arg_before, quiet, config):
"""Gets a command line for clang-tidy."""
start = [clang_tidy_binary]
if allow_enabling_alpha_checkers is not None:
if allow_enabling_alpha_checkers:
start.append('-allow-enabling-analyzer-alpha-checkers')
if header_filter is not None:
start.append('-header-filter=' + header_filter)
Expand Down
Loading