Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW39) #6898

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,923 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1923 commits
Select commit Hold shift + click to select a range
3b7b7fa
[flang] Accept a separate module procedure interface as a specific pr…
klausler Sep 1, 2022
7956576
Reland "[llvm] Support forward-referenced globals with dso_local_equi…
PiJoules Sep 21, 2022
b1926f3
Restore "[MemProf] Memprof profile matching and annotation"
teresajohnson Sep 23, 2022
0862349
[flang] A separate module procedure must inherit interface attributes
klausler Sep 21, 2022
d2e434c
[RegisterCoalescer] fix dst subreg replacement during remat copy trick
ivafanas Sep 23, 2022
ddfa0f6
[AMDGPU] Add GFX11 feature for subtargets with more VGPRs
jayfoad Sep 23, 2022
0d18815
Fix GH57943: Friend constraint checker didn't handle null decls.
Sep 23, 2022
0ba2a3c
[flang] Replace negative known CHARACTER length with zero in type ana…
klausler Sep 21, 2022
0a7f4e0
Revert "[SROA] Check typeSizeEqualsStoreSize in isVectorPromotionViable"
dyung Sep 23, 2022
91e0423
Revert "[SROA] Create additional vector type candidates based on stor…
dyung Sep 23, 2022
74f0b05
Fix Z3 version detection regexp
stil-t Sep 23, 2022
a3becb3
[clang][AMDGPU] Temporarily disable clang atomic fadd test for gfx90a
petar-avramovic Sep 23, 2022
bfc3907
[flang] Fix spurious errors from MODULE subprograms
klausler Sep 21, 2022
f466838
[RISCV] Simplify check-prefixes in half-intrinsics.ll. NFC
topperc Sep 23, 2022
c7285cd
[flang] Don't emit portability warnings for things in module files
klausler Sep 21, 2022
90a5d84
[RISCV] Promote f16 STRICT_FCEIL/FLOOR/TRUNC/NEARBYINT/RINT/ROUND,ROU…
topperc Sep 23, 2022
9489699
[flang] Fold IS_CONTIGUOUS() to .FALSE. when it is known to be
klausler Sep 21, 2022
dd41453
[flang] Allow a generic-spec on a PUBLIC/PRIVATE statement to declare…
klausler Sep 21, 2022
33ab74a
[AMDGPU] Precommit switching test to generated checks for D134463
jrbyrnes Sep 23, 2022
32994b7
Make MLIR model URLs cache variables
kongy Sep 23, 2022
19d11b4
[flang] Allow "non-expandable" scalars in single-element contexts
klausler Sep 21, 2022
166563f
[flang] Fix spurious error with COMMON and EQUIVALENCE
klausler Sep 21, 2022
a707675
[flang][runtime] Enabled HAS_FLOAT128 for builds with clang.
vzakhari Sep 22, 2022
74150a0
[objdump] Fix typo in error message.
drodriguez Sep 23, 2022
0d58a8c
[RISCV] Merge half-intrinsics-strict.ll into zvh-half-intrinsics-stri…
topperc Sep 23, 2022
3bbb2c2
[flang] Preserve component array lower bounds in folding
klausler Sep 21, 2022
8f1e362
Implement nanosleep per https://pubs.opengroup.org/onlinepubs/0096953…
rtenneti-google Sep 24, 2022
3bc334b
[flang] Fix crash in semantics in error recovery
klausler Sep 7, 2022
250f9e0
[mlir][spirv] Switch to kEmitAccessorPrefix_Both
kuhar Sep 24, 2022
19850cc
Revert "[RISCV] Lower BUILD_VECTOR to RISCVISD::VID_VL if it is float…
topperc Sep 24, 2022
afb0b21
[mlir][nvgpu] Use TableGen TypeDef for NVGPU dialect types
christopherbate Sep 23, 2022
cde3de5
[RISCV] Remove a few remnants of Zbr I misssed.
topperc Sep 24, 2022
90a1632
[mlir][spirv] Switch to kEmitAccessorPrefix_Predixed
kuhar Sep 24, 2022
3967abc
[RISCV] Add missing scheduler classes to Zbkb and Zbkx instructions.
topperc Sep 24, 2022
4f86c5c
[RISCV] Rename RISCVScheduleB.td to RISCVScheduleZb.td. NFC
topperc Sep 24, 2022
de3efd1
[flang] Lower character result of bind(c) function by value
clementval Sep 24, 2022
75279ae
[RISCV][Clang] Replace all undef value with poison
eopXD Sep 23, 2022
e221315
[Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to…
jhuber6 Sep 23, 2022
e657acd
[flang] Handle NULL(mold) used in initializer region
clementval Sep 24, 2022
a538d1f
[TableGen][CodeEmitterGen] Allow local names for sub-operands in a op…
jyknight Sep 5, 2022
5351878
[TableGen] Add useDeprecatedPositionallyEncodedOperands option.
jyknight Sep 20, 2022
e07ead8
[Clang] Warn when trying to dereference void pointers in C
junaire Sep 24, 2022
eb45443
[InstSimplify] add tests for select with min/max op; NFC
rotateright Sep 23, 2022
e5d15e1
[InstSimplify] fold redundant select of min/max
rotateright Sep 24, 2022
8c783b8
[clang-tidy] Fix a false positive in readability-simplify-boolean-expr
njames93 Sep 24, 2022
9e090dc
[BPF] ex1.ll - add checks for stores
RKSimon Sep 24, 2022
01631a8
[BPF] memcmp.ll - add checks for all loads
RKSimon Sep 24, 2022
473bb59
[LoopVersioning] Add tests where versioning requires LAA invalidation.
fhahn Sep 24, 2022
2b187ef
[ARM] Fix check lines in memcpy-inline.ll test. NFC
davemgreen Sep 24, 2022
6e7c54e
[RISCV] Add lowering for scalable @llvm.riscv.masked.strided.load/store
preames Sep 25, 2022
5358968
[RISCV] Pattern match scalable strided load/store
preames Sep 25, 2022
910ad36
[Clang] Improve diagnostics about the invalid target feature.
movie-travel-code Sep 25, 2022
67a04ed
[X86] Pre-commit unit test for D134477
zhuhan0 Sep 25, 2022
d2f3d7b
[lld-macho] Force higher alignment for __thread_vars
BertalanD Sep 24, 2022
b0bfefb
[InstSimplify] fold redundant select of min/max, part 2
rotateright Sep 25, 2022
34dfdd1
[libc++][test] Improves transitive includes.
mordante Sep 1, 2022
dcc756d
[AMDGPU] Pattern for flat atomic fadd f64 intrinsic with local addr
petar-avramovic Sep 25, 2022
ddb6c2b
[libc++] Rewrites graph_header_deps.py.
mordante Sep 19, 2022
faff990
[X86] Fix Icelake VPMULLQ zmm pipes and adjust AVX512DQ v8i64 mul cos…
RKSimon Sep 25, 2022
196f27b
[CostModel][X86] Add missing cost kinds for v2i64 icmp on SLM
RKSimon Sep 25, 2022
dc947ba
Autogenerate a couple of test in the AMDGPU backend. NFC
deadalnix Sep 25, 2022
4851fbc
fix errors on passing input iterator to `std::views::take`
huixie90 Sep 2, 2022
200fe18
[SLP][X86] Add missing triple from pr49081.ll test
RKSimon Sep 25, 2022
bcb1397
[PhaseOrdering][X86] Add missing triple from fast-basictest.ll test
RKSimon Sep 25, 2022
7847225
[clang-format] Correctly annotate static and consteval lambdas
rymiel Sep 25, 2022
39e6077
[clang-format] Look ahead before consuming `bool` in requires clause.
rymiel Sep 25, 2022
ea83712
[clang-cl] Implement /ZH: flag
nico Sep 23, 2022
2315ae3
[Coroutines] Regenerate coro-retcon-resume-values.ll
RKSimon Sep 25, 2022
015ce15
[clang-format][NFC] Rewrite prints in python3 compatible way
eoan-ermine Sep 25, 2022
0f99958
[Lanai] Fix useDeprecatedPositionallyEncodedOperands errors.
jyknight Jun 12, 2022
a8c59bc
[AMDGPU] Fix useDeprecatedPositionallyEncodedOperands errors in R600.
jyknight Sep 16, 2022
4f188ef
[AVR] Fix useDeprecatedPositionallyEncodedOperands errors.
jyknight Sep 19, 2022
394f309
[Clang][LoongArch] Add inline asm support for constraints f/l/I/K
SixWeining Sep 22, 2022
2698be0
[bazel] Add some general build flags
aeubanks Sep 26, 2022
7a8b930
[bazel] Always specify --strip=never
aeubanks Sep 26, 2022
cf14c7c
AMDGPU: Add a pass to rewrite certain undef in PHI
ruiling Sep 13, 2022
66325d9
AMDGPU: Add a test to show how later optimization works
ruiling Aug 23, 2022
40e9284
StructurizeCFG: prefer reduced number of live values
ruiling Aug 22, 2022
a5676a3
StructurizeCFG: Set Undef for non-predecessors in setPhiValues()
ruiling Aug 23, 2022
f89f099
[LoongArch] Support llvm.thread.pointer
xen0n Sep 26, 2022
a225556
[gn build] Port cf14c7caacfc
llvmgnsyncbot Sep 26, 2022
d2ac89b
[LoongArch] Support fastcc and treat it as ccc
xen0n Sep 26, 2022
283b6de
[clangd] Make go-to-type work on member function calls
sam-mccall Sep 26, 2022
bf25a48
Add override for runOnFunction()
ruiling Sep 26, 2022
ad6fe32
[LoongArch] Support 'generic' as a valid CPU name
xen0n Sep 26, 2022
43c5fbd
[VP][RISCV] Add vp.sqrt intrinsic and RISC-V support.
Sep 12, 2022
30b676a
Don't crash when code completing `using enum ^Foo`.
sam-mccall Sep 19, 2022
75265c7
[LoongArch] Lower BlockAddress/JumpTable
wangleiat Sep 26, 2022
75404e9
[JITLink] Introduce new weakly-referenced concept separate from linkage.
lhames Sep 26, 2022
258d7b8
[clang-format] Handle constructor invocations after new operator in C…
eoan-ermine Sep 26, 2022
a5f0054
[ORC] Update LinkGraph unit tests for API change in 75404e9ef88.
lhames Sep 26, 2022
a6d699b
[LoongArch] Add codegen support for strict_fsetccs and any_fsetcc
gonglingqin Sep 26, 2022
80c698d
[ADT] Use std::conditional_t (NFC)
kazutakahirata Sep 26, 2022
06b1e5f
[llvm] Use std::underlying_type_t (NFC)
kazutakahirata Sep 26, 2022
e2398a4
[Analysis] Introduce getStaticBonusApplied (NFC)
kazutakahirata Sep 26, 2022
9c8abbf
[mlir][Arithmetic] Support commutative canonicalization for continuou…
Sep 20, 2022
730ae80
[MLIR] Expose `getAsValues` in `StaticValueUtils.h` (NFC)
chelini Sep 25, 2022
a3df255
[mlir][Bazel] Port afb0b21f24adecfa0b302c79366980453b15ba7b
akuegel Sep 26, 2022
ec8f08c
[mlir][Bazel] Port 730ae80d3e1c47f93f725acb2d37f06fcba06953
akuegel Sep 26, 2022
b4cc363
[mlir][Bazel] Port 730ae80d3e1c47f93f725acb2d37f06fcba06953 part 2.
akuegel Sep 26, 2022
939c5cf
[MLIR] Migrate MemRef -> LLVM conversion pass to the auto-generated c…
mscuttari Sep 25, 2022
941d122
Revert "[MLIR] Expose `getAsValues` in `StaticValueUtils.h` (NFC)"
chelini Sep 26, 2022
a096164
Revert "[mlir][Bazel] Port 730ae80d3e1c47f93f725acb2d37f06fcba06953 p…
akuegel Sep 26, 2022
37bd099
[LLD][COFF] Fix absolute & synthetic symbols in COFF symbol table
alvinhochun Sep 26, 2022
be55829
[llvm-readobj][COFF] Print forwarder export symbols correctly
alvinhochun Sep 26, 2022
8a3597d
[lldb] Fix CommandInterpreter::DidProcessStopAbnormally() with multip…
mstorsjo Sep 16, 2022
585010b
Revert "[mlir][Bazel] Port 730ae80d3e1c47f93f725acb2d37f06fcba06953"
akuegel Sep 26, 2022
95597e9
[mlir] Fix typo in parameter name annotation.
akuegel Sep 26, 2022
5dcd6af
[mlir] Apply ClangTidyLegacy finding.
akuegel Sep 26, 2022
e66345d
[clang-tidy] adjust treating of array-of-pointers when 'AnalyzePointe…
JonasToth Sep 25, 2022
bebc969
[AArch64] Enable FeatureFuseAdrpAdd for all Arm cpus
davemgreen Sep 26, 2022
75e90ea
Fix MSVC "not all control paths return a value" warning. NFCI.
RKSimon Sep 26, 2022
4ff836a
[analyzer] Pass correct bldrCtx to computeObjectUnderConstruction
Sep 26, 2022
a412e9c
[ARM] Enable and/cmp0 folding - precommit test
momchil-velikov Sep 26, 2022
6602110
[ARM] Enable and/cmp0 folding
momchil-velikov Sep 26, 2022
0e91241
[LLDB] Add an llvm::Optional version of GetRegisterInfo
DavidSpickett Sep 23, 2022
4f1c124
[mlir] Add IteratorType enum to StructuredOpsUtils.
olegshyshkov Sep 26, 2022
9f97577
[LoopDistribute] Add LAA invalidation test for #50940.
fhahn Sep 26, 2022
91babd3
Update the status of a few more C99 DRs
AaronBallman Sep 26, 2022
8a55daf
[libc][NFC] introduce inline_bzero
gchatelet Sep 26, 2022
2188cf9
[libc][NFC] Remove new framework, a simpler one is coming
gchatelet Sep 26, 2022
aec908f
[libc][NFC] Move bzero_inline to separate file
gchatelet Sep 26, 2022
76c76e9
[VE] Support smax/smin
kaz7 Sep 24, 2022
ab3779a
[MustExecute] Add additional test for PR57780 (NFC)
nikic Sep 26, 2022
1cef30b
[VE] Disable automatic maxnum/minnum selection
kaz7 Sep 24, 2022
5ac8cc6
[flang] Lowers calls to procedure with CONTIGUOUS assumed shape dummies
jeanPerier Sep 26, 2022
2733088
[LoopUnroll] Add cache verification failure test case.
fhahn Sep 26, 2022
7876469
[Bazel] Remove template_rule and use @bazel_skylib's expand_template …
chsigg Sep 21, 2022
e3d14be
[Concepts] Recover properly from a RecoveryExpr in a concept
Sep 23, 2022
b30bbd1
Small formating nit in DAGCombiner. NFC
deadalnix Sep 26, 2022
f397775
[libc++] Add release note about unary_function and binary_function be…
ldionne Sep 26, 2022
192d69f
Revert "[Concepts] Recover properly from a RecoveryExpr in a concept"
Sep 26, 2022
79b69bf
Autogenerate stack-folding-fp X86 tests. NFC
deadalnix Sep 26, 2022
5ab6ef7
[mlir][spirv] Change dialect name from 'spv' to 'spirv'
kuhar Sep 26, 2022
e6c29c0
[AMDGPU] Precommit switching test to generated checks for D134463
jrbyrnes Sep 26, 2022
b6ff5b4
[libc++] Use XXYYZZ instead of XXYZZ for _LIBCPP_VERSION
ldionne Sep 19, 2022
ece0e2c
[mlir] Fix a deprecation warning
kazutakahirata Sep 26, 2022
f7e1ce0
[mlir][MemRef] Add pattern that forwards constant strided metadata.
nicolasvasilache Sep 22, 2022
684a789
Reapply "[Concepts] Recover properly from a RecoveryExpr in a concept"
Sep 26, 2022
a2052b8
[mlir][spirv] Change td def/class prefix from SPV to SPIRV
kuhar Sep 26, 2022
aac6629
[ConstraintElimination] Add initial usub.with.overflow tests.
Sep 26, 2022
b3d48a6
[mlir][Memref] Introduce a memref::ExtractAlignedPointerAsIndexOp
nicolasvasilache Sep 26, 2022
53c3664
[xmm] Remove duplicate #define
urnathan Sep 23, 2022
961c45f
[LLD][COFF] Generate map file even if no /out flag is present
pzhengqc Sep 23, 2022
27224fe
[MLIR] Expose `getAsValues` in `StaticValueUtils.h` (NFC)
chelini Sep 26, 2022
9d25991
[mlir][MemRef] Simplify extract_strided_metadata(allocLikeOp)
qcolombet Sep 24, 2022
ebfe8a7
[flang] Lower F08 bitwise-reduction intrinsics (IALL, IANY, IPARITY)
tarunprabhu Sep 26, 2022
dee4bc4
AMDGPU: Handle new address pattern in LowerKernelAttributes introduce…
changpeng Sep 26, 2022
ce82530
Revert "[mlir][spirv] Change td def/class prefix from SPV to SPIRV"
kuhar Sep 26, 2022
1f451a8
[clang] initialize type qualifiers for FunctionNoProtoType
rmaz Sep 9, 2022
ebdf00b
[mlir] Allow accessing TypeID of attrs/types defs
math-fehr Sep 26, 2022
4e214af
[MLIR] Add doc for Attribute print `elideType` (NFC)
Sep 26, 2022
10a3563
[lldb] Skip tests incompatible with older versions of Clang
felipepiovezan Sep 26, 2022
715bd12
[clang][modules] Over-align the `Module` class
jansvoboda11 Sep 26, 2022
afdd600
[LegalizeTypes][RISCV] Support f16 in ExpandIntRes_LLROUND_LLRINT.
topperc Sep 26, 2022
4ba1f04
[JITLink] Remove overly-restrictive visibility check introduced in 75…
lhames Sep 26, 2022
8f27a1f
[mlir] Relax transfer op hoisting on tensor
ThomasRaoux Sep 26, 2022
d6c0a5b
[Hexagon] Make sure we can still shift scalar vectors by non-splats
Sep 26, 2022
c418f00
[lldb] Fix completion of 'settings set' values
kastiglione Sep 23, 2022
bc13437
[mlir][vector] Handle subview correctly in sotre to load opt on memref
ThomasRaoux Sep 23, 2022
2d62833
Reland "[mlir][spirv] Change td def/class prefix from SPV to SPIRV"
kuhar Sep 26, 2022
53fa00b
LoopUnroll: Pass through AssumptionCache (NFC)
arsenm Sep 19, 2022
9bf1aea
LoopPeel: Pass through AssumptionCache (NFC)
arsenm Sep 19, 2022
473e83b
GuardWidening: Pass through AssumptionCache (NFC)
arsenm Sep 19, 2022
24cdae1
[mlir][spirv] Format a define. NFC.
kuhar Sep 26, 2022
12502ee
[lldb][test] 1 - Don't do test-replication for gmodules debug_info va…
Michael137 Sep 23, 2022
1c6826e
[lldb][test] 2 - Add gmodules test category explicitly where previous…
Michael137 Sep 23, 2022
096f1c4
[InstSimplify] remove redundant predicate check; NFC
rotateright Sep 26, 2022
e9e9948
[InstSimplify] rearrange matching for select-of-min/max folds; NFC
rotateright Sep 26, 2022
7ee3455
[mlir][TilingInterface] Fix `iter_args` handling in tile (and fuse).
Sep 22, 2022
dfaf7a2
[Hexagon] Avoid some unnecessary sign-extend instructions
Sep 26, 2022
8df1f3b
[clang][deps] Fix test on AIX
jansvoboda11 Sep 26, 2022
b5bccde
[InstSimplify] add tests for max intrinsic with constant expression; NFC
rotateright Sep 26, 2022
222e1c7
[InstSimplify] don't commute constant expression operand in min/max c…
rotateright Sep 26, 2022
def6cbd
[InstCombine] add assert/test for zext to i1
rotateright Sep 26, 2022
59080fe
Revert "[MLIR] Expose `getAsValues` in `StaticValueUtils.h` (NFC)"
chelini Sep 26, 2022
0ce96e0
[AMDGPU] Move SIModeRegisterDefaults to SI MFI
rampitec Sep 26, 2022
0fcc99a
[Matrix] Add tests for addition transpose optimizations
francisvm Sep 11, 2022
f076a70
[LoopDeletion] Add cache verification failure test case.
fhahn Sep 26, 2022
b6352ef
[LoopDeletion] Regenerate check lines for test added in f076a7097999d.
fhahn Sep 26, 2022
78084d9
[ELF] Rewrite R_RISCV_ALIGN nops when r.addend%4 != 0
MaskRay Sep 26, 2022
0ca1051
Check whether the allocated type is an array type before calling
ahatanaka Sep 26, 2022
90b695d
[IR][InstCombine] Support scalable vector splats ConstantExprs in Con…
topperc Sep 26, 2022
ddc6785
[mlir][LLVMIR] Add translation of AtomicRMW/CmpXchg from LLVM IR
mshockwave Jul 25, 2022
8a24e0c
[nfc][mlgo] Lazily compute the regalloc reward
mtrofin Sep 26, 2022
a3344d7
[mlir][sparse] minor cleanup of sparse tensor dialect ops
aartbik Sep 26, 2022
5866140
[AMDGPU][NFC] Correct name of DW_OP_LLVM_aspace_bregx
t-tye Sep 22, 2022
9a15442
[DWARF DUMP] Fix infinite recursion in Type Printer.
ayermolo Sep 26, 2022
b2d7a0d
[AArch64] Check target feature support for __builtin_arm_crc*
MaskRay Sep 27, 2022
79e522f
Revert "Skip crashing test"
adrian-prantl Sep 27, 2022
15805c0
[tests][msan] Use -fno-sanitize-memory-param-retval in tests
vitalybuka Aug 27, 2022
aba150c
[test][msan] Fix more tests for D134669
vitalybuka Sep 27, 2022
208d0f0
[NFC] legalize triple for dxil tests.
python3kgae Sep 27, 2022
f3e0298
[NFC][Clang] Remove dead code
Sep 27, 2022
e15b2da
[libc][math] Simplify tanf implementation and improve its performance.
lntue Sep 23, 2022
46fc75a
[NFC][2/n] Remove PrunePH pass
speryt Sep 27, 2022
1172bde
[HIP] Fix unbundling archive
yxsamliu Sep 10, 2022
ce004fb
[PowerPC] XCOFF exception section support on the direct assembler path
Sep 27, 2022
ae42563
[RISCV][NFC] Merge rv32 and rv64 insertelt/extract fp tests.
Sep 26, 2022
6142411
Merge from 'sycl' to 'sycl-web'
Sep 27, 2022
a64bce9
[flang] Write semantics test for atomic_define
ktras Sep 19, 2022
20a80d6
Revert "[AMDGPU] Move SIModeRegisterDefaults to SI MFI"
vitalybuka Sep 27, 2022
04e1301
[VP][RISCV] Add vp.maxnum and vp.minnum intrinsics and RISC-V support.
Sep 26, 2022
4782ccd
[test][clangd] Try to deflake with sanitizers
vitalybuka Sep 27, 2022
5a9bb32
Merge from 'main' to 'sycl-web' (477 commits)
haonanya1 Sep 27, 2022
4b1833d
[Support][NFC] Fix typo in comment
frasercrmck Sep 27, 2022
1bd1a44
[WebAssembly] Use intrinsics for table.get/set instructions
pmatos Sep 27, 2022
6584d1f
[ADT] Add IntervalTree - light tree data structure to hold intervals.
CarlosAlbertoEnciso Sep 27, 2022
2dfe7a3
[gn build] Port 6584d1f9309b
llvmgnsyncbot Sep 27, 2022
275bee3
[LoopUnroll] Forget block and loop dispositions during unrolling.
fhahn Sep 27, 2022
fbb1194
[AArch64] Add Neoverse V2 CPU support
david-arm Sep 15, 2022
e911ece
[libcxx] Support LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY + LIBCX…
nikic Sep 26, 2022
97dfa53
[FunctionAttrs] Infer precise FMRB
nikic Sep 23, 2022
712de9d
[AArch64] Add all predecessor archs in target info
DanielKristofKiss Sep 27, 2022
18b7c44
[BasicAA] Use ScopeExit to clear Visited set (NFC)
nikic Sep 27, 2022
3abaa37
[LSR] Preserve LCSSA in expander when rewriting loop exit values.
fhahn Sep 27, 2022
8427c83
[X86] Clean up prefixes for avoid-sfb.ll
RKSimon Sep 27, 2022
bd742df
Merge from 'main' to 'sycl-web'
Sep 27, 2022
a426753
[lldb] Add newline in output of `target modules lookup`
alvinhochun Sep 27, 2022
f4991bf
[lldb] Improve display of absolute symbol lookup
alvinhochun Sep 27, 2022
f8ad6ea
[mlir] Refactor transform dialect's gpu block func
grypp Sep 27, 2022
83a78ed
Merge from 'sycl' to 'sycl-web' (4 commits)
haonanya1 Sep 27, 2022
c2a44b5
[LoongArch] Support lowering frames larger than 2048 bytes
xen0n Sep 27, 2022
de80132
[VE] Change to expand FPOW
kaz7 Sep 26, 2022
bab129f
[ADT] Add IntervalTree - light tree data structure to hold intervals.
CarlosAlbertoEnciso Sep 27, 2022
823ce6a
[LoongArch] Add some comments for expand pseudo-inst pass. NFC
wangleiat Sep 27, 2022
d1baed7
[DAG] select Cond, -1, C --> or (sext Cond), C if Cond is MVT::i1
deadalnix Aug 5, 2022
c97e5ad
[lldb][test] Disable TestSBValueUnsignedEnumBitField.py for old DWARF…
Michael137 Sep 27, 2022
7ccfaec
[lldb][test] Remove failing ValueCheck on deprecated libcxx entity
Michael137 Sep 27, 2022
6b0b306
Fix regression from Deferred Concepts with lambda in var init
Sep 26, 2022
0ce5a3d
Merge remote-tracking branch 'otcshare_llvm/sycl-web' into llvmspirv_…
dbudanov-cmplr Sep 27, 2022
3f7f62c
Merge commit '6b0b306e6221ba3f8f02944b8e5a8140f4d52324' into llvmspir…
dbudanov-cmplr Sep 27, 2022
6ae7ea8
Remove -no-opaque-pointers flags from fixed tests. (#1612)
bader Sep 9, 2022
1f48cbc
Add a helper for type-aware mutateCallInst replacement. (#1611)
jcranmer-intel Sep 12, 2022
8080e03
Migrate atomics builtins to the mutator interface. (#1614)
jcranmer-intel Sep 15, 2022
99e8388
Migrate mutateArgsForImageOperands to the mutator interface.
jcranmer-intel Sep 13, 2022
87a9953
Address clang-tidy issues.
jcranmer-intel Sep 15, 2022
468f642
Migrate miscellaneous but simple calls to the mutator interface.
jcranmer-intel Sep 13, 2022
c68b523
Migrate calls in SPIRVReader to the mutator interface. (#1616)
jcranmer-intel Sep 16, 2022
e3d02f9
Migrate OCLBuiltinTransInfo::PostProc to the mutator interface.
jcranmer-intel Sep 13, 2022
5bb4298
Migrate more miscellaneous calls to the mutator interface. (#1619)
jcranmer-intel Sep 19, 2022
1e7915e
Migrate EnqueueKernel handling to the new mutator interface.
jcranmer-intel Sep 13, 2022
38a25d1
Migrate miscellaneous code in SPIRVToOCL to the mutator interface.
jcranmer-intel Sep 13, 2022
805bc3d
Migrate miscellaneous code in OCLToSPIRV to the mutator interface. (#…
jcranmer-intel Sep 22, 2022
e1041ff
Migrate handling of the AVC builtins to the mutator interface. (#1623)
jcranmer-intel Sep 23, 2022
8108b22
Cleanup code after all the mutator changes (#1625)
jcranmer-intel Sep 23, 2022
44d2a87
[HLSL] Restore code lost in merge commit
tahonermann Sep 19, 2022
1c364d2
Fix a disconnect with MSVC library and predefined macro handling.
dbudanov-cmplr Sep 20, 2022
b89ba99
Tests
dbudanov-cmplr Sep 28, 2022
71d1538
Fix for CodeGenSYCL/functionptr-addrspace.cpp lit test
dbudanov-cmplr Sep 30, 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/version-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_version_from_tag(tag):
# We have an rc tag.
return m.group(1,2,3)
# We have a final release tag.
return (m.group(1), m.group(2), int(m.group(3)) + 1)
return (m.group(1), m.group(2), str(int(m.group(3)) + 1))

m = re.match('llvmorg-([0-9]+)-init', tag)
if m:
Expand Down
20 changes: 12 additions & 8 deletions bolt/include/bolt/Core/BinaryContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,9 @@ inline int64_t truncateToSize(int64_t Value, unsigned Bytes) {
/// Filter iterator.
template <typename ItrType,
typename PredType = std::function<bool(const ItrType &)>>
class FilterIterator
: public std::iterator<std::bidirectional_iterator_tag,
typename std::iterator_traits<ItrType>::value_type> {
class FilterIterator {
using inner_traits = std::iterator_traits<ItrType>;
using Iterator = FilterIterator;
using T = typename std::iterator_traits<ItrType>::reference;
using PointerT = typename std::iterator_traits<ItrType>::pointer;

PredType Pred;
ItrType Itr, End;
Expand All @@ -128,14 +125,20 @@ class FilterIterator
}

public:
using iterator_category = std::bidirectional_iterator_tag;
using value_type = typename inner_traits::value_type;
using difference_type = typename inner_traits::difference_type;
using pointer = typename inner_traits::pointer;
using reference = typename inner_traits::reference;

Iterator &operator++() { next(); return *this; }
Iterator &operator--() { prev(); return *this; }
Iterator operator++(int) { auto Tmp(Itr); next(); return Tmp; }
Iterator operator--(int) { auto Tmp(Itr); prev(); return Tmp; }
bool operator==(const Iterator &Other) const { return Itr == Other.Itr; }
bool operator!=(const Iterator &Other) const { return !operator==(Other); }
T operator*() { return *Itr; }
PointerT operator->() { return &operator*(); }
reference operator*() { return *Itr; }
pointer operator->() { return &operator*(); }
FilterIterator(PredType Pred, ItrType Itr, ItrType End)
: Pred(Pred), Itr(Itr), End(End) {
nextMatching();
Expand Down Expand Up @@ -383,6 +386,8 @@ class BinaryContext {
}

unsigned getDWARFEncodingSize(unsigned Encoding) {
if (Encoding == dwarf::DW_EH_PE_omit)
return 0;
switch (Encoding & 0x0f) {
default:
llvm_unreachable("unknown encoding");
Expand Down Expand Up @@ -666,7 +671,6 @@ class BinaryContext {

/// DWARF encoding. Available encoding types defined in BinaryFormat/Dwarf.h
/// enum Constants, e.g. DW_EH_PE_omit.
unsigned TTypeEncoding = dwarf::DW_EH_PE_omit;
unsigned LSDAEncoding = dwarf::DW_EH_PE_omit;

BinaryContext(std::unique_ptr<MCContext> Ctx,
Expand Down
88 changes: 58 additions & 30 deletions bolt/include/bolt/Core/BinaryFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
#include "bolt/Core/JumpTable.h"
#include "bolt/Core/MCPlus.h"
#include "bolt/Utils/NameResolver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
Expand All @@ -44,9 +47,11 @@
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <iterator>
#include <limits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace llvm::object;
Expand Down Expand Up @@ -142,7 +147,8 @@ class BinaryFunction {
uint64_t Action;
};

using CallSitesType = SmallVector<CallSite, 0>;
using CallSitesList = SmallVector<std::pair<FragmentNum, CallSite>, 0>;
using CallSitesRange = iterator_range<CallSitesList::const_iterator>;

using IslandProxiesType =
std::map<BinaryFunction *, std::map<const MCSymbol *, MCSymbol *>>;
Expand Down Expand Up @@ -382,6 +388,9 @@ class BinaryFunction {
/// Original LSDA address for the function.
uint64_t LSDAAddress{0};

/// Original LSDA type encoding
unsigned LSDATypeEncoding{dwarf::DW_EH_PE_omit};

/// Containing compilation unit for the function.
DWARFUnit *DwarfUnit{nullptr};

Expand Down Expand Up @@ -492,8 +501,7 @@ class BinaryFunction {
DenseMap<int32_t, SmallVector<int32_t, 4>> FrameRestoreEquivalents;

// For tracking exception handling ranges.
CallSitesType CallSites;
CallSitesType ColdCallSites;
CallSitesList CallSites;

/// Binary blobs representing action, type, and type index tables for this
/// function' LSDA (exception handling).
Expand All @@ -507,9 +515,9 @@ class BinaryFunction {
/// addressing.
LSDATypeTableTy LSDATypeAddressTable;

/// Marking for the beginning of language-specific data area for the function.
MCSymbol *LSDASymbol{nullptr};
MCSymbol *ColdLSDASymbol{nullptr};
/// Marking for the beginnings of language-specific data areas for each
/// fragment of the function.
SmallVector<MCSymbol *, 0> LSDASymbols;

/// Map to discover which CFIs are attached to a given instruction offset.
/// Maps an instruction offset into a FrameInstructions offset.
Expand Down Expand Up @@ -716,7 +724,6 @@ class BinaryFunction {
BB->releaseCFG();

clearList(CallSites);
clearList(ColdCallSites);
clearList(LSDATypeTable);
clearList(LSDATypeAddressTable);

Expand Down Expand Up @@ -1067,6 +1074,14 @@ class BinaryFunction {
return N;
}

/// Return true if function has instructions to emit.
bool hasNonPseudoInstructions() const {
for (const BinaryBasicBlock &BB : blocks())
if (BB.getNumNonPseudos() > 0)
return true;
return false;
}

/// Return MC symbol associated with the function.
/// All references to the function should use this symbol.
MCSymbol *getSymbol(const FragmentNum Fragment = FragmentNum::main()) {
Expand Down Expand Up @@ -1418,14 +1433,24 @@ class BinaryFunction {

uint8_t getPersonalityEncoding() const { return PersonalityEncoding; }

const CallSitesType &getCallSites() const { return CallSites; }
CallSitesRange getCallSites(const FragmentNum F) const {
return make_range(std::equal_range(CallSites.begin(), CallSites.end(),
std::make_pair(F, CallSite()),
llvm::less_first()));
}

const CallSitesType &getColdCallSites() const { return ColdCallSites; }
void
addCallSites(const ArrayRef<std::pair<FragmentNum, CallSite>> NewCallSites) {
llvm::copy(NewCallSites, std::back_inserter(CallSites));
llvm::stable_sort(CallSites, llvm::less_first());
}

ArrayRef<uint8_t> getLSDAActionTable() const { return LSDAActionTable; }

const LSDATypeTableTy &getLSDATypeTable() const { return LSDATypeTable; }

unsigned getLSDATypeEncoding() const { return LSDATypeEncoding; }

const LSDATypeTableTy &getLSDATypeAddressTable() const {
return LSDATypeAddressTable;
}
Expand Down Expand Up @@ -1822,9 +1847,11 @@ class BinaryFunction {
return *this;
}

/// Set LSDA symbol for the function.
/// Set main LSDA symbol for the function.
BinaryFunction &setLSDASymbol(MCSymbol *Symbol) {
LSDASymbol = Symbol;
if (LSDASymbols.empty())
LSDASymbols.resize(1);
LSDASymbols.front() = Symbol;
return *this;
}

Expand All @@ -1848,30 +1875,25 @@ class BinaryFunction {
uint64_t getLSDAAddress() const { return LSDAAddress; }

/// Return symbol pointing to function's LSDA.
MCSymbol *getLSDASymbol() {
if (LSDASymbol)
return LSDASymbol;
if (CallSites.empty())
MCSymbol *getLSDASymbol(const FragmentNum F) {
if (F.get() < LSDASymbols.size() && LSDASymbols[F.get()] != nullptr)
return LSDASymbols[F.get()];
if (getCallSites(F).empty())
return nullptr;

LSDASymbol = BC.Ctx->getOrCreateSymbol(
Twine("GCC_except_table") + Twine::utohexstr(getFunctionNumber()));

return LSDASymbol;
}
if (F.get() >= LSDASymbols.size())
LSDASymbols.resize(F.get() + 1);

/// Return symbol pointing to function's LSDA for the cold part.
MCSymbol *getColdLSDASymbol(const FragmentNum Fragment) {
if (ColdLSDASymbol)
return ColdLSDASymbol;
if (ColdCallSites.empty())
return nullptr;
SmallString<256> SymbolName;
if (F == FragmentNum::main())
SymbolName = formatv("GCC_except_table{0:x-}", getFunctionNumber());
else
SymbolName = formatv("GCC_cold_except_table{0:x-}.{1}",
getFunctionNumber(), F.get());

ColdLSDASymbol =
BC.Ctx->getOrCreateSymbol(formatv("GCC_cold_except_table{0:x-}.{1}",
getFunctionNumber(), Fragment.get()));
LSDASymbols[F.get()] = BC.Ctx->getOrCreateSymbol(SymbolName);

return ColdLSDASymbol;
return LSDASymbols[F.get()];
}

void setOutputDataAddress(uint64_t Address) { OutputDataOffset = Address; }
Expand Down Expand Up @@ -2101,6 +2123,12 @@ class BinaryFunction {
/// cannot be statically evaluated for any given indirect branch.
bool postProcessIndirectBranches(MCPlusBuilder::AllocatorIdTy AllocId);

/// Validate that all data references to function offsets are claimed by
/// recognized jump tables. Register externally referenced blocks as entry
/// points. Returns true if there are no unclaimed externally referenced
/// offsets.
bool validateExternallyReferencedOffsets();

/// Return all call site profile info for this function.
IndirectCallSiteProfile &getAllCallSites() { return AllCallSites; }

Expand Down
9 changes: 7 additions & 2 deletions bolt/include/bolt/Core/MCPlusBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,14 @@ class MCPlusBuilder {
void setTailCall(MCInst &Inst);

public:
class InstructionIterator
: public std::iterator<std::bidirectional_iterator_tag, MCInst> {
class InstructionIterator {
public:
using iterator_category = std::bidirectional_iterator_tag;
using value_type = MCInst;
using difference_type = std::ptrdiff_t;
using pointer = value_type *;
using reference = value_type &;

class Impl {
public:
virtual Impl *Copy() const = 0;
Expand Down
11 changes: 1 addition & 10 deletions bolt/include/bolt/Passes/CacheMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,9 @@ namespace bolt {
class BinaryFunction;
namespace CacheMetrics {

/// Calculate various metrics related to instruction cache performance.
/// Calculate and print various metrics related to instruction cache performance
void printAll(const std::vector<BinaryFunction *> &BinaryFunctions);

/// Calculate Extended-TSP metric, which quantifies the expected number of
/// i-cache misses for a given pair of basic blocks. The parameters are:
/// - SrcAddr is the address of the source block;
/// - SrcSize is the size of the source block;
/// - DstAddr is the address of the destination block;
/// - Count is the number of jumps between the pair of blocks.
double extTSPScore(uint64_t SrcAddr, uint64_t SrcSize, uint64_t DstAddr,
uint64_t Count);

} // namespace CacheMetrics
} // namespace bolt
} // namespace llvm
Expand Down
9 changes: 7 additions & 2 deletions bolt/include/bolt/Passes/DataflowAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,18 @@ class DataflowAnalysis {
/// Define an iterator for navigating the expressions calculated by a
/// dataflow analysis at each program point, when they are backed by a
/// BitVector.
class ExprIterator
: public std::iterator<std::forward_iterator_tag, const MCInst *> {
class ExprIterator {
const BitVector *BV;
const std::vector<MCInst *> &Expressions;
int Idx;

public:
using iterator_category = std::forward_iterator_tag;
using value_type = const MCInst *;
using difference_type = std::ptrdiff_t;
using pointer = value_type *;
using reference = value_type &;

ExprIterator &operator++() {
assert(Idx != -1 && "Iterator already at the end");
Idx = BV->find_next(Idx);
Expand Down
4 changes: 4 additions & 0 deletions bolt/include/bolt/Passes/IndirectCallPromotion.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ class IndirectCallPromotion : public BinaryFunctionPass {
bool shouldPrint(const BinaryFunction &BF) const override {
return BinaryFunctionPass::shouldPrint(BF) && Modified.count(&BF) > 0;
}
bool shouldOptimize(const BinaryFunction &BF) const override {
return BF.isSimple() && !BF.isIgnored() && BF.hasProfile() &&
!BF.hasUnknownControlFlow();
}
void runOnFunctions(BinaryContext &BC) override;
};

Expand Down
13 changes: 11 additions & 2 deletions bolt/include/bolt/Passes/SplitFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,21 @@ enum SplitFunctionsStrategy : char {
All
};

class SplitStrategy {
public:
using BlockIt = BinaryFunction::BasicBlockOrderType::iterator;

virtual ~SplitStrategy() = default;
virtual bool canSplit(const BinaryFunction &BF) = 0;
virtual bool keepEmpty() = 0;
virtual void fragment(const BlockIt Start, const BlockIt End) = 0;
};

/// Split function code in multiple parts.
class SplitFunctions : public BinaryFunctionPass {
private:
/// Split function body into fragments.
template <typename Strategy>
void splitFunction(BinaryFunction &Function, Strategy S = {});
void splitFunction(BinaryFunction &Function, SplitStrategy &Strategy);

struct TrampolineKey {
FragmentNum SourceFN = FragmentNum::main();
Expand Down
24 changes: 20 additions & 4 deletions bolt/include/bolt/Rewrite/ExecutableFileMemoryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define BOLT_REWRITE_EXECUTABLE_FILE_MEMORY_MANAGER_H

#include "llvm/ADT/StringRef.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/ExecutionEngine/RuntimeDyld.h"
#include <cstdint>
#include <string>

Expand All @@ -20,14 +20,21 @@ namespace bolt {
class BinaryContext;

/// Class responsible for allocating and managing code and data sections.
class ExecutableFileMemoryManager : public SectionMemoryManager {
class ExecutableFileMemoryManager : public RuntimeDyld::MemoryManager {
private:
uint8_t *allocateSection(intptr_t Size, unsigned Alignment,
uint8_t *allocateSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID, StringRef SectionName,
bool IsCode, bool IsReadOnly);
BinaryContext &BC;
bool AllowStubs;

struct AllocInfo {
uint8_t *Address;
size_t Size;
size_t Alignment;
};
SmallVector<AllocInfo, 8> AllocatedSections;

public:
// Our linker's main purpose is to handle a single object file, created
// by RewriteInstance after reading the input binary and reordering it.
Expand Down Expand Up @@ -69,7 +76,16 @@ class ExecutableFileMemoryManager : public SectionMemoryManager {

bool allowStubAllocation() const override { return AllowStubs; }

bool finalizeMemory(std::string *ErrMsg = nullptr) override;
/// Count processed objects and skip memory finalization.
bool finalizeMemory(std::string *ErrMsg) override {
++ObjectsLoaded;
return false;
}

/// Ignore EH frames.
void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr,
size_t Size) override {}
void deregisterEHFrames() override {}
};

} // namespace bolt
Expand Down
Loading