[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (#110063)

nsw is now added to do-variable increment when -fno-wrapv is enabled as
GFortran seems to do.
That means the option introduced by #91579 isn't necessary any more.

Note that the feature of -flang-experimental-integer-overflow is enabled
by default.
This commit is contained in:
Yusuke MINATO
2024-10-25 15:20:23 +09:00
committed by GitHub
parent 3a4ccebb5c
commit 96bb375f5c
40 changed files with 119 additions and 676 deletions

View File

@@ -1350,12 +1350,6 @@ bool CompilerInvocation::createFromArgs(
invoc.loweringOpts.setNoPPCNativeVecElemOrder(true);
}
// -flang-experimental-integer-overflow
if (args.hasArg(
clang::driver::options::OPT_flang_experimental_integer_overflow)) {
invoc.loweringOpts.setNSWOnLoopVarInc(true);
}
// Preserve all the remark options requested, i.e. -Rpass, -Rpass-missed or
// -Rpass-analysis. This will be used later when processing and outputting the
// remarks generated by LLVM in ExecuteCompilerInvocation.cpp.