[llvm-commits] [llvm] r146168 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineInstr.cpp

Jay Foad jay.foad at gmail.com
Tue Jan 24 04:54:30 PST 2012


Hi Evan,

On 8 December 2011 19:23, Evan Cheng <evan.cheng at apple.com> wrote:
> Author: evancheng
> Date: Thu Dec  8 13:23:10 2011
> New Revision: 146168
>
> URL: http://llvm.org/viewvc/llvm-project?rev=146168&view=rev
> Log:
> Make MachineInstr instruction property queries more flexible. This change all
> clients to decide whether to look inside bundled instructions and whether
> the query should return true if any / all bundled instructions have the
> queried property.
>
> Modified:
>    llvm/trunk/include/llvm/CodeGen/MachineInstr.h
>    llvm/trunk/lib/CodeGen/MachineInstr.cpp
>
> Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=146168&r1=146167&r2=146168&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Dec  8 13:23:10 2011
> @@ -277,6 +277,12 @@
>   /// API for querying MachineInstr properties. They are the same as MCInstrDesc
>   /// queries but they are bundle aware.
>
> +  enum QueryType {
> +    IgnoreBundle,    // Ignore bundles
> +    AnyInBundle,     // Return true if any instruction in bundle has property
> +    AllInBundle      // Return true if all instructions in bundle have property
> +  };
> +
>   /// hasProperty - Return true if the instruction (or in the case of a bundle,
>   /// the instructions inside the bundle) has the specified property.
>   /// The first argument is the property being queried.
> @@ -285,43 +291,42 @@
>   /// If the third argument is true, than the query can return true when *any*
>   /// of the bundled instructions has the queried property. If it's false, then
>   /// this can return true iff *all* of the instructions have the property.
> -  bool hasProperty(unsigned Flag,
> -                   bool PeekInBundle = true, bool IsOr = true) const;
> +  bool hasProperty(unsigned Flag, QueryType Type = AnyInBundle) const;

The comment still talks about a third argument. It needs updating for
this change.

Thanks,
Jay.




More information about the llvm-commits mailing list