[PATCH] D92073: [CodeGen] Add text section prefix for COFF object file

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 21:19:11 PST 2020


pengfei added inline comments.


================
Comment at: llvm/test/CodeGen/X86/text-section-prefix.ll:1
+; RUN: llc -mtriple x86_64-linux-gnu -function-sections %s -o - | FileCheck %s --check-prefix=SECTION-HOT-ELF
+; RUN: llc -mtriple x86_64-linux-gnu -function-sections %s -o - | FileCheck %s --check-prefix=SECTION-UNLIKELY-ELF
----------------
Maybe better to put the test in `Transforms/CodeGenPrepare/X86`


================
Comment at: llvm/test/CodeGen/X86/text-section-prefix.ll:9
+;; CHECK hot section name
+; SECTION-HOT-ELF:  .section        .text.hot
+; SECTION-HOT-COFF: .section        .text$hot
----------------
You don't need to distinguish `HOT` and `UNLIKLY` since they are in different functions. You just need `SECTION-ELF` and `SECTION-COFF`.
You may also need to add
```
; RUN: llc -mtriple x86_64-linux-gnu -unique-section-names=0 %s -o - | FileCheck %s --check-prefix=ELF-NOUNIQ
; RUN: llc -mtriple x86_64-windows-mingw64 %s -o - | FileCheck %s --check-prefix=MINGW
```
as Reid suggested.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92073/new/

https://reviews.llvm.org/D92073



More information about the llvm-commits mailing list