Skip to content

Fetch Upstream #4

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 375 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
375 commits
Select commit Hold shift + click to select a range
26d83a4
[NFC][lldb][trace] Use uint64_t when decoding and enconding json
May 10, 2022
79a66ec
[RISCV] Enable strict assertions in InsertVSETVLI data flow
preames May 17, 2022
127a149
[clangd] Add command-line flag to set background indexing thread prio…
sam-mccall May 16, 2022
5c3b205
[mlir] Update LLVMIR Fastmath flags use of MLIR BitEnum functionality
jfurtek May 17, 2022
e8e00e3
[pseudo] benchmark cleanups. NFC
sam-mccall May 10, 2022
dbf3b5f
[InstCombine] fold more shuffles with FP<->Int cast operands
rotateright May 17, 2022
ff6fe39
[libc] add sprintf
michaelrj-google May 12, 2022
11a7e77
[RISCV] Canonicalize AVL=setvli to AVL=Imm or AVL=VLMAX
preames May 17, 2022
854c273
[clang][dataflow] Weaken guard to only check for storage location
tJener May 17, 2022
ccdb56a
Reland "[clangd] Indexing of standard library"
sam-mccall May 17, 2022
118c5d1
[RISCV] Minor reorganization of VSETVLIInfo::operator== for readabili…
preames May 17, 2022
d910508
[gn build] Port ccdb56ac10ee
llvmgnsyncbot May 17, 2022
a09af86
[AMDGPU] Enable FLAT LDS DMA on gfx9/10 before gfx940
rampitec May 5, 2022
6aabf60
Revert "Reland "[clangd] Indexing of standard library""
sam-mccall May 17, 2022
dee3190
[AMDGPU] Add llvm.amdgcn.global.load.lds intrinsic
rampitec May 17, 2022
8d53f2f
[gn build] Port 6aabf60f2fb7
llvmgnsyncbot May 17, 2022
1f49714
[trace][intelpt] Support system-wide tracing [4] - Support per core t…
May 3, 2022
1637545
[trace][intelpt] Support system-wide tracing [5] - Disable/enable per…
May 4, 2022
1188faa
[trace][intelpt] Support system-wide tracing [6] - Break IntelPTColle…
May 5, 2022
6f803ca
[gn build] Port 1188faa7ab4b
llvmgnsyncbot May 17, 2022
6947945
[gn build] Port 1f49714d3e19
llvmgnsyncbot May 17, 2022
5bbef2e
[clang][dataflow] Fix double visitation of nested logical operators
tJener May 17, 2022
9f1d905
[libc] add snprintf
michaelrj-google May 17, 2022
5a8e755
[docs][LangRef] Fix typo in llvm.smul.fix example
nunoplopes May 17, 2022
a5983e5
[RISCV] Add additional test coverage of 11a7e77c and related transforms
preames May 17, 2022
a7b69db
[BOLT][NFC] Move BinaryDominatorTree out of BinaryLoop header
aaupov May 17, 2022
c907d6e
[BOLT][NFC] Suppress unused variable warnings
aaupov May 17, 2022
0f4d9f9
[ConstantRange] Improve the implementation of binaryAnd
alexander-shaposhnikov May 17, 2022
79ca4ed
[pseudo] Design notes from discussion today. NFC
sam-mccall May 17, 2022
996834e
[mlir][SCF] Fix scf.while bufferization
matthias-springer May 17, 2022
d4545e6
Revert "[RISCV] Enable strict assertions in InsertVSETVLI data flow"
preames May 17, 2022
9294a1e
[mlir][tosa] Rework tosa.apply_scale lowering for 32-bit
rsuderman May 17, 2022
8527f32
[lld][ELF] Support BFD name elf32-avr
benshi001 May 12, 2022
85fb9cc
Precommit a test file for D84941
aqjune May 18, 2022
3adcf96
[JumpThreading] Let ProcessImpliedCondition look into freeze instruct…
aqjune May 18, 2022
d5c7d4b
[InstCombine] add tests for icmp-fsh
ZCBing May 18, 2022
25af3af
[NFC][AMDGPU][CodeGen] Use ArrayRef in TargetLowering functions
May 18, 2022
dca37af
[NFC][Clang] Modify expect of fail test or XFAIL because CSKY align i…
zixuan-wu May 11, 2022
9b1e007
[BasicAA] Remove unneeded special case for malloc/calloc
preames May 18, 2022
862b5a5
[MLIR][Presburger] Attach values only to non-local identifiers in FAVC
Groverkss May 18, 2022
e00cbbe
[MLIR][Presburger] Cleanup getMaybeValues in FACV
Groverkss May 18, 2022
573a5b5
Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honour…
mkurdej May 18, 2022
d810649
[ArgPromotion] Add unused-argument.ll test (NFC)
samolisov May 18, 2022
92f1028
[llvm-readobj] Fix printing of Windows ARM unwind opcodes, add tests
mstorsjo Nov 22, 2021
e213e5a
[mlir:PDLL] Drop space as a completion commit character
River707 May 18, 2022
6d4471e
[mlir:PDLL] Improve the location ranges of several expressions during…
River707 May 18, 2022
17e2e7b
[mlir:PDLL] Don't append / for directory code completion
River707 May 18, 2022
ebad5fb
[mlir][Canonicalize] Fix command-line options
rkayaith May 18, 2022
c4c01e4
[llvm-nm] Always use opaque pointers (PR55506)
nikic May 17, 2022
323514d
[LoopUnroll] Avoid branch on poison for runtime unroll with multiple …
nikic May 17, 2022
e9a1c82
[SCEVExpander] Expand umin_seq using freeze
nikic May 11, 2022
7814b55
[GreedyPatternRewriter] Avoid reversing constant order
rkayaith May 18, 2022
d9d15af
[PowerPC] Treat llvm.fmuladd intrinsic as using CTR
ecnelises May 18, 2022
6bcafce
[flang][Runtime] Use proper prototypes in Fortran_main. NFCI
rovka May 16, 2022
00999fb
[SelectionDAGBuilder] Pass fast math flags to most of VP SDNodes.
May 13, 2022
1c0b03f
[flang][driver] Support parsing response files
rovka May 3, 2022
7e65ffa
[test, x86] Fix spurious x86-target-features.c failure
May 6, 2022
fcfb864
[LV] set Header earlier, use variable instead of repeated access (NFC).
fhahn May 18, 2022
25ac078
[clang][ASTImporter] Add isNewDecl
May 13, 2022
56b9b97
[clang][analyzer][ctu] Make CTU a two phase analysis
Apr 14, 2022
d4cdf01
[JumpThreading] Use common code to skip freeze (NFC)
nikic May 18, 2022
7d8ec4d
[lldb] const a couple of getters on MemoryRegionInfo
DavidSpickett May 17, 2022
dd12c34
[AMDGPU] Shrink F16 MAD/FMA to MADAK/MADMK/FMAAK/FMAMK on GFX10
jayfoad May 17, 2022
aa568e0
[mlir:GreedyDriver] Return WalkResult::skip after deleting a known co…
River707 May 18, 2022
3eb2281
[AMDGPU] Aggressively fold immediates in SIFoldOperands
jayfoad May 16, 2022
18c70a7
[JumpThreading] Simplify getPredicateAt() based folding
nikic May 18, 2022
6d36cfe
[MLIR] Make `parseDimensionListRanked` configurable wrt parsing a tra…
frgossen May 18, 2022
242961f
[llvm][fix-irreducible] ensure that loop subtree under child is corre…
sunziping2016 May 18, 2022
e1d47d8
[IR] Report whether replaceUsesOfWith() changed something (NFC)
nikic May 18, 2022
bdf2547
[JumpThreading] Add additional freeze tests (NFC)
nikic May 18, 2022
e292650
[AMDGPU] Aggressively fold immediates in SIShrinkInstructions
jayfoad May 16, 2022
c9e7049
[JumpThreading] Look through freeze in getPredicateAt() fold
nikic May 18, 2022
140ad30
[AMDGPU][MC][GFX10] Add missing s_scratch_load tests.
kosarev May 18, 2022
8e648f1
[lldb] Add --all option to "memory region"
DavidSpickett May 18, 2022
04e5b7f
AArch64: fall back to DWARF instead of crashing on weird .cfi directives
TNorthover May 18, 2022
3f7fc09
[X86] Regenerate select-ext.ll test for D125604
RKSimon May 18, 2022
5a0b7e8
[X86] coalesce-dead-lanes.mir - fix CHECK-LABEL typo identified in D1…
RKSimon May 18, 2022
2794249
[X86] copy-propagation.ll - fix CHECK-NEXT typo identified in D125604
RKSimon May 18, 2022
ec3bb17
[X86] lvi-hardening-indirectbr.ll - fix X64-NOT typo identified in D1…
RKSimon May 18, 2022
bf84ab7
[X86] statepoint-vreg-details.ll - fix CHECK-VREG-LABEL typo identifi…
RKSimon May 18, 2022
f718664
[DebugInfo][X86] debug-info-template-parameter.ll - fix broken DW_AT_…
RKSimon May 18, 2022
1584b2c
[AArch64] fp16-v8-instructions.ll - remove some old defunct CHECKS id…
RKSimon May 18, 2022
3e928c4
Revert "[lldb] Add --all option to "memory region""
DavidSpickett May 18, 2022
d9398a9
[lldb] Remove non-address bits from read/write addresses in lldb
DavidSpickett Jan 28, 2022
95a8af2
[AMDGPU][MC][NFC] MUBUF code cleanup
dpreobra May 18, 2022
21c29a8
[OpenCL] Add cl_khr_subgroup_rotate builtins
svenvh May 18, 2022
e497871
[mlir][complex] Add pow/sqrt/tanh ops and lowering to libm
d0k May 13, 2022
2321c36
[ARM] Don't Enable AES Pass for Generic Cores
lenary May 18, 2022
169416c
[AMDGPU][MC][GFX7] Disable cache policy modifiers with SMRD
dpreobra May 18, 2022
fdd0195
[Security Group] Update representative for Rust.
pietroalbini May 18, 2022
939affc
[AArch64] neon-vmull-high-p64.ll - fix name/check mismatch identified…
RKSimon May 18, 2022
4e19837
[X86] addcarry.ll - add nounwind to prevent cfi noise on tests
RKSimon May 18, 2022
89cacb9
[libcxx] [test] Add missing header for std::numeric_limits
jwakely May 18, 2022
46d9a6e
[libcxx] [test] Include header for strverscmp
jwakely May 18, 2022
32ca9bd
[AMDGPU][MC][GFX940] Correct tied operand decoding for smfmac opcodes
dpreobra May 18, 2022
128da94
[InstCombine] Remove disable-verify tests (NFC)
nikic May 18, 2022
00a1258
[lldb][AArch64] Fix corefile memory reads when there are non-address …
DavidSpickett Apr 4, 2022
be6d7cc
[InstCombine] reduce code duplication for checking types; NFC
rotateright May 18, 2022
990cc49
[InstCombine] avoid crash on fold of icmp with cast operand
rotateright May 18, 2022
ca87553
Reland(2) "[clangd] Indexing of standard library"
sam-mccall May 18, 2022
1236b66
[lit] pass LLVM_SYMBOLIZER_PATH through to tests.
sam-mccall May 18, 2022
8e4c5d9
[CGP] Regenerate test checks (NFC)
nikic May 18, 2022
8c975ea
Assert on polymorphic pointer intrinsic param
May 17, 2022
0990d5b
[gn build] Port ca875539f788
llvmgnsyncbot May 18, 2022
47258ff
[NFC] correcting a code comment.
llvm-beanz May 18, 2022
6ca7eb2
[SCEV] Part 1, Serialize function calls in function arguments.
chapuni May 8, 2022
4273e61
[SystemZ] Bugfix in SystemZTargetLowering::combineINT_TO_FP()
JonPsson May 18, 2022
f7988d0
Revert "[BasicAA] Remove unneeded special case for malloc/calloc"
preames May 18, 2022
d39928e
clang-cl: Move /Zc: tests from cl-options.c to cl-zc.cpp
nico May 18, 2022
c44ba01
[OpenMP] libomp: honor passive wait policy requested with tasking
AndreyChurbanov May 18, 2022
fc0229f
[ARM] Clean up a test check from D125604. NFC
davemgreen May 18, 2022
1467e01
[RISCV][NFC] Rename variable in RISCVVEmitter.cpp
kito-cheng May 18, 2022
6381d48
[tests] Add test coverage for issue causing revert f7988d0
preames May 18, 2022
e44fe27
[LoopUnroll] Regenerate test checks (NFC)
nikic May 18, 2022
77533ea
Revert "Reland(2) "[clangd] Indexing of standard library""
sam-mccall May 18, 2022
a74e075
[AArch64] Add tests showing reassoc breaks (s|u)ml(a|s)l selection.
fhahn May 18, 2022
ca302f0
[gn build] Port 77533ea443ac
llvmgnsyncbot May 18, 2022
29e556f
[lldb] Change implementation of memory read --show-tags option
DavidSpickett Apr 14, 2022
66dfa36
[gn build] Port 29e556fc2ba9
llvmgnsyncbot May 18, 2022
69edacb
[mlir][sparse] Add support for complex.im and complex.re to the spars…
bixia1 May 17, 2022
c218fd3
[libunwind][AArch64] Add support for DWARF expression for RA_SIGN_STATE.
DanielKristofKiss May 13, 2022
e1ff449
Apply clang-tidy fixes for performance-for-range-copy in LinalgOps.cp…
joker-eph May 16, 2022
302158d
Apply clang-tidy fixes for llvm-else-after-return in OpenMPDialect.cp…
joker-eph May 16, 2022
46eef76
[DAGCombiner] Fix bug in MatchBSwapHWordLow.
topperc May 18, 2022
4739176
[clang-tidy] Fix readability-simplify-boolean-expr crash with implici…
njames93 May 18, 2022
087ef34
[ObjCopy][NFC] Remove unneeded zero initialization
MaskRay May 18, 2022
47b8424
Correct the diagnostic behavior for unreachable _Generic associations…
AaronBallman May 18, 2022
eafa053
[Debuginfod] Add --debug-file-directory to llvm-debuginfod-find.
mysterymath May 17, 2022
ececce1
Partially revert "[CMake] Passthrough OSX CMake options to builtins a…
petrhosek May 18, 2022
bff4673
Add a darwin platform setting to specify which exceptions debugserver
jimingham May 11, 2022
91a8caa
[gn build] port 6694491affa18
nico May 18, 2022
4957518
[mlir][ods] Simplify useDefaultType/AttributePrinterParser
Mogball May 17, 2022
e2f410f
[RISCV] Add test cases showing failure to remove mask on rotate amounts.
topperc May 18, 2022
86f7d70
[RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates.
topperc May 18, 2022
bedf657
[runtimes] Default LIB*_HERMETIC_STATIC_LIBRARY to ON on Windows
mstorsjo Apr 9, 2022
091a55c
[MC] [Win64EH] Remove an unused parameter to ARM64EmitUnwindCode. NFC.
mstorsjo May 18, 2022
924defa
[MC] [Win64EH] Don't produce packed ARM64 unwind info with homed para…
mstorsjo May 18, 2022
fc2c8b2
[libc] Add strlcpy
abrachet May 18, 2022
6adbcd2
[libc] Add String to bsd headers
abrachet May 18, 2022
15c809e
[libc++][format] Adds a formattable concept.
mordante Jan 30, 2022
d8de724
[gn build] Port 15c809e8e780
llvmgnsyncbot May 18, 2022
f0e6102
[libc++][format] Adds formatter<charT[N], charT>.
mordante Jan 29, 2022
4d8268f
[libc++][format] Improve format-arg-store.
mordante Oct 3, 2021
5ac411a
[SystemZ][z/OS] Add the PPA1 to SystemZAsmPrinter
May 18, 2022
f0c06c0
[libc++][format][5/6] Improve format_to_n.
mordante Sep 26, 2021
e64722f
[CMake][Fuchsia] Build runtimes as universal libraries on OS X
petrhosek May 18, 2022
f8ae591
[libc] fix missing semicolon in bsd_ext.td
michaelrj-google May 18, 2022
e60c8c3
[gn build] Port 4d8268fbf4cd
llvmgnsyncbot May 18, 2022
d4257fb
[llvm-readobj] Improve printing of Windows ARM packed unwind info
mstorsjo Nov 22, 2021
a3b30d2
[InstCombine] add tests for bswap with shift op; NFC
rotateright May 18, 2022
ebbc373
[InstCombine] allow variable shift amount in bswap + shift fold
rotateright May 18, 2022
29bebb0
[GISel] Add new combines for G_FMINNUM/MAXNUM and G_FMINIMUM/MAXIMUM
mkitzan May 17, 2022
d8166e1
[Driver] Refactor /opt/rh detection
MaskRay May 18, 2022
42dac47
Fix some -Wstrict-prototypes issues in ORC examples
dwblaikie May 18, 2022
4ac0589
[libc++][CI] fixed a return curr_symbol() for Russian in the libcxx/t…
diggerlin May 18, 2022
3566024
[clang-tidy] Fix readability-simplify-boolean-expr when Ifs have an i…
njames93 May 18, 2022
1e14b1a
[SystemZ][z/OS] Add missing include to llvm/include/llvm/BinaryFormat…
May 18, 2022
7d8060b
[SLP]Improve reductions vectorization.
alexey-bataev Oct 5, 2021
7aa1fa0
Reland "[dwarf] Emit a DIGlobalVariable for constant strings."
hctim May 18, 2022
e831ea6
[NFCI] clang-format scudo standalone
hctim May 18, 2022
40e242e
[mlir] Fix the error message for missing explicit TypeID
Mogball May 18, 2022
f9a3c43
[NFCI] clang-format gwp-asan files.
hctim May 18, 2022
72f6dfb
[libc][windows] fix strlcpy tests
michaelrj-google May 18, 2022
dd7233b
[Analyzer] Remove extra space from NSErrorChecker message.
usama54321 May 18, 2022
77014b9
[Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_A…
May 9, 2022
615255e
[RISCV] Add a test case where mutation still violates strict asserts …
preames May 18, 2022
03ba8c8
[Debuginfod] Fix shared libs build break after eafa0530417e
nemanjai May 18, 2022
797faba
[Analysis] Avoid virtual dtor. NFC.
Meinersbur May 18, 2022
1dcda06
[SPIRV] Add simple tests to improve test coverage
andreytr4intel May 13, 2022
6cc741b
[BOLT] Testcase to repro R_X86_64_REX_GOTPCRELX bug
rafaelauler Feb 17, 2022
8d03c49
Extend switch condition in optimizeSwitchPhiConst when free
MatzeB May 3, 2022
565f5df
[flang] test conforming & non-conforming lcobound
rouson Apr 14, 2022
3d869c8
[Sparc] Make sure that we really don't emit quad-precision unless the…
kettenis May 19, 2022
a5d618b
[M68k][Disassembler] Fix decoding conflict
0x59616e May 19, 2022
b3718bc
[llvm/Support] Fallback to $TERM if terminfo has no "colors" capability
medismailben May 18, 2022
d71d1a9
[lldb/Test] Add `use_colors` argument to the PExpect.launch wrapper
medismailben May 18, 2022
051a5ae
[lldb/Core] Fix "sticky" long progress messages
medismailben May 19, 2022
3e54ea0
[lldb/crashlog] Fix line entries resolution in interactive mode
medismailben May 18, 2022
821ee17
dyld patch
medismailben May 16, 2022
80589f2
[lldb/test] Make some tests as XFAIL while I investigate the issue
medismailben May 19, 2022
fd25ad5
Revert 821ee172cdcd7196b6130321b53b6cc66bf1222b
medismailben May 19, 2022
d699e54
Fix an or+and miscompile w/ GlobalISel
jroelofs May 19, 2022
51df77f
[InstCombine] Allow undef vectors when foldSelectToCopysign
ZCBing May 19, 2022
ffaaf24
[InstCombine] (rot X, ?) == 0/-1 --> X == 0/-1
ZCBing May 19, 2022
fbf0c42
Revert "[lldb/test] Make some tests as XFAIL while I investigate the …
medismailben May 19, 2022
1351a9b
[lldb/test] Fix failures caused by a previous PExpect.launch change
medismailben May 19, 2022
861489a
[NFC][RISCV] Enable TuneNoDefaultUnroll feature to control targets wh…
zixuan-wu May 19, 2022
90ea81f
[LV] Widen freeze instead of scalarizing it
lizhijin1024 May 19, 2022
b21c038
Fix if statement in DebugInfo/GSYM/LookupResult.cpp
apivovarov May 18, 2022
2bb2528
[mlir] Add GlobalOp, GlobalLoadConstOp to ml_program.
stellaraccident Apr 23, 2022
8b7e85f
[mlir][python] Add Python bindings for ml_program dialect.
stellaraccident May 18, 2022
03ea140
Reland(3) "[clangd] Indexing of standard library"
sam-mccall May 18, 2022
07c6635
[clang-tidy] Fix logic of assertion
sam-mccall May 19, 2022
dfd3a38
[gn build] Port 03ea140b3a28
llvmgnsyncbot May 19, 2022
cd387e4
[pseudo] Squash some warnings. NFC
sam-mccall May 19, 2022
4f35ca5
[clangd] Suppress warning: control reaches end of function
sam-mccall May 19, 2022
993070d
[LegalizeTypes][VP][NFC] Use an if and two returns instead of ?: oper…
May 18, 2022
bbc6834
[LegalizeTypes][VP] Add integer promotions support for VP_TRUNCATE
May 17, 2022
4df795b
[Serialization] Delta-encode consecutive SourceLocations in TypeLoc
sam-mccall May 11, 2022
d3a6f57
[libunwind] Remove -Wsign-conversion warning
DanielKristofKiss May 19, 2022
f035068
[LegalizeVectorTypes][VP] Add widen and split support for VP_SETCC
May 12, 2022
4816915
[Serialization] Add missing includes for CHAR_BIT
sam-mccall May 19, 2022
3948962
[gn build] Port 4df795bff752
llvmgnsyncbot May 19, 2022
4e8b2ac
[WebAssembly] Fix bug where -no-type-check failed to completely disab…
asb May 19, 2022
94d6dd9
[libc] Apply no-builtin everywhere, remove unnecessary flags
gchatelet May 18, 2022
2f8c067
[WebAssembly][NFC] Fix errant tabs in test case in last commit
asb May 19, 2022
c0f5bee
[release] Add cmake as an extra tarball and not bundle it
kwk May 19, 2022
530bab1
[RISCV][SelectionDAG] Support VECREDUCE_ADD mask operation
May 11, 2022
43c0f90
[clangd] NFC: Clarify the Include Cleaner warning
kirillbobyrev May 19, 2022
4f5a421
[clangd] Update the test after diagnostic message change
kirillbobyrev May 19, 2022
70ace42
[AMDGPU][NFC] Fix FileCheck directives in phi-vgpr-input-moveimm.mir.
kosarev May 19, 2022
6bec3e9
[APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf
jayfoad Oct 6, 2021
4e432f1
[APInt] Deprecate truncOrSelf, zextOrSelf and sextOrSelf
jayfoad Oct 6, 2021
4467327
[AMDGPU][MC][GFX940] Add SMFMAC aliases
dpreobra May 19, 2022
f820625
[flang][driver] Make driver accept `-module-dir<value>`
banach-space May 19, 2022
dd644dd
[AArch64] Extend zero vector TBL codegen tests. NFC
davemgreen May 19, 2022
13e1cf8
Reland "[lldb] Add --all option to "memory region""
DavidSpickett May 19, 2022
017c982
[NFC][M68k] Replace `APInt::zextOrSelf` with `APInt::zext`
0x59616e May 19, 2022
602f81e
[AArch64] Fix zero element TBL indices
davemgreen May 19, 2022
df25f0d
[M68k] Fix a bug in disassembler
0x59616e May 19, 2022
068f14f
[lldb] Add --show-tags option to "memory find"
DavidSpickett Apr 13, 2022
d633dbd
[SLP][NFC] Pre-commit test showing vectorization preventing FMA
wjschmidt May 18, 2022
5bbf6ad
Add an option to fill container for ref
usx95 May 18, 2022
5f4541f
[AArch64][SVE] Convert SRSHL to LSL when the fed from an ABS intrinsic
brads55 May 6, 2022
06cf0ce
[libc++] Enable move semantics for vector in C++03
philnik777 May 19, 2022
b2f9bde
[flang][NFC] Allow whitespaces before `ERROR`
May 19, 2022
f94a447
[libc++] Granularize algorithm benchmarks
philnik777 May 19, 2022
729467a
[AMDGPU] gfx11 LDSDIR instructions MC support
Sisyph Apr 22, 2022
3b390a1
[flang][OpenMP] Support for Collapse
Leporacanthicus Jul 7, 2021
e601b2a
[flang][driver] Add support for generating executables on MacOSX/Darwin
banach-space May 15, 2022
fa7ce8e
[runtimes] Fix the build of merged ABI/unwinder libraries
ldionne May 18, 2022
ac2ff25
[AMDGPU] gfx11 scalar memory instructions
Sisyph Apr 25, 2022
a5f3625
[libunwind] Remove unused _LIBUNWIND_HAS_NO_THREADS macro in tests
ldionne May 19, 2022
a094ad0
[NFC] Fix typos in X86CmovConversion
sapostolakis May 19, 2022
4431e8c
[libc++] Override the value of LIBCXX_CXX_ABI in the cache
ldionne May 19, 2022
df56fb4
[VPlan] Update VPWidenMemoryInstruction to not inherit from VPValue.
fhahn May 19, 2022
94a2bd5
[LoopVectorize] Precommit a test for D122126
huhu233 May 19, 2022
3ed9f60
[LoopVectorize] Don't interleave when the number of runtime checks ex…
huhu233 May 19, 2022
cefe472
[clang] Fix __has_builtin
yxsamliu May 17, 2022
a136a00
[lldb] Add non-address bit improvements to release notes
DavidSpickett May 19, 2022
d14f2a6
[AMDGPU] Allow multiple uses of the same literal in SOP2/SOPC
jayfoad May 19, 2022
32d6ef3
[SimpleLoopUnswitch] Skip trivial selects during trivial unswitching.
fhahn May 19, 2022
559b8fc
[AMDGPU] emit macro __GFX9__ etc
yxsamliu May 18, 2022
c35ca3a
[PowerPC] Implement XL compat __fnabs and __fnabss builtins.
amy-kwan May 19, 2022
dbffa40
[NVVM] Update intrinsic defintions to include the `nocallback` attribute
jhuber6 May 18, 2022
ca7c307
[SelectOpti][1/5] Setup new select-optimize pass
sapostolakis May 13, 2022
a49d305
[gn build] Port ca7c307d1816
llvmgnsyncbot May 19, 2022
5fc9449
[DeadArgElim] Use poison instead of undef as placeholder for dead arg…
nunoplopes May 19, 2022
d374b65
Drop qualifiers from return types in C (DR423)
AaronBallman May 19, 2022
d640442
[NFC] Fix a couple of whitespace issues.
paulwalker-arm May 19, 2022
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
  •  
  •  
  •  
57 changes: 57 additions & 0 deletions bolt/include/bolt/Core/BinaryDomTree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//==- bolt/Core/BinaryDomTree.h - Dominator Tree at low-level IR -*- 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
//
//===----------------------------------------------------------------------===//
//
// This file defines the BinaryDomTree class, which represents a dominator tree
// in the CFG of a binary function.
//
//===----------------------------------------------------------------------===//

#ifndef BOLT_CORE_BINARY_DOMTREE_H
#define BOLT_CORE_BINARY_DOMTREE_H

#include "llvm/Support/GenericDomTreeConstruction.h"

namespace llvm {
namespace bolt {

class BinaryBasicBlock;
using BinaryDomTreeNode = DomTreeNodeBase<BinaryBasicBlock>;
using BinaryDominatorTree = DomTreeBase<BinaryBasicBlock>;

} // namespace bolt

// BinaryDominatorTree GraphTraits specializations.
template <>
struct GraphTraits<bolt::BinaryDomTreeNode *>
: public DomTreeGraphTraitsBase<bolt::BinaryDomTreeNode,
bolt::BinaryDomTreeNode::iterator> {};

template <>
struct GraphTraits<const bolt::BinaryDomTreeNode *>
: public DomTreeGraphTraitsBase<const bolt::BinaryDomTreeNode,
bolt::BinaryDomTreeNode::const_iterator> {};

template <>
struct GraphTraits<bolt::BinaryDominatorTree *>
: public GraphTraits<bolt::BinaryDomTreeNode *> {
static NodeRef getEntryNode(bolt::BinaryDominatorTree *DT) {
return DT->getRootNode();
}

static nodes_iterator nodes_begin(bolt::BinaryDominatorTree *N) {
return df_begin(getEntryNode(N));
}

static nodes_iterator nodes_end(bolt::BinaryDominatorTree *N) {
return df_end(getEntryNode(N));
}
};

} // namespace llvm

#endif
36 changes: 0 additions & 36 deletions bolt/include/bolt/Core/BinaryLoop.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
#ifndef BOLT_CORE_BINARY_LOOP_H
#define BOLT_CORE_BINARY_LOOP_H

#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/Analysis/LoopInfoImpl.h"
#include "llvm/Support/GenericDomTreeConstruction.h"

namespace llvm {
namespace bolt {

class BinaryBasicBlock;

using BinaryDomTreeNode = DomTreeNodeBase<BinaryBasicBlock>;
using BinaryDominatorTree = DomTreeBase<BinaryBasicBlock>;

class BinaryLoop : public LoopBase<BinaryBasicBlock, BinaryLoop> {
public:
BinaryLoop() : LoopBase<BinaryBasicBlock, BinaryLoop>() {}
Expand Down Expand Up @@ -62,35 +57,4 @@ class BinaryLoopInfo : public LoopInfoBase<BinaryBasicBlock, BinaryLoop> {
} // namespace bolt
} // namespace llvm

namespace llvm {

// BinaryDominatorTree GraphTraits specializations.
template <>
struct GraphTraits<bolt::BinaryDomTreeNode *>
: public DomTreeGraphTraitsBase<bolt::BinaryDomTreeNode,
bolt::BinaryDomTreeNode::iterator> {};

template <>
struct GraphTraits<const bolt::BinaryDomTreeNode *>
: public DomTreeGraphTraitsBase<const bolt::BinaryDomTreeNode,
bolt::BinaryDomTreeNode::const_iterator> {};

template <>
struct GraphTraits<bolt::BinaryDominatorTree *>
: public GraphTraits<bolt::BinaryDomTreeNode *> {
static NodeRef getEntryNode(bolt::BinaryDominatorTree *DT) {
return DT->getRootNode();
}

static nodes_iterator nodes_begin(bolt::BinaryDominatorTree *N) {
return df_begin(getEntryNode(N));
}

static nodes_iterator nodes_end(bolt::BinaryDominatorTree *N) {
return df_end(getEntryNode(N));
}
};

} // namespace llvm

#endif
1 change: 1 addition & 0 deletions bolt/lib/Core/BinaryBasicBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ void BinaryBasicBlock::removePredecessor(BinaryBasicBlock *Pred,
}
}
assert(Erased && "Pred is not a predecessor of this block!");
(void)Erased;
}

void BinaryBasicBlock::removeDuplicateConditionalSuccessor(MCInst *CondBranch) {
Expand Down
2 changes: 2 additions & 0 deletions bolt/lib/Core/BinaryContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ BinaryContext::duplicateJumpTable(BinaryFunction &Function, JumpTable *JT,
break;
}
assert(Found && "Label not found");
(void)Found;
MCSymbol *NewLabel = Ctx->createNamedTempSymbol("duplicatedJT");
JumpTable *NewJT =
new JumpTable(*NewLabel, JT->getAddress(), JT->EntrySize, JT->Type,
Expand Down Expand Up @@ -1172,6 +1173,7 @@ void BinaryContext::postProcessSymbolTable() {
}
}
assert(Valid);
(void)Valid;
generateSymbolHashes();
}

Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Core/BinaryFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "bolt/Core/BinaryFunction.h"
#include "bolt/Core/BinaryBasicBlock.h"
#include "bolt/Core/BinaryDomTree.h"
#include "bolt/Core/DynoStats.h"
#include "bolt/Core/MCPlusBuilder.h"
#include "bolt/Utils/NameResolver.h"
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Rewrite/RewriteInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4048,6 +4048,7 @@ void RewriteInstance::rewriteNoteSections() {

if (BSec->getAllocAddress()) {
assert(!DataWritten && "Writing section twice.");
(void)DataWritten;
SectionData = BSec->getOutputData();

LLVM_DEBUG(dbgs() << "BOLT-DEBUG: " << (Size ? "appending" : "writing")
Expand Down
54 changes: 54 additions & 0 deletions bolt/test/X86/gotpcrelx.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This reproduces a bug with misinterpreting the gotpcrelx reloc

# Here we use llvm-mc -relax-relocations to produce R_X86_64_REX_GOTPCRELX
# and ld.lld to consume it and optimize it, transforming a CMP <mem, reg>
# into CMP <imm, reg>.
# Then we check that BOLT updates correctly the imm operand that references
# a function address. Currently XFAIL as we do not support it.

# REQUIRES: system-linux
# XFAIL: *

# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux \
# RUN: -relax-relocations %s -o %t.o
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: ld.lld %t.o -o %t.exe -q
# RUN: llvm-readobj -r %t.exe | FileCheck --check-prefix=READOBJ %s
# RUN: llvm-bolt %t.exe -relocs -o %t.out -lite=0
# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex \
# RUN: %t.out | FileCheck --check-prefix=DISASM %s

# Check that R_X86_64_REX_GOTPCRELX is present in the input binary
# READOBJ: 0x[[#%X,]] R_X86_64_REX_GOTPCRELX foo 0x[[#%X,]]

# DISASM: Disassembly of section .text:
# DISASM-EMPTY:
# DISASM-NEXT: <_start>:
# DISASM-NEXT: leaq 0x[[#%x,ADDR:]], %rax
# DISASM-NEXT: cmpq 0x[[#ADDR]], %rax

.text
.globl _start
.type _start, %function
_start:
.cfi_startproc
leaq foo, %rax
cmpq foo@GOTPCREL(%rip), %rax
je b
c:
mov $1, %rdi
callq foo
b:
xorq %rdi, %rdi
callq foo
ret
.cfi_endproc
.size _start, .-_start

.globl foo
.type foo, %function
foo:
.cfi_startproc
ret
.cfi_endproc
.size foo, .-foo
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,8 @@ void ContainerContainsCheck::check(const MatchFinder::MatchResult &Result) {
Result.Nodes.getNodeAs<Expr>("positiveComparison");
const auto *NegativeComparison =
Result.Nodes.getNodeAs<Expr>("negativeComparison");
assert(
!PositiveComparison ||
!NegativeComparison &&
"only one of PositiveComparison or NegativeComparison should be set");
assert((!PositiveComparison || !NegativeComparison) &&
"only one of PositiveComparison or NegativeComparison should be set");
bool Negated = NegativeComparison != nullptr;
const auto *Comparison = Negated ? NegativeComparison : PositiveComparison;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,41 +236,6 @@ static std::string replacementExpression(const ASTContext &Context,
return asBool(getText(Context, *E), NeedsStaticCast);
}

static 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;
}

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

if (const auto *Ret = dyn_cast<ReturnStmt>(IfRet->getThen()))
return stmtReturnsBool(Ret, Negated);

if (const auto *Compound = dyn_cast<CompoundStmt>(IfRet->getThen())) {
if (Compound->size() == 1) {
if (const auto *CompoundRet = dyn_cast<ReturnStmt>(Compound->body_back()))
return stmtReturnsBool(CompoundRet, Negated);
}
}

return nullptr;
}

static bool containsDiscardedTokens(const ASTContext &Context,
CharSourceRange CharRange) {
std::string ReplacementText =
Expand Down Expand Up @@ -386,6 +351,9 @@ class SimplifyBooleanExprCheck::Visitor : public RecursiveASTVisitor<Visitor> {
}

bool VisitIfStmt(IfStmt *If) {
// Skip any if's that have a condition var or an init statement.
if (If->hasInitStorage() || If->hasVarStorage())
return true;
/*
* if (true) ThenStmt(); -> ThenStmt();
* if (false) ThenStmt(); -> <Empty>;
Expand Down Expand Up @@ -496,14 +464,17 @@ class SimplifyBooleanExprCheck::Visitor : public RecursiveASTVisitor<Visitor> {
* if (Cond) return false; return true; -> return !Cond;
*/
auto *If = cast<IfStmt>(*First);
ExprAndBool ThenReturnBool =
checkSingleStatement(If->getThen(), parseReturnLiteralBool);
if (ThenReturnBool && ThenReturnBool.Bool != TrailingReturnBool.Bool) {
if (Check->ChainedConditionalReturn ||
(!PrevIf && If->getElse() == nullptr)) {
Check->replaceCompoundReturnWithCondition(
Context, cast<ReturnStmt>(*Second), TrailingReturnBool.Bool,
If);
if (!If->hasInitStorage() && !If->hasVarStorage()) {
ExprAndBool ThenReturnBool =
checkSingleStatement(If->getThen(), parseReturnLiteralBool);
if (ThenReturnBool &&
ThenReturnBool.Bool != TrailingReturnBool.Bool) {
if (Check->ChainedConditionalReturn ||
(!PrevIf && If->getElse() == nullptr)) {
Check->replaceCompoundReturnWithCondition(
Context, cast<ReturnStmt>(*Second), TrailingReturnBool.Bool,
If, ThenReturnBool.Item);
}
}
}
} else if (isa<LabelStmt, CaseStmt, DefaultStmt>(*First)) {
Expand All @@ -516,14 +487,15 @@ class SimplifyBooleanExprCheck::Visitor : public RecursiveASTVisitor<Visitor> {
: isa<CaseStmt>(*First) ? cast<CaseStmt>(*First)->getSubStmt()
: cast<DefaultStmt>(*First)->getSubStmt();
auto *SubIf = dyn_cast<IfStmt>(SubStmt);
if (SubIf && !SubIf->getElse()) {
if (SubIf && !SubIf->getElse() && !SubIf->hasInitStorage() &&
!SubIf->hasVarStorage()) {
ExprAndBool ThenReturnBool =
checkSingleStatement(SubIf->getThen(), parseReturnLiteralBool);
if (ThenReturnBool &&
ThenReturnBool.Bool != TrailingReturnBool.Bool) {
Check->replaceCompoundReturnWithCondition(
Context, cast<ReturnStmt>(*Second), TrailingReturnBool.Bool,
SubIf);
SubIf, ThenReturnBool.Item);
}
}
}
Expand Down Expand Up @@ -689,11 +661,11 @@ void SimplifyBooleanExprCheck::replaceWithReturnCondition(

void SimplifyBooleanExprCheck::replaceCompoundReturnWithCondition(
const ASTContext &Context, const ReturnStmt *Ret, bool Negated,
const IfStmt *If) {
const auto *Lit = stmtReturnsBool(If, Negated);
const IfStmt *If, const Expr *ThenReturn) {
const std::string Replacement =
"return " + replacementExpression(Context, Negated, If->getCond());
issueDiag(Context, Lit->getBeginLoc(), SimplifyConditionalReturnDiagnostic,
issueDiag(Context, ThenReturn->getBeginLoc(),
SimplifyConditionalReturnDiagnostic,
SourceRange(If->getBeginLoc(), Ret->getEndLoc()), Replacement);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class SimplifyBooleanExprCheck : public ClangTidyCheck {

void replaceCompoundReturnWithCondition(const ASTContext &Context,
const ReturnStmt *Ret, bool Negated,
const IfStmt *If);
const IfStmt *If,
const Expr *ThenReturn);

void issueDiag(const ASTContext &Result, SourceLocation Loc,
StringRef Description, SourceRange ReplacementRange,
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clangd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ add_clang_library(clangDaemon
index/Ref.cpp
index/Relation.cpp
index/Serialization.cpp
index/StdLib.cpp
index/Symbol.cpp
index/SymbolCollector.cpp
index/SymbolID.cpp
Expand Down
Loading