https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/76910
>From b9173e3769ce2fefe846b0b65cef61631af94008 Mon Sep 17 00:00:00 2001 From: Amir Ayupov <aau...@fb.com> Date: Thu, 4 Jan 2024 09:52:26 -0800 Subject: [PATCH 1/3] Fix SaveProfile definition issue Created using spr 1.3.4 --- bolt/lib/Rewrite/RewriteInstance.cpp | 4 +--- bolt/lib/Utils/CommandLineOpts.cpp | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index c6f38db17f093d..06f28195bb08dd 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -199,9 +199,7 @@ static cl::opt<cl::boolOrDefault> RelocationMode( "relocs", cl::desc("use relocations in the binary (default=autodetect)"), cl::cat(BoltCategory)); -cl::opt<std::string> SaveProfile("w", - cl::desc("save recorded profile to a file"), - cl::cat(BoltOutputCategory)); +extern cl::opt<std::string> SaveProfile; static cl::list<std::string> SkipFunctionNames("skip-funcs", diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index a1df5de2623402..4a980a67fca378 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -163,6 +163,10 @@ cl::opt<ProfileFormatKind> ProfileFormat( clEnumValN(PF_YAML, "yaml", "dense YAML representation")), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); +cl::opt<std::string> SaveProfile("w", + cl::desc("save recorded profile to a file"), + cl::cat(BoltOutputCategory)); + cl::opt<bool> SplitEH("split-eh", cl::desc("split C++ exception handling code"), cl::Hidden, cl::cat(BoltOptCategory)); >From 8eb2cf8cd77244251595817c9d25d3721b2e0be2 Mon Sep 17 00:00:00 2001 From: Amir Ayupov <aau...@fb.com> Date: Wed, 20 Mar 2024 16:42:41 -0700 Subject: [PATCH 2/3] remove blarge.bat.preagg Created using spr 1.3.4 --- bolt/test/X86/Inputs/blarge.bat.preagg | 81 -------------------------- 1 file changed, 81 deletions(-) delete mode 100644 bolt/test/X86/Inputs/blarge.bat.preagg diff --git a/bolt/test/X86/Inputs/blarge.bat.preagg b/bolt/test/X86/Inputs/blarge.bat.preagg deleted file mode 100644 index 76b4003d977c26..00000000000000 --- a/bolt/test/X86/Inputs/blarge.bat.preagg +++ /dev/null @@ -1,81 +0,0 @@ -B 4005f0 X:7f49b808f200 804 12 -B 400610 X:7f49b806f430 175 8 -B 400620 X:7f49b839e260 26 1 -B 400630 X:7f49b83fa1c0 2 1 -B 400640 X:7f49b839d900 2 0 -B 400ad1 400e00 34 0 -B 400add 400610 12 0 -B 400b00 400610 19 0 -B 400b09 400aea 2 0 -B 400b10 4005f0 802 0 -B 400b2d 400aa8 29 0 -B 400b4b 400a90 4 0 -B 400ba1 401170 9 0 -B 400bb7 400610 15 0 -B 400bc3 400b99 7 0 -B 400bf3 400610 5 0 -B 400c37 400610 122 0 -B 400c56 400c0f 125 0 -B 400c8e 400610 3 0 -B 400cad 400c66 3 0 -B 400e82 800345 2 0 -B 400e88 8002a0 28 0 -B 40119a 4011a3 362 36 -B 4011a7 40117a 668 4 -B 4011ac 400ba6 13 0 -B 4011ac 400be1 5 0 -B X:7f49b806f4f6 400ae2 17 0 -B X:7f49b806f4f6 400b05 800 0 -B X:7f49b806f4f6 400bbc 7 1 -B X:7f49b806f4f6 400c3c 123 6 -B X:7f49b806f4f6 400c93 4 1 -B X:7f49b808f289 400b15 33 0 -B X:7f49b839e2b1 8002ed 12 0 -B X:7f49b83f8b53 80038a 1 0 -B X:7f49b83fa2ff 800495 1 0 -B 8002e8 400620 26 0 -B 80031f 800329 11 0 -B 800344 400ad6 10 0 -B 800385 400640 2 0 -B 8003d1 400630 1 0 -B 8004bb 400ad6 1 0 -F 4005f0 4005f0 802 -F 400610 400610 172 -F 400610 400c37 1 -F 400620 400620 26 -F 400630 400630 1 -F 400640 400640 2 -F 400a90 400ad1 4 -F 400aa8 400ad1 29 -F 400ad6 400add 11 -F 400ae2 400b00 17 -F 400aea 400b00 2 -F 400b05 400b09 2 -F 400b05 400b10 798 -F 400b15 400b2d 29 -F 400b15 400b4b 4 -F 400b99 400ba1 7 -F 400ba6 400bb7 13 -F 400bbc 400bc3 7 -F 400be1 400bf3 5 -F 400c0f 400c37 118 -F 400c3c 400c56 123 -F 400c66 400c8e 3 -F 400c93 400cad 3 -F 400e00 400e82 2 -F 400e00 400e88 28 -F 401170 400ba1 2 -F 401170 40119a 5 -F 40117a 40119a 343 -F 40117a 4011a7 301 -F 40117a 4011ac 5 -F 4011a3 40119a 1 -F 4011a3 4011a7 343 -F 4011a3 4011ac 13 -F X:7f49b806f430 400610 1 -F 8002a0 8002e8 26 -F 8002ed 80031f 11 -F 800329 800344 10 -F 800345 800385 2 -F 80038a 8003d1 1 -F 800495 8004bb 1 >From 84a82ddf4b8a59075d79956a4dc26ef07a3e03de Mon Sep 17 00:00:00 2001 From: Amir Ayupov <aau...@fb.com> Date: Wed, 20 Mar 2024 17:02:42 -0700 Subject: [PATCH 3/3] Fix test Created using spr 1.3.4 --- bolt/test/X86/bolt-address-translation-yaml.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bolt/test/X86/bolt-address-translation-yaml.test b/bolt/test/X86/bolt-address-translation-yaml.test index e265b5b9f0507e..25ff4e7fbfcc57 100644 --- a/bolt/test/X86/bolt-address-translation-yaml.test +++ b/bolt/test/X86/bolt-address-translation-yaml.test @@ -18,7 +18,7 @@ RUN: | FileCheck --check-prefix CHECK-BOLT-YAML %s WRITE-BAT-CHECK: BOLT-INFO: Wrote 5 BAT maps WRITE-BAT-CHECK: BOLT-INFO: Wrote 4 function and 22 basic block hashes -WRITE-BAT-CHECK: BOLT-INFO: BAT section size (bytes): 384 +WRITE-BAT-CHECK: BOLT-INFO: BAT section size (bytes): 344 READ-BAT-CHECK-NOT: BOLT-ERROR: unable to save profile in YAML format for input file processed by BOLT READ-BAT-CHECK: BOLT-INFO: Parsed 5 BAT entries @@ -37,4 +37,4 @@ YAML-BAT-CHECK-NEXT: hash: 0xA900AE79CFD40000 YAML-BAT-CHECK-NEXT: succ: [ { bid: 3, cnt: 0 }, { bid: 1, cnt: 0 } ] CHECK-BOLT-YAML: pre-processing profile using YAML profile reader -CHECK-BOLT-YAML-NEXT: 5 out of 16 functions in the binary (31.2%) have non-empty execution profile +CHECK-BOLT-YAML-NEXT: 1 out of 16 functions in the binary (6.2%) have non-empty execution profile _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits