Summary: Rename --elf-cg-profile to --cg-profile and keep --elf-cg-profile as an alias of --cg-profile.
Reviewers: jhenderson, MaskRay, espindola, hans
Reviewed By: jhenderson, MaskRay
Subscribers: emaste, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81855
Display the dynamic table.
-.. option:: --elf-cg-profile
+.. option:: --cg-profile
Display the callgraph profile section.
Display the dynamic table.
-.. option:: --elf-cg-profile
+.. option:: --cg-profile
Display the callgraph profile section.
; RUN: llc -filetype=asm %s -o - -mtriple x86_64-pc-linux-gnu | FileCheck %s
; RUN: llc -filetype=obj %s -o %t -mtriple x86_64-pc-linux-gnu
-; RUN: llvm-readobj --elf-cg-profile %t | FileCheck %s --check-prefix=OBJ
+; RUN: llvm-readobj --cg-profile %t | FileCheck %s --check-prefix=OBJ
declare void @b()
-# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd --elf-cg-profile | FileCheck %s
+# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd --cg-profile | FileCheck %s
.section .test,"aw",@progbits
a: .word b
# RUN: yaml2obj %s -o %t.o
-# RUN: llvm-readobj -a --elf-cg-profile --addrsig %t.o | FileCheck %s
+# RUN: llvm-readobj -a --cg-profile --addrsig %t.o | FileCheck %s
# Test that multiple sections with the same type does not trigger an error.
## This test checks how we handle the --elf-cg-profile option.
# RUN: yaml2obj %s -o %t.o
+# RUN: llvm-readobj %t.o --cg-profile | FileCheck %s --check-prefix=LLVM
+# RUN: llvm-readelf %t.o --cg-profile | FileCheck %s --check-prefix=GNU
# RUN: llvm-readobj %t.o --elf-cg-profile | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf %t.o --elf-cg-profile | FileCheck %s --check-prefix=GNU
## Check LLVM output style.
# RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \
-# RUN: --elf-section-groups --elf-cg-profile --addrsig \
+# RUN: --elf-section-groups --cg-profile --addrsig \
# RUN: --demangle %t.so > %t.llvm.long
# RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \
-# RUN: --elf-section-groups --elf-cg-profile --addrsig \
+# RUN: --elf-section-groups --cg-profile --addrsig \
# RUN: -C %t.so > %t.llvm.short
# RUN: FileCheck %s --input-file %t.llvm.long --check-prefixes=LLVM-COMMON,LLVM-DEMANGLE
# RUN: diff %t.llvm.long %t.llvm.short
## Check that default is no demangling.
# RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \
-# RUN: --elf-section-groups --elf-cg-profile --addrsig \
+# RUN: --elf-section-groups --cg-profile --addrsig \
# RUN: %t.so > %t.llvm.default
# RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \
-# RUN: --elf-section-groups --elf-cg-profile --addrsig \
+# RUN: --elf-section-groups --cg-profile --addrsig \
# RUN: --demangle=false %t.so > %t.llvm.nodemangle
# RUN: FileCheck %s --input-file %t.llvm.default --check-prefixes=LLVM-COMMON,LLVM-MANGLED
# RUN: diff %t.llvm.default %t.llvm.nodemangle
## Test that the content of SHT_LLVM_CALL_GRAPH_PROFILE sections
## for 32/64-bit little/big endian targets is correct.
# RUN: yaml2obj --docnum=1 -D BITS=64 -D ENCODE=LSB %s -o %t.le64
-# RUN: llvm-readobj --elf-cg-profile --sections --section-data %t.le64 | FileCheck %s --check-prefixes=BASIC,BASIC-LE
+# RUN: llvm-readobj --cg-profile --sections --section-data %t.le64 | FileCheck %s --check-prefixes=BASIC,BASIC-LE
# RUN: yaml2obj --docnum=1 -D BITS=64 -D ENCODE=MSB %s -o %t.be64
-# RUN: llvm-readobj --elf-cg-profile --sections --section-data %t.be64 | FileCheck %s --check-prefixes=BASIC,BASIC-BE
+# RUN: llvm-readobj --cg-profile --sections --section-data %t.be64 | FileCheck %s --check-prefixes=BASIC,BASIC-BE
# RUN: yaml2obj --docnum=1 -D BITS=32 -D ENCODE=LSB %s -o %t.le32
-# RUN: llvm-readobj --elf-cg-profile --sections --section-data %t.le32 | FileCheck %s --check-prefixes=BASIC,BASIC-LE
+# RUN: llvm-readobj --cg-profile --sections --section-data %t.le32 | FileCheck %s --check-prefixes=BASIC,BASIC-LE
# RUN: yaml2obj --docnum=1 -D BITS=32 -D ENCODE=MSB %s -o %t.be32
-# RUN: llvm-readobj --elf-cg-profile --sections --section-data %t.be32 | FileCheck %s --check-prefixes=BASIC,BASIC-BE
+# RUN: llvm-readobj --cg-profile --sections --section-data %t.be32 | FileCheck %s --check-prefixes=BASIC,BASIC-BE
# BASIC: Name: .llvm.call-graph-profile
# BASIC-NEXT: Type: SHT_LLVM_CALL_GRAPH_PROFILE
## Check we can refer to symbols by name.
# RUN: yaml2obj --docnum=4 %s -o %t.sym
-# RUN: llvm-readobj --elf-cg-profile %t.sym | FileCheck %s --check-prefix=SYMBOL-NAMES
+# RUN: llvm-readobj --cg-profile %t.sym | FileCheck %s --check-prefix=SYMBOL-NAMES
# SYMBOL-NAMES: CGProfile [
# SYMBOL-NAMES-NEXT: CGProfileEntry {
cl::desc("Alias for --elf-hash-histogram"),
cl::aliasopt(HashHistogram));
- // --elf-cg-profile
- cl::opt<bool> CGProfile("elf-cg-profile", cl::desc("Display callgraph profile section"));
+ // --cg-profile
+ cl::opt<bool> CGProfile("cg-profile",
+ cl::desc("Display callgraph profile section"));
+ cl::alias ELFCGProfile("elf-cg-profile", cl::desc("Alias for --cg-profile"),
+ cl::aliasopt(CGProfile));
// -addrsig
cl::opt<bool> Addrsig("addrsig",