-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override CPU::detect() on Z and X86 #4837
Conversation
8a84df3
to
68cf4da
Compare
5be9981
to
4f79aa4
Compare
4f79aa4
to
ee1f73a
Compare
IMO these post initializations should be in a separate member function and not in the constructor nor in the My reasonings:
@fjeremic need your opinions/suggestions on this. |
Why is that? One of the benefits of extensible classes is that everything interfaces through |
Could you show an example of how that works? I only know how to extend member functions with the extensible classes. |
OMRCodeGenerator is an extensible class which has a static method [1] https://github.com/eclipse/omr/blob/f955e91fb663683ad0b71cf47e3fc0dcc0871694/compiler/codegen/OMRCodeGenerator.hpp#L496-L503 |
I think what you are suggesting is making namespace OMR
{
namespace Z
{
class CPU : public OMR::CPU
{
public:
static TR::CPU detect(OMRPortLibrary * const omrPortLib); TR::CPU is the concrete class the detect method is returning, and since it's not a pointer, we need to know its definition, which means we need to do #include "env/OMRCPU.hpp"
namespace TR
{
class CPU : public OMR::CPUConnector
{
public:
CPU() : OMR::CPUConnector() {}
};
}
#endif and over here we can see that |
That's right. Wouldn't it work in the same way it does for the current use in #4744? We forward declare the type: |
Okay cool. I failed to realize forward declaration still works in this scenario. No more confusions now. |
ee1f73a
to
5582de6
Compare
b8725e1
to
7823eec
Compare
05656db
to
479d385
Compare
74d423b
to
0ab979c
Compare
bd1103a
to
40042e6
Compare
Depends on #4900 |
40042e6
to
a3dfcd1
Compare
@genie-omr build all |
a3dfcd1
to
5e25a96
Compare
Corrected a missing '&' in |
@genie-omr build all |
On Z, modifications to the processor description are needed due to command line options and other factors. On X, unused features are masked out (may come in handy for processor compatibility checks) Issue: eclipse-omr#4339 Signed-off-by: Harry Yu <harryyu1994@gmail.com>
5e25a96
to
607bb5f
Compare
Build failed due to yet another typo :(. I'm going to wait till it passes ci before requesting for another review this time. |
@genie-omr build all |
Looks to me that all tests passed ("100% tests passed, 0 tests failed out of 27") and it was a test infrastructure failure ("Remote call on omr_ci_1 failed").
|
@genie-omr build aix |
On Z, modifications to the processor description are needed
due to command line options and other factors. On X, unused
features are masked out (may come in handy for processor
compatibility tests)
Issue: #4339
Signed-off-by: Harry Yu harryyu1994@gmail.com