History log of /llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp (Results 126 – 150 of 190)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 58e706a6 24-Jul-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Move outlined function remark into its own function

This pulls the OutlinedFunction remark out into its own function to make
the code a bit easier to read.

llvm-svn: 337849


# 69f517df 24-Jul-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Move target frame info into OutlinedFunction

Just some gardening here.

Similar to how we moved call information into Candidates, this moves outlined
frame information into Ou

[MachineOutliner][NFC] Move target frame info into OutlinedFunction

Just some gardening here.

Similar to how we moved call information into Candidates, this moves outlined
frame information into OutlinedFunction. This allows us to remove
TargetCostInfo entirely.

Anywhere where we returned a TargetCostInfo struct, we now return an
OutlinedFunction. This establishes OutlinedFunctions as more of a general
repeated sequence, and Candidates as occurrences of those repeated sequences.

llvm-svn: 337848

show more ...


# fca55129 24-Jul-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Make Candidates own their call information

Before this, TCI contained all the call information for each Candidate.

This moves that information onto the Candidates. As a resul

[MachineOutliner][NFC] Make Candidates own their call information

Before this, TCI contained all the call information for each Candidate.

This moves that information onto the Candidates. As a result, each Candidate
can now supply how it ought to be called. Thus, Candidates will be able to,
say, call the same function in cheaper ways when possible. This also removes
that information from TCI, since it's no longer used there.

A follow-up patch for the AArch64 outliner will demonstrate this.

llvm-svn: 337840

show more ...


# 1cc52a00 24-Jul-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Move missed opt remark into its own function

Having the missed remark code in the middle of `findCandidates` made the
function hard to follow. This yanks that out into a new f

[MachineOutliner][NFC] Move missed opt remark into its own function

Having the missed remark code in the middle of `findCandidates` made the
function hard to follow. This yanks that out into a new function,
`emitNotOutliningCheaperRemark`.

llvm-svn: 337839

show more ...


# f94d1d29 24-Jul-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Sink some candidate logic into OutlinedFunction

Just some simple gardening to improve clarity.

Before, we had something along the lines of

1) Create a std::vector of Candida

[MachineOutliner][NFC] Sink some candidate logic into OutlinedFunction

Just some simple gardening to improve clarity.

Before, we had something along the lines of

1) Create a std::vector of Candidates
2) Create an OutlinedFunction
3) Create a std::vector of pointers to Candidates
4) Copy those over to the OutlinedFunction and the Candidate list

Now, OutlinedFunctions create the Candidate pointers. They're still copied
over to the main list of Candidates, but it makes it a bit clearer what's
going on.

llvm-svn: 337838

show more ...


# f905bf14 14-Jul-2018 Francis Visoiu Mistrih <francisvm@yahoo.com>

[MachineOutliner] Check the last instruction from the sequence when updating liveness

The MachineOutliner was doing an std::for_each from the call (inserted
before the outlined sequence) to the iter

[MachineOutliner] Check the last instruction from the sequence when updating liveness

The MachineOutliner was doing an std::for_each from the call (inserted
before the outlined sequence) to the iterator at the end of the
sequence.

std::for_each needs the iterator past the end, so the last instruction
was not taken into account when propagating the liveness information.

This fixes the machine verifier issue in machine-outliner-disubprogram.ll.

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

llvm-svn: 337090

show more ...


# eaececf5 04-Jul-2018 Yvan Roux <yvan.roux@linaro.org>

[MachineOutliner] Fix typo in getOutliningCandidateInfo function name

getOutlininingCandidateInfo -> getOutliningCandidateInfo

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

llvm-svn: 3362

[MachineOutliner] Fix typo in getOutliningCandidateInfo function name

getOutlininingCandidateInfo -> getOutliningCandidateInfo

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

llvm-svn: 336285

show more ...


# 8bda1881 30-Jun-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] Add support for target-default outlining.

This adds functionality to the outliner that allows targets to
specify certain functions that should be outlined from by default.

If a ta

[MachineOutliner] Add support for target-default outlining.

This adds functionality to the outliner that allows targets to
specify certain functions that should be outlined from by default.

If a target supports default outlining, then it specifies that in
its TargetOptions. In the case that it does, and the user hasn't
specified that they *never* want to outline, the outliner will
be added to the pass pipeline and will run on those default functions.

This is a preliminary patch for turning the outliner on by default
under -Oz for AArch64.

https://reviews.llvm.org/D48776

llvm-svn: 336040

show more ...


# dafa198c 28-Jun-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] Define MachineOutliner support in TargetOptions

Targets should be able to define whether or not they support the outliner
without the outliner being added to the pass pipeline. Bef

[MachineOutliner] Define MachineOutliner support in TargetOptions

Targets should be able to define whether or not they support the outliner
without the outliner being added to the pass pipeline. Before this, the
outliner pass would be added, and ask the target whether or not it supports the
outliner.

After this, it's possible to query the target in TargetPassConfig, before the
outliner pass is created. This ensures that passing -enable-machine-outliner
will not modify the pass pipeline of any target that does not support it.

https://reviews.llvm.org/D48683

llvm-svn: 335887

show more ...


# f472f615 27-Jun-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] Don't outline sequences where x16/x17/nzcv are live across

It isn't safe to outline sequences of instructions where x16/x17/nzcv live
across the sequence.

This teaches the outline

[MachineOutliner] Don't outline sequences where x16/x17/nzcv are live across

It isn't safe to outline sequences of instructions where x16/x17/nzcv live
across the sequence.

This teaches the outliner to check whether or not a specific canidate has
x16/x17/nzcv live across it and discard the candidate in the case that that is
true.

https://bugs.llvm.org/show_bug.cgi?id=37573
https://reviews.llvm.org/D47655

llvm-svn: 335758

show more ...


# 32de26d4 19-Jun-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] NFC: Remove insertOutlinerPrologue, rename insertOutlinerEpilogue

insertOutlinerPrologue was not used by any target, and prologue-esque code was
beginning to appear in insertOutlin

[MachineOutliner] NFC: Remove insertOutlinerPrologue, rename insertOutlinerEpilogue

insertOutlinerPrologue was not used by any target, and prologue-esque code was
beginning to appear in insertOutlinerEpilogue. Refactor that into one function,
buildOutlinedFrame.

This just removes insertOutlinerPrologue and renames insertOutlinerEpilogue.

llvm-svn: 335076

show more ...


Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3
# aa087327 04-Jun-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.h

This is setting up to fix bug 37573 cleanly.

This moves data structures that are technically both used in some way by

[MachineOutliner] NFC - Move intermediate data structures to MachineOutliner.h

This is setting up to fix bug 37573 cleanly.

This moves data structures that are technically both used in some way by the
target and the general-purpose outlining algorithm into MachineOutliner.h. In
particular, the `Candidate` class is of importance.

Before, the outliner passed the locations of `Candidates` to the target, which
would then make some decisions about the prospective outlined function. This
change allows us to just pass `Candidates` along to the target. This will allow
the target to discard `Candidates` that would be considered unsafe before cost
calculation. Thus, we will be able to remove the unsafe candidates described in
the bug without resorting to torching the entire prospective function.

Also, as a side-effect, it makes the outliner a bit cleaner.

https://bugs.llvm.org/show_bug.cgi?id=37573

llvm-svn: 333952

show more ...


Revision tags: llvmorg-6.0.1-rc2
# 042dc9e0 22-May-2018 Eli Friedman <efriedma@codeaurora.org>

[MachineOutliner] Add "thunk" outlining for AArch64.

When we're outlining a sequence that ends in a call, we can save up to
three instructions in the outlined function by turning the call into
a tai

[MachineOutliner] Add "thunk" outlining for AArch64.

When we're outlining a sequence that ends in a call, we can save up to
three instructions in the outlined function by turning the call into
a tail-call. I refer to this as thunk outlining because the resulting
outlined function looks like a thunk; suggestions welcome for a better
name.

In addition to making the outlined function shorter, thunk outlining
allows outlining calls which would otherwise be illegal to outline:
we don't need to save/restore LR, so we don't need to prove anything
about the stack access patterns of the callee.

To make this work effectively, I also added
MachineOutlinerInstrType::LegalTerminator to the generic MachineOutliner
code; this allows treating an arbitrary instruction as a terminator in
the suffix tree.

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

llvm-svn: 333015

show more ...


# 4081a57a 18-May-2018 Eli Friedman <efriedma@codeaurora.org>

[MachineOutliner] Count savings from outlining in bytes.

Counting the number of instructions is both unintuitive and inaccurate.
On AArch64, this only affects the generated remarks and certain rare

[MachineOutliner] Count savings from outlining in bytes.

Counting the number of instructions is both unintuitive and inaccurate.
On AArch64, this only affects the generated remarks and certain rare
pseudo-instructions, but it will have a bigger impact on other targets.

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

llvm-svn: 332685

show more ...


# 25bef201 15-May-2018 Eli Friedman <efriedma@codeaurora.org>

[MachineOutliner] Add optsize markings to outlined functions.

It doesn't matter much this late in the pipeline, but one place that
does check for it is the function alignment code.

Differential Rev

[MachineOutliner] Add optsize markings to outlined functions.

It doesn't matter much this late in the pipeline, but one place that
does check for it is the function alignment code.

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

llvm-svn: 332415

show more ...


# d34e60ca 14-May-2018 Nicola Zaghen <nicola.zaghen@imgtec.com>

Rename DEBUG macro to LLVM_DEBUG.

The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/

Rename DEBUG macro to LLVM_DEBUG.

The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.

In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.

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

llvm-svn: 332240

show more ...


# 5f8f34e4 01-May-2018 Adrian Prantl <aprantl@apple.com>

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they ar

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done

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

llvm-svn: 331272

show more ...


# 0b672491 27-Apr-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] Add defs to calls + don't track liveness on outlined functions

This commit makes it so that if you outline a def of some register, then the
call instruction created by the outliner

[MachineOutliner] Add defs to calls + don't track liveness on outlined functions

This commit makes it so that if you outline a def of some register, then the
call instruction created by the outliner actually reflects that the register
is defined by the call. It also makes it so that outlined functions don't
have the TracksLiveness property.

Outlined calls shouldn't break liveness assumptions that someone might make.

This also un-XFAILs the noredzone test, and updates the calls test.

llvm-svn: 331095

show more ...


# 1eca23bd 19-Apr-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] NFC: Move EnableLinkOnceODROutlining into MachineOutliner.cpp

This moves the EnableLinkOnceODROutlining flag from TargetPassConfig.cpp into
MachineOutliner.cpp. It also removes Out

[MachineOutliner] NFC: Move EnableLinkOnceODROutlining into MachineOutliner.cpp

This moves the EnableLinkOnceODROutlining flag from TargetPassConfig.cpp into
MachineOutliner.cpp. It also removes OutlineFromLinkOnceODRs from the
MachineOutliner constructor. This is now handled by the moved command-line
flag.

llvm-svn: 330373

show more ...


Revision tags: llvmorg-6.0.1-rc1
# bccd18b8 04-Apr-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner] Add `useMachineOutliner` target hook

The MachineOutliner has a bunch of target hooks that will call llvm_unreachable
if the target doesn't implement them. Therefore, if you enable

[MachineOutliner] Add `useMachineOutliner` target hook

The MachineOutliner has a bunch of target hooks that will call llvm_unreachable
if the target doesn't implement them. Therefore, if you enable the outliner on
such a target, it'll just crash. It'd be much better if it'd just *not* run
the outliner at all in this case.

This commit adds a hook to TargetInstrInfo that returns false by default.
Targets that implement the hook make it return true. The outliner checks the
return value of this hook to decide whether or not to continue.

llvm-svn: 329220

show more ...


# d506bf8e 03-Apr-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Make outlined functions have internal linkage

The linkage type on outlined functions was private before. This meant that if
you set a breakpoint in an outlined function, the d

[MachineOutliner][NFC] Make outlined functions have internal linkage

The linkage type on outlined functions was private before. This meant that if
you set a breakpoint in an outlined function, the debugger wouldn't be able to
give a sane name to the outlined function.

This commit changes the linkage type to internal and updates any tests that
relied on the prefixes on the names of outlined functions.


llvm-svn: 329116

show more ...


Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2
# df82274f 22-Mar-2018 Jessica Paquette <jpaquette@apple.com>

[MachineOutliner][NFC] Refactoring + comments in runOnModule

Split up some of the if/else branches in runOnModule. Elaborate on some
comments. Replace a call to getOrCreateMachineFunction with getMa

[MachineOutliner][NFC] Refactoring + comments in runOnModule

Split up some of the if/else branches in runOnModule. Elaborate on some
comments. Replace a call to getOrCreateMachineFunction with getMachineFunction.

This makes it clearer what's happening in runOnModule, and ensures that the
outliner doesn't create any MachineFunctions which will never be used by the
outliner (or anything else, really).

llvm-svn: 328240

show more ...


Revision tags: llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2
# 82203c41 31-Jan-2018 Geoff Berry <gberry@codeaurora.org>

[MachineOutliner] Freeze registers in new functions

Summary:
Call MRI.freezeReservedRegs() on functions created during outlining so
that calls to isReserved() by the verifier called after this pass

[MachineOutliner] Freeze registers in new functions

Summary:
Call MRI.freezeReservedRegs() on functions created during outlining so
that calls to isReserved() by the verifier called after this pass won't
assert.

Reviewers: MatzeB, qcolombet, paquette

Subscribers: mcrosier, javed.absar, llvm-commits

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

llvm-svn: 323905

show more ...


# 0909ca13 26-Jan-2018 Hiroshi Inoue <inouehrs@jp.ibm.com>

[NFC] fix trivial typos in comments and documents

"in in" -> "in", "on on" -> "on" etc.

llvm-svn: 323508


# a499c3c2 19-Jan-2018 Jessica Paquette <jpaquette@apple.com>

Add optional DICompileUnit to DIBuilder + make outliner debug info use it

Previously, the DIBuilder didn't expose functionality to set its compile unit
in any other way than calling createCompileUni

Add optional DICompileUnit to DIBuilder + make outliner debug info use it

Previously, the DIBuilder didn't expose functionality to set its compile unit
in any other way than calling createCompileUnit. This meant that the outliner,
which creates new functions, had to create a new compile unit for its debug
info.

This commit adds an optional parameter in the DIBuilder's constructor which
lets you set its CU at construction.

It also changes the MachineOutliner so that it keeps track of the DISubprograms
for each outlined sequence. If debugging information is requested, then it
uses one of the outlined sequence's DISubprograms to grab a CU. It then uses
that CU to construct the DISubprogram for the new outlined function.

The test has also been updated to reflect this change.

See https://reviews.llvm.org/D42254 for more information. Also see the e-mail
discussion on D42254 in llvm-commits for more context.

llvm-svn: 322992

show more ...


12345678