r194593 - Adds ARM backend options: -mrestrict-it and -mno-restrict-it

Weiming Zhao weimingz at codeaurora.org
Wed Nov 13 13:45:25 PST 2013


Hi Chad,

Sorry, I forgot to add the test file while committing with svn. 
Now, I added it and committed as 194606.

Thanks,
Weiming


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation

-----Original Message-----
From: mcrosier at codeaurora.org [mailto:mcrosier at codeaurora.org] 
Sent: Wednesday, November 13, 2013 12:40 PM
To: Weiming Zhao
Cc: cfe-commits at cs.uiuc.edu
Subject: Re: r194593 - Adds ARM backend options: -mrestrict-it and
-mno-restrict-it

Hi Weiming,
Can you please add a driver test?

See test/Driver/arm-alignment.c as an example.

 Chad

> Author: weimingz
> Date: Wed Nov 13 12:31:23 2013
> New Revision: 194593
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194593&view=rev
> Log:
> Adds ARM backend options: -mrestrict-it and -mno-restrict-it
>
> To support the generation of IT block in Thumbv7 way or
> Thumbv8 way
>
> Modified:
>     cfe/trunk/include/clang/Driver/Options.td
>     cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Opt
> ions.td?rev=194593&r1=194592&r2=194593&view=diff
> ======================================================================
> ========
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Wed Nov 13 12:31:23 2013
> @@ -1029,6 +1029,10 @@ def mno_unaligned_access : Flag<["-"], "
>  def mstrict_align : Flag<["-"], "mstrict-align">, 
> Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>,
>    HelpText<"Force all memory accesses to be aligned (ARM only, same 
> as mno-unaligned-access)">;  def mno_thumb : Flag<["-"], "mno-thumb">, 
> Group<m_arm_Features_Group>;
> +def mrestrict_it: Flag<["-"], "mrestrict-it">,
> Group<m_arm_Features_Group>,
> +  HelpText<"Disallow generation of deprecated IT blocks for ARMv8. It 
> + is
> on by default for ARMv8 Thumb mode.">;
> +def mno_restrict_it: Flag<["-"], "mno-restrict-it">,
> Group<m_arm_Features_Group>,
> +  HelpText<"Allow generation of deprecated IT blocks for ARMv8. It is 
> + off
> by default for ARMv8 Thumb mode">;
>  def marm : Flag<["-"], "marm">, Alias<mno_thumb>;  def ffixed_r9 : 
> Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
>    HelpText<"Reserve the r9 register (ARM only)">;
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev
> =194593&r1=194592&r2=194593&view=diff
> ======================================================================
> ========
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Nov 13 12:31:23 2013
> @@ -3072,6 +3072,17 @@ void Clang::ConstructJob(Compilation &C,
>      }
>    }
>
> +  if (Arg *A = Args.getLastArg(options::OPT_mrestrict_it,
> +                               options::OPT_mno_restrict_it)) {
> +    if (A->getOption().matches(options::OPT_mrestrict_it)) {
> +      CmdArgs.push_back("-backend-option");
> +      CmdArgs.push_back("-arm-restrict-it");
> +    } else {
> +      CmdArgs.push_back("-backend-option");
> +      CmdArgs.push_back("-arm-no-restrict-it");
> +    }
> +  }
> +
>    // Forward -f options with positive and negative forms; we translate
>    // these by hand.
>    if (Arg *A = Args.getLastArg(options::OPT_fprofile_sample_use_EQ)) 
> {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>






More information about the cfe-commits mailing list