132350 Commits

Author SHA1 Message Date
Sanjay Patel
1674a46fcf add tests for vector urem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:55:17 +00:00
David Majnemer
acba3a4cdd Address post-review for r270246
This gets rid of some unnecessary SmallStrings in
X86TargetMachine::getSubtargetImpl.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:41:24 +00:00
Adrian Prantl
d492dcbc14 dsymutil/modules: Reword the warning for static libraries without module caches
In addition to clarifying the warning message this contains a minor functional
change in that it now warns if the *immediate* parent directory in which the
missing PCM is expected to be isn't found.

This patch also includes a more comprehensive testcase.

rdar://problem/25860711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:36:06 +00:00
Michael Kuperstein
116261ccf9 [BasicAA] Turn DecomposeGEPExpression runtime checks into asserts.
When it has a DataLayout, DecomposeGEPExpression() should return the same object
as GetUnderlyingObject(). Per the FIXME, it currently always has a DL, so the
runtime check is redundant and can become an assert.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:26:50 +00:00
Chris Bieneman
bf0e75a50e Revert "Work around a glibc bug: backtrace() spuriously fails if..."
This commit has been breaking the FreeBSD bots:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd

This reverts commit r269992.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:15:17 +00:00
Sanjay Patel
ae359d99fb use FileCheck instead of grep for exact checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:07:18 +00:00
Derek Bruening
21214517f0 [esan] Use ModulePass for EfficiencySanitizerPass.
Summary:
Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to
better support global variable creation for a forthcoming struct field
counter tool.

Patch by Qin Zhao.

Reviewers: aizatsky

Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc

Differential Revision: http://reviews.llvm.org/D20458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:00:05 +00:00
Rui Ueyama
59427f6dc7 pdbdump: print out symbol names referred by publics stream.
DBI stream contains a stream number of the symbol record stream.
Symbol record streams is an array of length-type-value members.
Each member represents one symbol.

Publics stream contains offsets to the symbol record stream.
This patch is to print out all symbols that are referenced by
the publics stream.

Note that even with this patch, llvm-pdbdump cannot dump all the
information in a publics stream since it contains more information
than symbol names. I'll improve it in followup patches.

Differential Revision: http://reviews.llvm.org/D20480

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:55:17 +00:00
Krzysztof Parzyszek
7192e93760 Use report_fatal_error after all
Depending on the compiler used to build LLVM, llvm_unreachable can either
expand to a call to abort(), or to a __builtin_unreachable. The latter
does not have a predictable behavior at runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:46:42 +00:00
Matthias Braun
2a73788c72 LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().
Fix renameDisconnectedComponents() creating vreg uses that can be
reached from function begin withouthaving a definition (or explicit
live-in). Fix this by inserting IMPLICIT_DEF instruction before
control-flow joins as necessary.

Removes an assert from MachineScheduler because we may now get
additional IMPLICIT_DEF when preparing the scheduling policy.

This fixes the underlying problem of http://llvm.org/PR27705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:46:13 +00:00
Peter Collingbourne
1df5089425 CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.
This gives AsmPrinter a chance to initialize its DD field before
we call beginModule(), which is about to start using it.

Differential Revision: http://reviews.llvm.org/D20413

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:35:35 +00:00
Peter Collingbourne
37cc1ba8fa CodeGen: Do not require a MachineFunction just to create a DIEDwarfExpression.
We are about to start using DIEDwarfExpression to create global variable
DIEs, which happens before we generate code for functions.

Differential Revision: http://reviews.llvm.org/D20412

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:35:17 +00:00
Justin Bogner
ea1ed45029 CODE_OWNERS: Take ownership of SelectionDAG
Owen no longer has time to tend to the yaks in SelectionDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:14:04 +00:00
Jun Bum Lim
2d7f9c2715 [AArch64] Disable narrow load merge by default
Summary:
As this optimization converts two loads into one load with two shift instructions,
it could potentially hurt performance if a loop is arithmetic operation intensive.

Reviewers: t.p.northover, mcrosier, jmolloy

Subscribers: evandro, jmolloy, aemerson, rengolin, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D20172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:45:49 +00:00
Mark Lacey
04be7e88ef Functions with differing phis should not be merged.
Check that the incoming blocks of phi nodes are identical, and block
function merging if they are not.

rdar://problem/26255167

Differential Revision: http://reviews.llvm.org/D20462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:39:11 +00:00
Quentin Colombet
8cd572cb8f [RegBankSelect] Look for the best mapping in greedy mode.
The Fast mode takes the first mapping, the greedy mode loops over all
the possible mapping for an instruction and choose the cheaper one.
Test case will come with target specific code, since we currently do not
have instructions that have several mappings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:37:33 +00:00
Chris Bieneman
28b72d65ff [MachOYAML] Removing duplicated field from LC_UUID YAML
The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:36:52 +00:00
Quentin Colombet
0da74c8399 [RegBankSelect] Get rid of a now dead method: setSafeInsertPoint.
This is now encapsulated in the RepairingPlacement class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270247 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:17:16 +00:00
David Majnemer
ee47fd7219 [X86] Reduce memory allocations in X86TargetMachine::getSubtargetImpl
We performed a number of memory allocations each time getTTI was called,
remove them by using SmallString.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:16:06 +00:00
Quentin Colombet
fe4c39be37 [RegBankSelect] Take advantage of a potential best cost information in
computeMapping.

Computing the cost of a mapping takes some time.
Since in Fast mode, the cost is irrelevant, just spare some cycles by not
computing it.
In Greedy mode, we need to choose the best cost, that means that when
the local cost gets more expensive than the best cost, we can stop
computing the repairing and cost for the current mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:00:46 +00:00
Quentin Colombet
0a2adaeedd [RegBankSelect] Use frequency and probability information to compute
more precise cost in Greedy mode.

In Fast mode the cost is irrelevant so do not bother requiring that
those passes get scheduled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:54:09 +00:00
Quentin Colombet
8ffc17cd96 [RegBankSelect] Use the Fast mode for functions with the optnone attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:36:54 +00:00
Chris Bieneman
54530096e5 [obj2yaml][yaml2obj] Adding enumFallback for MachO load commands
This adds support for handling unknown load commands, and a bogus_load_command tests.

Unknown or unsupported load commands can be specified in YAML by their hex value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:20:42 +00:00
Sanjay Patel
2c98ad1c24 fix comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270237 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:07:19 +00:00
Sanjay Patel
6d605e9529 use range-loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:00:10 +00:00
Quentin Colombet
8dd49fb28f [RegBankSelect] Specify different optimization mode for the pass.
The mode should be choose by the target when instantiating the pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:55:35 +00:00
Sanjay Patel
040e77cee7 fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:46:01 +00:00
Krzysztof Parzyszek
4e5eef13a1 Fix error reporting in register scavenger (lack of emergency spill slot)
- Do not store Twine objects.
- Remove report_fatal_error, since llvm_unreachable does terminate the
  program in release mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:38:34 +00:00
Quentin Colombet
4c3d76947c [RegBankSelect] Add a method to avoid splitting while repairing.
The previous choice of the insertion points for repairing was
straightfoward but may introduce some basic block or edge splitting. In
some situation this is something we can avoid.
For instance, when repairing a phi argument, instead of placing the
repairing on the related incoming edge, we may move it to the previous
block, before the terminators. This is only possible when the argument
is not defined by one of the terminator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:36:12 +00:00
Davide Italiano
2bd5cc36e7 [PM/PartiallyInlineLibCalls] Fix pass dependencies.
Inline getAnalysisUsage() while I'm here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:23:14 +00:00
Simon Pilgrim
11c52a1f5a [X86][AVX] Generalized matching for target shuffle combines
This patch is a first step towards a more extendible method of matching combined target shuffle masks.

Initially this just pulls out the existing basic mask matches and adds support for some 256/512 bit equivalents. Future patterns will require a number of features to be added but I wanted to keep this patch simple.

I hope we can avoid duplication between shuffle lowering and combining and share more complex pattern match functions in future commits.

Differential Revision: http://reviews.llvm.org/D19198

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:19:30 +00:00
Simon Pilgrim
a7f9ea74d5 [X86][AVX] Sync with clang/test/CodeGen/avx-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:05:55 +00:00
Davide Italiano
fbaa1ba049 [PartiallyInlineLibCalls] Remove dead includes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 15:52:23 +00:00
Davide Italiano
9d466b3f70 [PM/PartiallyInlineLibCalls] Convert to static function in preparation for porting this pass to the new PM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 15:43:39 +00:00
Sanjay Patel
f5a8ebbd97 [SimplifyCFG] eliminate switch cases based on known range of switch condition
This was noted in PR24766:
https://llvm.org/bugs/show_bug.cgi?id=24766#c2

We may not know whether the sign bit(s) are zero or one, but we can still
optimize based on knowing that the sign bit is repeated.

Differential Revision: http://reviews.llvm.org/D20275



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:53:09 +00:00
Krzysztof Parzyszek
a3d21bd41c Correction to r270219: fix detection of invalid frame index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:34:03 +00:00
Krzysztof Parzyszek
64552eff55 Skip entries with invalid indexes in the search loop in register scavenger
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:18:54 +00:00
Sanjay Patel
760078b188 [MCExpr] avoid UB via negation of INT_MIN
I accidentally exposed a bug in MCExpr::evaluateAsRelocatableImpl() with the test file added in:
http://reviews.llvm.org/rL269977

Differential Revision: http://reviews.llvm.org/D20434



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:09:41 +00:00
Krzysztof Parzyszek
9798d4211d [Hexagon] Use pipe instead of temporary files in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:01:34 +00:00
Rafael Espindola
dddfc0bb56 Refactor X86 symbol access classification.
This refactors the logic in X86 to avoid code duplication. It also
splits it in two steps: it first decides if a symbol is local to the DSO
and then uses that information to decide how to access it.

The first part is implemented by shouldAssumeDSOLocal. It is not in any
way specific to X86. In a followup patch I intend to move it to
somewhere common and reused it in other backends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 12:20:10 +00:00
Rafael Espindola
f5a1debd28 Simplify handling of hidden stubs on PowerPC.
We now handle them just like non hidden ones. This was already the case
on x86 (r207518) and arm (r207517).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 12:00:52 +00:00
NAKAMURA Takumi
e3282d30d8 SparcISelLowering.cpp: Add missing StringSwitch.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 10:53:56 +00:00
Chris Dewhurst
8393870560 [Sparc] Implement getRegisterByName.
Allows Sparc registers to be specifically referred to in inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 10:21:01 +00:00
Benjamin Kramer
e3bf66476f [ProfileData] Thread unique_ptr through the summary builder to avoid leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:18:37 +00:00
Igor Kudrin
88a127497f [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.

Differential Revision: http://reviews.llvm.org/D20286


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:14:24 +00:00
Chris Dewhurst
564e8812da [Sparc] Enable more inline assembly constraints.
Note: This is specifically to allow GCC's test pr44707 to pass.

Trivial change, not put for differential revision. Test included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:03:01 +00:00
Diana Picus
5930164242 Fix some comment typos in SelectionDAGBuilder. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 08:06:31 +00:00
Saleem Abdulrasool
e7579a0096 Target: move enum back into MC
Move the enumeration back to avoid the layering violation.  Should repair the
modules build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 05:13:35 +00:00
Craig Topper
2f6808a785 [X86] Run the AVX/AVX2 intrinsic tests in AVX512VL mode too just to make sure we don't break any older intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 05:10:32 +00:00
Craig Topper
9c173669ce [X86] Fix another AVX pattern to only be disable if VLX and BWI are supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270182 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 05:10:27 +00:00