This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][llvm-exegesis] Add a PowerPC target
ClosedPublic

Authored by jsji on Nov 6 2018, 2:15 PM.

Details

Summary

This is patch to add PowerPC target to llvm-exegesis.
The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes.

Diff Detail

Repository
rL LLVM

Event Timeline

jsji created this revision.Nov 6 2018, 2:15 PM

Thanks for the patch !

llvm/tools/llvm-exegesis/lib/CMakeLists.txt
13 ↗(On Diff #172851)

I think you wrote this against the version before PR39021 and failed to merge the changes in r342865.

llvm/tools/llvm-exegesis/lib/PowerPC/Target.cpp
8 ↗(On Diff #172851)

"The PowerPC ExegesisTarget."

32 ↗(On Diff #172851)

remove the namespace; LLVM style does not put static functions in anonymous namespaces.

33 ↗(On Diff #172851)

getLoadImmediateOpcode

llvm/unittests/tools/llvm-exegesis/PowerPC/AnalysisTest.cpp
1 ↗(On Diff #172851)

This file is missing a header.

llvm/unittests/tools/llvm-exegesis/PowerPC/TargetTest.cpp
1 ↗(On Diff #172851)

ditto

Nice ! Thx for the patch !

llvm/unittests/tools/llvm-exegesis/PowerPC/AnalysisTest.cpp
31 ↗(On Diff #172851)

typo unes

jsji added a comment.Nov 7 2018, 5:53 AM

Thanks for prompt review, I will update the patch to fix the issues.

llvm/tools/llvm-exegesis/lib/CMakeLists.txt
13 ↗(On Diff #172851)

Yes, you are right! I did a quick update before submitting the patch, and apparently I didn't merge all changes correctly. I will have a look at r342865, and update the patch. Thanks.

llvm/tools/llvm-exegesis/lib/PowerPC/Target.cpp
8 ↗(On Diff #172851)

OK

32 ↗(On Diff #172851)

OK

33 ↗(On Diff #172851)

OK

llvm/unittests/tools/llvm-exegesis/PowerPC/AnalysisTest.cpp
1 ↗(On Diff #172851)

I'll have a look, Thanks.

jsji updated this revision to Diff 172943.Nov 7 2018, 6:30 AM
jsji marked 6 inline comments as done.

Addressed the review comments.

jedilyn added a subscriber: jedilyn.Nov 7 2018, 6:04 PM
jedilyn added inline comments.
llvm/tools/llvm-exegesis/lib/PowerPC/Target.cpp
32 ↗(On Diff #172943)

It seems these two static functions are still put in anonymous namespace (line 18 - line 76).

courbet accepted this revision.Nov 7 2018, 11:20 PM

Please address the last comment by jedilyn@.

This revision is now accepted and ready to land.Nov 7 2018, 11:20 PM
jsji updated this revision to Diff 173167.Nov 8 2018, 7:47 AM
jsji marked an inline comment as done.

Address anonymous namespace/static comment.

This revision was automatically updated to reflect the committed changes.