aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-mca
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-12-07 14:54:03 +0000
committerGuillaume Chatelet <gchatelet@google.com>2022-12-07 14:54:03 +0000
commit7203a8614a9b7fe31fc4b0eca457d3595d5556fe (patch)
tree51a3f4d42e065faae77bedacd718558e9dcccfd7 /llvm/tools/llvm-mca
parentb822063669641570ab5edae72956d18a5bcde8c4 (diff)
downloadllvm-7203a8614a9b7fe31fc4b0eca457d3595d5556fe.zip
llvm-7203a8614a9b7fe31fc4b0eca457d3595d5556fe.tar.gz
llvm-7203a8614a9b7fe31fc4b0eca457d3595d5556fe.tar.bz2
[reland][Alignment] Use Align in MCStreamer emitZeroFill/emitLocalCommonSymbol
Before performing this change, I checked that `ByteAlignment` was never `0` inside `MCAsmStreamer:emitZeroFill` and `MCAsmStreamer::emitLocalCommonSymbol`. I believe it is NFC as `0` values are illegal in `emitZeroFill` anyways, `Log2(ByteAlignment)` would be undefined. And currently, all calls to `emitLocalCommonSymbol` are provably `>0`. Differential Revision: https://reviews.llvm.org/D139439
Diffstat (limited to 'llvm/tools/llvm-mca')
-rw-r--r--llvm/tools/llvm-mca/CodeRegionGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/CodeRegionGenerator.cpp b/llvm/tools/llvm-mca/CodeRegionGenerator.cpp
index d643234..b1a2dad 100644
--- a/llvm/tools/llvm-mca/CodeRegionGenerator.cpp
+++ b/llvm/tools/llvm-mca/CodeRegionGenerator.cpp
@@ -50,7 +50,7 @@ public:
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) override {}
void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
- uint64_t Size = 0, unsigned ByteAlignment = 0,
+ uint64_t Size = 0, Align ByteAlignment = Align(1),
SMLoc Loc = SMLoc()) override {}
void emitGPRel32Value(const MCExpr *Value) override {}
void beginCOFFSymbolDef(const MCSymbol *Symbol) override {}