[MemProf] Add option to print function GUIDs during matching (#170946)
For debugging, add -memprof-print-function-guids option that will cause
memprof matching to emit the computed function GUID for every function
definition in the module to stderr. This is helpful because the profile
only contains the function GUID and not the names.
Revert "[IR] Don't store switch case values as operands" (#170962)
Reverts llvm/llvm-project#166842
Breaks Mips LLVM tests, and LLD on bots.
See llvm/llvm-project#166842
[Github][CI] Introduce `LintHelper` class in `code-lint-helper.py` (#168827)
This commit introduces a new `LintHelper` class to
`llvm/utils/git/code-lint-helper.py`, which lays the groundwork for
integrating additional linters (`doc8`) into Github Action workflow.
---------
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
[RISCV][TTI] Add cost model for ROTL/ROTR (#170824)
A funnel shift with the same first two operands is a rotate. When
`Zbb/Zbkb` is enabled we can use the `ROL(W)/ROR(I)(W)` instruction to
represent this. Add cost model support for this.
Similar to https://github.com/llvm/llvm-project/pull/169335 for AArch64.
[Clang][CIR][Doc] Document CIR code duplication plans (#166457)
This adds a document describing known problems with code duplication in
the CIR codegen implementation, strategies to mitigate the risks caused
by that code duplication, and a general long-term plan for minimizing
the problem.
Reland "AMDGPU/PromoteAlloca: Simplify how deferred loads work (#170510)" (#170955)
The second pass of promotion to vector can be quite simple. Reflect that
simplicity in the code for better maintainability.
v2:
- don't put placeholders into the SSAUpdater, and add a test that shows
the problem
[libc] Refactor static polymorphism in WriteBuffer (NFC).
There are three flavors of WriteBuffer currently, all of which
could be passed into printf_core::Writer class. It's a tricky
class, since it chooses a flavor-specific logic either based
on runtime dispatch (to save code size and prevent
generating three versions of the entirety of printf_core),
or based on template arguments (to avoid dealing with
function pointers in codegen for FILL_BUFF_AND_DROP_OVERFLOW path.
Refactor this somewhat convoluted logic to have three
concrete subclasses inheriting from the templated base
class, and use static polymorphism with reinterpret_cast
to implement dispatching above. Now we can actually
have flavor-specific fields, constructors, and methods
(e.g. "flush_to_stream" is now a method of FlushingBuffer),
and the code on the user side is cleaner: the complexity
of enabling/disabling runtime-dispatch and using proper
template arguments is now localized in writer.h.
[4 lines not shown]
Reland "AMDGPU/PromoteAlloca: Always use i32 for indexing (#170511)"
Create more canonical code that may even lead to slightly better
codegen.
commit-id:a3832fee
Reland "AMDGPU/PromoteAlloca: Simplify how deferred loads work (#170510)"
The second pass of promotion to vector can be quite simple. Reflect that
simplicity in the code for better maintainability.
v2:
- don't put placeholders into the SSAUpdater, and add a test that shows
the problem
commit-id:d6d2255a