Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW27) #6358

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 692 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
692 commits
Select commit Hold shift + click to select a range
c475e31
[libc++] Remove std::function in C++03
philnik777 Jun 20, 2022
1a60e5f
Merge from 'sycl' to 'sycl-web'
Jun 22, 2022
681cde7
[libc++] Complete the implementation of N4190
philnik777 Jun 22, 2022
706e89d
Fix interaction of pragma FENV_ACCESS with other pragmas
spavloff Apr 20, 2022
74f0660
[mlir][Transform] NFC - Pass TransformState as an argument to applyTo…
nicolasvasilache Jun 22, 2022
1f88d80
[SCCP] Don't mark edges feasible when resolving undefs
nikic Jun 3, 2022
20869c5
[libc++] fix views::all hard error on lvalue move only views instead …
huixie90 Jun 22, 2022
aa0a413
[AArch64][SME] Add some SME PSTATE setting/query intrinsics
david-arm Jun 16, 2022
f986976
[X86] Don't run O2 pipeline in codegen test (NFC)
nikic Jun 22, 2022
979400b
[ARM] Fix MVE gather/scatter merged gep offsets
davemgreen Jun 22, 2022
d29e986
[XCOFF] write the real source file name in C_FILE symbol.
Jun 22, 2022
563cf93
[ADCE] Update tests to use opaque pointers (NFC)
nikic Jun 22, 2022
7c802f9
[AggressiveInstCombine] Update tests to use opaque pointers (NFC)
nikic Jun 22, 2022
fc655a9
[AddDiscriminators] Migrate tests to opaque pointers (NFC)
nikic Jun 22, 2022
67fe3bd
[libc][mem*] Introduce Sized/Backends for new mem framework
gchatelet Jun 14, 2022
615efc3
[AlignmentFromAssumptions] Migrate tests to opaque pointers (NFC)
nikic Jun 22, 2022
9065cb2
Merge from 'main' to 'sycl-web' (235 commits)
HaohaiWen Jun 22, 2022
4e83986
Add -opaque-pointers for failed clang test
HaohaiWen Jun 22, 2022
60a3215
[Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC)
nikic Jun 22, 2022
aeccc16
Re-land [libc] Apply no-builtin everywhere, remove unnecessary flags
gchatelet Jun 22, 2022
2f448bf
[X86] Migrate tests to use opaque pointers (NFC)
nikic Jun 22, 2022
2c3a4a9
[DAG] SelectionDAG::GetDemandedBits - don't recurse back into GetDema…
RKSimon Jun 22, 2022
8958e70
[NVPTX] Keep metadata attached to module-scope variables
igorkudrin Jun 22, 2022
bb29702
Don't treat invalid parameters as being unused
AaronBallman Jun 22, 2022
9846a1f
[lldb] Remove an outdated comment. NFC.
mstorsjo Jun 20, 2022
9803db8
[NFC] Remove dead code
gchatelet Jun 22, 2022
7e6af44
[X86] Name instructions in test (NFC)
nikic Jun 22, 2022
958a885
[LinkerWrapper] Rework the linker wrapper and use owning binaries
jhuber6 Jun 6, 2022
21e29b6
[Clang] Allow multiple comma separated arguments to `--offload-arch=`
jhuber6 Jun 20, 2022
098b0b1
[ConstraintElimination] Transfer info from SGE to unsigned system.
fhahn Jun 22, 2022
8ba2cbf
[NFC] Remove dead code
gchatelet Jun 22, 2022
1906188
[flang] Add FIR tests missing from fir-dev
clementval Jun 22, 2022
b980841
[X86] Migrate more tests to opaque pointers (NFC)
nikic Jun 22, 2022
a9fd8b9
[LinkerWrapper] Fix calls to deleted Error constructor on older compi…
jhuber6 Jun 22, 2022
cef6586
[Alignment] Use Align for MaxKernArgAlign
gchatelet Jun 18, 2022
17e2702
Clang AttributeReference: emit entries for "Undocumented" attributes.
jyknight Jun 22, 2022
8a64dd5
[lldb] Fix reading i686-windows executables with GNU environment
mstorsjo Jun 21, 2022
2bae956
[lldb] Resolve exe location for `target create`
alvinhochun Jun 22, 2022
4d12378
[lldb][windows] Fix crash on getting nested exception
alvinhochun Jun 22, 2022
3c86789
[lldb] Add setting to override PE/COFF ABI by module name
alvinhochun Jun 22, 2022
c3574ef
[clang-tidy] Confusable identifiers detection
Oct 15, 2021
721875d
Reland "[gn build] (manually) port b94db7ed7eaf (Confusables.inc)"
nico Jun 3, 2022
1af1e91
[gn build] Port c3574ef739fb slightly better
nico Jun 22, 2022
4c921aa
[X86] Name instructions in test (NFC)
nikic Jun 22, 2022
57ffff6
Revert "[NFC] Remove dead code"
gchatelet Jun 22, 2022
fbb7253
[X86PreAMXConfig] Use MapVector to fix non-determinism
nikic Jun 22, 2022
ff5301d
[X86] Regenerate test checks (NFC)
nikic Jun 22, 2022
65f44c9
[libc++] Fixes GCC-12 build.
mordante Jun 22, 2022
1061511
[X86PreAMXConfig] Use IRBuilder to insert instructions (NFC)
nikic Jun 22, 2022
b7b4986
[OpenMP][libomp] Hold old __kmp_threads arrays until library shutdown
jpeyton52 May 5, 2022
0bc7105
[lldb] Tentative attempt to fix command-target-create-resolve-exe.tes…
mstorsjo Jun 22, 2022
f31ec68
[NFC][flang] Add the test case for D125371
PeixinQiao Jun 22, 2022
4308416
[flang][Driver] Refine _when_ driver diagnostics are formatted
PeixinQiao Jun 22, 2022
3fa62ef
[flang] Add semantic check for C1520
PeixinQiao Jun 22, 2022
73ebb05
[DirectX] Support opaque ptr for ValueAsMetadata in DXILBitcodeWriter
python3kgae Jun 14, 2022
88c279b
[libc++][CI] Use GCC 12 labels.
mordante Jun 22, 2022
f912d21
[RISCV] Add RISCVISD opcodes for the rest of get*Addr.
topperc Jun 22, 2022
cff4f04
[LSR] Don't allow zero quotient as scale ref. PR56160
xortator Jun 22, 2022
628a2c1
[MLIR][Presburger] introduce SlowMPInt, an auto-resizing APInt for fu…
Superty Jun 22, 2022
e7d3ba1
[mlir][sparse] accept sparse reshape (expand/collapse)
aartbik Jun 21, 2022
9e6261e
[mlir][sparse] fix typo in CHECK test
aartbik Jun 21, 2022
cf92766
[libc++] Reduces std::to_chars instantiations.
mordante Jun 20, 2022
b967a97
[clang-tidy] Fix documentation (NFC)
LegalizeAdulthood Jun 22, 2022
27fd01d
[iwyu] Handle regressions in libLLVM header include
Jun 22, 2022
4298b1b
Add a "-b" option to "process continue" to run to a set of breakpoints,
jimingham Jun 8, 2022
8bd078b
[Symbolize] Parse multi-line markup elements.
mysterymath Apr 29, 2022
30bdfac
[MLIR] Fix top-level comment (NFC)
chelini Jun 22, 2022
67dc802
[Support] Change TrackingStatistic and NoopStatistic to use uint64_t …
mingmingl-llvm Jun 17, 2022
7597988
[LinkerWrapper][NFC] Change interface to use a StringRef to TempFiles
jhuber6 Jun 22, 2022
21ba9d0
[libc++][NFC] Merges unused functions in callers.
mordante Jun 14, 2022
a1ee0b9
[lldb] Second attempt at fixing command-target-create-resolve-exe.tes…
alvinhochun Jun 22, 2022
69d9437
[Support/BLAKE3] Fix error in prior commit, apply `-mavx512vl` for `b…
akyrtzi Jun 22, 2022
acc9721
[NFC] [HWASan] Remove indirection for getting analyses.
fmayer Jun 15, 2022
130167e
[LLDB] Handle DIE with DW_AT_low_pc and empty ranges
ayermolo Jun 22, 2022
89a1d03
[clang-tidy] Organize test files into subdirectories by module (NFC)
LegalizeAdulthood Jun 17, 2022
efbfde0
[trace] Add an option to dump instructions in json and to a file
Jun 18, 2022
476ced4
[MTE] [HWASan] Support diamond lifetimes.
fmayer Jun 14, 2022
f7d434e
[libc++] Clarify std::function release note
JoeLoser Jun 22, 2022
10b23ae
[flang] Handle BINC(C) variables and add TODO for corner cases
clementval Jun 22, 2022
1c7889c
[flang] Remove some auto
clementval Jun 22, 2022
d0a4450
Rename GCCBuiltin into ClangBuiltin
GuillaumeGomez Jun 22, 2022
d571639
[mlir][Linalg] SplitReduction implementation without tensor::ExpandSh…
nicolasvasilache Jun 21, 2022
bae10a6
Fix a bug with "process continue -b" when no breakpoints are
jimingham Jun 22, 2022
485c4d6
Merge from 'sycl' to 'sycl-web'
Jun 22, 2022
b1cc59f
[clang-tidy][docs] Reorganise release notes
njames93 Jun 22, 2022
24e8cf4
[flang] Capture result interface of functions called in internal proc…
clementval Jun 22, 2022
165d693
[clang-tidy][docs] Fix a couple of missed cases from 6e566bc5523
njames93 Jun 22, 2022
5011b4c
Revert "[Attributor] Ensure to use the proper liveness AA"
eugenis Jun 22, 2022
e13248a
[UnifyLoopExits] Reduce number of guard blocks
bcahoon Apr 6, 2022
8b3bcfd
Merge from 'main' to 'sycl-web' (81 commits)
dwoodwor-intel Jun 22, 2022
f0d87df
[lldb] Return the correct utility function in AppleObjCRuntimeV2
JDevlieghere Jun 22, 2022
d95c406
[lldb] Fix off-by-one error in the AppleObjCRuntimeV2 utility function
JDevlieghere Jun 22, 2022
f1b05a0
[StructurizeCFG] Improve basic block ordering
bcahoon Apr 6, 2022
4e555a3
Fix a misspell. NFC
Jun 22, 2022
46be5fa
[lldb/Fuzzer] Add command interpreter fuzzer for LLDB
chelcassanova Jun 21, 2022
9320a32
[MTE] [HWASan] Use LoopInfo for reachability queries.
fmayer Jun 15, 2022
4512dda
[ELF][test] Clean up thinlto*
MaskRay Jun 22, 2022
758504b
[libc++] Simplify the visibility attributes
philnik777 Jun 22, 2022
56a33ba
[libc++] Implement P0154R1 (Hardware inference size)
philnik777 Jun 22, 2022
efe603e
[mlir][vulkan-runner] fix VK_ERROR_INCOMPATIBLE_DRIVER error
jackalcooper Jun 21, 2022
e871617
[SVE] Make ISD::SPLAT_VECTOR a legal operation.
paulwalker-arm Feb 24, 2022
bc856eb
[SampleProfile][Inline] Annotate sample profile inline remarks with l…
mingmingl-llvm Jun 1, 2022
a35141d
[OpenMP] Add handling cases when filter(tid) appears with default(none)
mdfazlay Jun 23, 2022
370aa2f
InlineSpiller: Don't fold spills into undef reads
arsenm Jun 15, 2022
b03d902
AMDGPU: Fix invalid liveness after si-optimize-exec-masking-pre-ra
arsenm Jun 10, 2022
5fef62f
AMDGPU: Add missing implicit uses in tests
arsenm Jun 17, 2022
f4a3df1
[ASan][Darwin] XFAIL test; atos does not show line numbers for globals
Jun 23, 2022
1dd2c93
[mlir][linalg] move isElementwise() to Linalg/Utils (NFC)
okkwon Jun 22, 2022
2962f9d
stop llvm-reduce from introducing undefs
regehr Jun 21, 2022
1cb8c87
[gn build] Port 2962f9df7ca3
llvmgnsyncbot Jun 23, 2022
6344848
[TableGen] Add new operator !exists
pcwang-thead Jun 23, 2022
aa5492e
[GlobalISel][TableGen] Qualify calls to llvm::format that have ::std:…
Jun 23, 2022
b690597
[flang] Fixes several bugs relating to initialization expressions. An…
clementval Jun 23, 2022
5e1ccdf
[RS4GC] Handle freeze case for vector
Jun 21, 2022
9c2bf53
Revert "[SelectionDAG][DAGCombiner] Reuse exist node by reassociate"
bcl5980 Jun 23, 2022
352346f
[RISCV] Refactor code to remove some small wrapper methods and merge …
topperc Jun 23, 2022
a411bc1
Revert "[SLP]Fix a crash when insert subvector is out of range."
MaskRay Jun 23, 2022
1ffd2d9
Revert D115462 "[SLP]Improve shuffles cost estimation where possible."
MaskRay Jun 23, 2022
719658d
[fastalloc] Support allocating specific register class in fastalloc
LuoYuanke Jun 23, 2022
9915477
[mlir] Add an additional check to vectorizeStaticLinalgOpPrecondition.
akuegel Jun 22, 2022
24a9888
[ConstraintElimination] Transfer info from SGT to unsigned system.
fhahn Jun 23, 2022
20e6ada
[LoongArch] Combine ((x & shifted_mask) >> shamt) to bstrpick.{w/d}
SixWeining Jun 23, 2022
7dc81c6
[clang][analyzer] Fix StdLibraryFunctionsChecker 'mkdir' return value.
balazske Jun 23, 2022
20b5f0c
[IR] Export ConstantFold.h header (NFC)
nikic Jun 20, 2022
8ef6280
[analyzer] Structured binding to arrays
isuckatcs Jun 8, 2022
dcb24f9
[AMDGPU][MC][GFX11] Correct disassembly of VOP3.DPP8 opcodes
dpreobra Jun 23, 2022
88e6449
[X86] Update some AMX tests to use opaque pointers (NFC)
nikic Jun 23, 2022
5e7ddb0
Revert "[LLDB] Handle DIE with DW_AT_low_pc and empty ranges"
DavidSpickett Jun 23, 2022
6f258c0
[Clang] Don't test register allocation
nikic Jun 23, 2022
c995038
[Flang] Call the CSE pass in the pass pipeline
kiranchandramohan Jun 23, 2022
e36535f
Fix sphinx build for clang-tools-extra
AaronBallman Jun 23, 2022
91139ce
[docs] Document and publish LLVM community calendar
kbeyls Jun 15, 2022
569d84f
[VPlan] Remove dead recipes across whole plan.
fhahn Jun 23, 2022
cdc59e2
[tbaa] Handle base classes in struct tbaa
brunodf-snps Jun 23, 2022
96b7af6
[VPlan] Update unit test after 569d84fe99e63.
fhahn Jun 23, 2022
ea38744
[flang] Lowering passing variables to OPTIONAL VALUE
clementval Jun 23, 2022
2c3bbac
[libc++] Implement ranges::move{, _backward}
philnik777 Jun 23, 2022
af41955
[gn build] Port 2c3bbac0c715
llvmgnsyncbot Jun 23, 2022
b6a33ce
[NFC] remove trailing whitespace
tru Jun 23, 2022
9f1d90b
[compiler-rt] Fix false positive detection of a target in compile-onl…
skosukhin Jun 22, 2022
0fdfeb0
[WebAssembly] Update test to run it in opaque pointers mode
pmatos Jun 23, 2022
8999b74
Revert "[tbaa] Handle base classes in struct tbaa"
dobbelaj-snps Jun 23, 2022
4c7225d
[mlir][Transform] Fix implementation of the generic apply that is bas…
nicolasvasilache Jun 23, 2022
983cb6c
[mlir][pdll] Add new tablegen helper NFC
jpienaar Jun 23, 2022
0eb17a9
[X86][AMX] Update tests to use opaque pointers (NFC)
nikic Jun 22, 2022
da34966
[llvm-c] Add LLVMGetAggregateElement() function
nikic Jun 23, 2022
ab89c13
[flang] Add lowering TODO for separate module procedures
clementval Jun 23, 2022
49b8ca3
AMDGPU: Don't crash on global_ctor/dtor declaration
ruiling Jun 22, 2022
74c3f9c
[AMDGPU] Precommit test for D128196
jayfoad Jun 23, 2022
971fa4b
[AMDGPU] GFX11: remove ShaderType from ds_ordered_count offset field
rdomingu Mar 30, 2021
6b187fd
[pseudo] Add xfail tests for a simple-declaration/function-definition…
sam-mccall Jun 9, 2022
30e49a3
[InstCombine] Optimise shift+and+boolean conversion pattern to simple…
bcl5980 Jun 23, 2022
9a33f39
[ConstraintElimination] Transfer info from SLT to unsigned system.
fhahn Jun 23, 2022
2b4931e
[AMDGPU] Use -check-prefixes in a test. NFC.
jayfoad Jun 23, 2022
9d2349c
[LSR] Move transform test from test/Analysis to test/Transforms.
fhahn Jun 23, 2022
342e649
[Sema] Fix assertion failure when instantiating requires expression
ilya-biryukov Jun 23, 2022
bd1a4c8
[ValueTracking] Teach isKnownNonZero that a vscale is never 0.
davemgreen Jun 23, 2022
8b6f69a
[BasicAA] Add test for call incorrectly treated as escape source (NFC)
nikic Jun 23, 2022
4e2a009
[Binary] Reserve the correct size for the OffloadBinary
jhuber6 Jun 23, 2022
7c9a382
[Binary] Fix leftoever line
jhuber6 Jun 23, 2022
851a5ef
Revert "[fastalloc] Support allocating specific register class in fas…
nico Jun 23, 2022
79e77a9
[AMDGPU] Flush the vmcnt counter in loop preheaders when necessary
bsaleil Jun 23, 2022
6f27df5
[AArch64][SVE] Match (add x (lsr/asr y c)) -> usra/ssra x y c
brads55 Jun 17, 2022
ed39fd5
[lld-macho] Use source information in duplicate symbol errors
BertalanD Jun 23, 2022
9ec7e4d
[clang][driver] NFC, test: Make test output order-independent
jansvoboda11 Jun 23, 2022
316e106
[ConstraintElimination] Transfer info from ULT to signed system.
fhahn Jun 23, 2022
9afaa15
[libc++][format] Copy code to new location.
mordante Dec 28, 2021
e3ec054
[pseudo] Track heads as GSS nodes, rather than as "pending actions".
sam-mccall Jun 21, 2022
94ed2ca
Revert "[ConstraintElimination] Transfer info from ULT to signed syst…
fhahn Jun 23, 2022
ae72fee
[AMDGPU] gfx11 Select on Buffer Atomic FAdd Rtn type
Sisyph Jun 20, 2022
4045b62
[RISCV] Add macrofusion infrastructure and one example usage.
topperc Jun 23, 2022
0ec87ad
[lld/mac] Add a few TimeTraceScopes
nico Jun 22, 2022
8b10ffa
[RISCV] Disable <vscale x 1 x *> types with Zve32x or Zve32f.
topperc Jun 23, 2022
57b0d94
[gn build] Port 4045b62d4cc9
llvmgnsyncbot Jun 23, 2022
124338d
[flang] Increase support for intrinsic module procedures
vdonaldson Jun 23, 2022
734ad03
[flang] Handle boxed characters that are values when doing a conversion
clementval Jun 23, 2022
09dea54
[lldb] Support a buffered logging mode
JDevlieghere Jun 23, 2022
70841b9
[lldb] Make thread safety the responsibility of the log handlers
JDevlieghere Jun 23, 2022
0c13267
[BasicTTI] Avoid crash when costing scalable select expansion
preames Jun 23, 2022
2c80b53
Revert "[pseudo] Track heads as GSS nodes, rather than as "pending ac…
sam-mccall Jun 23, 2022
d771245
[flang] Fix READ/WRITE with POS= on stream units, with refactoring
klausler Jun 17, 2022
b70ee9d
Reland "[pseudo] Track heads as GSS nodes, rather than as "pending ac…
sam-mccall Jun 23, 2022
f9710d1
[pseudo] Add a fast-path to GLR reduce when both pop and push are tri…
sam-mccall Jun 21, 2022
bc07634
Adding a named op for grouped convolutions
gpetters94 Jun 21, 2022
1650fb8
[flang][runtime] Respect PAD='NO' on READ/WRITE
klausler Jun 17, 2022
b257acd
[test][GlobalOpt] Update precommitted test
aeubanks Jun 23, 2022
ede4213
[flang][runtime] Handle READ of non-UTF-8 data into multi-byte CHARACTER
klausler Jun 17, 2022
865812c
[docs][NewPM] Add more info on why accessing mutable outer analyses i…
aeubanks Jun 22, 2022
6e68892
[Offloading] Embed the target features in the OffloadBinary
jhuber6 Jun 13, 2022
d9526e8
[ConstraintElimination] Use stable_sort to sort worklist.
fhahn Jun 23, 2022
1cc9792
[RISCV] Fix a crash in InsertVSETVLI where we hadn't properly guarded…
preames Jun 23, 2022
3e610f2
[pseudo] Turn glrReduce into a class, reuse storage across calls.
sam-mccall Jun 21, 2022
b6fce8b
[flang] Fix bogus errors from SIZE/SHAPE/UBOUND on assumed-shape
klausler Jun 17, 2022
3474d10
[mlir][bufferization][NFC] Make `escape` a dialect attribute
matthias-springer Jun 23, 2022
7aff663
[pseudo] Store reduction sequences by pointer in heaps, instead of by…
sam-mccall Jun 21, 2022
b163ac3
[mlir][math] Lower atan to libm
vzakhari Jun 23, 2022
c50e6f5
[Inline] Introduce a backend option to suppress inlining of functions…
Jun 22, 2022
c078e46
[flang][runtime] FLUSH(bad or unconnected unit number) is an error
klausler Jun 22, 2022
466eae6
[pseudo] Store last node popped in the queue, not its parent(s). NFC
sam-mccall Jun 23, 2022
dfaa388
[flang] Fix wording of warning message
klausler Jun 17, 2022
1ef5e6d
[flang] Make SQRT folding exact
klausler Jun 21, 2022
5ca68d5
[clang-tidy] Add `-verify-config` command line argument
njames93 Jun 23, 2022
df6afee
[flang][runtime] Improve G0 output editing
klausler Jun 22, 2022
3b6edef
[SLP]Fix a crash when reorder masked gather nodes with reused scalars.
alexey-bataev Jun 22, 2022
768216c
[pseudo] Handle no-reductions-available on the fastpath. NFC
sam-mccall Jun 23, 2022
148071f
[llvm] Update module map to include the `IR/ConstantFold` header
medismailben Jun 23, 2022
fbf611e
[clang-tidy] Extend spelling for CheckOptions
njames93 Jun 23, 2022
8c6da76
[mlir][Transform] Fix applyToOne corner case when no op is matched.
nicolasvasilache Jun 23, 2022
22f1273
[ThinLTO][ELF] Add --thinlto-emit-index-files option
Northbadge Jun 1, 2022
4d3c010
[CUDA] Do not embed a fatbinary when using the new driver
jhuber6 Jun 23, 2022
46ea4b5
[LV] Avoid a crash when costing a uniform store which doesn't corresp…
preames Jun 23, 2022
a2c1f7c
[lld, ELF and mac] Add --time-trace=<file>, remove --time-trace-file=…
nico Jun 23, 2022
77f72ac
[HLSL] Enable half type for hlsl.
python3kgae Jun 19, 2022
517bbc6
DebugInfo: Fully integrate ctor type homing into 'limited' debug info
dwblaikie Jun 22, 2022
23d6cde
[libc++] Add a test to pin down the set of transitive public includes
ldionne Jun 20, 2022
95733a5
[libc++] P2321R2 section [tuple.tuple]. Adding C++23 constructors, as…
huixie90 May 12, 2022
d5475af
[libc][NFC] Convert threads unittests in to integration tests.
Jun 22, 2022
1b24fe3
[LoopInterchange] New cost model for loop interchange
CongzheUalberta Jun 23, 2022
0a537a1
[libc][NFC] Convert pthread tests which create threads to integration…
Jun 22, 2022
306f273
[libc][NFC] Eliminate the internal header library target.
Jun 9, 2022
ba93b23
[libc] Revert "Eliminate the internal header library target."
Jun 23, 2022
a1f20da
The help string for stop-on-shared-library-load was copied to stop-on…
jimingham Jun 23, 2022
40aace5
[lldb/Fuzzer] Have fuzzers write artifacts to specific directory
chelcassanova Jun 23, 2022
5a082d9
[WebAssembly][Object] Remove requirement that objects must have code …
dschuff Jun 17, 2022
9dd7ad6
Revert "[libc++] P2321R2 section [tuple.tuple]. Adding C++23 construc…
huixie90 Jun 23, 2022
6fa9120
[lldb] Fix up Objective-C ISA pointers
JDevlieghere Jun 23, 2022
18c674e
Merge from 'sycl' to 'sycl-web'
Jun 23, 2022
0836fc3
[NFC][lld] Fix typos to test commit access
BertalanD Jun 23, 2022
7bfad7b
[RISCV] Replace two calls to getMinRVVVectorSizeInBits with useRVVFor…
preames Jun 23, 2022
02d29af
[MLIR] Add `decomposeMixedStridesOrOffsets` and `decomposeMixedSizes`
frgossen Jun 22, 2022
878309c
Revert "[LoopInterchange] New cost model for loop interchange"
eugenis Jun 23, 2022
8b987ca
Add support for decoding base64.
clayborg May 23, 2022
8d6a7e4
Merge from 'main' to 'sycl-web' (131 commits)
dwoodwor-intel Jun 23, 2022
37b881a
clang: Tweak behaviour of warn_empty_while_body and warn_empty_if_body
gribozavr Jun 24, 2022
9aaba9d
[libcxx][test] Suppress complex<int> warnings when testing MSVC
CaseyCarter Jun 24, 2022
6ef3413
Merge from 'sycl' to 'sycl-web'
Jun 24, 2022
bba7d70
Merge from 'main' to 'sycl-web' (17 commits)
HaohaiWen Jun 24, 2022
07bdc8f
Merge branch 'sycl-web' of https://github.com/otcshare/llvm into pull…
dwoodwor-intel Jun 24, 2022
d413628
Merge commit '9aaba9d9bb4fc3648a9417820858086b14b6b73e' into pulldown…
dwoodwor-intel Jun 24, 2022
212cc43
Prepare SPIRVWriter for type conversion without opaque pointers. (#1499)
jcranmer-intel Jun 20, 2022
3a379a5
Clear OCLTypeToSPIRV at start
svenvh May 19, 2022
5db6427
Initialize some member variables
svenvh Jun 13, 2022
4878c10
Migrate SPIRVWriter to new PassManager
svenvh Jun 13, 2022
9921295
Fix build by reverting a ValueMap back to std::map
svenvh Jun 20, 2022
812deed
Add SPV_KHR_subgroup_rotate support
svenvh Jun 15, 2022
99af174
Fix excess kernel_arg_type_qual entry in test
svenvh Jun 22, 2022
272c12b
Fix UB when validating spirv-ext option
svenvh Jun 22, 2022
04fed93
Enable LLVM_BUILD_TOOLS for out-of-tree builds
svenvh Jun 15, 2022
2c217cf
[SYCL] Fix file names in SYCL toolchain
npmiller Jun 28, 2022
f6667e1
[SYCL] Fix filename string data going out of scope
npmiller Jun 29, 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.
8 changes: 8 additions & 0 deletions bolt/include/bolt/Core/BinaryContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ class BinaryContext {
/// to function \p BF.
std::string generateJumpTableName(const BinaryFunction &BF, uint64_t Address);

/// Free memory used by jump table offsets
void clearJumpTableOffsets() {
for (auto &JTI : JumpTables) {
JumpTable &JT = *JTI.second;
JumpTable::OffsetsType Temp;
Temp.swap(JT.OffsetEntries);
}
}
/// Return true if the array of bytes represents a valid code padding.
bool hasValidCodePadding(const BinaryFunction &BF);

Expand Down
7 changes: 6 additions & 1 deletion bolt/include/bolt/Core/MCPlusBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,14 @@ class MCPlusBuilder {
/// Return handler and action info for invoke instruction if present.
Optional<MCPlus::MCLandingPad> getEHInfo(const MCInst &Inst) const;

// Add handler and action info for call instruction.
/// Add handler and action info for call instruction.
void addEHInfo(MCInst &Inst, const MCPlus::MCLandingPad &LP);

/// Update exception-handling info for the invoke instruction \p Inst.
/// Return true on success and false otherwise, e.g. if the instruction is
/// not an invoke.
bool updateEHInfo(MCInst &Inst, const MCPlus::MCLandingPad &LP);

/// Return non-negative GNU_args_size associated with the instruction
/// or -1 if there's no associated info.
int64_t getGnuArgsSize(const MCInst &Inst) const;
Expand Down
7 changes: 7 additions & 0 deletions bolt/include/bolt/Passes/SplitFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class SplitFunctions : public BinaryFunctionPass {
/// Split function body into fragments.
void splitFunction(BinaryFunction &Function);

/// Create trampoline landing pads for exception handling code to guarantee
/// that every landing pad is placed in the same function fragment as the
/// corresponding thrower block. The trampoline landing pad, when created,
/// will redirect the execution to the real landing pad in a different
/// fragment.
void createEHTrampolines(BinaryFunction &Function) const;

std::atomic<uint64_t> SplitBytesHot{0ull};
std::atomic<uint64_t> SplitBytesCold{0ull};

Expand Down
21 changes: 20 additions & 1 deletion bolt/lib/Core/BinaryContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,31 @@ BinaryFunction *BinaryContext::createBinaryFunction(
const MCSymbol *
BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address,
JumpTable::JumpTableType Type) {
auto isFragmentOf = [](BinaryFunction *Fragment, BinaryFunction *Parent) {
return (Fragment->isFragment() && Fragment->isParentFragment(Parent));
};

if (JumpTable *JT = getJumpTableContainingAddress(Address)) {
assert(JT->Type == Type && "jump table types have to match");
assert(JT->Parent == &Function &&
bool HasMultipleParents = isFragmentOf(JT->Parent, &Function) ||
isFragmentOf(&Function, JT->Parent);
assert((JT->Parent == &Function || HasMultipleParents) &&
"cannot re-use jump table of a different function");
assert(Address == JT->getAddress() && "unexpected non-empty jump table");

// Flush OffsetEntries with INVALID_OFFSET if multiple parents
// Duplicate the entry for the parent function for easy access
if (HasMultipleParents) {
if (opts::Verbosity > 2) {
outs() << "BOLT-WARNING: Multiple fragments access same jump table: "
<< JT->Parent->getPrintName() << "; " << Function.getPrintName()
<< "\n";
}
constexpr uint64_t INVALID_OFFSET = std::numeric_limits<uint64_t>::max();
for (unsigned I = 0; I < JT->OffsetEntries.size(); ++I)
JT->OffsetEntries[I] = INVALID_OFFSET;
Function.JumpTables.emplace(Address, JT);
}
return JT->getFirstLabel();
}

Expand Down
6 changes: 2 additions & 4 deletions bolt/lib/Core/BinaryEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,8 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, bool EmitColdPart) {
// defined in the same section and hence cannot place the landing pad into a
// cold fragment when the corresponding call site is in the hot fragment.
// Because of this issue and the previously described issue of possible
// zero-offset landing pad we disable splitting of exception-handling
// code for shared objects.
// zero-offset landing pad we have to place landing pads in the same section
// as the corresponding invokes for shared objects.
std::function<void(const MCSymbol *)> emitLandingPad;
if (BC.HasFixedLoadAddress) {
Streamer.emitIntValue(dwarf::DW_EH_PE_udata4, 1); // LPStart format
Expand All @@ -925,8 +925,6 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, bool EmitColdPart) {
Streamer.emitSymbolValue(LPSymbol, 4);
};
} else {
assert(!EmitColdPart &&
"cannot have exceptions in cold fragment for shared object");
Streamer.emitIntValue(dwarf::DW_EH_PE_omit, 1); // LPStart format
emitLandingPad = [&](const MCSymbol *LPSymbol) {
if (!LPSymbol)
Expand Down
18 changes: 7 additions & 11 deletions bolt/lib/Core/BinaryFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,11 +1654,13 @@ void BinaryFunction::postProcessJumpTables() {
"detected in function "
<< *this << '\n';
}
for (unsigned I = 0; I < JT.OffsetEntries.size(); ++I) {
MCSymbol *Label =
getOrCreateLocalLabel(getAddress() + JT.OffsetEntries[I],
/*CreatePastEnd*/ true);
JT.Entries.push_back(Label);
if (JT.Entries.empty()) {
for (unsigned I = 0; I < JT.OffsetEntries.size(); ++I) {
MCSymbol *Label =
getOrCreateLocalLabel(getAddress() + JT.OffsetEntries[I],
/*CreatePastEnd*/ true);
JT.Entries.push_back(Label);
}
}

const uint64_t BDSize =
Expand Down Expand Up @@ -1700,12 +1702,6 @@ void BinaryFunction::postProcessJumpTables() {
}
clearList(JTSites);

// Free memory used by jump table offsets.
for (auto &JTI : JumpTables) {
JumpTable &JT = *JTI.second;
clearList(JT.OffsetEntries);
}

// Conservatively populate all possible destinations for unknown indirect
// branches.
if (opts::StrictMode && hasInternalReference()) {
Expand Down
11 changes: 11 additions & 0 deletions bolt/lib/Core/MCPlusBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ void MCPlusBuilder::addEHInfo(MCInst &Inst, const MCLandingPad &LP) {
}
}

bool MCPlusBuilder::updateEHInfo(MCInst &Inst, const MCLandingPad &LP) {
if (!isInvoke(Inst))
return false;

setAnnotationOpValue(Inst, MCAnnotation::kEHLandingPad,
reinterpret_cast<int64_t>(LP.first));
setAnnotationOpValue(Inst, MCAnnotation::kEHAction,
static_cast<int64_t>(LP.second));
return true;
}

int64_t MCPlusBuilder::getGnuArgsSize(const MCInst &Inst) const {
Optional<int64_t> Value =
getAnnotationOpValue(Inst, MCAnnotation::kGnuArgsSize);
Expand Down
86 changes: 76 additions & 10 deletions bolt/lib/Passes/SplitFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {

bool AllCold = true;
for (BinaryBasicBlock *BB : BF.layout()) {
uint64_t ExecCount = BB->getExecutionCount();
const uint64_t ExecCount = BB->getExecutionCount();
if (ExecCount == BinaryBasicBlock::COUNT_NO_PROFILE)
return;
if (ExecCount != 0)
Expand All @@ -140,12 +140,12 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {
<< " pre-split is <0x"
<< Twine::utohexstr(OriginalHotSize) << ", 0x"
<< Twine::utohexstr(ColdSize) << ">\n");
}

if (opts::SplitFunctions == SplitFunctions::ST_LARGE && !BC.HasRelocations) {
// Split only if the function wouldn't fit.
if (OriginalHotSize <= BF.getMaxSize())
return;
if (opts::SplitFunctions == SplitFunctions::ST_LARGE &&
!BC.HasRelocations) {
// Split only if the function wouldn't fit.
if (OriginalHotSize <= BF.getMaxSize())
return;
}
}

// Never outline the first basic block.
Expand All @@ -164,9 +164,9 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {
BB->setCanOutline(false);
continue;
}

if (BF.hasEHRanges() && !opts::SplitEH) {
// We cannot move landing pads (or rather entry points for landing
// pads).
// We cannot move landing pads (or rather entry points for landing pads).
if (BB->isLandingPad()) {
BB->setCanOutline(false);
continue;
Expand All @@ -176,7 +176,7 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {
// that the block never throws, it is safe to move the block to
// decrease the size of the function.
for (MCInst &Instr : *BB) {
if (BF.getBinaryContext().MIB->isInvoke(Instr)) {
if (BC.MIB->isInvoke(Instr)) {
BB->setCanOutline(false);
break;
}
Expand Down Expand Up @@ -214,6 +214,12 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {
BB->setIsCold(true);
}

// For shared objects, place invoke instructions and corresponding landing
// pads in the same fragment. To reduce hot code size, create trampoline
// landing pads that will redirect the execution to the real LP.
if (!BC.HasFixedLoadAddress && BF.hasEHRanges() && BF.isSplit())
createEHTrampolines(BF);

// Check the new size to see if it's worth splitting the function.
if (BC.isX86() && BF.isSplit()) {
std::tie(HotSize, ColdSize) = BC.calculateEmittedSize(BF);
Expand All @@ -237,5 +243,65 @@ void SplitFunctions::splitFunction(BinaryFunction &BF) {
}
}

void SplitFunctions::createEHTrampolines(BinaryFunction &BF) const {
const auto &MIB = BF.getBinaryContext().MIB;

// Map real landing pads to the corresponding trampolines.
std::unordered_map<const MCSymbol *, const MCSymbol *> LPTrampolines;

// Iterate over the copy of basic blocks since we are adding new blocks to the
// function which will invalidate its iterators.
std::vector<BinaryBasicBlock *> Blocks(BF.pbegin(), BF.pend());
for (BinaryBasicBlock *BB : Blocks) {
for (MCInst &Instr : *BB) {
const Optional<MCPlus::MCLandingPad> EHInfo = MIB->getEHInfo(Instr);
if (!EHInfo || !EHInfo->first)
continue;

const MCSymbol *LPLabel = EHInfo->first;
BinaryBasicBlock *LPBlock = BF.getBasicBlockForLabel(LPLabel);
if (BB->isCold() == LPBlock->isCold())
continue;

const MCSymbol *TrampolineLabel = nullptr;
auto Iter = LPTrampolines.find(LPLabel);
if (Iter != LPTrampolines.end()) {
TrampolineLabel = Iter->second;
} else {
// Create a trampoline basic block in the same fragment as the thrower.
// Note: there's no need to insert the jump instruction, it will be
// added by fixBranches().
BinaryBasicBlock *TrampolineBB = BF.addBasicBlock();
TrampolineBB->setIsCold(BB->isCold());
TrampolineBB->setExecutionCount(LPBlock->getExecutionCount());
TrampolineBB->addSuccessor(LPBlock, TrampolineBB->getExecutionCount());
TrampolineBB->setCFIState(LPBlock->getCFIState());
TrampolineLabel = TrampolineBB->getLabel();
LPTrampolines.emplace(std::make_pair(LPLabel, TrampolineLabel));
}

// Substitute the landing pad with the trampoline.
MIB->updateEHInfo(Instr,
MCPlus::MCLandingPad(TrampolineLabel, EHInfo->second));
}
}

if (LPTrampolines.empty())
return;

// All trampoline blocks were added to the end of the function. Place them at
// the end of corresponding fragments.
std::stable_sort(BF.layout_begin(), BF.layout_end(),
[&](BinaryBasicBlock *A, BinaryBasicBlock *B) {
return A->isCold() < B->isCold();
});

// Conservatively introduce branch instructions.
BF.fixBranches();

// Update exception-handling CFG for the function.
BF.recomputeLandingPads();
}

} // namespace bolt
} // namespace llvm
1 change: 1 addition & 0 deletions bolt/lib/Passes/ValidateInternalCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ bool ValidateInternalCalls::fixCFGForPIC(BinaryFunction &Function) const {
// block.
std::vector<std::unique_ptr<BinaryBasicBlock>> NewBBs;
NewBBs.emplace_back(Function.createBasicBlock());
NewBBs.back()->setOffset(0);
NewBBs.back()->addInstructions(MovedInsts.begin(), MovedInsts.end());
BB.moveAllSuccessorsTo(NewBBs.back().get());
Function.insertBasicBlocks(&BB, std::move(NewBBs));
Expand Down
8 changes: 1 addition & 7 deletions bolt/lib/Rewrite/RewriteInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,11 +1686,6 @@ void RewriteInstance::adjustCommandLineOptions() {
opts::SplitEH = false;
}

if (opts::SplitEH && !BC->HasFixedLoadAddress) {
errs() << "BOLT-WARNING: disabling -split-eh for shared object\n";
opts::SplitEH = false;
}

if (opts::StrictMode && !BC->HasRelocations) {
errs() << "BOLT-WARNING: disabling strict mode (-strict) in non-relocation "
"mode\n";
Expand Down Expand Up @@ -2903,6 +2898,7 @@ void RewriteInstance::disassembleFunctions() {
BC->processInterproceduralReferences(Function);
}

BC->clearJumpTableOffsets();
BC->populateJumpTables();
BC->skipMarkedFragments();

Expand Down Expand Up @@ -5206,8 +5202,6 @@ uint64_t RewriteInstance::getNewFunctionAddress(uint64_t OldAddress) {
if (!Function)
return 0;

assert(!Function->isFragment() && "cannot get new address for a fragment");

return Function->getOutputAddress();
}

Expand Down
7 changes: 6 additions & 1 deletion bolt/lib/Target/X86/X86MCPlusBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3129,7 +3129,12 @@ class X86MCPlusBuilder : public MCPlusBuilder {
case 1: Opcode = X86::MOV8ri; break;
case 2: Opcode = X86::MOV16ri; break;
case 4: Opcode = X86::MOV32ri; break;
case 8: Opcode = X86::MOV64ri; break;
// Writing to a 32-bit register always zeros the upper 32 bits of the
// full-width register
case 8:
Opcode = X86::MOV32ri;
Reg = getAliasSized(Reg, 4);
break;
default:
llvm_unreachable("Unexpected size");
}
Expand Down
38 changes: 38 additions & 0 deletions bolt/test/X86/shared_object_entry.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
# RUN: ld.lld %t.o -o %t.so --shared --entry=func1.cold.1 --emit-relocs
# RUN: llvm-bolt -relocs %t.so -o %t -reorder-functions=hfsort+ \
# RUN: -split-functions=3 -reorder-blocks=ext-tsp -split-all-cold \
# RUN: -dyno-stats -icf=1 -use-gnu-stack

# Check that an entry point is a cold symbol
# RUN: llvm-readelf -h %t.so > %t.log
# RUN: llvm-nm %t.so >> %t.log
# RUN: FileCheck %s --input-file %t.log
# CHECK: Entry point address: 0x[[#%X,ENTRY:]]
# CHECK: [[#%x,ENTRY]] {{.*}} func1.cold.1

.globl func1.cold.1
.type func1.cold.1,@function
func1.cold.1:
.cfi_startproc
.L1:
movq %rbx, %rdx
jmp .L3
.L2:
# exit(0)
movq $60, %rax
xorq %rdi, %rdi
syscall
.size func1.cold.1, .-func1.cold.1
.cfi_endproc

.globl func1
.type func1,@function
func1:
.cfi_startproc
.L3:
movq %rax, %rdi
jmp .L2
call exit
.size func1, .-func1
.cfi_endproc
Loading