[llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)
Christian Ulmann via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 03:20:53 PST 2024
================
@@ -35,6 +35,20 @@
using namespace llvm;
using namespace PatternMatch;
+// As set of temporary options to help migrate how splats are represented.
+static cl::opt<bool> UseConstantIntForFixedLengthSplat(
+ "use-constant-int-for-fixed-length-splat", cl::init(false), cl::Hidden,
+ cl::desc("Use ConstantInt's native fixed-length vector splat support."));
+static cl::opt<bool> UseConstantFPForFixedLengthSplat(
+ "use-constant-fp-for-fixed-length-splat", cl::init(false), cl::Hidden,
+ cl::desc("Use ConstantFP's native fixed-length vector splat support."));
+static cl::opt<bool> UseConstantIntForScalableSplat(
+ "use-constant-int-for-scalable-splat", cl::init(false), cl::Hidden,
+ cl::desc("Use ConstantInt's native scalable vector splat support."));
+static cl::opt<bool> UseConstantFPForScalableSplat(
+ "use-constant-fp-for-scalable-splat", cl::init(false), cl::Hidden,
+ cl::desc("Use ConstantFP's native scalable vector splat support."));
+
----------------
Dinistro wrote:
Thanks for the fast response.
> Can you provide more details on this?
I attempted to directly access the underlying `Option` structures, but that did not succeed.
> The usual way to set the options is via cl::ParseCommandLineOptions, which doesn't mean that they actually have to come from the command line. It's pretty typical to just hardcode some options in the invocation.
I was not aware that one can executed this function twice to pass custom options to it, thanks for the hint. This should work, once some other, only tangentially related, issues have been addressed.
https://github.com/llvm/llvm-project/pull/74502
More information about the llvm-commits
mailing list