This is an archive of the discontinued LLVM Phabricator instance.

[opt] refactor opt main function
AbandonedPublic

Authored by Kokan on Jan 1 2020, 4:01 AM.

Details

Reviewers
MaskRay
Group Reviewers
Restricted Project
Summary
  • set ->keep() as soon as possible
  • refactor target machine detection
  • refactor early exit with -module-summary/hash with -S option
  • refactor use OutputKind
  • extract initialize passes
  • run-twice small refactors
  • use == for SmallVector

Signed-off-by: Peter Kokai <kokaipeter@gmail.com>

Diff Detail

Event Timeline

Kokan created this revision.Jan 1 2020, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 1 2020, 4:01 AM
MaskRay added inline comments.Jan 1 2020, 4:20 PM
llvm/tools/opt/opt.cpp
693

GetOutputKind is only called once. The change does not seem to improve readability.

944

llvm_unreachable

Kokan abandoned this revision.Jan 5 2020, 2:24 AM