RFC - VectorUtils.h isTriviallyVectorizable(Intrinsic::ID)

Can we make this an attribute on the intrinsic definition instead of a separate switch table? For example, I can specify an intrinsic is “Commutative” rather than having to add to a switch statement somewhere.

Thanks

From: "Mark Schimmel" <Mark.Schimmel@synopsys.com>
To: llvmdev@cs.uiuc.edu
Sent: Monday, February 2, 2015 4:27:33 PM
Subject: [LLVMdev] RFC - VectorUtils.h isTriviallyVectorizable(Intrinsic::ID)

Can we make this an attribute on the intrinsic definition instead of
a separate switch table? For example, I can specify an intrinsic is
“Commutative” rather than having to add to a switch statement
somewhere.

Yes, I think we could definitely do that. Patches welcome.

-Hal