This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Simplify Assemble and Backend action collapsing
Needs ReviewPublic

Authored by kpet on May 31 2019, 2:07 AM.

Details

Summary

The action collapsing logic introduced in https://reviews.llvm.org/D21840 generally works by replacing action A followed by B by an action that uses the tool for A with action B.

The logic in combineAssembleBackend however does something different and selects a tool for an action that is not part of the list of actions under consideration for collapsing, specifically it selects the tool for the CompileJobAction on which the BackendJobAction depends.

There doesn't seem to be any good reason that I could find for doing this. My understanding is that all cases of interest rely on the Clang tool being selected for the CompileJobAction.
However the same Clang tool would be selected for a BackendJobAction and doing so would make the collapsing logic more symmetric and make it easier to further refactor into something more generic.

The reason I'm looking at this is that I am currently working on a toolchain that uses a single tool with combined BackendJobAction and AssembleJobAction that is not Clang but uses Clang as the tool for CompileJobAction.

Am I missing something? Are we missing a test?

Signed-off-by: Kevin Petit <kevin.petit@arm.com>

Diff Detail

Repository
rC Clang

Event Timeline

kpet created this revision.May 31 2019, 2:07 AM
kpet edited the summary of this revision. (Show Details)May 31 2019, 2:09 AM
kpet added a comment.Jun 18 2019, 5:10 AM

Friendly ping :).