This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Reviewers
asb
reames
Summary

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.
include/llvm/IR/GitCommitModule.h
32–33

there is no create...Pass

lib/IR/LegacyPassManager.cpp
739–740
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: http://lists.llvm.org/pipermail/llvm-dev/2018-March/121634.html

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