Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW46) #7317

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 525 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
525 commits
Select commit Hold shift + click to select a range
93c7a9b
[bazel] Port 589764a38264
d0k Nov 4, 2022
1186e9d
[LLVM][AMDGPU] Specialize 32-bit atomic fadd instruction for generic …
shiltian Nov 4, 2022
9a456b7
[IndVars] Forget SCEV for replaced PHI.
fhahn Nov 4, 2022
c064545
[mlir][spirv] Do not truncate i/f64 -> i/f32 in SPIRVConversion
kuhar Nov 4, 2022
6edb49e
[mlir][arith][spirv] Remove duplicate test cases
kuhar Nov 4, 2022
8c33639
[mlir] Move the assertion to a valid place.
hanhanW Nov 3, 2022
c954cfe
Some uses of the preprocessor can result in multiple target regions o…
mikerice1969 Nov 3, 2022
687ce3d
[BOLT][Hugify] Fix apple builds
rafaelauler Nov 4, 2022
3698994
[BOLT] Always move JTs in jump-table=move
rafaelauler Oct 29, 2022
ba65584
Alias Analysis infra in Flang
Renaud-K Nov 2, 2022
52ffc72
[mlir][tiling] Relax tiling to accept generating multiple operations.
hanhanW Nov 4, 2022
35a870c
Revert "Implement CWG2631"
cor3ntin Nov 4, 2022
4ec7dff
[CMake] Only set LLVM_DEFAULT_TARGET_TRIPLE to LLVM_HOST_TRIPLE when …
python3kgae Nov 4, 2022
ce90957
[mlir][spirv] Fold noop `BitcastsOp`s
kuhar Nov 4, 2022
7b7ec60
Fix test TestVSCode_terminatedEvent.py
kusmour Nov 4, 2022
09d38dd
AMDGPU: Fix assert when trying to overextend liverange
arsenm Oct 25, 2022
de14bef
Remove redundant loads.
jyu2-git Nov 2, 2022
03c7cd3
Revert "[lldb-vscode] Send Statistics Dump in terminated event"
GeorgeHuyubo Nov 4, 2022
8383897
[mlir][sparse] support Parallel for/reduction.
Oct 18, 2022
a38db7b
AMDGPU: Fix test failure
arsenm Nov 4, 2022
ada6aa3
AMDGPU: Fold undef rcp to qnan
arsenm Oct 17, 2022
2925333
[libc++abi] Use std::nullptr_t instead of declaring it manually
rprichard Nov 4, 2022
5617fb1
[MLGO][NFC] Use std::map instead of DenseMap to avoid use after free
mtrofin Nov 4, 2022
026ddce
R600: Remove broken atomicrmw patterns
arsenm Nov 3, 2022
53d5d34
[mlir][sparse] extend foreach operation to accept reduction arguments.
Nov 4, 2022
7ded25c
Fix Bazel build for ba65584d1545951ce958ea5729692374055d6b9f
dwblaikie Nov 4, 2022
70508b6
[mlir][sparse] fix sparse tensor rewriting patterns that do not propa…
Nov 4, 2022
d6b224e
[RISCV] Rename isAllUsesReadW to hasAllWUsers in RISCVSExtWRemoval. NFC
topperc Nov 4, 2022
a4b543a
[llvm-profdata] Check for all duplicate entries in MemOpSize table
ormris Nov 5, 2022
eace139
Back out test that failed.
jyu2-git Nov 5, 2022
0faac15
[RISCV] Remove duplicate SDNodeXForm. NFC
topperc Nov 5, 2022
91aa233
[RISCV] Add isel pattern for (and X, 0xffffffff << C) with Zba.
topperc Nov 5, 2022
200266a
[mlir][MemRef] Fix the lowering of extract_strided_metadata
qcolombet Nov 3, 2022
38c219b
[mlir] Infer SubElementInterface implementations using the storage KeyTy
River707 Nov 3, 2022
e83446f
[mlir:LLVM] Fix translation of DISubRangeAttr to LLVM
River707 Nov 4, 2022
55e8998
[mlir] Attempt to fix windows build after D137374
River707 Nov 5, 2022
6c6dff7
[libc] Add add_with_carry to builtin wrapper.
lntue Nov 4, 2022
6703290
[InstCombine] fold `sub + and` pattern with specific const value
bcl5980 Nov 5, 2022
3e8c1c4
[lldb/crashlog] Fix frame parser regex for when there is no source info
medismailben Nov 4, 2022
40afc69
[lldb/test] Fix StructuredDataTest::GetDescriptionEmpty warning (NFC)
medismailben Nov 5, 2022
acba66f
[lldb/crashlog] Standardize file path key in the ScriptedProcess Dict…
medismailben Nov 5, 2022
2951a93
MLIR. NFC. Remove trailing whitespaces in MemRefOps.td
bondhugula Nov 5, 2022
1bb6f1b
[libc][docs] Move links to internal developer guides out of the main …
Nov 4, 2022
64821f1
[libc][docs] Fix typos.
Nov 5, 2022
b12c677
[libc][docs] Add a build and test document.
Nov 5, 2022
ed4749f
[mlir] Add `populateFunctionOpInterfaceTypeConversionPattern` version…
Hardcode84 Nov 4, 2022
d95dc5b
[X86] Replace unnecessary int2double overrides with a better WriteCvt…
RKSimon Nov 5, 2022
1bd6471
[X86] Remove SandyBridge CVTSS2SIrm/CVTSD2SIrm overrides
RKSimon Nov 5, 2022
184817d
[X86] Add missing ReadAfterFold attributes from CVTSD2SSrm/CVTSS2SDrm…
RKSimon Nov 5, 2022
ee1ad1a
[X86] Add SchedWriteVecTruncate scheduler per-width wrapper
RKSimon Nov 5, 2022
b781ca4
[X86] Fix override for CVTPD2PS/CVTPD2DQ/CVTTPD2DQ AVX variants
RKSimon Nov 5, 2022
4c52a98
[flang] Fix controlSuccessor chain for select type construct
clementval Nov 5, 2022
0b7f327
[X86] Fix cvtss2si64/cvttss2si64 typo in SkylakeClient
RKSimon Nov 5, 2022
660b243
[libc++] Add [[nodiscard]] extensions to ranges algorithms
philnik777 Nov 1, 2022
2c79186
[X86] Cleanup WriteCvtSD2SS/WriteCvtPD2PS overrides
RKSimon Nov 5, 2022
7c05f09
[NFC] Refactor DAGCombiner::foldSelectOfConstants to reduce nesting
deadalnix Nov 5, 2022
a41cb8b
[SimpleLoopUnswitch] Forget block & loop dispos during trivial unswitch.
fhahn Nov 5, 2022
82209fd
[NFC] Refactor DAGCombiner::foldSelectOfConstants to reduce nesting 2.0
deadalnix Nov 5, 2022
23ba5bc
[MCA][X86] Add more avx512 cvt instructions test coverage
RKSimon Nov 5, 2022
45dead4
[flang] Add one missing "llvm_" prefix to gtest_main
mgorny Oct 31, 2022
edf8855
[X86] Replace unnecessary int2float and float2double overrides with b…
RKSimon Nov 5, 2022
89b356f
[libc++] Granularize <concept> includes
philnik777 Nov 2, 2022
59ef4b3
[libc++] Split __allocator_destructor out of shared_ptr.h
philnik777 Sep 22, 2022
23831f0
[gn build] Port 59ef4b3686e4
llvmgnsyncbot Nov 5, 2022
d1829c3
Add support of the next Ubuntu (Ubuntu 23.04 - Lunar Lobster)
sylvestre Nov 5, 2022
38c07d9
Change a 'default_triple' to 'object-emission'
pogo59 Nov 5, 2022
f530e6e
[mlir] Drop `const` from `SymbolTableCollection::lookupSymbolIn`
Nov 4, 2022
a782922
[mlir][SubElementInterfaces] Prefer calling the derived get if possible
River707 Nov 5, 2022
0e18d5e
[mlir][SubElements] Re-add null guards to better enable downstream ad…
River707 Nov 5, 2022
05a165b
[llvm/cmake/config-ix.cmake] If `LD64_EXECUTABLE` is already set, avo…
akyrtzi Nov 6, 2022
b5626ae
[MLIR] Fix bug in the method constructing semi affine expression from…
arnab-polymage Nov 6, 2022
a8d9378
[mlir] Fix a warning
kazutakahirata Nov 6, 2022
b6be37b
[llvm] [cmake] Set EXCLUDE_FROM_ALL on gtest and TestingSupport
mgorny Oct 30, 2022
6106816
Revert "[llvm] [cmake] Set EXCLUDE_FROM_ALL on gtest and TestingSupport"
mgorny Nov 6, 2022
bb63567
[llvm] Remove redundaunt typename (NFC)
kazutakahirata Nov 6, 2022
ad980b5
[flang] Fix controlSuccessor chain for select rank construct
clementval Nov 6, 2022
656f1d8
Revert "[SLP] Extend reordering data of tree entry to support PHI nodes"
davemgreen Nov 6, 2022
0e9dfff
[SLP][AArch64] Add a test case for SLP phi ordering of scalable vecto…
davemgreen Nov 6, 2022
244331a
[X86] Fix scalar load latencies for WriteLoad scheduler class
RKSimon Nov 6, 2022
6fff3ba
Revert rG244331ae833aaf33503bbd36890e704afb66a237 "[X86] Fix scalar l…
RKSimon Nov 6, 2022
d84cdf5
[X86] Regenerate atom-pad-short-functions.ll test checks
RKSimon Nov 6, 2022
08fe55b
[X86] Fix scalar load latencies for WriteLoad scheduler class
RKSimon Nov 6, 2022
92c5bcb
[InstCombine] add tests for zext of and of trunc; NFC
rotateright Nov 4, 2022
1c6ebe2
[InstCombine] reduce multi-use casts+masks
rotateright Nov 6, 2022
bff6880
[SimplifyLibCalls] improve code readability for AttributeList propaga…
rotateright Nov 6, 2022
4e56aa2
[X86] Schedule scalar movsx/movzx load+extend ops as WriteLoad instea…
RKSimon Nov 6, 2022
49143f9
[IndVars] Forget the SCEV when the instruction has been sunk.
Nov 6, 2022
a023fdb
Merge from 'sycl' to 'sycl-web'
Nov 6, 2022
e0ed3d5
Online sync-ups: add SYCL working group sync details.
bader Nov 6, 2022
f5a2ef8
[clangd] Fix the code action `RemoveUsingNamespace`
v1nh1shungry Nov 6, 2022
d423570
[lld] Use llvm::reverse (NFC)
kazutakahirata Nov 6, 2022
6a7a118
Apply clang-tidy fixes for llvm-else-after-return in VectorToGPU.cpp …
joker-eph Nov 3, 2022
c310a6d
Apply clang-tidy fixes for readability-simplify-boolean-expr in GPUDi…
joker-eph Nov 3, 2022
7987a0d
Add missing dependent FuncDialect for `convert-async-to-llvm` pass
joker-eph Nov 6, 2022
b84fd82
Add boundary check for ASTUnresolvedSet::erase
zhouzhouyi-hub Nov 6, 2022
a86cfce
[ELF] Add gdb index time trace
Trass3r Nov 6, 2022
7aa90b2
[PowerPC] Replace __ppc64__ with __powerpc64__
MaskRay Nov 7, 2022
6c927f2
Canonicalize PowerPC detection macros to __powerpc__
MaskRay Nov 7, 2022
0f91ec2
[builtins] Canonicalize PowerPC detection macros to __powerpc__
MaskRay Nov 7, 2022
34f687c
[test] Canonicalize PowerPC detection macros to __powerpc__
MaskRay Nov 7, 2022
7c50bcb
[RISCV] Support -mcpu/mtune=native
pcwang-thead Nov 7, 2022
7c80e7a
[builtins] Check __SIZEOF_INT128__ for CRT_HAS_128BIT
xobs Nov 7, 2022
7c2b76f
[PowerPC] Use llvm::is_contained (NFC)
kazutakahirata Nov 7, 2022
585e35a
[mlir] Use llvm::is_contained (NFC)
kazutakahirata Nov 7, 2022
c63465b
[flang] Use llvm::is_contained (NFC)
kazutakahirata Nov 7, 2022
2a67cc7
[Sema] Use llvm::is_contained (NFC)
kazutakahirata Nov 7, 2022
a5f368a
[clang-tidy] Use structured bindings (NFC)
kazutakahirata Nov 7, 2022
9418634
[clang] Use llvm::reverse (NFC)
kazutakahirata Nov 7, 2022
27f5f33
[clang][Interp][NFC] Remove an unused include
tbaederr Nov 4, 2022
dca7b8e
AMDGPU: Add new test for target intrinsic aliasing metadata
arsenm Nov 5, 2022
162d903
GlobalISel: Pass through AA metadata for target memory intrinsics
arsenm Nov 5, 2022
f72416e
AMDGPU: Fix missing divergence tests for csub intrinsics
arsenm Nov 5, 2022
541041d
AMDGPU: Fix faulty divergence analysis tests
arsenm Nov 5, 2022
d4f884c
[clang][Interp] Add a test case for #58754
tbaederr Nov 7, 2022
10483ac
[clang][Interp] Support pointer arithmethic in binary operators
tbaederr Oct 13, 2022
7c0a2d9
[clang][Interp][NFC] Use StorePop for assignments with DiscardResult
tbaederr Oct 21, 2022
6e557e2
[PowerPC][NFC] use script to generate check lines
Nov 7, 2022
9a3b969
[clang][Interp][NFC] Make InitField() not pop the pointer
tbaederr Oct 21, 2022
70de684
[clang-format] Handle object instansiation in if-statements
tru Nov 7, 2022
05a113e
[clang][Interp][NFC] Handle discarded ArraySubscriptExprs
tbaederr Oct 22, 2022
c40ef64
[Greedy RegAlloc] Add a test for single block split with statepoint u…
Nov 7, 2022
f4707af
[clang][Interp][NFCI] Cleanup emitConst()
tbaederr Oct 30, 2022
abe2738
[mlir] Apply two ClangTidy findings.
akuegel Nov 7, 2022
41fa7d2
[clangd] Fix a small inconsistency in system-include-extractor.test
HighCommander4 Oct 31, 2022
c8341a6
[clang][Interp][NFC] Avoid a getSource() call in the common case
tbaederr Oct 31, 2022
6b3e5c5
[clang][Interp][NFC] Remove unused function
tbaederr Oct 30, 2022
5bd6bd1
[clang][Interp][NFC] Simplify visitReturnStmt()
tbaederr Oct 31, 2022
5dfacb1
[clang][Interp][NFC] Replace dyn_cast_or_null with _if_present
tbaederr Oct 31, 2022
9e885d9
[InstSimplify] Add tests for (~A & B) | ~(A | B) --> ~A with logical …
davemgreen Nov 7, 2022
d917656
[X86] Add missing `IntrArgMemOnly` for intrinsics
phoebewang Nov 7, 2022
a2620e0
[Assignment Tracking][3/*] Add DIAssignID metadata boilerplate
OCHyams Nov 3, 2022
83255c4
Recommit [AArch64] Improve codegen for shifted mask op
bcl5980 Nov 7, 2022
eb421c0
[PowerPC][NFC] fix the LIT regressions
Nov 7, 2022
c8be352
[SWP] Recognize mem carried dep with different base
Oct 21, 2022
b46427b
[InstSimplify] (~A & B) | ~(A | B) --> ~A with logical and
davemgreen Nov 7, 2022
c37f29c
[Assignment Tracking][4/*] Add llvm.dbg.assign intrinsic boilerplate
OCHyams Nov 7, 2022
2bf960a
[clangd] Add "usedAsMutablePointer" highlighting modifier
ckandeler Jun 21, 2022
171f702
[Assignment Tracking][5/*] Add core infrastructure for instruction re…
OCHyams Nov 7, 2022
4aabbc0
[X86] Flatten WriteShift/Rotate SchedRW defs
RKSimon Nov 7, 2022
b867fe5
Merge from 'main' to 'sycl-web' (248 commits)
Fznamznon Nov 7, 2022
028df7f
Fix warning: comparison of integers of different signs
OCHyams Nov 7, 2022
6e279f5
[AMDGPU][MC][GFX10+] Enable literal operands with permlane16/permlanex16
dpreobra Nov 7, 2022
8f68952
[AMDGPU][MC][GFX11][NFC] Correct VINTERP src operands
dpreobra Nov 7, 2022
671709f
[clang][ExtractAPI] Add targetFallback to relationships in symbol graph
daniel-grumberg Oct 21, 2022
f63db91
Only add targetFallback if target is not in defined in current product
daniel-grumberg Oct 25, 2022
39dbfa7
Revert "Only add targetFallback if target is not in defined in curren…
daniel-grumberg Nov 7, 2022
bada353
[mlir][NFC] Remove unnecessary attr name getters from StructuredOpsUt…
olegshyshkov Nov 7, 2022
9a45e4b
[MemCpyOpt] Move lifetime marker before call to enable call slot opti…
nikic Oct 13, 2022
12a6572
[AArch64] Add SME2.1 target feature for Armv9-A 2022 Architecture Ext…
david-arm Nov 3, 2022
4c44fa1
[Assignment Tracking][5.1/*] Add deleteAssignmentMarkers function
OCHyams Nov 7, 2022
8ddd1cc
[SLP]Redesign vectorization of the gather nodes.
alexey-bataev Sep 16, 2022
80378a4
[NFC] Move getDebugValueLoc from static in Local.cpp to DebugInfo.h
OCHyams Nov 7, 2022
b9b74fc
InstCombine: Add baseline tests for fcmp and select on denormal range
arsenm Nov 4, 2022
0f68ffe
InstCombine: Fold compare with smallest normal if input denormals are…
arsenm Nov 4, 2022
5c0cb75
[X86] Folded MOVDDUPrm has the same sched behaviour as MOVSHDUPrm/MOV…
RKSimon Nov 7, 2022
cf69895
[AArch64][SVE2] Add the SVE2.1 BF16 instructions
david-arm Nov 2, 2022
9b800bf
[mlir][sparse] Improve the non-stable sort implementation.
bixia1 Nov 7, 2022
a8c24d5
[InstCombine] Remove redundant splats in InstCombineVectorOps
MDevereau Oct 12, 2022
a9d7b18
[AArch64][SVE2] Add the SVE2.1 quadword variants of ld1w/ld1d/st1w/st1d
david-arm Nov 1, 2022
36e8e19
[NFC][BlockPlacement]Add an option to renumber blocks based on functi…
mingmingl-llvm Nov 4, 2022
a50c269
[InstCombine] Handle load smaller than one byte in memset forward
nikic Nov 7, 2022
d35fcf0
[WebAssembly] Use default attributes for intrinsics
nikic Nov 7, 2022
cf24d49
[mlir][sparse] Add sparse_tensor.sort_coo operator.
bixia1 Nov 7, 2022
ecd0b5a
Revert "[SLP]Redesign vectorization of the gather nodes."
alexey-bataev Nov 7, 2022
6ebca03
[Clang] Update test after wasm intrinsics attribute change (NFC)
nikic Nov 7, 2022
708185f
[mlir][NVGPU] Add support for structured sparsity MMA variants
christopherbate Nov 5, 2022
1ce5f93
InstSimplify: Add new baseline tests for fdiv
arsenm Oct 17, 2022
7dd27a7
InstSimplify: Fold fdiv nnan ninf x, 0 -> poison
arsenm Oct 17, 2022
a2c4ca5
Revert "[mlir][sparse] support Parallel for/reduction."
sstamenova Nov 7, 2022
058f727
InstCombine: Add baseline checks for fdiv
arsenm Oct 17, 2022
ec224e3
Revert "[mlir][sparse] fix sparse tensor rewriting patterns that do n…
sstamenova Nov 7, 2022
90ad3e3
[IR] Allow available_externally GlobalAlias
MaskRay Nov 7, 2022
ddb68f3
[flang] Initial support for FastMathAttr setup in FirOpBuilder.
vzakhari Nov 7, 2022
b62c81b
[VectorCombine] add test with non-canonical shuffle mask; NFC
rotateright Nov 6, 2022
de36d39
[InstCombine] Avoid passing pow attributes to sqrt
Saldivarcher Nov 7, 2022
3676a86
[cmake] Add missing CMakePushCheckState include to FindLibEdit.cmake
mgorny Nov 7, 2022
fe20692
[flang] Allow fir.class as fir.save_result operand #0
clementval Nov 7, 2022
8f3f15c
[flang] Configure FirOpBuilder based on math driver options.
vzakhari Nov 7, 2022
265a730
Use double hashes for non-run/check lines in lld/test/ELF/basic.s
zmodem Nov 7, 2022
19a7939
[lld] Check errors from expanding response files
zmodem Nov 5, 2022
9917107
Revert "[mlir][sparse] extend foreach operation to accept reduction a…
sstamenova Nov 7, 2022
b8651a1
[AMDGPU] Merge GlobalISel tests into SelectionDAG tests. NFC.
jayfoad Nov 7, 2022
f81f880
[mlir] Lower async.func with async.coro and async.runtime operations
yijia1212 Nov 7, 2022
c4b7465
[mlir] Fix a warning (NFC)
kazutakahirata Nov 7, 2022
75ac294
[mlir][sparse] support parallel for/reduction in sparsification.
Nov 7, 2022
89ddcff
[LTO] Make local linkage GlobalValue in non-prevailing COMDAT availab…
MaskRay Nov 7, 2022
108e41d
[clang][NFC] Use c++17 style variable type traits
njames93 Nov 7, 2022
ec1bd25
[NFC][lldb] Remove unnecessary branch in TypeSystemClang::DumpTypeDes…
aeubanks Nov 4, 2022
583450f
AMDGPU: Fix DivergenceAnalysis for llvm.read_register
arsenm Oct 31, 2022
28e312c
[libc][obvious] fix printf failing to stop on %\0
michaelrj-google Nov 3, 2022
fdf2259
[NFC] Comment in MLInlineAdvisor as to why use std::map for FPICache
mtrofin Nov 7, 2022
463da45
[bazel][mlir] NVGPUToNVVM fixes for 708185f03ff
cota Nov 7, 2022
cafe50d
Explicitly initialize opaque pointer mode in CodeGenAction
MatzeB Nov 4, 2022
cd8c6ab
[NFC] clang-format part of TypePrinter.cpp
aeubanks Nov 7, 2022
d91460b
Apply clang-tidy fixes for performance-move-const-arg in IndexOps.cpp…
joker-eph Nov 3, 2022
93cb2b0
Apply clang-tidy fixes for performance-unnecessary-value-param in Lin…
joker-eph Nov 3, 2022
d8233b5
Fix MLIR doc build
joker-eph Nov 7, 2022
43e52ad
[libc] Add implementations of ftell.
Nov 4, 2022
4fa00ce
[mlir][sparse] extend foreach operation to accept reduction arguments…
Nov 4, 2022
6a61019
[libc] Add implementation of getc, getc_unlocked and fgetc_unlocked.
Nov 6, 2022
0c8db88
[libc] add scanf reader
michaelrj-google Oct 19, 2022
1c40d5e
[libc] add scanf string converters
michaelrj-google Nov 3, 2022
86674f6
[HLSL] Added HLSL this as a reference
Nov 7, 2022
430ca14
[libc][obvious] fix tests using wrong size for string
michaelrj-google Nov 7, 2022
eedbe44
[LLD] Enable --no-undefined-version by default.
DanAlbert Oct 6, 2022
432a7e2
[libomp] Add -Wl,--undefined-version workaround
MaskRay Nov 7, 2022
79f9f1f
[lld-macho] Ensure that chained fixups data comes first in __LINKEDIT
BertalanD Nov 5, 2022
afa22c5
[clangd] Pass the entire tooling::CompileCommand to CommandMangler
HighCommander4 Sep 25, 2022
68e230a
[clangd] Perform system include extraction inside CommandMangler
HighCommander4 Sep 12, 2022
428ac8f
[clangd] Rename QueryDriverDatabase.cpp to SystemIncludeExtractor.cpp
HighCommander4 Nov 4, 2022
f64802e
[Clang][AArch64][Darwin] Enable GlobalISel by default for Darwin ARM6…
aemerson Nov 2, 2022
41ce74e
[Clang][Sema] Add -Wincompatible-function-pointer-types-strict
samitolvanen Nov 7, 2022
d29d5ff
Revert "[Assignment Tracking][5.1/*] Add deleteAssignmentMarkers func…
rastogishubham Nov 7, 2022
4c37a41
Revert "Fix warning: comparison of integers of different signs"
rastogishubham Nov 7, 2022
41f5a00
Revert "[Assignment Tracking][5/*] Add core infrastructure for instru…
rastogishubham Nov 7, 2022
6040275
[mlir:SubElementInterfaces] Remove unnecessary static check
River707 Nov 7, 2022
b22d80d
Revert "[NFC] Move getDebugValueLoc from static in Local.cpp to Debug…
rastogishubham Nov 7, 2022
ec9aae9
[gn build] Port 428ac8f3a0f9
llvmgnsyncbot Nov 7, 2022
7c2d315
[mlir][spirv] Don't return value when cannot fold spirv.bitcast
antiagainst Nov 8, 2022
32a02a9
[Debuginfod] DEBUGINFOD_HEADERS_FILE environment variable
mysterymath Oct 18, 2022
ecedc4d
[flang] Add atomic_xor to list of intrinsics
ktras Nov 1, 2022
32a2af4
[CMake] Fix -Wstrict-prototypes
thesamesam Nov 8, 2022
674a17e
MIPS/compiler_rt: use synci to flush icache on r6
wzssyqa Nov 8, 2022
7bf3cb3
[lldb] Fix issue with re.Pattern availability
kastiglione Nov 7, 2022
e72fb69
[mlir][arith] Convert fastmath to LLVM dialect for some arith ops.
vzakhari Nov 8, 2022
9d96feb
[SLP][NFC] Restructure areTwoInsertFromSameBuildVector
skc7 Nov 7, 2022
4638ba7
llvm-reduce: Try to turn calls into something else
arsenm Oct 22, 2022
6ceb607
[PowerPC][NFC] remove the rop-protect attribute in LIT cases.
Nov 8, 2022
e661185
InstCombine: Fold fdiv nnan x, 0 -> copysign(inf, x)
arsenm Oct 17, 2022
b293de9
[Docs] Add my Office Hours
pmatos Nov 8, 2022
ebac599
[SimpleLoopUnswitch] Skip trivial selects in guards conditions unswit…
d-makogon Nov 2, 2022
1c35535
[X86] Add In64BitMode predicates for LOCK_INC64m, LOCK_DEC64m
HaohaiWen Nov 8, 2022
70c781f
[SIFoldOperands] Move `isFoldableCopy` into a separate helper, NFC.
Pierre-vh Nov 7, 2022
13f8336
[Driver] Add -fsample-profile-use-profi
haoyuintel Nov 8, 2022
b5f9972
[SIFoldOperands] Small code cleanups, NFC.
Pierre-vh Nov 7, 2022
7425077
[AMDGPU] Add & use `hasNamedOperand`, NFC
Pierre-vh Nov 7, 2022
d1f90b6
[NFC] [C++20] [Modules] Rename ASTWriter::isWritingStdCXXNamedModules
ChuanqiXu9 Nov 8, 2022
767999f
[AMDGPU][GlobalISel] Support mad/fma_mix selection
Pierre-vh Sep 28, 2022
9aae3dd
[mlir][llvm] Update insertion point handling in LLVM import.
gysit Nov 8, 2022
b20c31d
Merge remote-tracking branch 'sycl-web' into llvmspirv_pulldown46
Fznamznon Nov 8, 2022
75af1d6
Merge commit '9aae3dd94c881a36998ee8027d3e126ff3becf89' into llvmspir…
Fznamznon Nov 8, 2022
535535b
Implement SPV_INTEL_tensor_float32_conversion extension (#1656)
MrSidims Nov 4, 2022
9e51f5b
Translate readnone attribute as function parameter attribute (#1697)
MrSidims Nov 8, 2022
bdc5988
Use TypedPointerType in more places. (#1683)
jcranmer-intel Nov 8, 2022
634156a
Fix test failures during pulldown by adding -opaque-pointers flag
Fznamznon Nov 8, 2022
3508400
[SYCL] Fix generation of intel_fpga_mem builtin
Fznamznon Nov 8, 2022
d9d8669
Touch yml file to run post commit checks
Fznamznon Nov 8, 2022
2629cbb
[ESIMD] Disable tests that failed due new "readnone" attribute policy
Fznamznon Nov 10, 2022
f4b39a5
Patch bug in 9a45e4bee. Prevent SSA breaks when lifetime intrinsics a…
clin111 Nov 9, 2022
6aeabf8
Revert "Touch yml file to run post commit checks"
Fznamznon Nov 10, 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
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions bolt/include/bolt/Passes/Hugify.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===- bolt/Passes/Hugify.h -------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef BOLT_PASSES_HUGIFY_H
#define BOLT_PASSES_HUGIFY_H

#include "bolt/Passes/BinaryPasses.h"

namespace llvm {
namespace bolt {

class HugePage : public BinaryFunctionPass {
public:
HugePage(const cl::opt<bool> &PrintPass) : BinaryFunctionPass(PrintPass) {}

void runOnFunctions(BinaryContext &BC) override;

const char *getName() const override { return "HugePage"; }
};

} // namespace bolt
} // namespace llvm

#endif
6 changes: 2 additions & 4 deletions bolt/include/bolt/RuntimeLibs/HugifyRuntimeLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ class HugifyRuntimeLibrary : public RuntimeLibrary {
public:
/// Add custom section names generated by the runtime libraries to \p
/// SecNames.
void addRuntimeLibSections(std::vector<std::string> &SecNames) const final {
SecNames.push_back(".bolt.hugify.entries");
}
void addRuntimeLibSections(std::vector<std::string> &SecNames) const final {}

void adjustCommandLineOptions(const BinaryContext &BC) const final;

void emitBinary(BinaryContext &BC, MCStreamer &Streamer) final;
void emitBinary(BinaryContext &BC, MCStreamer &Streamer) final {}

void link(BinaryContext &BC, StringRef ToolPath, RuntimeDyld &RTDyld,
std::function<void(RuntimeDyld &)> OnLoad) final;
Expand Down
1 change: 1 addition & 0 deletions bolt/include/bolt/Utils/CommandLineOpts.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extern llvm::cl::opt<unsigned long long> HeatmapMinAddress;
extern llvm::cl::opt<bool> HotData;
extern llvm::cl::opt<bool> HotFunctionsAtEnd;
extern llvm::cl::opt<bool> HotText;
extern llvm::cl::opt<bool> Hugify;
extern llvm::cl::opt<bool> Instrument;
extern llvm::cl::opt<std::string> OutputFilename;
extern llvm::cl::opt<std::string> PerfData;
Expand Down
6 changes: 4 additions & 2 deletions bolt/lib/Core/BinaryEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,10 +740,12 @@ void BinaryEmitter::emitJumpTables(const BinaryFunction &BF) {

for (auto &JTI : BF.jumpTables()) {
JumpTable &JT = *JTI.second;
// Only emit shared jump tables once, when processing the first parent
if (JT.Parents.size() > 1 && JT.Parents[0] != &BF)
continue;
if (opts::PrintJumpTables)
JT.print(outs());
if ((opts::JumpTables == JTS_BASIC || !BF.isSimple()) &&
BC.HasRelocations) {
if (opts::JumpTables == JTS_BASIC && BC.HasRelocations) {
JT.updateOriginal();
} else {
MCSection *HotSection, *ColdSection;
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Passes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ add_llvm_library(LLVMBOLTPasses
FrameOptimizer.cpp
HFSort.cpp
HFSortPlus.cpp
Hugify.cpp
IdenticalCodeFolding.cpp
IndirectCallPromotion.cpp
Inliner.cpp
Expand Down
50 changes: 50 additions & 0 deletions bolt/lib/Passes/Hugify.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//===--- bolt/Passes/Hugify.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "bolt/Passes/Hugify.h"
#include "llvm/Support/CommandLine.h"

#define DEBUG_TYPE "bolt-hugify"

using namespace llvm;

namespace llvm {
namespace bolt {

void HugePage::runOnFunctions(BinaryContext &BC) {
auto *RtLibrary = BC.getRuntimeLibrary();
if (!RtLibrary || !BC.isELF() || !BC.StartFunctionAddress) {
return;
}

auto createSimpleFunction =
[&](std::string Title, std::vector<MCInst> Instrs) -> BinaryFunction * {
BinaryFunction *Func = BC.createInjectedBinaryFunction(Title);

std::vector<std::unique_ptr<BinaryBasicBlock>> BBs;
BBs.emplace_back(Func->createBasicBlock(nullptr));
BBs.back()->addInstructions(Instrs.begin(), Instrs.end());
BBs.back()->setCFIState(0);
BBs.back()->setOffset(BinaryBasicBlock::INVALID_OFFSET);

Func->insertBasicBlocks(nullptr, std::move(BBs),
/*UpdateLayout=*/true,
/*UpdateCFIState=*/false);
Func->updateState(BinaryFunction::State::CFG_Finalized);
return Func;
};

const BinaryFunction *const Start =
BC.getBinaryFunctionAtAddress(*BC.StartFunctionAddress);
assert(Start && "Entry point function not found");
const MCSymbol *StartSym = Start->getSymbol();
createSimpleFunction("__bolt_hugify_start_program",
BC.MIB->createSymbolTrampoline(StartSym, BC.Ctx.get()));
}
} // namespace bolt
} // namespace llvm
3 changes: 3 additions & 0 deletions bolt/lib/Rewrite/BinaryPassManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "bolt/Passes/AsmDump.h"
#include "bolt/Passes/CMOVConversion.h"
#include "bolt/Passes/FrameOptimizer.h"
#include "bolt/Passes/Hugify.h"
#include "bolt/Passes/IdenticalCodeFolding.h"
#include "bolt/Passes/IndirectCallPromotion.h"
#include "bolt/Passes/Inliner.h"
Expand Down Expand Up @@ -333,6 +334,8 @@ void BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {

if (opts::Instrument)
Manager.registerPass(std::make_unique<Instrumentation>(NeverPrint));
else if (opts::Hugify)
Manager.registerPass(std::make_unique<HugePage>(NeverPrint));

Manager.registerPass(std::make_unique<ShortenInstructions>(NeverPrint));

Expand Down
11 changes: 11 additions & 0 deletions bolt/lib/Rewrite/RewriteInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ Error RewriteInstance::discoverStorage() {
NextAvailableAddress = alignTo(NextAvailableAddress, BC->PageAlign);
NextAvailableOffset = alignTo(NextAvailableOffset, BC->PageAlign);

// Hugify: Additional huge page from left side due to
// weird ASLR mapping addresses (4KB aligned)
if (opts::Hugify && !BC->HasFixedLoadAddress)
NextAvailableAddress += BC->PageAlign;

if (!opts::UseGnuStack) {
// This is where the black magic happens. Creating PHDR table in a segment
// other than that containing ELF header is tricky. Some loaders and/or
Expand Down Expand Up @@ -3719,6 +3724,12 @@ void RewriteInstance::mapCodeSections(RuntimeDyld &RTDyld) {
Address = alignTo(Address, Section->getAlignment());
Section->setOutputAddress(Address);
Address += Section->getOutputSize();

// Hugify: Additional huge page from right side due to
// weird ASLR mapping addresses (4KB aligned)
if (opts::Hugify && !BC->HasFixedLoadAddress &&
Section->getName() == BC->getMainCodeSectionName())
Address = alignTo(Address, Section->getAlignment());
}

// Make sure we allocate enough space for huge pages.
Expand Down
29 changes: 0 additions & 29 deletions bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,35 +60,6 @@ void HugifyRuntimeLibrary::adjustCommandLineOptions(
}
}

void HugifyRuntimeLibrary::emitBinary(BinaryContext &BC, MCStreamer &Streamer) {
const BinaryFunction *StartFunction =
BC.getBinaryFunctionAtAddress(*(BC.StartFunctionAddress));
assert(!StartFunction->isFragment() && "expected main function fragment");
if (!StartFunction) {
errs() << "BOLT-ERROR: failed to locate function at binary start address\n";
exit(1);
}

const auto Flags = BinarySection::getFlags(/*IsReadOnly=*/false,
/*IsText=*/false,
/*IsAllocatable=*/true);
MCSectionELF *Section =
BC.Ctx->getELFSection(".bolt.hugify.entries", ELF::SHT_PROGBITS, Flags);

// __bolt_hugify_init_ptr stores the poiter the hugify library needs to
// jump to after finishing the init code.
MCSymbol *InitPtr = BC.Ctx->getOrCreateSymbol("__bolt_hugify_init_ptr");

Section->setAlignment(llvm::Align(BC.RegularPageSize));
Streamer.switchSection(Section);

Streamer.emitLabel(InitPtr);
Streamer.emitSymbolAttribute(InitPtr, MCSymbolAttr::MCSA_Global);
Streamer.emitValue(
MCSymbolRefExpr::create(StartFunction->getSymbol(), *(BC.Ctx)),
/*Size=*/8);
}

void HugifyRuntimeLibrary::link(BinaryContext &BC, StringRef ToolPath,
RuntimeDyld &RTDyld,
std::function<void(RuntimeDyld &)> OnLoad) {
Expand Down
5 changes: 3 additions & 2 deletions bolt/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ set(BOLT_RT_FLAGS
-fno-exceptions
-fno-rtti
-fno-stack-protector
-mno-sse)
-mno-sse
-fPIE)

# Don't let the compiler think it can create calls to standard libs
target_compile_options(bolt_rt_instr PRIVATE ${BOLT_RT_FLAGS} -fPIE)
target_compile_options(bolt_rt_instr PRIVATE ${BOLT_RT_FLAGS})
target_include_directories(bolt_rt_instr PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_compile_options(bolt_rt_hugify PRIVATE ${BOLT_RT_FLAGS})
target_include_directories(bolt_rt_hugify PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
74 changes: 74 additions & 0 deletions bolt/runtime/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,22 @@ uint32_t strLen(const char *Str) {
return Size;
}

void *strStr(const char *const Haystack, const char *const Needle) {
int j = 0;

for (int i = 0; i < strLen(Haystack); i++) {
if (Haystack[i] == Needle[0]) {
for (j = 1; j < strLen(Needle); j++) {
if (Haystack[i + j] != Needle[j])
break;
}
if (j == strLen(Needle))
return (void *)&Haystack[i];
}
}
return nullptr;
}

void reportNumber(const char *Msg, uint64_t Num, uint32_t Base) {
char Buf[BufSize];
char *Ptr = Buf;
Expand Down Expand Up @@ -310,6 +326,25 @@ unsigned long hexToLong(const char *Str, char Terminator = '\0') {
return Res;
}

/// Starting from character at \p buf, find the longest consecutive sequence
/// of digits (0-9) and convert it to uint32_t. The converted value
/// is put into \p ret. \p end marks the end of the buffer to avoid buffer
/// overflow. The function \returns whether a valid uint32_t value is found.
/// \p buf will be updated to the next character right after the digits.
static bool scanUInt32(const char *&Buf, const char *End, uint32_t &Ret) {
uint64_t Result = 0;
const char *OldBuf = Buf;
while (Buf < End && ((*Buf) >= '0' && (*Buf) <= '9')) {
Result = Result * 10 + (*Buf) - '0';
++Buf;
}
if (OldBuf != Buf && Result <= 0xFFFFFFFFu) {
Ret = static_cast<uint32_t>(Result);
return true;
}
return false;
}

#if !defined(__APPLE__)
// We use a stack-allocated buffer for string manipulation in many pieces of
// this code, including the code that prints each line of the fdata file. This
Expand Down Expand Up @@ -387,6 +422,28 @@ int __madvise(void *addr, size_t length, int advice) {
return ret;
}

#define _UTSNAME_LENGTH 65

struct UtsNameTy {
char sysname[_UTSNAME_LENGTH]; /* Operating system name (e.g., "Linux") */
char nodename[_UTSNAME_LENGTH]; /* Name within "some implementation-defined
network" */
char release[_UTSNAME_LENGTH]; /* Operating system release (e.g., "2.6.28") */
char version[_UTSNAME_LENGTH]; /* Operating system version */
char machine[_UTSNAME_LENGTH]; /* Hardware identifier */
char domainname[_UTSNAME_LENGTH]; /* NIS or YP domain name */
};

int __uname(struct UtsNameTy *Buf) {
int Ret;
__asm__ __volatile__("movq $63, %%rax\n"
"syscall\n"
: "=a"(Ret)
: "D"(Buf)
: "cc", "rcx", "r11", "memory");
return Ret;
}

struct timespec {
uint64_t tv_sec; /* seconds */
uint64_t tv_nsec; /* nanoseconds */
Expand Down Expand Up @@ -482,6 +539,23 @@ int __fsync(int fd) {
return ret;
}

// %rdi %rsi %rdx %r10 %r8
// sys_prctl int option unsigned unsigned unsigned unsigned
// long arg2 long arg3 long arg4 long arg5
int __prctl(int Option, unsigned long Arg2, unsigned long Arg3,
unsigned long Arg4, unsigned long Arg5) {
int Ret;
register long rdx asm("rdx") = Arg3;
register long r8 asm("r8") = Arg5;
register long r10 asm("r10") = Arg4;
__asm__ __volatile__("movq $157, %%rax\n"
"syscall\n"
: "=a"(Ret)
: "D"(Option), "S"(Arg2), "d"(rdx), "r"(r10), "r"(r8)
:);
return Ret;
}

#endif

void reportError(const char *Msg, uint64_t Size) {
Expand Down
Loading