ROCm / ROCm/HIPIFY

[HIPIFY][clang] Add a callback in clang to decide on hipify-clang's side whether to exclude the particular false conditional block or not

Open
#1 1 comment 0 reactions 1 assignee View on GitHub

@emankov is already working on this.

Since Mar 3, 2020.

clang feature
Dominant language
C++
Stars
728
Forks
107
Avg merge
16h 49m
Merged PRs (30d)
16

Description

With the change https://github.com/ROCm-Developer-Tools/HIP/pull/1372, all the blocks are not excluded from AST when -skip-excluded-preprocessor-conditional-blocks option is set. The corresponding change in clang: https://reviews.llvm.org/D66597.

The main idea is: if there is nothing to hipify in a particular false conditional block, then such block might be excluded from AST.

Such a callback in clang's preprocessor will be useful for the following main cases:

  • conditional branches with multiplatform code;
  • variables redefinition in conditional branches;
  • other cases, which may lead to syntactical errors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.