Skip to content

Commit f31d0cf

Browse files
committed
Merge branch 'amd-staging' into amd/dev/rlieberm/eliminate-flang-new
2 parents ed00432 + 9c23605 commit f31d0cf

File tree

1,163 files changed

+105477
-58206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,163 files changed

+105477
-58206
lines changed

.ci/compute_projects.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def _get_modified_projects(modified_files: list[str]) -> Set[str]:
200200
# documentation builds.
201201
if len(path_parts) > 2 and path_parts[1] == "docs":
202202
continue
203+
# Exclude files for the gn build. We do not test it within premerge
204+
# and changes occur often enough that they otherwise take up
205+
# capacity.
206+
if len(path_parts) > 3 and path_parts[:3] == ("llvm", "utils", "gn"):
207+
continue
203208
modified_projects.add(pathlib.Path(modified_file).parts[0])
204209
return modified_projects
205210

.ci/compute_projects_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ def test_exclude_docs(self):
179179
self.assertEqual(env_variables["runtimes_to_build"], "")
180180
self.assertEqual(env_variables["runtimes_check_targets"], "")
181181

182+
def test_exclude_gn(self):
183+
env_variables = compute_projects.get_env_variables(
184+
["llvm/utils/gn/build/BUILD.gn"], "Linux"
185+
)
186+
self.assertEqual(env_variables["projects_to_build"], "")
187+
self.assertEqual(env_variables["project_check_targets"], "")
188+
self.assertEqual(env_variables["runtimes_to_build"], "")
189+
self.assertEqual(env_variables["runtimes_check_targets"], "")
190+
182191

183192
if __name__ == "__main__":
184193
unittest.main()

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- name: Install abi-compliance-checker
105105
run: |
106106
sudo apt-get update
107-
sudo apt-get install abi-dumper autoconf pkg-config
107+
sudo apt-get install -y abi-dumper autoconf pkg-config
108108
- name: Install universal-ctags
109109
run: |
110110
git clone https://github.com/universal-ctags/ctags.git
@@ -157,7 +157,7 @@ jobs:
157157
- name: Install abi-compliance-checker
158158
run: |
159159
sudo apt-get update
160-
sudo apt-get install abi-compliance-checker
160+
sudo apt-get install -y abi-compliance-checker
161161
- name: Compare ABI
162162
run: |
163163
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do

.github/workflows/llvm-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Install abi-compliance-checker
9393
run: |
9494
sudo apt-get update
95-
sudo apt-get install abi-dumper autoconf pkg-config
95+
sudo apt-get -y install abi-dumper autoconf pkg-config
9696
- name: Install universal-ctags
9797
run: |
9898
git clone https://github.com/universal-ctags/ctags.git
@@ -166,7 +166,7 @@ jobs:
166166
- name: Install abi-compliance-checker
167167
run: |
168168
sudo apt-get update
169-
sudo apt-get install abi-compliance-checker
169+
sudo apt-get -y install abi-compliance-checker
170170
- name: Compare ABI
171171
run: |
172172
if [ -s symbol-list/llvm.symbols ]; then

amd/device-libs/ocml/src/tgammaF.cl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ MATH_MANGLE(tgamma)(float x)
4242
ret = x > 0x1.18521ep+5f ? PINF_F32 : ret;
4343
} else {
4444
float s = MATH_MANGLE(sinpi)(x);
45-
float p = s*x*t2*t1*t1;
46-
ret = MATH_DIV(-sqrtpiby2*d, MATH_MAD(p, pt, p));
47-
ret = x < -42.0f ? 0.0f : ret;
45+
if (x > -30.0f) {
46+
float p = s*x*t2*t1*t1;
47+
ret = MATH_DIV(-sqrtpiby2*d, MATH_MAD(p, pt, p));
48+
} else if (x > -41.0f) {
49+
float t3 = t2*t1;
50+
float p1 = MATH_MAD(t3, pt, t3);
51+
float p2 = s*x*t1;
52+
ret = MATH_DIV(MATH_DIV(-sqrtpiby2*d, p1), p2);
53+
} else
54+
ret = 0.0f;
4855
ret = BUILTIN_FRACTION_F32(x) == 0.0f ? QNAN_F32 : ret;
4956
}
5057
} else {

amd/hipcc/src/hipBin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ void HipBin::executeHipConfig(int argc, char* argv[]) {
150150
break;
151151
case check: platformPtrs.at(j)->checkHipconfig();
152152
break;
153-
case newline: platformPtrs.at(j)->printFull();
154-
cout << endl;
153+
case newline: cout << endl;
155154
break;
156155
default:
157156
platformPtrs.at(j)->printUsage();

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,11 @@ class MCPlusBuilder {
12661266

12671267
/// Return MCSymbol extracted from the expression.
12681268
virtual const MCSymbol *getTargetSymbol(const MCExpr *Expr) const {
1269-
if (auto *SymbolRefExpr = dyn_cast<const MCSymbolRefExpr>(Expr))
1269+
if (auto *BinaryExpr = dyn_cast<const MCBinaryExpr>(Expr))
1270+
return getTargetSymbol(BinaryExpr->getLHS());
1271+
1272+
auto *SymbolRefExpr = dyn_cast<const MCSymbolRefExpr>(Expr);
1273+
if (SymbolRefExpr && SymbolRefExpr->getKind() == MCSymbolRefExpr::VK_None)
12701274
return &SymbolRefExpr->getSymbol();
12711275

12721276
return nullptr;

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,11 @@ void BinaryFunction::handleIndirectBranch(MCInst &Instruction, uint64_t Size,
12191219
case IndirectBranchType::UNKNOWN:
12201220
// Keep processing. We'll do more checks and fixes in
12211221
// postProcessIndirectBranches().
1222+
if (opts::Verbosity > 2) {
1223+
outs() << "BOLT-WARNING: failed to match indirect branch, "
1224+
<< getPrintName() << " at 0x" << Twine::utohexstr(Offset)
1225+
<< " offset\n";
1226+
}
12221227
UnknownIndirectBranchOffsets.emplace(Offset);
12231228
break;
12241229
}

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -862,20 +862,12 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
862862
if (AArchExpr && AArchExpr->getSubExpr())
863863
return getTargetSymbol(AArchExpr->getSubExpr());
864864

865-
auto *BinExpr = dyn_cast<MCBinaryExpr>(Expr);
866-
if (BinExpr)
867-
return getTargetSymbol(BinExpr->getLHS());
868-
869-
auto *SymExpr = dyn_cast<MCSymbolRefExpr>(Expr);
870-
if (SymExpr && SymExpr->getKind() == MCSymbolRefExpr::VK_None)
871-
return &SymExpr->getSymbol();
872-
873-
return nullptr;
865+
return MCPlusBuilder::getTargetSymbol(Expr);
874866
}
875867

876868
const MCSymbol *getTargetSymbol(const MCInst &Inst,
877869
unsigned OpNum = 0) const override {
878-
if (!getSymbolRefOperandNum(Inst, OpNum))
870+
if (!OpNum && !getSymbolRefOperandNum(Inst, OpNum))
879871
return nullptr;
880872

881873
const MCOperand &Op = Inst.getOperand(OpNum);

bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,7 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
338338
if (RISCVExpr && RISCVExpr->getSubExpr())
339339
return getTargetSymbol(RISCVExpr->getSubExpr());
340340

341-
auto *BinExpr = dyn_cast<MCBinaryExpr>(Expr);
342-
if (BinExpr)
343-
return getTargetSymbol(BinExpr->getLHS());
344-
345-
auto *SymExpr = dyn_cast<MCSymbolRefExpr>(Expr);
346-
if (SymExpr && SymExpr->getKind() == MCSymbolRefExpr::VK_None)
347-
return &SymExpr->getSymbol();
348-
349-
return nullptr;
341+
return MCPlusBuilder::getTargetSymbol(Expr);
350342
}
351343

352344
const MCSymbol *getTargetSymbol(const MCInst &Inst,

0 commit comments

Comments
 (0)