| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the minimal support necessary to select a function that returns the sum of
two i32 values.
This includes some support for argument/return lowering of i32 values through
registers, as well as the handling of copy and add instructions throughout the
GlobalISel pipeline.
Differential Revision: https://reviews.llvm.org/D26677
llvm-svn: 289940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IRTranslator uses an additional block before the LLVM-IR entry block
to perform all the ABI lowering and the constant hoisting. Thus, this
block is the actual entry block and it falls through the LLVM-IR entry
block. However, with such representation, we end up with two basic
blocks that are not maximal.
Therefore, this patch adds a bit of canonicalization by merging both the
LLVM-IR entry block and the ABI lowering/constants hoisting into one
block, making the resulting block more likely to be maximal (indeed the
LLVM-IR entry block might not have been maximal).
llvm-svn: 289891
|
|
|
|
|
|
| |
Apparently I missed this one when I moved ValueHandler back in r288658. Sorry!
llvm-svn: 289528
|
|
|
|
|
|
|
| |
Supporting them properly is a reasonably complex chunk of work, so to allow bot
testing before then we should at least be able to fall back to DAG ISel.
llvm-svn: 289150
|
|
|
|
| |
llvm-svn: 289149
|
|
|
|
|
|
|
|
| |
ConstantExpr instances were emitting code into the current block rather than
the entry block. This meant they didn't necessarily dominate all uses, which is
clearly wrong.
llvm-svn: 288985
|
|
|
|
|
|
|
| |
Having to ask the MIRBuilder for the current function is a little awkward, and
I'm intending to improve how that's threaded through anyway.
llvm-svn: 288983
|
|
|
|
|
|
|
|
|
|
|
|
| |
MachineIRBuilder had weird before/after and beginning/end flags for the insert
point. Unfortunately the non-default means that instructions will be inserted
in reverse order which is almost never what anyone wants.
Really, I think we just want (like IRBuilder has) the ability to insert at any
C++ iterator-style point (i.e. before any instruction or before MBB.end()). So
this fixes MIRBuilders to behave like IRBuilders in this respect.
llvm-svn: 288980
|
|
|
|
|
|
|
| |
We were rounding size in bits down rather than up, leading to 0-sized slots for
i1 (assert!) and bugs for other types not byte-aligned.
llvm-svn: 288848
|
|
|
|
| |
llvm-svn: 288840
|
|
|
|
|
|
|
|
|
|
| |
There were two problems:
+ AArch64 was reusing random data from its binary op tables, which is
complete nonsense for G_SEQUENCE.
+ Even when AArch64 gave up and said it couldn't handle G_SEQUENCE,
the generic code asserted.
llvm-svn: 288836
|
|
|
|
| |
llvm-svn: 288835
|
|
|
|
|
|
|
|
| |
It'll almost immediately fail because it always tries to half/double the size
until it finds a legal one. Unfortunately, this triggers an assertion
preventing the DAG fallback from being possible.
llvm-svn: 288834
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add missing parens in assert, which warn in GCC.
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27448
llvm-svn: 288792
|
|
|
|
|
|
|
|
| |
The function used to finish off PHIs by adding the relevant basic blocks can
fail if we're aborting and still don't actually have the needed
MachineBasicBlocks. So avoid trying in that case.
llvm-svn: 288727
|
|
|
|
|
|
|
|
|
| |
When the entry block was empty after arg lowering, we were always placing
constants at the end. This is probably hamrless while translating the same
block, but horribly wrong once its terminator has been translated. So switch to
inserting at the beginning.
llvm-svn: 288720
|
|
|
|
| |
llvm-svn: 288717
|
|
|
|
| |
llvm-svn: 288713
|
|
|
|
|
|
|
|
| |
This makes it more similar to the floating-point constant, and also allows for
larger constants to be translated later. There's no real functional change in
this patch though, just syntax updates.
llvm-svn: 288712
|
|
|
|
|
|
|
|
| |
Returning 0 (NoReg) from getOrCreateVReg leads to unexpected situations later
in the translation. It's better to return a valid (if undefined) register and
let the rest of the instruction carry on as planned.
llvm-svn: 288709
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function seems target-independent so far: all the target-specific behaviour
is isolated in the CCAssignFn and the ValueHandler (which we're also extracting
into the generic CallLowering).
The intention is to use this in the ARM backend.
Differential Revision: https://reviews.llvm.org/D27045
llvm-svn: 288658
|
|
|
|
| |
llvm-svn: 288460
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recommitting r288293 with some extra fixes for GlobalISel code.
Most of the exception handling members in MachineModuleInfo is actually
per function data (talks about the "current function") so it is better
to keep it at the function instead of the module.
This is a necessary step to have machine module passes work properly.
Also:
- Rename TidyLandingPads() to tidyLandingPads()
- Use doxygen member groups instead of "//===- EH ---"... so it is clear
where a group ends.
- I had to add an ugly const_cast at two places in the AsmPrinter
because the available MachineFunction pointers are const, but the code
wants to call tidyLandingPads() in between
(markFunctionEnd()/endFunction()).
Differential Revision: https://reviews.llvm.org/D27227
llvm-svn: 288405
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: t.p.northover, ab, qcolombet
Subscribers: mehdi_amini, vkalintiris, wdng, dberris, llvm-commits, rovka
Differential Revision: https://reviews.llvm.org/D26765
llvm-svn: 287344
|
|
|
|
|
|
| |
This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.
llvm-svn: 287206
|
|
|
|
|
|
| |
While there, rename them to follow the coding style.
llvm-svn: 287169
|
|
|
|
|
|
|
|
|
| |
This reverts commit r286962.
We want to avoid depending on SelectionDAG, and AddLandingPadInfo
lives in CodeGen now.
llvm-svn: 287168
|
|
|
|
|
|
|
|
|
|
|
| |
They're not SelectionDAG- or FunctionLoweringInfo-specific. They
are, however, specific to building MMI from IR.
We could make them members, but it's nice having MMI be a "simple" data
structure and this logic kept separate.
This also lets us reuse them from GlobalISel.
llvm-svn: 287167
|
|
|
|
|
|
|
| |
r286407 has introduced calls to llvm::AddLandingPadInfo, which lives in the
SelectionDAG component. Add it to LLVMBuild to avoid linker failures on Linux.
llvm-svn: 286962
|
|
|
|
| |
llvm-svn: 286808
|
|
|
|
| |
llvm-svn: 286408
|
|
|
|
|
|
|
| |
Pretty bare-bones support for exception handling (no weird MSVC stuff, no SjLj
etc), but it should get things going.
llvm-svn: 286407
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
release builds.
Summary:
There are two variables here that break. This change constrains both of them to
debug builds (via DEBUG() or #ifndef NDEBUG).
Reviewers: bkramer, t.p.northover
Subscribers: mehdi_amini, vkalintiris
Differential Revision: https://reviews.llvm.org/D26421
llvm-svn: 286300
|
|
|
|
|
|
|
|
|
| |
After instruction selection we perform some checks on each VReg just before
discarding the type information. These checks were assertions before, but that
breaks the fallback path so this patch moves the logic into the main flow and
reports a better error on failure.
llvm-svn: 286289
|
|
|
|
|
|
| |
This is helpful when multiple instructions are inserted.
llvm-svn: 286273
|
|
|
|
|
|
|
|
|
|
|
| |
Erasing reverse_iterators is problematic; iterate manually.
While there, keep track of the range of inserted instructions.
It can miss instructions inserted elsewhere, but those are harder
to track.
Differential Revision: http://reviews.llvm.org/D22924
llvm-svn: 286272
|
|
|
|
| |
llvm-svn: 286190
|
|
|
|
| |
llvm-svn: 285614
|
|
|
|
|
|
| |
Committed by mistake.
llvm-svn: 284606
|
|
|
|
| |
llvm-svn: 284604
|
|
|
|
| |
llvm-svn: 284603
|
|
|
|
| |
llvm-svn: 284527
|
|
|
|
| |
llvm-svn: 284525
|
|
|
|
|
|
|
|
|
|
| |
The previous names were both misleading (the MachineLegalizer actually
contained the info tables) and inconsistent with the selector & translator (in
having a "Machine") prefix. This should make everything sensible again.
The only functional change is the name of a couple of command-line options.
llvm-svn: 284287
|
|
|
|
| |
llvm-svn: 283809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template
The core of the change is supposed to be NFC, however it also fixes
what I believe was an undefined behavior when calling:
va_start(ValueArgs, Desc);
with Desc being a StringRef.
Differential Revision: https://reviews.llvm.org/D25342
llvm-svn: 283671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of producing a mapping for all the operands, we only generate a
mapping for the definition. Indeed, the other operands are not
constrained by the instruction and thus, we should leave the choice to
the actual definition to do the right thing.
In pratice this is almost NFC, but with one advantage. We will have only
one instance of OperandsMapping for each copy and phi that map to one
register bank instead of one different instance for each different
number of operands for each copy and phi.
llvm-svn: 282756
|
|
|
|
|
|
|
|
|
|
|
| |
This is a step toward statically allocate InstructionMapping. Like the
previous few commits, the goal is to move toward a TableGen'ed like
structure with no dynamic allocation at all.
This should already improve compile time by getting rid of a bunch of
memmove of SmallVectors.
llvm-svn: 282643
|
|
|
|
|
|
|
| |
This is a preparatory commit for more TableGen-like structure.
NFC
llvm-svn: 282642
|
|
|
|
|
|
|
| |
This makes it obvious that items in those maps behave like statically
created objects.
llvm-svn: 282327
|