Apply constexpr on global constant varaibles

When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef


[ROCm/clr commit: fdef6f722f]
Cette révision appartient à :
Tao Sang
2020-07-14 20:10:24 -04:00
révisé par Tao Sang
Parent 11f8a869f1
révision 44eb207f8d
62 fichiers modifiés avec 224 ajouts et 227 suppressions
+1 -1
Voir le fichier
@@ -170,7 +170,7 @@ bool Segment::freeze(bool destroySysmem) {
return result;
}
const static char* Carrizo = "Carrizo";
static constexpr const char* Carrizo = "Carrizo";
HSAILProgram::HSAILProgram(Device& device, amd::Program& owner)
: Program(device, owner),
rawBinary_(nullptr),