r318644 - [Driver] Add a cc1 flag for the new TBAA metadata format
Ivan A. Kosarev via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 20 03:16:17 PST 2017
Author: kosarev
Date: Mon Nov 20 03:16:16 2017
New Revision: 318644
URL: http://llvm.org/viewvc/llvm-project?rev=318644&view=rev
Log:
[Driver] Add a cc1 flag for the new TBAA metadata format
This patch starts a series of changes to add support for the new
TBAA metadata format proposed in this llvm-dev thread:
http://lists.llvm.org/pipermail/llvm-dev/2017-November/118748.html
Differential Revision: https://reviews.llvm.org/D39955
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=318644&r1=318643&r2=318644&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Mon Nov 20 03:16:16 2017
@@ -244,6 +244,8 @@ def relaxed_aliasing : Flag<["-"], "rela
HelpText<"Turn off Type Based Alias Analysis">;
def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
HelpText<"Turn off struct-path aware Type Based Alias Analysis">;
+def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
+ HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
def masm_verbose : Flag<["-"], "masm-verbose">,
HelpText<"Generate verbose assembly output">;
def mcode_model : Separate<["-"], "mcode-model">,
Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=318644&r1=318643&r2=318644&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def Mon Nov 20 03:16:16 2017
@@ -144,6 +144,7 @@ ENUM_CODEGENOPT(StructReturnConvention,
CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions.
CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled.
CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA.
+CODEGENOPT(NewStructPathTBAA , 1, 0) ///< Whether or not to use enhanced struct-path TBAA.
CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels.
CODEGENOPT(SanitizeAddressUseAfterScope , 1, 0) ///< Enable use-after-scope detection
///< in AddressSanitizer
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=318644&r1=318643&r2=318644&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon Nov 20 03:16:16 2017
@@ -546,6 +546,8 @@ static bool ParseCodeGenArgs(CodeGenOpti
OPT_fuse_register_sized_bitfield_access);
Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
Opts.StructPathTBAA = !Args.hasArg(OPT_no_struct_path_tbaa);
+ Opts.NewStructPathTBAA = !Args.hasArg(OPT_no_struct_path_tbaa) &&
+ Args.hasArg(OPT_new_struct_path_tbaa);
Opts.FineGrainedBitfieldAccesses =
Args.hasFlag(OPT_ffine_grained_bitfield_accesses,
OPT_fno_fine_grained_bitfield_accesses, false);
More information about the cfe-commits
mailing list