-
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
Add compiler options needed by openXL #7447
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for supporting the project, and congratulations on your first contribution! A project committer will shortly review your contribution. In the mean time, if you haven't had a chance please skim over the contribution guidelines which all pull requests must adhere to. If the ECA pull request check fails, have a look at the instructions for signing the ECA in the legal considerations section.
If you run into any problems our community will be happy to assist you in any way we can. There are a number of recommended ways to interact with the community. We encourage you to ask questions, or drop by to say hello.
please provide a proper description of what you are trying to do in this PR |
as for compiler-id, could you make it consistent with Z side (they are switching to OpenXL too, on Z of course)? also, Clang 17.x.x is ambiguous: that 17 refers to OpenXL17, or refers to community Clang version 17? Detecting OpenXL as XLClang ... this is ambiguous too: we are currently using both xlC and xlclang (i.e. xlC16's xlclang front-end) already. I am not sure if it eventually worked out with this ambiguity, i prefer to staying away from the ambiguity. At least, provide abundant comments for future readers to understand it. |
af90606
to
0dcc9e4
Compare
Commit for openXL as Xclang is redundant it's an old change that we don't need anymore so I have removed it. |
b6a07f9
to
61ddfd5
Compare
1e8f62e
to
dfa188b
Compare
compiler/compile/OSRData.cpp
Outdated
@@ -1515,7 +1515,7 @@ bool TR_OSRCompilationData::TR_ScratchBufferInfo::operator==(const TR_ScratchBuf | |||
|
|||
#if (defined(TR_HOST_POWER) && defined(TR_TARGET_POWER) \ | |||
|| defined(TR_HOST_S390) && defined(TR_TARGET_S390)) \ | |||
&& defined(__IBMCPP__) | |||
&& (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as raised in the other PR, is defined(__cplusplus)
definitely needed here (and more places below)? isn't it automatically defined for c++ files to begin with?
@@ -144,7 +144,7 @@ typedef struct TR_InlinedCallSite | |||
#include <builtins.h> | |||
#endif /* __cplusplus */ | |||
#define FLUSH_MEMORY(smp) if( smp ) __lwsync(); | |||
#elif defined(LINUX) | |||
#elif defined(LINUX) || defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks out of place ... shouldn't it be defined in the same clause for AIX? strongly recommend to do that just for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it looks out of place, but the else part is supposed to be for power not sure why there is a check for LINUX in that. But as the definition used for smp is same for open_xl and LINUX macro I didn't put it under another if checking.
compiler/infra/Annotations.hpp
Outdated
@@ -64,7 +64,7 @@ | |||
#define OMR_NORETURN _declspec(noreturn) | |||
#elif defined(__GNUC__) | |||
#define OMR_NORETURN __attribute__ ((noreturn)) | |||
#elif defined(__IBMCPP__) | |||
#elif defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -22,7 +22,7 @@ | |||
#include "runtime/OMRRuntimeAssumptions.hpp" | |||
#include "env/jittypes.h" | |||
|
|||
#if defined(__IBMCPP__) && !defined(AIXPPC) && !defined(LINUXPPC) | |||
#if (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) && !defined(AIXPPC) && !defined(LINUXPPC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto re c++
compiler/runtime/Runtime.cpp
Outdated
@@ -23,7 +23,7 @@ | |||
|
|||
TR_RuntimeHelperTable runtimeHelpers; | |||
|
|||
#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(LINUXPPC64) | |||
#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(LINUXPPC64) || defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other comment re MVS applies here too. && and ||
are used in an unreadable way ... did you really take their precedences into accounts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the MVS issue is not introduced by the changes of this PR I will address this in future creating a new PR.
configure
Outdated
CC="$ac_save_CC $ac_arg" | ||
if ac_fn_c_try_compile "$LINENO"; then : | ||
ac_cv_prog_cc_c89=$ac_arg | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent properly to align with if
include_core/AtomicSupport.hpp
Outdated
#elif defined(__xlC__) /* defined(__GNUC__) */ | ||
#if ((__xlC__ > 0x0d01) || ((__xlC__ == 0x0d01) && (__xlC_ver__ >= 0x00000300))) /* XLC >= 13.1.3 */ | ||
#elif (defined(__xlC__)) /* defined(__GNUC__) */ | ||
#if ((__xlC__ > 0x0d01) || ((__xlC__ == 0x0d01) && (__xlC_ver__ >= 0x00000300))) /* XLC >= 13.1.3 OR OpenXL */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a better way to do the same thing? instead of these cryptic numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of code is not modified to support openxl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is commented explicitly there: /* XLC >= 13.1.3 OR OpenXL */ i took it to mean OpenXL build taking true condition on that line?
include_core/omrcomp.h
Outdated
@@ -237,7 +237,7 @@ typedef double SYS_FLOAT; | |||
* xlC11 C++ compiler reportedly supports attributes before function names, but we've only tested xlC12. | |||
* The C compiler doesn't support it. | |||
*/ | |||
#if defined(__cplusplus) && (__xlC__ >= 0xc00) | |||
#if defined(__cplusplus) && (__xlC__ >= 0xc00) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this relevant to and applies to openxl case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. There was some space added by mistake. will remove it.
Trc_PRT_signal_omrsignal_sig_protect_Exit_long_jumped_back_to_omrsig_protect(fn, fn_arg, handler, handler_arg, flags); | ||
return OMRPORT_SIG_EXCEPTION_OCCURRED; | ||
} | ||
#if !defined(__open_xl__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block of code isn't needed for OpenXL build anymore? does it still work as xlC build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it should not be omitted for openxl. Right now it's just an work around.
Signed-off-by: midronij <[email protected]>
Signed-off-by: Ishita Ray <[email protected]>
This macro will specify if openXL17 clang is used. Signed-off-by: Ishita Ray <[email protected]>
Signed-off-by: midronij <[email protected]>
Signed-off-by: Ishita Ray <[email protected]>
Remove __cplusplus macros that are used along with __open_xl__ macros. Signed-off-by: Ishita Ray <[email protected]>
No description provided.