Skip to content

Purge materialize hook. #9

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

Draft
wants to merge 581 commits into
base: inliner-interface
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
581 commits
Select commit Hold shift + click to select a range
dc521b9
[x86][MemFold] Fix anon namespace in header
felipepiovezan Mar 20, 2023
fa326c2
Revert "[clang][ASTImport] Add support for import of empty records"
kpdev Mar 20, 2023
b33437c
Reland "[LSAN][HWASAN] Turn on leak sanitizer in HWASAN for Linux"
kstoimenov Mar 20, 2023
afce10c
[clang][ExtractAPI] Add semicolons for enum, typedef, struct declarat…
chaitanyav Mar 20, 2023
54539fa
[LSR/LFTR] Move two utilities to common code for reuse [nfc]
preames Mar 20, 2023
fc7b860
[mlir][nfc] Fix syntax to conform with the C++20 restrictions on erro…
schweitzpgi Mar 20, 2023
c41c336
[Internalize] Remove interaction with CallGraph
aeubanks Mar 20, 2023
313365a
[Internalize] Don't claim to preserve CallGraph
aeubanks Mar 20, 2023
cd22e7c
[AArch64] Regenerate neon-vcmla.ll tests and add tests for combining …
davemgreen Mar 20, 2023
67089a3
[LSR] Regen tests to adjust for naming in SCEVExpander [nfc]
preames Mar 20, 2023
edc0355
[Libomptarget] Add missing explicit moves on llvm::Error
jhuber6 Mar 20, 2023
ad9f751
[Libomptarget] Add missing explicit moves on llvm::Error
jhuber6 Mar 20, 2023
34f1da3
[RISCV] Make Zfh PseudoQuietFCMP definitions predicated on HasStdExtZfh
asb Mar 20, 2023
dfb40d3
[SimpleLoopUnswitch] Skip non-trivial unswitching of cold loop nests
teresajohnson Mar 19, 2023
4e298c3
[libc] Make string tests compatible with the Fuchsia build
frobtech Mar 18, 2023
e4f62da
[lldb] Sidestep -Wformat warning by using LLDB_LOG instead of LLDB_LOGF
JDevlieghere Mar 20, 2023
cd11f55
[clang][dataflow] Fix indentation in a test
gribozavr Mar 20, 2023
72073fc
[Serialization] Place command line defines in the correct file
john-brawn-arm Feb 21, 2023
b952148
[LSR] Rewrite IV match for term-fold using existing utilities
preames Mar 20, 2023
c47da7f
[lldb] Introduce CMake variable LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS
bulbazord Mar 17, 2023
60b117a
[PowerPC] Adding test coverage for vector compatibility warning
maryammo Feb 23, 2023
6ac632a
[MLIR][Linalg] Generate unique LibraryCallName for LinalgOps.
kaitingwang Mar 20, 2023
5259da7
[AIX][Clang] Respect -r when invoking the linker
SanitizedMemory Mar 13, 2023
fb3f6a9
Revert "[clangd] Fix AddUsing in the face of typo-correction"
kadircet Mar 20, 2023
427136d
[SLP][NFC]Add a test with missed buildvector node, matching the
alexey-bataev Mar 20, 2023
0c0468e
[InstCombine] Add test for issue fixed by 50fe87a5c8597e.
fhahn Mar 20, 2023
d1e00b6
[clang][deps] Only cache files with specific extension
jansvoboda11 Mar 17, 2023
6bd4d71
[libc] Add environment variables to GPU libc test for AMDGPU
jhuber6 Mar 17, 2023
41e9c4b
[NFC][Outliner] Delete default ctors for Candidate & OutlinedFunction.
aemerson Mar 19, 2023
272ebd6
[LSR] Inline getAlternateIVEnd and simplify [nfc]
preames Mar 20, 2023
92416b6
[ADT] Work around `enumerate` compilation error with modules enabled
kuhar Mar 20, 2023
2d373e4
[MLIR][OpenMP] Added OMPIRBuilder support for Target Data directives
TIFitis Mar 17, 2023
57bfe25
[clangd] Remove reundant use of getSpellingLoc()
HighCommander4 Mar 19, 2023
5452d86
[llvm-readobj] Pretty-print IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY.
efriedma-quic Mar 20, 2023
59ff9d3
[SLP]Fix PR61554: use of missing vectorized value in buildvector nodes.
alexey-bataev Mar 20, 2023
f67b481
[Flang] Exit gracefully with a useful message when we fail to lookup …
UsmanNadeem Mar 20, 2023
82ac02e
Add scalar support for amdgpu.raw_buffer_{load,store}
giuseros Mar 20, 2023
da40f7e
[PowerPC][NFC] Pre-commit a test case for upcoming patch
nemanjai Mar 20, 2023
eecb8c5
[SampleProfile] Use LazyCallGraph instead of CallGraph
aeubanks Mar 20, 2023
091422a
[LSR] Fix wrapping bug in lsr-term-fold logic
preames Mar 20, 2023
3af1c48
Changes to `SCFFuseProducerOfSliceResult` to also return the operatio…
Mar 20, 2023
fb1b994
[JITLink][ELF][AArch64] Add support for ELF R_AARCH64_ABS32 relocation.
lhames Mar 20, 2023
c21e88c
[mlir][Tensor] Avoid dropping attributes for `tensor.pad` operations …
Mar 20, 2023
c71fe7c
[mlir][openMP] Add bazel deps
anlunx Mar 20, 2023
d3d6a5f
[NFC] Rename ArgSize to SpellingSize, and add ArgStringSize.
mu5tafazade Mar 20, 2023
38fc680
Replace strlen with StringRef::size
mu5tafazade Mar 20, 2023
d0e507f
[mlir][Tensor] Fix build error due to missing `<>` in D146440.
Mar 20, 2023
411b1d8
[mlir][Tensor] Make `TilingInterface` implementation only return hand…
Mar 20, 2023
d03805f
[mlir][sparse] add merger/topo sort support for slice-based affine sp…
Jan 19, 2023
6ee4ea8
[PowerPC][NFC] Test needs to include constant pool values
nemanjai Mar 20, 2023
919a3f1
Add declaration for `__tsan_default_options` to tsan_interface.h
Mar 20, 2023
f2c3a9c
[libc][obvious] fix missing memory_check_utils
michaelrj-google Mar 20, 2023
99047c0
[libc][bazel] add targets for sprintf
michaelrj-google Mar 14, 2023
1187d8a
[libunwind][Modules] Add unwind_arm_ehabi.h and unwind_itanium.h to t…
ian-twilightcoder Jan 31, 2023
b333f33
[SPIR-V] Add Machine Value Type for SPIR-V builtins
michalpaszkowski Mar 20, 2023
8d024a7
Fix a problem with "watchpoint triggers before" watchpoint handling.
jimingham Mar 20, 2023
1328bb6
[mlir][sparse] extend loop emitter and optimize lattices with the awa…
Jan 20, 2023
f05ac80
Re-apply "[JITLink][ELF] Don't skip debug info sections by default."
lhames Mar 20, 2023
ff48a29
modify dir of dep in OpenMPCommon
yijia1212 Mar 20, 2023
ee23250
[lldb] Move UnixSignals creation into Platform plugins
bulbazord Mar 16, 2023
3378912
[NFC][tsan] Add include guards
vitalybuka Mar 20, 2023
e520800
[NFC] Include tsan_interface.h in tests
vitalybuka Mar 20, 2023
9b655c2
Revert "Fix a problem with "watchpoint triggers before" watchpoint ha…
jimingham Mar 20, 2023
2c7abc8
Reapply 8d024a79ea783ed3fbb5691aeaf186ad3f0a4ae9 w/o the extra bits.
jimingham Mar 20, 2023
1f58ae8
[mlir][sparse] Making `TensorExp::Kind` a nested enum-class
wrengr Mar 20, 2023
3b97321
[NFC][tsan] Clang-format includes
vitalybuka Mar 20, 2023
402dd79
sanitizer_common: Use plain thread_local for __sancov_lowest_stack de…
pcc Mar 18, 2023
805ec19
[IRSim] Check largest sections first when analyzing similarity
AndrewLitteken Oct 2, 2022
c600b99
Expose `__tsan_on_thread_idle` as part of tsan shared interface
Mar 20, 2023
46b5087
[libc] add basic wide char functions
michaelrj-google Mar 13, 2023
75c8abc
Revert "[IRSim] Check largest sections first when analyzing similarity"
AndrewLitteken Mar 20, 2023
1bd8e87
Disable __sancov_lowest_stack on Windows.
pcc Mar 20, 2023
07cdf4a
[libc][obvious] fix missing type headers
michaelrj-google Mar 20, 2023
c1e4a0d
Follow on to 2c7abc83f605b2d3b1062f28422eeff81278ecd5.
jimingham Mar 20, 2023
72455b3
[mlir][sparse] Fixing -Wunused-variable in Sparsification.cpp
wrengr Mar 20, 2023
b6f7e59
[gn build] Port ee232506b870
llvmgnsyncbot Mar 20, 2023
6a0f2e5
[-Wunsafe-buffer-usage] Add Fixable for dereference of simple ptr ari…
ziqingluo-90 Mar 20, 2023
e4c1dfe
[X86] Create extra prolog/epilog for stack realignment
LuoYuanke Mar 9, 2023
1a79b25
[gn build] Port e4c1dfed3837
llvmgnsyncbot Mar 21, 2023
23ea2c4
[libc][obvious] remove currently unused types
michaelrj-google Mar 21, 2023
89359df
[support] Support printing floats in ScopedPrinter
ilovepi Mar 18, 2023
0d3f7d2
[llvm-readobj] Provide Hash Histogram for all ELFDumper implementations
ilovepi Mar 18, 2023
3d9e646
[libc][obvious] fix missing stdio dependency
michaelrj-google Mar 21, 2023
9e2b164
[libc] temporarily disable wctob entrypoint
michaelrj-google Mar 21, 2023
1952945
[Attributor][NFC] Reduce output verbosity
jdoerfert Mar 7, 2023
d14ea2f
[Attributor][NFC] Precommit test exposing a bug
jdoerfert Mar 20, 2023
0fc63d4
[Attributor][FIX] Ensure loop PHI replacements are dynamically unique
jdoerfert Mar 20, 2023
b89558a
[OpenMP][FIX] Properly track and lookup Execution Domains
jdoerfert Mar 7, 2023
8f47fd0
[OpenMPOpt][FIX] Avoid removing barriers in callees
jdoerfert Mar 20, 2023
c0f3a3d
[Attributor][FIX] Avoid H2S on GPUs if the pointer can be shared
jdoerfert Mar 21, 2023
4c483a0
[AIX] Consolidate Crt0Basename logic
SanitizedMemory Mar 20, 2023
64d96ec
Fix Windows export list.
pcc Mar 21, 2023
8894fe7
[docs] Update the status for coroutines
ChuanqiXu9 Mar 16, 2023
064e249
[llvm-readobj] Fix ambiguous call of printNumber in ELFDumper.cpp (NFC)
DamonFool Mar 21, 2023
00c4343
[llvm-jitlink] Fix typo in description of llvm-jitlink's -alias option.
lhames Mar 21, 2023
4fa9dc9
[AVR] Fix incorrect expansion of the pseudo 'ELPMBRdZ' instruction
benshi001 Jan 8, 2023
d9661d7
[Webassembly][multivalue] update libcall signature when multivalue fe…
HerrCai0907 Mar 21, 2023
71d97df
[MLIR][Affine] Fix addInductionVarOrTerminalSymbol
bondhugula Mar 21, 2023
ff937a8
[Webassembly][NFC] Fix typo in comment
HerrCai0907 Mar 21, 2023
37f3e53
[RISCV] Simplify RISCVISAInfo::compareExtension. NFCI
topperc Mar 21, 2023
aead502
[Attributor] Add convergent abstract attribute
ishaangandhi Mar 21, 2023
614c63b
[X86] Create extra prolog/epilog for stack realignment [part 2]
LuoYuanke Mar 21, 2023
35c2aac
Revert "Revert "[clangd] Fix AddUsing in the face of typo-correction""
kadircet Mar 20, 2023
772658a
[InstCombine][NFC] Precommit test case of PR61137
Mar 3, 2023
029ec03
[clangd][NFC] Format & include cleanup for AddUsingTests.cpp
kadircet Mar 21, 2023
bd5d0a2
Reformat
chapuni Mar 21, 2023
f675ec6
TableGen: Make 2nd arg `MainFn` of `TableGenMain(argv0, MainFn)` opti…
chapuni Mar 21, 2023
4178ef4
TableGen: Introduce `llvm::TableGen::Emitter` to register backends
chapuni Feb 16, 2023
f35064d
llvm-tblgen: Move decl of `EmitDecoder()`to TableGenBackends.h
chapuni Feb 20, 2023
a7e2b74
llvm-tblgen: Cleanup for each EmitterClass to be invoked by uniform s…
chapuni Feb 18, 2023
9c93e72
llvm-tblgen: Rewrite emitters to use `TableGen::Emitter`
chapuni Feb 19, 2023
6beb371
[InstCombine] Combine binary operator of two phi node
Mar 3, 2023
3e79dfa
[Bazel] Fixup for D144351, Add `alwayslink` to `//llvm:tblgen`
chapuni Mar 21, 2023
6fc670e
[WebAssembly] Add auto-upgrade for renamed intrinsics
nikic Mar 20, 2023
db8c0b2
[X86][MemFold] Stop emitting Header for X86 fold tables
yubingex007-a11y Mar 21, 2023
d9b3a94
[NFC] Change strcpy to std::copy
mu5tafazade Mar 21, 2023
8325d46
[MergeFuncs] Compare load instruction metadata
dingxiangfei2009 Mar 21, 2023
658595d
[flang] Handle polymorphic entities with rank > 0 in entry statement
clementval Mar 21, 2023
9f48562
[Test] Add test on freezing of widenable condition
xortator Mar 21, 2023
d0de2c5
[InstCombine] Simplify foldOperationIntoSelectOperand() (NFCI)
nikic Mar 21, 2023
85bc498
[LLDB] Show sub type of signals when debugging a core file
DavidSpickett Mar 14, 2023
ee928e3
[NFC] Add iterator traits to BitVector set_bits_iterator
OCHyams Mar 21, 2023
d5b2c8e
[Assignment Tracking][NFC] Use BitVectors as masks for SmallVectors
OCHyams Mar 21, 2023
9437bf4
[mlir][Linalg][Transform] Fix effect on RewriteInDestinationPassingSt…
nicolasvasilache Mar 21, 2023
e8ec42b
[InstCombine] Fold icmp eq of non-inbounds gep with base pointer
nikic Mar 21, 2023
3cfb081
[InstCombine] Add icmp gep tests without inbounds (NFC)
nikic Mar 21, 2023
090205f
[lldb] Fix TestStepOverWatchpoint
labath Mar 21, 2023
5d17ae2
[Assignment Tracking] Downgrade dbg.assigns to dbg.values in mem2reg
OCHyams Mar 21, 2023
289542b
[InstCombine] Fold icmp eq of non-inbounds geps
nikic Mar 21, 2023
54ab954
[BOLT] Reject symbols pointing to section end
mtvec Mar 21, 2023
25ca26e
[AMDGPU] Make use of GCNSubtarget::hasNSAEncoding. NFC.
jayfoad Mar 21, 2023
c270aaf
Mark widenable condition as noundef
xortator Mar 21, 2023
0165b73
[lldb] Relax expectation on TestMainThreadExit
labath Mar 21, 2023
3a8f161
[mlir] Add a pattern to fold single- and zero-iteration scf.forall ops.
pifon2a Mar 21, 2023
af99aa0
[LV] Set imbounds flag using CreateGEP in VPWidenMemInst (NFC).
fhahn Mar 21, 2023
c8af0d3
[lldb] Add compile time checks for signal codes when on the matching …
DavidSpickett Mar 16, 2023
3e2d4e8
Revert "[X86] Create extra prolog/epilog for stack realignment [part 2]"
LuoYuanke Mar 21, 2023
35130e4
[AArch64] Add tests for bitcast to and mask reduction (NFC)
nikic Mar 21, 2023
8f072bb
[MLIR] Fix warnings in AttrTypeSubElements.h
bondhugula Mar 21, 2023
da8260a
Revert "[X86] Create extra prolog/epilog for stack realignment"
LuoYuanke Mar 21, 2023
64276ee
[clang][NFC] Fix typo in comment
mu5tafazade Mar 21, 2023
cdccea8
[gn build] Port da8260a9b111
llvmgnsyncbot Mar 21, 2023
0e9523e
[mlir] Support lowering of dialect attributes attached to top-level m…
skatrak Mar 13, 2023
a6a788b
[DAG] foldBinOpIntoSelect - use FoldConstantArithmetic instead of get…
RKSimon Mar 21, 2023
282cae0
[Sema] Fix crash on __fp16 parameters in template instantiations
ilya-biryukov Mar 21, 2023
20294bf
[mlir][Transform] NFC - Add more advanced debug spew to help hunt dow…
nicolasvasilache Mar 21, 2023
8022ff5
[X86] Add verify-machineinstrs checks to baseptr tests
RKSimon Mar 21, 2023
382eb7c
[mlir] Add alloca address space handling to the data layout subsystem
jsjodin Mar 20, 2023
155abd0
[PowerPC] Emit warn_deprecated_lax_vec_conv_all warning only for PPC
maryammo Mar 7, 2023
16b192f
[mlir][Bazel] Adjust BUILD files to 0e9523efda8a4ad95ecb1d5b5e65e10bc…
akuegel Mar 21, 2023
dc9d2e5
[mlir] Add missing registrations to runners.
akuegel Mar 21, 2023
88e5206
Reland [clang][ASTImport] Add support for import of empty records
kpdev Mar 21, 2023
392d9eb
[lldb] For native compiles, check signal numbers are correct when add…
DavidSpickett Mar 17, 2023
042783f
[LFTR] Assert and simplify under assumption exit counts are integers …
preames Mar 21, 2023
83dc473
Fix -fsplit-lto-unit with ifuncs
DanielKristofKiss Mar 21, 2023
270a6a2
No longer issue pedantic warning about pre-c++2b compat
AaronBallman Mar 21, 2023
fb409a2
[mlir] Transform dialect: add named sequences
ftynse Mar 20, 2023
fd004a4
[mlir] tosa.concat - Add InferTensorType interface
Mar 9, 2023
faa1043
[flang] Carry over dynamic type information when creating an unlimite…
clementval Mar 21, 2023
b7af34c
[LSR] Add a test case for (another) miscompile in lsr-term-fold
preames Mar 21, 2023
b33f5e7
[LSR] Use evaluateAtIteration in lsr-term-fold
preames Mar 21, 2023
514e435
inline stmt attribute diagnosing in templates
Mar 17, 2023
b430743
[ModuleUtils] Handle globals_ctors/dtors with non-literal type (PR56809)
nikic Mar 21, 2023
53e9a5d
[LSR] Fix "new use of poison" problem in lsr-term-fold
preames Mar 21, 2023
68685a7
Revert "[GuardWidening] Improve analysis of potential widening into h…
xortator Mar 21, 2023
e73dd62
[lldb] Fix a 32 bit warning in ScriptedProcessInterface
DavidSpickett Mar 15, 2023
01d05bd
Add warning test to make buildbots happy after 514e4359
Mar 21, 2023
e7c1b4b
[SystemZ] Fix modelling of composed subreg indices.
perlfu Mar 21, 2023
9125996
Support retrieving the splat value from DenseElementsAttrs in Python
apaszke Mar 21, 2023
67852bf
Fix switch warning from 514e4359a
Mar 21, 2023
e69f8ba
[RISCV][NFC] Add test case for SLP reduction vectorization failure
lukel97 Mar 21, 2023
082ec26
[IRSim] Check largest sections first when analyzing similarity
AndrewLitteken Mar 21, 2023
586ad89
[AMDGPU][NFC] Update GFX11 test checks
mbrkusanin Mar 21, 2023
4277d93
[LV] Use speculatability within entire loop to avoid strided load pre…
annamthomas Mar 8, 2023
9baaf4f
Revert "[IRSim] Check largest sections first when analyzing similarity"
AndrewLitteken Mar 21, 2023
ec2a726
[Webassembly][multivalue] update libcall signature for f128 when mult…
HerrCai0907 Mar 21, 2023
511ddfe
[test] Split up new-pm-thinlto-defaults.ll into prelink and postlink …
aeubanks Mar 21, 2023
e9df5d6
[LSR] Remove a couple stale comments in lsr-term-fold
preames Mar 21, 2023
00fdd2c
[LSR] Don't crash on non-branch terminator in -lsr-term-fold
preames Mar 21, 2023
fb855eb
[libc++] Qualifies size_t.
mordante Mar 14, 2023
24caf01
[IndVarSimplify] Remove duplicate call to getSCEV. NFC
topperc Mar 21, 2023
b904e68
No longer issue static lambda pedantic warning for pre-c++2b compat
AaronBallman Mar 21, 2023
2981832
[ADT] Add `llvm::range_size` function for generic ranges
kuhar Mar 21, 2023
006230e
[test] Remove redundant check prefix from new-pm-thinlto-prelink-pgo-…
aeubanks Mar 21, 2023
75fdf7f
[lldb] Test direct ivar access in objc++ (NFC)
kastiglione Mar 17, 2023
651b405
[DAG] visitABS - use FoldConstantArithmetic to perform constant folding.
RKSimon Mar 21, 2023
c819257
[llvm][support] Fix ScopedPrinterTest on AIX
ilovepi Mar 21, 2023
3854963
Recommit [lldb] Change dwim-print to default to disabled persistent r…
kastiglione Mar 8, 2023
2b34d59
[test] Change DAG to NEXT in pipeline tests
aeubanks Mar 21, 2023
2356bf2
[lldb][CMake] Enforce not letting lldbUtility link against any other …
bulbazord Mar 20, 2023
fa6ea7a
[AlwaysInliner] Make legacy pass like the new pass
aeubanks Mar 20, 2023
32baf5c
[lldb][expr] Propagate ClangDynamicCheckerFunctions::Install() errors…
weliveindetail Mar 21, 2023
83542e4
[libc++][spaceship] Implement `operator<=>` for `duration`
Zingam Mar 18, 2023
a37df84
[SelectionDAG][RISCV] Remove code for handling too small shift type f…
topperc Mar 21, 2023
2bd4130
Update checks in advance of an update to D68233.
kpneal Mar 21, 2023
22b5fe7
[llvm-libtool-darwin] Fix test when libfile.a exists
smeenai Mar 21, 2023
852cfc2
[NFC] Fix incorrect comment for simplifyRightShift
aeubanks Mar 21, 2023
ae484c2
[TSAN][Darwin] Forward declare spinlock functions on darwin for TSAN …
thetruestblue Mar 21, 2023
ee7b6fd
[flang] Set proper source location for the main function.
vzakhari Mar 17, 2023
e240e6b
[IRSim] Check largest sections first when analyzing similarity
AndrewLitteken Mar 21, 2023
cef71d0
[memprof] Support symbolization of PIE binaries.
snehasish Mar 11, 2023
a2c63d7
[mlir][sparse][gpu] end-to-end test for 2:4 sparsity on NVidia GPUs
aartbik Mar 18, 2023
08b0977
[mlir][tosa] Add check if the operand of the operations is constant.
tatwaichong Mar 21, 2023
51c8c1e
Fix dep error for transform dialect in bazel
yijia1212 Mar 21, 2023
abe0362
[RISCV] Remove 'rs1' field from RVInst16 class. NFC
topperc Mar 21, 2023
c327f99
[lldb] Refactor deduction of the instance variable's name (NFC)
kastiglione Mar 17, 2023
c5f6339
Add missing dependency for TransformDialect
anlunx Mar 21, 2023
2aa90da
[CUDA] Update cached kernel handle when the function instance changes.
Artem-B Mar 20, 2023
a09283a
[NFC][tsan] Add __tsan_default_{options,suppressions} into interface …
vitalybuka Mar 21, 2023
696fdec
[WebAssembly] Fix i64_i64_func_i64_i64_i32 type signature when multiv…
HerrCai0907 Mar 21, 2023
087b5f3
[RISCV] Improve validation of opcode for .insn.
topperc Mar 21, 2023
13e9afd
[mlir][sparse] Adding new `Merger::addLat` overload
wrengr Mar 21, 2023
5499b02
[lldb][CMake] Enforce not linking against plugin libs in core libs
bulbazord Mar 21, 2023
e8ad2a0
[amdgpu][nfc] Comment and extract two functions in LowerModuleLDS
JonChesterfield Mar 21, 2023
2b21327
[mlir][sparse] fix crash when using pure constant index in indexing m…
Mar 21, 2023
b9c4b95
[llvm] Use ConstantInt::{isZero,isOne} (NFC)
kazutakahirata Mar 22, 2023
d70e7ea
[amdgpu][nfc] Extract more functions in LowerModuleLDS, mark more met…
JonChesterfield Mar 22, 2023
c49e56a
[SCEV] Add coverage for a missing flag inference case
preames Mar 22, 2023
78e6818
[amdgpu][nfc] clang-format AMDGPULowerModuleLDS for easier merging
JonChesterfield Mar 22, 2023
8e43c22
[RISCV] Use LBU for extloadi8.
topperc Mar 22, 2023
ebcc6db
[libc] Don't install the GPU startup code for now
jhuber6 Mar 22, 2023
de9edf4
[OpenMP] Avoid zero size copies to the device
jdoerfert Mar 21, 2023
0153ab6
[OpenMP] Remove restriction on the thread count for parallel regions
jdoerfert Mar 22, 2023
f2c3859
[OpenMP] Remove shadow pointer map and introduce consistent locking
jdoerfert Mar 21, 2023
a124b4c
[LFTR] Simplify another case under assumption exit counts are integer…
preames Mar 22, 2023
206dc54
[LFTR] Use evaluateAtIteration in genLoopLimit [nfc]
preames Mar 22, 2023
06006f4
[LFTR] Minor style cleanup [nfc]
preames Mar 22, 2023
4dc0455
[AIX][r] Do not call AddFilePathLibArgs with -r
SanitizedMemory Mar 21, 2023
b50c685
[RISCV] Move fli selection in RISCVISelDAGToDAG.cpp. NFC
topperc Mar 22, 2023
2023cc2
[RISCV] Clear mayRaiseFPException for Zfa fmvh.x.d and fmvp.d.x instr…
topperc Mar 22, 2023
c176edc
[RISCV] Clear mayRaiseFPException for fclass.d instruction.
topperc Mar 22, 2023
55dd04f
update dependency for TransformOpsPyTdFiles
yijia1212 Mar 22, 2023
f64dc9b
[PowerPC][NFC] add const-nonsplat-array-init.ll
Mar 22, 2023
43f5085
[Coroutines] Fix premature conversion of return object
bcardosolopes Mar 7, 2023
fa0d4e1
[Coroutines] Implement fix for cwg2563 issue and enable RVO under cer…
bcardosolopes Mar 9, 2023
0d37efd
[clang][driver] Enable '-flto' on AVR
benshi001 Mar 9, 2023
829446c
[mlir][memref] Use folded composed affine apply ops in FoldMemRefAlia…
nicolasvasilache Mar 20, 2023
792bb70
[MCContext] Use `const Twine &` in symbol creation methods. NFC
Mar 22, 2023
823ddba
[flang] Feature list plugin
EthanLuisMcDonough Mar 2, 2023
1fe6a8a
[X86] Use llvm::isOneConstant (NFC)
kazutakahirata Mar 22, 2023
e603285
[Test] Add hanging test for D146276
xortator Mar 22, 2023
9bb96fd
[llvm] Use llvm::isNullConstant (NFC)
kazutakahirata Mar 22, 2023
558b46f
[analyzer] Fix crashing getSValFromInitListExpr for nested initlists
steakhal Mar 22, 2023
9c16eef
[mlir][IR] Add ReverseDominanceIterator for IR walkers
matthias-springer Mar 22, 2023
f809eb4
[mlir] Argument and result attribute handling during inlining.
gysit Mar 22, 2023
7b83a14
[GuardWidening] Improve analysis of potential widening into hotter bl…
xortator Mar 22, 2023
57c128e
[mlir][Bazel] Add missing dependency.
akuegel Mar 22, 2023
9297b9f
[mlir][Transforms][NFC] Improve builder/listener API of OperationFolder
matthias-springer Mar 22, 2023
56d94a9
[mlir][llvm] Add experimental alias scope decl intrinsic.
gysit Mar 22, 2023
ed8c062
[mlir] Replace the materializeCallConversion inlining hook.
gysit Mar 9, 2023
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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/llvm-bugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
jobs:
auto-subscribe:
runs-on: ubuntu-latest
if: github.repository == 'llvm/llvm-project'
steps:
- uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions bolt/include/bolt/Core/BinarySection.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ class BinarySection {
bool isTBSS() const { return isBSS() && isTLS(); }
bool isVirtual() const { return ELFType == ELF::SHT_NOBITS; }
bool isRela() const { return ELFType == ELF::SHT_RELA; }
bool isRelr() const { return ELFType == ELF::SHT_RELR; }
bool isWritable() const { return (ELFFlags & ELF::SHF_WRITE); }
bool isAllocatable() const {
if (isELF()) {
Expand Down
3 changes: 3 additions & 0 deletions bolt/include/bolt/Core/Relocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ struct Relocation {
/// Return code for a ABS 8-byte relocation
static uint64_t getAbs64();

/// Return code for a RELATIVE relocation
static uint64_t getRelative();

/// Return true if this relocation is PC-relative. Return false otherwise.
bool isPCRelative() const { return isPCRelative(Type); }

Expand Down
11 changes: 11 additions & 0 deletions bolt/include/bolt/Rewrite/RewriteInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ class RewriteInstance {
/// Read relocations from a given section.
void readDynamicRelocations(const object::SectionRef &Section, bool IsJmpRel);

/// Read relocations from a given RELR section.
void readDynamicRelrRelocations(BinarySection &Section);

/// Print relocation information.
void printRelocationInfo(const RelocationRef &Rel, StringRef SymbolName,
uint64_t SymbolAddress, uint64_t Addend,
Expand Down Expand Up @@ -312,6 +315,9 @@ class RewriteInstance {
/// Patch allocatable relocation sections.
ELF_FUNCTION(void, patchELFAllocatableRelaSections);

/// Patch allocatable relr section.
ELF_FUNCTION(void, patchELFAllocatableRelrSection);

/// Finalize memory image of section header string table.
ELF_FUNCTION(void, finalizeSectionStringTable);

Expand Down Expand Up @@ -486,6 +492,11 @@ class RewriteInstance {
uint64_t DynamicRelocationsSize{0};
uint64_t DynamicRelativeRelocationsCount{0};

// Location and size of .relr.dyn relocations.
std::optional<uint64_t> DynamicRelrAddress;
uint64_t DynamicRelrSize{0};
uint64_t DynamicRelrEntrySize{0};

/// PLT relocations are special kind of dynamic relocations stored separately.
std::optional<uint64_t> PLTRelocationsAddress;
uint64_t PLTRelocationsSize{0};
Expand Down
6 changes: 6 additions & 0 deletions bolt/lib/Core/Relocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,12 @@ uint64_t Relocation::getAbs64() {
return ELF::R_X86_64_64;
}

uint64_t Relocation::getRelative() {
if (Arch == Triple::aarch64)
return ELF::R_AARCH64_RELATIVE;
return ELF::R_X86_64_RELATIVE;
}

size_t Relocation::emit(MCStreamer *Streamer) const {
const size_t Size = getSizeForType(Type);
MCContext &Ctx = Streamer->getContext();
Expand Down
203 changes: 201 additions & 2 deletions bolt/lib/Rewrite/RewriteInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,16 @@ void RewriteInstance::discoverFileObjects() {
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: considering symbol " << UniqueName
<< " for function\n");

if (Address == Section->getAddress() + Section->getSize()) {
assert(SymbolSize == 0 &&
"unexpect non-zero sized symbol at end of section");
LLVM_DEBUG(
dbgs()
<< "BOLT-DEBUG: rejecting as symbol points to end of its section\n");
registerName(SymbolSize);
continue;
}

if (!Section->isText()) {
assert(SymbolType != SymbolRef::ST_Function &&
"unexpected function inside non-code section");
Expand Down Expand Up @@ -2074,6 +2084,19 @@ bool RewriteInstance::analyzeRelocation(
}

void RewriteInstance::processDynamicRelocations() {
// Read .relr.dyn section containing compressed R_*_RELATIVE relocations.
if (DynamicRelrSize > 0) {
ErrorOr<BinarySection &> DynamicRelrSectionOrErr =
BC->getSectionForAddress(*DynamicRelrAddress);
if (!DynamicRelrSectionOrErr)
report_error("unable to find section corresponding to DT_RELR",
DynamicRelrSectionOrErr.getError());
if (DynamicRelrSectionOrErr->getSize() != DynamicRelrSize)
report_error("section size mismatch for DT_RELRSZ",
errc::executable_format_error);
readDynamicRelrRelocations(*DynamicRelrSectionOrErr);
}

// Read relocations for PLT - DT_JMPREL.
if (PLTRelocationsSize > 0) {
ErrorOr<BinarySection &> PLTRelSectionOrErr =
Expand Down Expand Up @@ -2372,6 +2395,60 @@ void RewriteInstance::readDynamicRelocations(const SectionRef &Section,
}
}

void RewriteInstance::readDynamicRelrRelocations(BinarySection &Section) {
assert(Section.isAllocatable() && "allocatable expected");

LLVM_DEBUG({
StringRef SectionName = Section.getName();
dbgs() << "BOLT-DEBUG: reading relocations in section " << SectionName
<< ":\n";
});

const uint64_t RType = Relocation::getRelative();
const uint8_t PSize = BC->AsmInfo->getCodePointerSize();
const uint64_t MaxDelta = ((CHAR_BIT * DynamicRelrEntrySize) - 1) * PSize;

auto ExtractAddendValue = [&](uint64_t Address) -> uint64_t {
ErrorOr<BinarySection &> Section = BC->getSectionForAddress(Address);
assert(Section && "cannot get section for data address from RELR");
DataExtractor DE = DataExtractor(Section->getContents(),
BC->AsmInfo->isLittleEndian(), PSize);
uint64_t Offset = Address - Section->getAddress();
return DE.getUnsigned(&Offset, PSize);
};

auto AddRelocation = [&](uint64_t Address) {
uint64_t Addend = ExtractAddendValue(Address);
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: R_*_RELATIVE relocation at 0x"
<< Twine::utohexstr(Address) << " to 0x"
<< Twine::utohexstr(Addend) << '\n';);
BC->addDynamicRelocation(Address, nullptr, RType, Addend);
};

DataExtractor DE = DataExtractor(Section.getContents(),
BC->AsmInfo->isLittleEndian(), PSize);
uint64_t Offset = 0, Address = 0;
uint64_t RelrCount = DynamicRelrSize / DynamicRelrEntrySize;
while (RelrCount--) {
assert(DE.isValidOffset(Offset));
uint64_t Entry = DE.getUnsigned(&Offset, DynamicRelrEntrySize);
if ((Entry & 1) == 0) {
AddRelocation(Entry);
Address = Entry + PSize;
} else {
const uint64_t StartAddress = Address;
while (Entry >>= 1) {
if (Entry & 1)
AddRelocation(Address);

Address += PSize;
}

Address = StartAddress + MaxDelta;
}
}
}

void RewriteInstance::printRelocationInfo(const RelocationRef &Rel,
StringRef SymbolName,
uint64_t SymbolAddress,
Expand Down Expand Up @@ -5203,6 +5280,101 @@ void RewriteInstance::patchELFSymTabs(ELFObjectFile<ELFT> *File) {
ELF::SHT_STRTAB);
}

template <typename ELFT>
void RewriteInstance::patchELFAllocatableRelrSection(
ELFObjectFile<ELFT> *File) {
if (!DynamicRelrAddress)
return;

raw_fd_ostream &OS = Out->os();
const uint8_t PSize = BC->AsmInfo->getCodePointerSize();
const uint64_t MaxDelta = ((CHAR_BIT * DynamicRelrEntrySize) - 1) * PSize;

auto FixAddend = [&](const BinarySection &Section, const Relocation &Rel) {
// Fix relocation symbol value in place if no static relocation found
// on the same address
if (Section.getRelocationAt(Rel.Offset))
return;

// No fixup needed if symbol address was not changed
const uint64_t Addend = getNewFunctionOrDataAddress(Rel.Addend);
if (!Addend)
return;

uint64_t FileOffset = Section.getOutputFileOffset();
if (!FileOffset)
FileOffset = Section.getInputFileOffset();

FileOffset += Rel.Offset;
OS.pwrite(reinterpret_cast<const char *>(&Addend), PSize, FileOffset);
};

// Fill new relative relocation offsets set
std::set<uint64_t> RelOffsets;
for (const BinarySection &Section : BC->allocatableSections()) {
const uint64_t SectionInputAddress = Section.getAddress();
uint64_t SectionAddress = Section.getOutputAddress();
if (!SectionAddress)
SectionAddress = SectionInputAddress;

for (const Relocation &Rel : Section.dynamicRelocations()) {
if (!Rel.isRelative())
continue;

uint64_t RelOffset =
getNewFunctionOrDataAddress(SectionInputAddress + Rel.Offset);

RelOffset = RelOffset == 0 ? SectionAddress + Rel.Offset : RelOffset;
assert((RelOffset & 1) == 0 && "Wrong relocation offset");
RelOffsets.emplace(RelOffset);
FixAddend(Section, Rel);
}
}

ErrorOr<BinarySection &> Section =
BC->getSectionForAddress(*DynamicRelrAddress);
assert(Section && "cannot get .relr.dyn section");
assert(Section->isRelr() && "Expected section to be SHT_RELR type");
uint64_t RelrDynOffset = Section->getInputFileOffset();
const uint64_t RelrDynEndOffset = RelrDynOffset + Section->getSize();

auto WriteRelr = [&](uint64_t Value) {
if (RelrDynOffset + DynamicRelrEntrySize > RelrDynEndOffset) {
errs() << "BOLT-ERROR: Offset overflow for relr.dyn section\n";
exit(1);
}

OS.pwrite(reinterpret_cast<const char *>(&Value), DynamicRelrEntrySize,
RelrDynOffset);
RelrDynOffset += DynamicRelrEntrySize;
};

for (auto RelIt = RelOffsets.begin(); RelIt != RelOffsets.end();) {
WriteRelr(*RelIt);
uint64_t Base = *RelIt++ + PSize;
while (1) {
uint64_t Bitmap = 0;
for (; RelIt != RelOffsets.end(); ++RelIt) {
const uint64_t Delta = *RelIt - Base;
if (Delta >= MaxDelta || Delta % PSize)
break;

Bitmap |= (1ULL << (Delta / PSize));
}

if (!Bitmap)
break;

WriteRelr((Bitmap << 1) | 1);
Base += MaxDelta;
}
}

// Fill the rest of the section with empty bitmap value
while (RelrDynOffset != RelrDynEndOffset)
WriteRelr(1);
}

template <typename ELFT>
void
RewriteInstance::patchELFAllocatableRelaSections(ELFObjectFile<ELFT> *File) {
Expand Down Expand Up @@ -5294,8 +5466,11 @@ RewriteInstance::patchELFAllocatableRelaSections(ELFObjectFile<ELFT> *File) {
}
};

// The dynamic linker expects R_*_RELATIVE relocations to be emitted first
writeRelocations(/* PatchRelative */ true);
// Place R_*_RELATIVE relocations in RELA section if RELR is not presented.
// The dynamic linker expects all R_*_RELATIVE relocations in RELA
// to be emitted first.
if (!DynamicRelrAddress)
writeRelocations(/* PatchRelative */ true);
writeRelocations(/* PatchRelative */ false);

auto fillNone = [&](uint64_t &Offset, uint64_t EndOffset) {
Expand Down Expand Up @@ -5501,6 +5676,15 @@ Error RewriteInstance::readELFDynamic(ELFObjectFile<ELFT> *File) {
case ELF::DT_RELACOUNT:
DynamicRelativeRelocationsCount = Dyn.getVal();
break;
case ELF::DT_RELR:
DynamicRelrAddress = Dyn.getPtr();
break;
case ELF::DT_RELRSZ:
DynamicRelrSize = Dyn.getVal();
break;
case ELF::DT_RELRENT:
DynamicRelrEntrySize = Dyn.getVal();
break;
}
}

Expand All @@ -5513,6 +5697,20 @@ Error RewriteInstance::readELFDynamic(ELFObjectFile<ELFT> *File) {
PLTRelocationsAddress.reset();
PLTRelocationsSize = 0;
}

if (!DynamicRelrAddress || !DynamicRelrSize) {
DynamicRelrAddress.reset();
DynamicRelrSize = 0;
} else if (!DynamicRelrEntrySize) {
errs() << "BOLT-ERROR: expected DT_RELRENT to be presented "
<< "in DYNAMIC section\n";
exit(1);
} else if (DynamicRelrSize % DynamicRelrEntrySize) {
errs() << "BOLT-ERROR: expected RELR table size to be divisible "
<< "by RELR entry size\n";
exit(1);
}

return Error::success();
}

Expand Down Expand Up @@ -5724,6 +5922,7 @@ void RewriteInstance::rewriteFile() {

if (BC->HasRelocations) {
patchELFAllocatableRelaSections();
patchELFAllocatableRelrSection();
patchELFGOT();
}

Expand Down
31 changes: 28 additions & 3 deletions bolt/test/AArch64/constant_island_pie_update.s
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
// This test checks that the constant island value is updated if it
// has dynamic relocation.
// This test checks that the constant island offset and value is updated if
// it has dynamic relocation. The tests checks both .rela.dyn and relr.dyn
// dynamic relocations.
// Also check that we don't duplicate CI if it has dynamic relocations.

# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
// .rela.dyn
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.rela.exe -nostdlib \
# RUN: -Wl,-q -Wl,-z,notext
# RUN: llvm-bolt %t.rela.exe -o %t.rela.bolt --use-old-text=0 --lite=0
# RUN: llvm-objdump -j .text -d %t.rela.bolt | FileCheck %s
# RUN: llvm-readelf -rsW %t.rela.bolt | FileCheck --check-prefix=ELFCHECK %s
// .relr.dyn
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.relr.exe -nostdlib \
# RUN: -Wl,-q -Wl,-z,notext -Wl,--pack-dyn-relocs=relr
# RUN: llvm-bolt %t.relr.exe -o %t.relr.bolt --use-old-text=0 --lite=0
# RUN: llvm-objdump -j .text -d %t.relr.bolt | FileCheck %s
# RUN: llvm-readelf -rsW %t.relr.bolt | FileCheck --check-prefix=ELFCHECK %s
# RUN: llvm-readelf -SW %t.relr.bolt | FileCheck --check-prefix=RELRSZCHECK %s

// Check that the CI value was updated
# CHECK: [[#%x,ADDR:]] <exitLocal>:
# CHECK: {{.*}} <$d>:
# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
# CHECK-NEXT: {{.*}} .word 0x00000000
# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
# CHECK-NEXT: {{.*}} .word 0x00000000
# CHECK-NEXT: {{.*}} .word 0x00000000
# CHECK-NEXT: {{.*}} .word 0x00000000
# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
# CHECK-NEXT: {{.*}} .word 0x00000000


// Check that we've relaxed adr to adrp + add to refer external CI
# CHECK: <addressDynCi>:
# CHECK-NEXT: adrp
# CHECK-NEXT: add

// Check that relocation offset was updated
// Check that relocation offsets were updated
# ELFCHECK: [[#%x,OFF:]] [[#%x,INFO_DYN:]] R_AARCH64_RELATIVE
# ELFCHECK-NEXT: [[#OFF + 8]] {{0*}}[[#INFO_DYN]] R_AARCH64_RELATIVE
# ELFCHECK-NEXT: [[#OFF + 24]] {{0*}}[[#INFO_DYN]] R_AARCH64_RELATIVE
# ELFCHECK: {{.*}}[[#OFF]] {{.*}} $d

// Check that .relr.dyn size is 2 bytes to ensure that last 2 relocations were
// encoded as a bitmap so the total section size for 3 relocations is 2 bytes.
# RELRSZCHECK: .relr.dyn RELR [[#%x,ADDR:]] [[#%x,OFF:]] {{0*}}10

.text
.align 4
.local exitLocal
Expand All @@ -47,6 +69,9 @@ _start:
bl exitLocal
nop
.Lci:
.xword exitLocal
.xword exitLocal
.xword 0
.xword exitLocal
.size _start, .-_start

Expand Down
Loading