[BOLT] Don't fold hot text mover functions in ICF (#180367)
Hot text mover functions are placed in special sections (e.g.,
.never_hugify) to avoid being placed on hot/huge pages. Folding them
with functions from other sections could defeat this purpose.
Add a check in ICF's isIdenticalWith() to prevent folding when either
function is a hot text mover.
[AMDGPU] Fix instruction size for 64-bit literal constant operands
PR #156602 changed the condition for using 64-bit literal encoding, but it
didn't update the instruction size calculation. This caused a size mismatch
between the `MachineInstr` and the `MCInst`.
[PowerPC] Use MCAssembler::getEmitter instead of getEmitterPtr. NFC
PPCELFStreamer and PPCXCOFFStreamer are MCObjectStreamer subclasses
where the emitter is guaranteed non-null. Use getEmitter() instead of
getEmitterPtr(). getEmitterPtr is reserved for MCAsmStreamer users.
MC: Move generateCompactUnwindEncodings to MCObjectStreamer. NFC (#180381)
... removing the need to pass MCAsmBackend as a parameter.
This allows MCStreamer.cpp to not include MCAsmBackend.h.
[libclang/python] Type-annotate SourceLocation and SourceRange (#180193)
This adds type annotations to the `SourceLocation` and `SourceRange`
classes, enough to pass a strict typecheck. This resolves 29 strict
typing errors as the next step towards
https://github.com/llvm/llvm-project/issues/76664
[Polly] Update isl to isl-0.27-78-gfc484e00 (#180377)
Update isl to include
https://repo.or.cz/isl.git/commit/fc484e004200964f8f18249de1f510393ec924a9
which fixes #180000.
The isl update also fixes #34710 which had the same cause but with an
empty access domain (#180000 has an empty statement domain). Thus we
also revert 163cacb46960be4dd0d8562737bbf0ea97cb14ad which now only adds
unnecessary overhead.
A regression test has been added to isl which is why we do not add a
test in Polly.
Fixes: #180000
Thanks @skimo-openhub for the fix and @thapgua for the bugreport.
[AMDGPU][SIInsertWaitcnts][NFC] Make a few WaitcntBracket member functions private (#180018)
The user of the WaitcntBrackets class shouldn't need to know about how
the scoreboard has been implemented internally. So I think it is best to
provide a higher level API that hides things like scoreUB, scoreLB and
score ranges.
This patch makes getScoreUB(), getScoreLB() and getScoreRange() private
and introduces new functions that don't expose the internal
implementation:
- getOutstanding(T)
- hasPendingVMEM(VMEMID, T)
- empty(T)
I also noticed that getSGPRScore() and getVMemScore() are not used
externally so these are now private.
[VPlan] Compute predicated load/store costs in VPlan. (NFC) (#179129)
Update VPReplicateReicpe::computeCost to compute predicated load/store
costs directly, unless the pointer is uniform. In that case, the legacy
cost model uses a different logic, which will be migrated separately.
PR: https://github.com/llvm/llvm-project/pull/179129
[clang-format][doc] Add GNU style link in KeepFormFeed option (#176654)
It was not clear from the description what this option does.
Added small example to demostrate its behavior.
[DSE] Handle variable offsets with sized dead_on_return (#180364)
With a sized dead_on_return, we need to not eliminate stores if there
are to a pointer with a variable offset from the underlying object
marked dead_on_return. This manifested as an assertion failure as
BaseValue/V ended up not being equal. It's possible we could do a range
analysis to try and prove the variable offset stays within bounds, but
this case seems to come up relatively rarely (only reproducible with a
UBSan build of LLVM) and is probably not worth the compile time.
Fixes #180361.
[ProfCheck] Add PreISelIntrinsicLoweringTest to XFail
Introduced in 191af6c254a83c9eb72df92a5db534d8fd4f0701. Should not be a
complicated fix, but move to the xfail list for now so the bot gets back
to green while we work on fixing.
[AMDGPU][GlobalISel] Add lowering for G_FMODF (#180152)
Add generic expansion for G_FMODF matching the SelectionDAG
implementation.
Enable G_FMODF lowering for AMDGPU with tests.
Related: #179434
[clang][NFC] Replace includes of "Attrs.inc" with "Attr.h" (#180356)
"clang/AST/Attrs.inc" is not a self-contained header and is not intended
to be included directly. Instead, "clang/AST/Attr.h" is the header that
users need.
[lld][ELF] Remove redundant size check in nopInstrFill
We checked twice of size is equal to zero. This is not necessary and
makes the code a little bit less readable.
Reviewers: MaskRay, tmsri
Pull Request: https://github.com/llvm/llvm-project/pull/180304
[InferAddressSpaces] Initialize op(generic const, generic const, ...) -> generic (#172143)
Fixes #171890
If the pointer operands of an instruction are all constants with generic
AS, we always infer the AS of the instruction as uninitialized finally.
And the rewrite process will skip cloning the instruction, producing
invalid IR.
This patch fixes it by inferring the AS of this kind of instruction as
flat. Maybe we can fold the operator with all constants to get better
performance, but I think this case is rare in the real world.
[HIP][Sema] Fix incorrect CK_NoOp for lvalue-to-rvalue conversion in … (#180314)
…builtin args
The HIP implicit address space cast for builtin pointer arguments used
CK_NoOp to convert lvalue args to rvalues.
This caused an assertion failure in LifetimeSafety analysis:
Assertion `Dst->getLength() == Src->getLength()` failed
in FactsGenerator::flow() in some cases.
Use DefaultLvalueConversion which correctly emits CK_LValueToRValue.