HomePhabricator

[NFC] Refactor InlineResult for readability

Authored by mtrofin on Jan 15 2020, 1:33 PM.

Description

[NFC] Refactor InlineResult for readability

Summary:
InlineResult is used both in APIs assessing whether a call site is
inlinable (e.g. llvm::isInlineViable) as well as in the function
inlining utility (llvm::InlineFunction). It means slightly different
things (can/should inlining happen, vs did it happen), and the
implicit casting may introduce ambiguity (casting from 'false' in
InlineFunction will default a message about hight costs,
which is incorrect here).

The change renames the type to a more generic name, and disables
implicit constructors.

Reviewers: eraman, davidxl

Reviewed By: davidxl

Subscribers: kerbowa, arsenm, jvesely, nhaehnle, eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72744

Details

Committed
mtrofinJan 15 2020, 1:34 PM
Reviewer
davidxl
Differential Revision
D72744: [NFC] Refactor InlineResult for readability
Parents
rGfa26a37d3699: [mlir] Add shaped container component type interface
Branches
Unknown
Tags
Unknown