Commit Graph

137428 Commits

Author SHA1 Message Date
Lang Hames
a59e27b537 [Orc] Explicitly specify type for assignment.
This should fix the MSVC errors in
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15120



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 02:59:24 +00:00
Sebastian Pop
fab5bb8a6c GVN-hoist: invalidate MD cache (PR29144)
Without invalidating the entries in the MD cache we would try to access instructions
that were removed in previous iterations of hoisting.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 02:48:41 +00:00
Quentin Colombet
529dc06de0 [RegBankSelect] Do not abort when the target wants to fall back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279906 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 02:38:27 +00:00
Quentin Colombet
16b39f4d7f [InstructionSelect] Do not abort when the target wants to fall back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 02:38:24 +00:00
Quentin Colombet
bbef3e060a [MachineLegalize] Do not abort when the target wants to fall back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 02:38:21 +00:00
Matt Arsenault
95ec13b22a AMDGPU: Select mulhi 24-bit instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 01:32:27 +00:00
Matt Arsenault
e52dfc95ef AMDGPU: Move cndmask pseudo to be isel pseudo
There's only one use of this for the convenience
of a pattern. I think v_mov_b64_pseudo should also be
moved, but SIFoldOperands does currently make use of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 01:00:37 +00:00
Matt Arsenault
f5dc5ec299 AMDGPU: Fix sched type for branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:51:02 +00:00
Matt Arsenault
36a8c3e60f AMDGPU: Remove register operand from si_mask_branch
It isn't used for anything, and is also misleading since
it could be spilled at the end of the block, so it can't be relied
on. There ends up being a verifier error about using an undefined
register since the spill kills the register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:42:21 +00:00
Matt Arsenault
d97fe48fe0 AMDGPU: Improve error reporting for maximum branch distance
Unfortunately this seems to only help the assembler diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:21:22 +00:00
Chris Bieneman
4ec9567b37 [CMake] Only generate Components.cmake if components are specified
Generating the Components import file is useless if there are no components coming in from the runtimes configuration, so we should skip generation in that case.

This also should fix the configuration error that Renato reported on llvm-dev.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:19:51 +00:00
Lang Hames
fd6bad6c38 [ORC] Fix typo in LogicalDylib, add unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:19:05 +00:00
Quentin Colombet
c47e5db5f7 [GlobalISel] Add a fallback path to SDISel.
When global-isel fails on a MachineFunction MF, MF will be cleaned up
and given to SDISel.
Thanks to this fallback, we can already perform correctness test even if
we support only a small portion of the functions in a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:18:31 +00:00
Quentin Colombet
1dba46c5a7 [AArch64][CallLowering] Do not assert for not implemented part.
When doing the ABI lowering, report a failure to the caller instead of
asserting. This gives a chance for the caller to recover.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:18:28 +00:00
Quentin Colombet
411fc079bb [GlobalISel] Teach the core pipeline not to run if ISel failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279889 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:18:24 +00:00
Michael Kuperstein
b274272581 [X86] Add baseline test for "odd" shuffles. NFC.
Adds a baseline test for lowering shuffles where the width of the output
vector is not twice the size of the input vectors. Many of those sequences
are suboptimal, and will hopefully be improved in follow-up patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-27 00:10:24 +00:00
Quentin Colombet
c15079f481 [IRTranslator] Do not abort when the target wants to fall back.
Every pass in the GlobalISel pipeline will need to do something similar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 23:49:05 +00:00
Quentin Colombet
6dff9d76f8 [MFProperties] Introduce a FailedISel property.
This is used to communicate that the instruction selection pipeline
failed at some point.
Another way to achieve that would be to have some kind of conditional
scheduling in the PassManager, such that we only schedule a pass based
on the success/failure of another one. The property approach has the
advantage of being lightweight and solve the problem at stake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 23:49:01 +00:00
Teresa Johnson
d80408f437 [ThinLTO] Move loading of cache entry to client
Summary:
Have the cache pass back the path to the cache entry when it
is ready to be loaded, instead of a buffer.

For gold-plugin we can simply pass this file back to gold directly,
which avoids expensive writing of a separate tmp file. Ensure
the cache entry is not deleted on cleanup by adjusting the setting
of the IsTemporary flags.

Moved the loading of the buffer into llvm-lto2 to maintain current
behavior.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 23:29:14 +00:00
Andrew Kaylor
bc94acefe6 Adding document describing the use of the -opt-bisect-limit option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 23:11:48 +00:00
Quentin Colombet
be4c1108a9 [TargetPassConfig] Add a target hook to know what GlobalISel should do on error.
By default, this hook tells GlobalISel to abort (report a fatal error)
when it encounters an error. The alternative will be to fall back on
SDISel.
This fall back will be removed when the bring-up of GlobalISel is over.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:32:59 +00:00
Quentin Colombet
65ce6c6c0c [IRTranslator][NFC] Use DEBUG_TYPE instead of repeating the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:32:57 +00:00
Quentin Colombet
aaa2879009 [SelectionDAG] Do not run the ISel process on already selected code.
Right now, this cannot happen, but with the fall back path of GlobalISel
it will show up eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:32:55 +00:00
Quentin Colombet
ac0c6d3071 [MachineFunction] Introduce a reset method.
This method allows to reset the state of a MachineFunction as if it was
just created. This will be used during the bring-up of GlobalISel to
provide a way to fallback on SelectionDAG. That way, we can start doing
correctness testing even if we are not able to select all functions via
the global instruction selector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:32:53 +00:00
Justin Bogner
ea4e88c5cf TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
This mapping is between pointers, which DenseMap is particularly good
at. Most targets aren't really affected, but if there's a lot of
subregister composition this can shave off a good chunk of time from
generating registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:29:36 +00:00
Quentin Colombet
7e94389773 [MFProperties] Introduce a reset method with no argument.
This method allows to reset all the properties in one go.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:09:11 +00:00
Quentin Colombet
1c4f0f9d6c [MFProperties][NFC] Rename clear into reset to match BitVector naming.
The name clear is used to reset all the bit in bitvectors and using it
to reset just properties was confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 22:09:08 +00:00
Tom Stellard
c6ee33f19c AMDGPU/SI: Canonicalize offset order for merged DS instructions
Summary:
If the scheduler clusters the loads, then the offsets will be sorted,
but it is possible for the scheduler to scheduler loads together
without out explicitly clustering them, which would give us non-sorted
offsets.

Also, we will want to do this if we move the load/store optimizer before
the scheduler.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 21:36:47 +00:00
Tom Stellard
96359c15f7 XXX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 21:16:40 +00:00
Tom Stellard
8de9275a0e AMDGPU/SI: Use a better method for determining the largest pressure sets
Summary:
There are a few different sgpr pressure sets, but we only care about
the one which covers all of the sgprs.  We were using hard-coded
register pressure set names to determine the reg set id for the
biggest sgpr set.  However, we were using the wrong name, and this
method is pretty fragile, since the reg pressure set names may
change.

The new method just looks for the pressure set that contains the most
reg units and sets that set as our SGPR pressure set.  We've also
adopted the same technique for determining our VGPR pressure set.

Reviewers: arsenm

Subscribers: MatzeB, arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 21:16:37 +00:00
Chris Bieneman
cf9a1e3c7d [CMake] Expose runtime component check targets
This will expose the check targets for runtime project components into the top-level build. It will enable exposing targets like check-asan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:34:11 +00:00
Adam Nemet
c96b33c2f4 [Inliner] Report when inlining fails because callee's def is unavailable
Summary:
This is obviously an interesting case because it may motivate code
restructuring or LTO.

Reporting this requires instantiation of ORE in the loop where the call
sites are first gathered.  I've checked compile-time
overhead *with* -Rpass-with-hotness and the worst slow-down was 6% in
mcf and quickly tailing off.  As before without -Rpass-with-hotness
there is no overhead.

Because this could be a pretty noisy diagnostics, it is currently
qualified as 'verbose'.  As of this patch, 'verbose' diagnostics are
only emitted with -Rpass-with-hotness, i.e. when the output is expected
to be filtered.

Reviewers: eraman, chandlerc, davidxl, hfinkel

Subscribers: tejohnson, Prazek, davide, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:21:05 +00:00
Rafael Espindola
9e8a8de066 Make writeToResolutionFile a static helper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:19:35 +00:00
Kyle Butt
db440c8640 TailDuplication: Record blocks that received the duplicated block. NFC.
This will allow tail duplication during layout to handle the cfg changes more
cleanly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:12:40 +00:00
Chris Bieneman
7921d70074 [CMake] Fixing LLVM_INCLUDE_TESTS for runtimes directory
We need to explicitly pass LLVM_INCLUDE_TESTS through from the top-level to the runtimes configuration because it isn't in LLVMConfig.cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:08:57 +00:00
Teresa Johnson
ceaef9f87f Streamline LTO getComdat invocation (NFC)
We already have obtained a pointer to the underlying GlobalObject,
use it directly to find the comdat, rather than using the
GlobalValue::getComdat which will do the same thing again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 20:07:15 +00:00
Kevin Enderby
ff19e2b684 Next set of additional error checks for invalid Mach-O files for bad LC_SYMTAB’s.
This contains the missing checks for LC_SYMTAB load command fields.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 19:34:07 +00:00
Manman Ren
55d021c2f5 Swift Calling Convetion: add support for AArch64.
It will just be the same as the regular calling convention.

rdar://28029509


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 19:28:17 +00:00
Tim Northover
2fd36a5c7b AArch64: avoid assertion on illegal types in performFDivCombine.
In the code to detect fixed-point conversions and make use of AArch64's special
instructions, we weren't prepared for weird types. The fptosi direction got
fixed recently, but not the similar sitofp code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:52:31 +00:00
Sanjay Patel
d96bcc0e97 [InstCombine] add helper function for icmp (and (sh X, Y), C2), C1 ; NFC
Like other recent changes near here, the goal is to allow vector types for
all of these folds. Splitting things up makes it easier to incrementally 
enhance the code and easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:28:46 +00:00
Chad Rosier
519119c89d [AArch64] Avoid materializing constant values when generating csel instructions.
Differential Revision: https://reviews.llvm.org/D23677

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:05:50 +00:00
Davide Italiano
fb0de92d8c [AsmParser] Placate a -Wmisleading-indentantion warning (GCC7).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 18:05:03 +00:00
Reid Kleckner
def731aa8a [MC] Move .cv_loc management logic out of MCContext
MCContext already has many tasks, and separating CodeView out from it is
probably a good idea. The .cv_loc tracking was modelled on the DWARF
tracking which lived directly in MCContext.

Removes the inclusion of MCCodeView.h from MCContext.h, so now there are
only 10 build actions while I hack on CodeView support instead of 265.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:58:37 +00:00
Tim Northover
ce55c03b2b GlobalISel: mark G_FPEXT legal from float to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:22 +00:00
Tim Northover
9e4ec13f32 GlobalISel: mark G_FCMP legal on float & double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:19 +00:00
Tim Northover
75d2e48802 GlobalISel: simplify G_ICMP legalization regime.
It's unclear how the old

    %res(32) = G_ICMP { s32, s32 } intpred(eq), %0, %1

is actually different from an s1 verison

    %res(1) = G_ICMP { s1, s32 } intpred(eq), %0, %1

so we'll remove it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:17 +00:00
Tim Northover
b04cf870a6 GlobalISel: legalize sdiv and srem operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:13 +00:00
Tim Northover
e7265c7232 GlobalISel: legalize under-width divisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:06 +00:00
Tim Northover
3c47a67a88 GlobalISel: mark selects legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:46:03 +00:00
Tim Northover
f1f64bed75 GlobalISel: mark float/int conversions legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 17:45:58 +00:00