Skip to content

Commit 6c41f0d

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 29cfa38 commit 6c41f0d

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
@@ -1035,6 +1035,9 @@ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
10351035
// HIP headers depend on hsa.h which is in ROCM_DIR/include.
10361036
ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
10371037

1038+
// Default to O3 for all contexts
1039+
Args.push_back("-O3");
1040+
10381041
Args.push_back("-x");
10391042

10401043
switch (ActionInfo->Language) {

0 commit comments

Comments
 (0)