Skip to content

Commit a512c96

Browse files
committed
Rename Input/OutputAddr to Offset in BAT.md
Created using spr 1.3.4
2 parents cd7c0be + 8f8832f commit a512c96

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

bolt/docs/BAT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Delta encoding means that only the difference with the previous corresponding
9292
entry is encoded. Input offsets implicitly start at zero.
9393
| Entry | Encoding | Description |
9494
| ------ | ------| ----------- |
95-
| `OutputAddr` | Continuous, Delta, ULEB128 | Function offset in output binary |
96-
| `InputAddr` | Optional, Delta, SLEB128 | Function offset in input binary with `BRANCHENTRY` LSB bit |
95+
| `OutputOffset` | Continuous, Delta, ULEB128 | Function offset in output binary |
96+
| `InputOffset` | Optional, Delta, SLEB128 | Function offset in input binary with `BRANCHENTRY` LSB bit |
9797
| `BBHash` | Optional, 8b | Basic block entries only: basic block hash in input binary |
9898

9999
`BRANCHENTRY` bit denotes whether a given offset pair is a control flow source

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2178,7 +2178,7 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) {
21782178

21792179
TestLexer Lexer(Allocator, Buffers, Style);
21802180
AdditionalKeywords Keywords(Lexer.IdentTable);
2181-
auto Annotate = [&Lexer, &Style](llvm::StringRef Code) {
2181+
auto Annotate = [&Lexer](llvm::StringRef Code) {
21822182
return Lexer.annotate(Code);
21832183
};
21842184

flang/runtime/extensions.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ void FORTRAN_PROCEDURE_NAME(getlog)(std::byte *arg, std::int64_t length) {
108108
if (nameMaxLen == -1)
109109
nameMaxLen = _POSIX_LOGIN_NAME_MAX + 1;
110110
#endif
111-
char str[nameMaxLen];
111+
std::vector<char> str(nameMaxLen);
112112

113-
int error{getlogin_r(str, nameMaxLen)};
113+
int error{getlogin_r(str.data(), nameMaxLen)};
114114
if (error == 0) {
115115
// no error: find first \0 in string then pad from there
116-
CopyAndPad(reinterpret_cast<char *>(arg), str, length, std::strlen(str));
116+
CopyAndPad(reinterpret_cast<char *>(arg), str.data(), length,
117+
std::strlen(str.data()));
117118
} else {
118119
// error occur: get username from environment variable
119120
GetUsernameEnvVar("LOGNAME", arg, length);

flang/unittests/Runtime/CommandTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,10 +699,10 @@ TEST_F(EnvironmentVariables, GetlogPadSpace) {
699699
if (charLen == -1)
700700
charLen = _POSIX_LOGIN_NAME_MAX + 2;
701701
#endif
702-
char input[charLen];
702+
std::vector<char> input(charLen);
703703

704704
FORTRAN_PROCEDURE_NAME(getlog)
705-
(reinterpret_cast<std::byte *>(input), charLen);
705+
(reinterpret_cast<std::byte *>(input.data()), charLen);
706706

707707
EXPECT_EQ(input[charLen - 1], ' ');
708708
}

mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,10 +3151,9 @@ void TransposeOp::getAsmResultNames(
31513151
/// Build a strided memref type by applying `permutationMap` to `memRefType`.
31523152
static MemRefType inferTransposeResultType(MemRefType memRefType,
31533153
AffineMap permutationMap) {
3154-
auto rank = memRefType.getRank();
31553154
auto originalSizes = memRefType.getShape();
31563155
auto [originalStrides, offset] = getStridesAndOffset(memRefType);
3157-
assert(originalStrides.size() == static_cast<unsigned>(rank));
3156+
assert(originalStrides.size() == static_cast<unsigned>(memRefType.getRank()));
31583157

31593158
// Compute permuted sizes and strides.
31603159
auto sizes = applyPermutationMap<int64_t>(permutationMap, originalSizes);

0 commit comments

Comments
 (0)