[PATCH] D44519: Add llvm-exegesis tool.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 08:01:06 PDT 2018
courbet added inline comments.
================
Comment at: tools/llvm-exegesis/lib/InstructionSnippetGenerator.cpp:151
+computeSequentialAssignmentChains(const llvm::MCRegisterInfo &RegInfo,
+ const llvm::ArrayRef<Variable> Vars) {
+ using graph::Node;
----------------
RKSimon wrote:
> Do you need the const on the ArrayRef? I don't think you can change anything - that's what MutableArrayRef is for.
Thanks for pointing that out. Our internal ArrayRef (Span) can change its extent if not its elements. Fixed here and in 14 other places.
================
Comment at: tools/llvm-exegesis/lib/InstructionSnippetGenerator.cpp:159
+ // Adding variables to the graph.
+ for (size_t I = 0; I < Vars.size(); ++I) {
+ const Variable &Var = Vars[I];
----------------
RKSimon wrote:
> ```
> for (size_t I = 0, E = Vars.size(); I < E; ++I) {
> ```
The compiler should be able to inline these, right ?
================
Comment at: tools/llvm-exegesis/lib/InstructionSnippetGenerator.cpp:230
+ // Registers with remaining degrees of freedom are assigned randomly.
+ for (size_t I = 0; I < Vars.size(); ++I) {
+ llvm::MCPhysReg &Reg = Registers[I];
----------------
RKSimon wrote:
> ```
> for (size_t I = 0, E = Vars.size(); I < E; ++I) {
> ```
ditto
================
Comment at: tools/llvm-exegesis/lib/Uops.cpp:101
+ // we never create a RAW hazard that would lead to serialization.
+ for (size_t I = 0; I < Vars.size(); ++I) {
+ llvm::MCPhysReg Reg = Regs[I];
----------------
RKSimon wrote:
> ```
> for (size_t I = 0, E = Vars.size(); I < e; ++I) {
> ```
ditto
Repository:
rL LLVM
https://reviews.llvm.org/D44519
More information about the llvm-commits
mailing list