[PATCH] D68049: Propeller: Clang options for basic block sections

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 05:56:21 PDT 2019


MaskRay added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.h:120
 
+  std::string BasicBlockSections;
+
----------------
Comment its allowed values ("all", "labels", "none")


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1103
+      dyn_cast<FunctionDecl>(GD.getDecl()) &&
+      this->getFunctionLinkage(GD) == llvm::GlobalValue::InternalLinkage) {
+    std::string UniqueSuffix = getUniqueModuleId(&getModule(), true);
----------------
```
  if (getCodeGenOpts().UniqueInternalFuncNames &&
      isa<FunctionDecl>(GD.getDecl()) &&
      getFunctionLinkage(GD) == llvm::GlobalValue::InternalLinkage) {
```

How does it interop with `MangledName = getCUDARuntime().getDeviceStubName(MangledName);` below?


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4304
+                               options::OPT_fno_propeller)) {
+    /* If we specify -funique-internal-funcnames on the command
+       line, we do not need to push it again.
----------------
The comment is a bit verbose. I think it can just state that when -fpropeller-optimize= or -fpropeller-label is specified, default to -funique-internal-funcnames, followed by a reason why -funique-internal-funcnames should be used.


================
Comment at: clang/test/CodeGen/unique_internal_funcnames.c:18
+// UNIQUE-NOT: foo:
+// UNIQUE: foo.$
----------------
`foo.${{[0-9a-f]+}}` (to make it clearer)


Repository:
  rC Clang

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

https://reviews.llvm.org/D68049





More information about the cfe-commits mailing list