Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P parabix-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cameron
  • parabix-devel
  • Merge requests
  • !41

Merged
Created May 27, 2021 by cprabhu@cprabhuContributor3 of 6 tasks completed3/6 tasks

Support multiple LLVM versions

  • Overview 33
  • Commits 49
  • Pipelines 9
  • Changes 80

What

Refactored to choose appropriate LLVM API based on the LLVM version being used to build Parabix.

Why

To support building Parabix with LLVM version 5 through 12

How

Mostly #ifdefs help determine the appropriate LLVM API to be used. Another approach uses a facade library (LLVMVersion) that has a pair of header and .cpp files. These files contain the appropriate API call needed for the LLVM version in use.

To simplify the facade design further and avoid duplicate code, we can consolidate the LLVMVersion libraries post LLVM 9 into a single LLVMVersion.h/.cpp file. It can use FixedVectorType by default. This is a possibility considering LLVM maintains any (to be) deprecated APIs at least for 1-2 major releases before removing it completely.

Changes details

  • Use LLVMVersion layer - llvm_version::API_NAME to resolve to any version-specific API
  • Added LLVMVersion library that has pairs of LLVMVersion.h/.cpp for different LLVM versions.
  • CMake has been modified to decide the version to use and include the correct LLVMVersion directory to the build process.
  • Added CI config for LLVM 10, LLVM 11
  • Refactored deprecated wrapper functions by their actual implementations.
  • Added header files required for LLVM_VERSION_MAJOR >= 10
  • Added wrapper function createCall to invoke llvm::CreateCall with appropriate arg types/list for given LLVM version.

Missed anything?

  • Explained the purpose of this PR.
  • Self reviewed the PR.
  • Added or updated test cases.
  • Informed of breaking changes, testing and migrations (if applicable).
  • Updated documentation (if applicable).
  • Attached screenshots (if applicable).
Edited Jun 24, 2021 by cprabhu
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: Multiple-LLVM-versions