Petar Avramovic
eff069b6c8
[MIPS GlobalISel] narrowScalar G_CONSTANT
...
Legalize s64 G_CONSTANT using narrowScalar on MIPS 32.
Differential Revision: https://reviews.llvm.org/D54255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346495 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 14:21:16 +00:00
Petar Avramovic
d22ff25690
[MIPS GlobalISel] Set operand order for G_MERGE and G_UNMERGE
...
Set operands order for G_MERGE_VALUES and G_UNMERGE_VALUES so
that least significant bits always go first, regardless of endianness.
Differential Revision: https://reviews.llvm.org/D54098
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346305 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-07 11:45:43 +00:00
Petar Jovanovic
c99132a727
[MIPS GlobalISel] Legalize constants
...
Legalize s1, s8, s16 and s64 G_CONSTANT for MIPS32.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D53077
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344684 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 10:30:03 +00:00
Petar Jovanovic
48d3a5535e
[MIPS GlobalISel] Legalize i64 add
...
Custom legalize s64 G_ADD for MIPS32.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D52652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-08 23:59:37 +00:00
Petar Jovanovic
8a7d229b56
[MIPS GlobalISel] Select icmp
...
Select 32bit integer compare instructions for MIPS32.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D51489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341840 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10 15:56:52 +00:00
Petar Jovanovic
f798bee771
[MIPS GlobalISel] Legalize i8 and i16 add
...
Legalize G_ADD for types smaller than i32.
LegalizationArtifactCombiner replaces extend instructions with appropriate
bitwise instructions.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D51213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340697 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-26 07:25:33 +00:00
Petar Jovanovic
35df2a3841
[MIPS GlobalISel] Select bitwise instructions
...
Select bitwise instructions for i32.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D50183
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340258 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 08:15:56 +00:00
Petar Jovanovic
f4bd4b2689
[MIPS GlobalISel] Select global address
...
Select G_GLOBAL_VALUE for position dependent code.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D49803
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338499 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 09:03:23 +00:00
Petar Jovanovic
3de71f627e
[MIPS GlobalISel] Lower pointer arguments
...
Add support for lowering pointer arguments.
Changing type from pointer to integer is already done in
MipsTargetLowering::getRegisterTypeForCallingConv.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D49419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337912 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 12:35:01 +00:00
Petar Jovanovic
f85073912f
[MIPS GlobalISel] Select instructions to load and store i32 on stack
...
Add code for selection of G_LOAD, G_STORE, G_GEP, G_FRAMEINDEX and
G_CONSTANT. Support loads and stores of i32 values.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D48957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337168 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16 13:29:32 +00:00
Roman Tereshin
f911f7d95a
[GlobalISel][Mips] LegalizerInfo verifier: Adding LegalizerInfo::verify(...) call for Mips
...
Reviewers: aemerson, qcolombet
Reviewed By: qcolombet
Differential Revision: https://reviews.llvm.org/D46339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333665 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-31 16:16:49 +00:00
Petar Jovanovic
91e3c3b9cc
[MIPS GlobalISel] remove superfluous #includes (NFC)
...
Remove superfluous #includes.
Minor code style change in MipsCallLowering::lowerFormalArguments().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329926 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 17:01:46 +00:00
Petar Jovanovic
92ffece499
[MIPS GlobalISel] Select add i32, i32
...
Add the minimal support necessary to lower a function that returns the
sum of two i32 values.
Support argument/return lowering of i32 values through registers only.
Add tablegen for regbankselect and instructionselect.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D44304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329819 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 15:12:32 +00:00
Craig Topper
f137ed238d
[IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer.
...
Currently EVT is in the IR layer only because of Function.cpp needing a very small piece of the functionality of EVT::getEVTString(). The rest of EVT is used in codegen making CodeGen a better place for it.
The previous code converted a Type* to EVT and then called getEVTString. This was only expected to handle the primitive types from Type*. Since there only a few primitive types, we can just print them as strings directly.
Differential Revision: https://reviews.llvm.org/D45017
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328806 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-29 17:21:10 +00:00
David Blaikie
b91d9a7128
Fix layering by moving ValueTypes.h from CodeGen to IR
...
ValueTypes.h is implemented in IR already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328397 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-23 23:58:31 +00:00
Petar Jovanovic
581db4c3f6
[MIPS GlobalISel] Adding GlobalISel
...
Add GlobalISel infrastructure up to the point where we can select a ret
void.
Patch by Petar Avramovic.
Differential Revision: https://reviews.llvm.org/D43583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-23 11:06:40 +00:00