[MC,CodeGen] Update .prefalign for symbol-based preferred alignment (#184032)
https://discourse.llvm.org/t/rfc-enhancing-function-alignment-attributes/88019/17
The recently-introduced .prefalign only worked when each function was in
its own section (-ffunction-sections), because the section size gave the
function body size needed for the alignment rule.
This led to -ffunction-sections and -fno-function-sections AsmPrinter
differences (#155529), which is rather unusual.
This patch fixes this AsmPrinter difference by extending .prefalign to
accept an end symbol and a required fill operand:
.prefalign <log2_align>, <end_sym>, nop
.prefalign <log2_align>, <end_sym>, <fill_byte>
The first operand is a log2 alignment value (e.g. 4 means 16-byte
alignment). The body size (end_sym_offset - start_offset) determines the
alignment:
[19 lines not shown]
[MC] Remove MCTargetOptions parameter from MCContext constructor (#191596)
Now that MCAsmInfo stores the MCTargetOptions pointer (set by
TargetRegistry::createMCAsmInfo #180464), MCContext can retrieve it via
MCAsmInfo. Remove the redundant MCTargetOptions parameter from the
MCContext constructor and update all callers.
[clang-tidy] Fix FP in bugprone-exception-escape with unevaluated exception specs (#190593)
Functions whose exception spec has not yet been evaluated have no body
in the AST. Because the compiler does not generate call sites for these
functions before evaluating their spec, they cannot propagate
exceptions.
Closes https://github.com/llvm/llvm-project/issues/188730
Revert "[lld][AMDGPU] Support R_AMDGPU_ABS32_(LO|HI) relocations" (#191591)
Reverts llvm/llvm-project#191550
Merged without understanding getImplicitAddend and test convention, and
less than 4 hours after a colleague rubber stamping with "I am not ELF
or linker expert but to me looks good."
[lld][AMDGPU] Support R_AMDGPU_ABS32_(LO|HI) relocations (#191550)
Summary:
These relocations are extremely rare, but they are listed as an expected
relocation in https://llvm.org/docs/AMDGPUUsage.html#relocation-records
and you can theoretically make them happen so we should probably support
it in the linker.
Changed stat passes to count instructions before and after optimizations (#188837)
Created this for instcount and func-properties-analysis to be able to
see the change the optimization pipelines have on stats
[clang-doc] Use distinct APIs for fixed arena allocation sites
Typically, code either always emits data into the TransientArena or the
PersistentArena. Use more explicit APIs to convey the intent directly
instead of relying on parameters or defaults.
[clang-doc] Removed OwnedPtr alias
The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory of these pointers is generally interned inside
a local arena.
[clang-doc] Update type aliases
Many of the type aliases we introduced to simplify migration to arena
allocation are no longer relevant after completing the migration. We
can use more relevant names and remove dead aliases.
[flang] Detect non-optional boxes inside acc.compute_region. (#191328)
This should be a temporary change until we figure out
a better way for representing definitely present boxes.
It allows me to experiment with flang-licm further,
so I would like to ask for approval.
[flang][CUF] Limit Flang LICM for operations with symbol operands. (#191494)
There is probably an ordering issue between `CUFDeviceGlobal`
and `OffloadLiveInValueCanonicalization` passes: Flang LICM hoists
`fir.address_of` out of `cuf.kernel`, it is pulled back by
`OffloadLiveInValueCanonicalization`, but the symbol is never added
into the device module because `CUFDeviceGlobal` does not run after.
Changing the passes order may take some time, so this is a temporary
workaround to unblock #191309.
The change is currently NFC.