[llvm] 1712254 - [SampleFDO] Allow multiple of --enable-fs-discrimintor option [NFC]

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 11:32:28 PST 2022


Author: Rong Xu
Date: 2022-03-08T11:31:20-08:00
New Revision: 1712254b3f4d3c08bcaadc22960c59377015e18a

URL: https://github.com/llvm/llvm-project/commit/1712254b3f4d3c08bcaadc22960c59377015e18a
DIFF: https://github.com/llvm/llvm-project/commit/1712254b3f4d3c08bcaadc22960c59377015e18a.diff

LOG: [SampleFDO] Allow multiple of --enable-fs-discrimintor option [NFC]

Allow users to use multiple of --enable-fs-discriminator option.
When this option is specified multiple times, the last instance wins.

Added: 
    

Modified: 
    llvm/lib/IR/DebugInfoMetadata.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 69370d6bc8432..033980d40ca58 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -27,7 +27,7 @@ using namespace llvm;
 namespace llvm {
 // Use FS-AFDO discriminator.
 cl::opt<bool> EnableFSDiscriminator(
-    "enable-fs-discriminator", cl::Hidden, cl::init(false),
+    "enable-fs-discriminator", cl::Hidden, cl::init(false), cl::ZeroOrMore,
     cl::desc("Enable adding flow sensitive discriminators"));
 } // namespace llvm
 


        


More information about the llvm-commits mailing list