HomePhabricator

[RISCV] Add support for -mcpu option.

Authored by khchen on Jul 16 2020, 10:32 AM.

Description

[RISCV] Add support for -mcpu option.

Summary:

  1. gcc uses -march and -mtune flag to chose arch and

pipeline model, but clang does not have -mtune flag,
we uses -mcpu to chose both infos.

  1. Add SiFive e31 and u54 cpu which have default march

and pipeline model.

  1. Specific -mcpu with rocket-rv[32|64] would select

pipeline model only, and use the driver's arch choosing
logic to get default arch.

Reviewers: lenary, asb, evandro, HsiangKai

Reviewed By: lenary, asb, evandro

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D71124

Details

Committed
khchenJul 16 2020, 11:46 AM
Reviewer
lenary
Differential Revision
D71124: [RISCV] support clang driver to select cpu
Parents
rGa394aa1b974b: [LiveVariables] Replace std::vector with SmallVector.
Branches
Unknown
Tags
Unknown

Event Timeline

Zakk Chen <zakk.chen@sifive.com> committed rG294d1eae75bf: [RISCV] Add support for -mcpu option. (authored by Zakk Chen <zakk.chen@sifive.com>).Jul 16 2020, 11:46 AM