Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[LLVM] Add -git-commit-after-all option
Needs RevisionPublic

Authored by alexandre.isoard on Mar 7 2018, 7:30 PM.



Will create a temporary git and add the entire module LLVM-IR and
commit it, after each passes.

Diff Detail

Event Timeline

Fixed RUN_ON macro typo

etherzhhb added inline comments.

there is no create...Pass

if (auto *PP = P->createGitCommitModulePass(GitRepo, P->getPassName()))
asb added a comment.Mar 14 2018, 9:30 AM

For reference, this was discussed on llvm-dev here:

My personal view is that it would make more sense to dump the raw information you're after in a trivially machine readable way (a minor modification to -print-after-all?), and use an external script to post-process that output (e.g. committing to git). It might make sense to commit such a script to the utils/ subdir. That would be more general purpose, and avoid the concern of what to do when someone wants to come along and add a HgCommitModule or similar.

waskyo added a subscriber: waskyo.Mar 14 2018, 10:16 AM
reames requested changes to this revision.Mar 14 2018, 3:25 PM
reames added a subscriber: reames.

It was pointed out that upstream support for dumping the whole module already exists. It's spelled as: -print-after-all -print-module-scope

Given this, you should be able to do this by post processing a log without needing any LLVM changes.

This revision now requires changes to proceed.Mar 14 2018, 3:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2019, 10:49 PM