Skip to content

Commit 1d9e4d4

Browse files
committed
[Comgr] Default to -O3 for all contexts
Previously Comgr required users/callers to manually supply an optimization option. However, because -O3 is generally accepted as useful, we can default to that if no option is provided Change-Id: I82b31f9260f0d8940944f794c661aee5f0480069
1 parent 38e3e5b commit 1d9e4d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

amd/comgr/src/comgr-compiler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,9 @@ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
10311031
// HIP headers depend on hsa.h which is in ROCM_DIR/include.
10321032
ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
10331033

1034+
// Default to O3 for all contexts
1035+
Args.push_back("-O3");
1036+
10341037
Args.push_back("-x");
10351038

10361039
switch (ActionInfo->Language) {

0 commit comments

Comments
 (0)