OSDN Git Service
David Majnemer [Sun, 24 Jan 2016 16:46:53 +0000 (16:46 +0000)]
Fix build bot breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258661
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 24 Jan 2016 10:41:28 +0000 (10:41 +0000)]
Added Skylake client to X86 targets and features
Changes in X86.td:
I set features of Intel processors in incremental form: IVB = SNB + X HSW = IVB + X ..
I added Skylake client processor and defined it's features
FeatureADX was missing on KNL
Added some new features to appropriate processors SMAP, IFMA, PREFETCHWT1, VMFUNC and others
Differential Revision: http://reviews.llvm.org/D16357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258659
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Sun, 24 Jan 2016 08:18:55 +0000 (08:18 +0000)]
Fixed few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258658
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 24 Jan 2016 08:04:33 +0000 (08:04 +0000)]
AVX512: VMOVDQU8/16/32/64 (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258657
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jan 2016 07:13:28 +0000 (07:13 +0000)]
[TableGen] In AsmWriterEmitter unique command search, rather than storing a mapping from instruction to unique command, instead store a list of which instructions each unique command corresponds to.
This simplifies the complexity of the code that tries to find further operands to merge into the unique command.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258656
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 24 Jan 2016 06:40:37 +0000 (06:40 +0000)]
Fix buildbot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258655
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 24 Jan 2016 06:26:47 +0000 (06:26 +0000)]
[SCCP] Remove duplicate code
SCCP has code identical to changeToUnreachable's behavior, switch it
over to just call changeToUnreachable.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258654
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 24 Jan 2016 05:26:18 +0000 (05:26 +0000)]
[InstCombine, SCCP] Consolidate code used to remove instructions
InstCombine and SCCP both want to remove dead code in a very particular
way but using identical means to do so. Share the code between the two.
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258653
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jan 2016 23:54:33 +0000 (23:54 +0000)]
[WinEH] Don't miscompile cleanups which conditionally unwind to caller
A cleanup can have paths which unwind or end up in unreachable.
If there is an unreachable path *and* a path which unwinds to caller,
we would mistakenly inject an unwind path to a catchswitch on the
unreachable path. This results in a verifier assertion firing because
the cleanup unwinds to two different places: to the caller and to the
catchswitch.
This occured because we used getCleanupRetUnwindDest to determine if the
cleanuppad had no cleanuprets.
This is incorrect, getCleanupRetUnwindDest returns null for cleanuprets
which unwind to caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258651
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Sat, 23 Jan 2016 22:49:54 +0000 (22:49 +0000)]
Remove duplicate documentation in ConstantFolding.cpp. NFC.
The documentation for these functions is already present in the header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258649
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Sat, 23 Jan 2016 22:42:24 +0000 (22:42 +0000)]
Remove duplicate documentation in Attributes.cpp. NFC.
The documentation for these methods is already present in the header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258648
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Sat, 23 Jan 2016 22:38:39 +0000 (22:38 +0000)]
Update outdated method documention in Attributes.h. NFC.
Nowadays the alignment attribute is not the only integer attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258647
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jan 2016 22:27:54 +0000 (22:27 +0000)]
[SelectionDAG] Generalised the CONCAT_VECTORS creation to support BUILD_VECTOR and UNDEF folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258646
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jan 2016 22:02:48 +0000 (22:02 +0000)]
[X86][SSE] Generalised TRUNC -> PACKSS/PACKUS code. NFC.
Generalised mask generation / subvector extraction to use the input/output types directly instead of an if/else through all the currently accepted types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258645
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jan 2016 21:50:40 +0000 (21:50 +0000)]
Tidied up TRUNC combine code. NFC.
Make use of DAG.getBitcast and use clang-format to reduce number of lines (and make it more readable).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258644
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 23 Jan 2016 21:12:22 +0000 (21:12 +0000)]
[CUDA] Add Target::isNVPTX().
Summary: Helper so we don't have to enumerate nvptx && nvptx64 everywhere.
Reviewers: echristo
Subscribers: llvm-commits, jhen, tra
Differential Revision: http://reviews.llvm.org/D16494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258639
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 23 Jan 2016 21:12:20 +0000 (21:12 +0000)]
[CUDA] Die gracefully when trying to output an LLVM alias.
Summary:
Previously, we would just output "foo = bar" in the assembly, and then
ptxas would choke. Now we die before emitting any invalid code.
Reviewers: echristo
Subscribers: jholewinski, llvm-commits, jhen, tra
Differential Revision: http://reviews.llvm.org/D16490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258638
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 23 Jan 2016 21:12:17 +0000 (21:12 +0000)]
[CUDA] Make empty parameter lists in nvptx function decls easier to read.
Summary:
Before:
.func (.param .b32 func_retval0) _ZL21__nvvm_reflect_anchorv(
)
{
After:
.func (.param .b32 func_retval0) _ZL21__nvvm_reflect_anchorv()
{
Reviewers: bkramer
Subscribers: llvm-commits, tra, jhen, echristo, jholewinski
Differential Revision: http://reviews.llvm.org/D16512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258637
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2016 20:58:09 +0000 (20:58 +0000)]
Don't check if a list is empty with ilist::size.
ilist::size() is O(n) while ilist::empty() is O(1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258636
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 20:48:50 +0000 (20:48 +0000)]
ObjectTransformLayerTest.cpp: Rework r258633. [-Winconsistent-missing-override]
Sorry for the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258635
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 20:45:55 +0000 (20:45 +0000)]
ObjectTransformLayerTest.cpp: Fix a warning. [-Wredundant-move]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258634
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 20:45:50 +0000 (20:45 +0000)]
ObjectTransformLayerTest.cpp: Fix a warning. [-Winconsistent-missing-override]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258633
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 23 Jan 2016 19:34:19 +0000 (19:34 +0000)]
[libFuzzer] add -abort_on_timeout option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258631
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Sat, 23 Jan 2016 18:36:01 +0000 (18:36 +0000)]
[ORC] Update ObjectTransformLayer signature
Summary:
Update ObjectTransformLayer::addObjectSet to take the object set by
value rather than reference and pass it to the base layer with move
semantics rather than copy, to match r258185's changes to
ObjectLinkingLayer.
Update the unit test to verify that ObjectTransformLayer's signature stays
in sync with ObjectLinkingLayer's.
Reviewers: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16414
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258630
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Jan 2016 17:52:56 +0000 (17:52 +0000)]
regenerate checks and note some near-term improvements
For the moment, this file takes way too long to run (see inline comments), but
that should be a temporary problem. The fact that the compile time is so slow
for a target that doesn't support maskmov may be a bug worth investigating too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258629
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 23 Jan 2016 16:02:10 +0000 (16:02 +0000)]
[Bitcode] Insert the darwin wrapper at the beginning of a file when the
target is macho.
It looks like the check for macho was accidentally dropped in r132959.
I don't have a test case, but I'll add one if anyone knows how this can
be tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258627
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 23 Jan 2016 15:42:21 +0000 (15:42 +0000)]
Silence a -Wparentheses warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258626
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jan 2016 14:38:02 +0000 (14:38 +0000)]
Added missing comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258624
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 13:52:09 +0000 (13:52 +0000)]
AlignOf.h: Satisfy both g++-4.7 and msc18.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258623
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jan 2016 13:37:07 +0000 (13:37 +0000)]
[X86][SSE] Remove INSERTPS dependencies from unreferenced operands.
If the INSERTPS zeroes out all the referenced elements from either of the 2 input vectors (and the input is not already UNDEF), then set that input to UNDEF to reduce dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258622
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Sat, 23 Jan 2016 06:52:41 +0000 (06:52 +0000)]
[LIR] Add support for structs and hand unrolled loops
Now LIR can turn following codes into memset:
typedef struct foo {
int a;
int b;
} foo_t;
void bar(foo_t *f, unsigned n) {
for (unsigned i = 0; i < n; ++i) {
f[i].a = 0;
f[i].b = 0;
}
}
void test(foo_t *f, unsigned n) {
for (unsigned i = 0; i < n; i += 2) {
f[i] = 0;
f[i+1] = 0;
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258620
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 23 Jan 2016 06:49:29 +0000 (06:49 +0000)]
Inline variable into assert
Seems like some compilers still give unused variable warnings for
bool var = ...;
(void)var;
so I have to inline the variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258619
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 06:34:59 +0000 (06:34 +0000)]
AArch64ISelLowering.cpp: Fix a warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258618
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Sat, 23 Jan 2016 06:34:36 +0000 (06:34 +0000)]
Remove extra whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258617
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jan 2016 06:00:44 +0000 (06:00 +0000)]
[PruneEH] Don't try to insert a terminator after another terminator
LLVM's BasicBlock has a single terminator, it is not valid to have two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258616
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Sat, 23 Jan 2016 05:47:34 +0000 (05:47 +0000)]
Put space after pointer type in test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258615
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:42:49 +0000 (05:42 +0000)]
AMDGPU: Replace some deprecated intrinsic uses in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258614
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:42:43 +0000 (05:42 +0000)]
AMDGPU: Run instnamer on a few tests
This will make future test updates easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:42:38 +0000 (05:42 +0000)]
AMDGPU: Remove more unused intrinsics
Replace tests with lrp with basic IR expansion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258612
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jan 2016 05:41:29 +0000 (05:41 +0000)]
[PruneEH] FuncletPads must not have undef operands
Instead of RAUW with undef, replace the first non-token instruction with
unreachable.
This fixes PR26263.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258611
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jan 2016 05:41:27 +0000 (05:41 +0000)]
[PruneEH] Unify invoke and call handling in DeleteBasicBlock
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258610
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jan 2016 05:41:22 +0000 (05:41 +0000)]
[PruneEH] Reuse code from removeUnwindEdge
PruneEH had functionality idential to removeUnwindEdge.
Consolidate around removeUnwindEdge.
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:32:20 +0000 (05:32 +0000)]
AMDGPU: Move amdgcn intrinsic handling into SITargetLowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258608
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:32:18 +0000 (05:32 +0000)]
AMDGPU: Remove IntrNoMem from llvm.SI.sendmsg
This has side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258607
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jan 2016 05:32:14 +0000 (05:32 +0000)]
AMDGPU: Remove Feature64BitPtr
This is a leftover from AMDIL that doesn't do anything
and doesn't belong here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258606
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 23 Jan 2016 04:05:22 +0000 (04:05 +0000)]
AArch64ISel: Fix ccmp code selection matching deep expressions.
Some of the conditions necessary to produce ccmp sequences were only
checked in recursive calls to emitConjunctionDisjunctionTree() after
some of the earlier expressions were already built. Move all checks over
to isConjunctionDisjunctionTree() so they are all checked before we
start emitting instructions.
Also rename some variable to better reflect their usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258605
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 23 Jan 2016 04:05:18 +0000 (04:05 +0000)]
AArch64ISelLowering: Reduce maximum recursion depth of isConjunctionDisjunctionTree()
This function will exhibit exponential runtime (2**n) so we should
rather use a lower limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258604
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 23 Jan 2016 04:05:16 +0000 (04:05 +0000)]
Fix wrong indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258603
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 23 Jan 2016 02:22:36 +0000 (02:22 +0000)]
AlignOf.h: Appease g++-4.7 for now. Will fix later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258600
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Sat, 23 Jan 2016 01:20:43 +0000 (01:20 +0000)]
[WebAssembly] Fix RegNumbering for the stack pointer
Previously it failed to add NumArgRegs to the offset and so clobbered an
already-used register. Now just start the numbering after the arg regs
and don't duplicate the add. Test coverage for this coming shortly with
the implementation of byval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258597
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 22 Jan 2016 23:55:14 +0000 (23:55 +0000)]
[libFuzzer] add more fields to DictionaryEntry to count the number of uses and successes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258589
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 22 Jan 2016 23:27:13 +0000 (23:27 +0000)]
[cmake] Disable manifest generation when LLD is the linker
Running mt.exe to make the manifest is really slow. Disabling manifest
generation doesn't seem to break anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258581
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 22 Jan 2016 23:20:43 +0000 (23:20 +0000)]
[WinEH] Let cleanups post-dominated by unreachable get executed
Cleanups in C++ are a little weird. They are only guaranteed to be
reliably executed if, and only if, there is a viable catch handler which
can handle the exception.
This means that reachability of a cleanup is lexically determined by it
being nested with a try-block which unwinds to a catch. It is *cannot*
be reasoned about by examining the control flow edges leaving a cleanup.
Usually this is not a problem. It becomes a problem when there are *no*
edges out of a cleanup because we believed that code post-dominated by
the cleanup is dead. In LLVM's case, this code is what informs the
personality routine about the presence of a suitable catch handler.
However, the lack of edges to that catch handler makes the handler
become unreachable which causes us to remove it. By removing the
handler, the cleanup becomes unreachable.
Instead, inject a catch-all handler with every cleanup that has no
unwind edges. This will allow us to properly unwind the stack.
This fixes PR25997.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258580
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 22 Jan 2016 22:49:55 +0000 (22:49 +0000)]
Fix the code that leads to the incorrect trigger of the report_fatal_error()
in MachOObjectFile::getSymbolByIndex() when a Mach-O file has
a symbol table load command but the number of symbols are zero.
The code in MachOObjectFile::symbol_begin_impl() should not be
assuming there is a symbol at index 0, in cases there is no symbol
table load command or the count of symbol is zero. So I also fixed
that. And needed to fix MachOObjectFile::symbol_end_impl() to
also do the same thing for no symbol table or one with zero entries.
The code in MachOObjectFile::getSymbolByIndex() should trigger
the report_fatal_error() for programmatic errors for any index when
there is no symbol table load command and not return the end iterator.
So also fixed that. Note there is no test case as this is a programmatic
error.
The test case using the file macho-invalid-bad-symbol-index has
a symbol table load command with its number of symbols (nsyms)
is zero. Which was incorrectly testing the bad triggering of the
report_fatal_error() in in MachOObjectFile::getSymbolByIndex().
This test case is an invalid Mach-O file but not for that reason.
It appears this Mach-O file use to have an nsyms value of 11,
and what makes this Mach-O file invalid is the counts and
indexes into the symbol table of the dynamic load command
are now invalid because the number of symbol table entries
(nsyms) is now zero. Which can be seen with the existing
llvm-obdump:
% llvm-objdump -private-headers macho-invalid-bad-symbol-index
…
Load command 4
cmd LC_SYMTAB
cmdsize 24
symoff 4216
nsyms 0
stroff 4392
strsize 144
Load command 5
cmd LC_DYSYMTAB
cmdsize 80
ilocalsym 0
nlocalsym 8 (past the end of the symbol table)
iextdefsym 8 (greater than the number of symbols)
nextdefsym 2 (past the end of the symbol table)
iundefsym 10 (greater than the number of symbols)
nundefsym 1 (past the end of the symbol table)
...
And the native darwin tools generates an error for this file:
% nm macho-invalid-bad-symbol-index
nm: object: macho-invalid-bad-symbol-index truncated or malformed object (ilocalsym plus nlocalsym in LC_DYSYMTAB load command extends past the end of the symbol table)
I added new checks for the indexes and sizes for these in the
constructor of MachOObjectFile. And added comments for what
would be a proper diagnostic messages.
And changed the test case using macho-invalid-bad-symbol-index
to test for the new error now produced.
Also added a test with a valid Mach-O file with a symbol table
load command where the number of symbols is zero that shows
the report_fatal_error() is not called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258576
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan Krasin [Fri, 22 Jan 2016 22:28:27 +0000 (22:28 +0000)]
Use std::piecewise_constant_distribution instead of ad-hoc binary search.
Summary:
Fix the issue with the most recently discovered unit receiving much less attention.
Note: this is the second attempt (prev: r258473). Now, libc++ build is fixed.
Reviewers: aizatsky, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16487
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258571
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Fri, 22 Jan 2016 22:21:34 +0000 (22:21 +0000)]
Fix LivePhysRegs::addLiveOuts
Summary:
The testing for returnBB was flipped which may cause ARM ld/st opt pass uses callee saved regs in returnBB when shrink-wrap is used.
Reviewers: t.p.northover, apazos, MatzeB
Subscribers: mcrosier, zzheng, aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D16434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258569
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jan 2016 22:20:56 +0000 (22:20 +0000)]
fixed to test features, not CPU models
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258568
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jan 2016 22:09:41 +0000 (22:09 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258567
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 22 Jan 2016 22:07:24 +0000 (22:07 +0000)]
Strip local symbols when using externalized debug info.
When we build LLVM with externalized debug info, all debugging and
symbolication related data is extracted into dSYM files prior to
stripping. As such, there is no need to preserve local symbols in LLVM
binaries after dSYM creation.
This shrinks libLLVM.dylib from 58MB to 55MB on my system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258566
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 22 Jan 2016 21:36:49 +0000 (21:36 +0000)]
[gold] Remove inconsistent llvm_unreachable().
Differential Revision: http://reviews.llvm.org/D16429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258561
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 21:30:46 +0000 (21:30 +0000)]
AMDGPU: Remove GCCBuiltin from intrinsics that need mangling
If the intrinsic is overloaded and works on multiple types,
it cannot resolve to a single corresponding builtin and requires
handling in clang. This just causes crashes now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258559
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 21:30:43 +0000 (21:30 +0000)]
AMDGPU: Add new name for barrier intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258558
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 21:30:34 +0000 (21:30 +0000)]
AMDGPU: Rename intrinsics to use amdgcn prefix
The intrinsic target prefix should match the target name
as it appears in the triple.
This is not yet complete, but gets most of the important ones.
llvm.AMDGPU.* intrinsics used by mesa and libclc are still handled
for compatability for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258557
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergei Larin [Fri, 22 Jan 2016 21:18:20 +0000 (21:18 +0000)]
Make sure that any new and optimized objects created during GlobalOPT copy all the attributes from the base object.
Summary:
Make sure that any new and optimized objects created during GlobalOPT copy all the attributes from the base object.
A good example of improper behavior in the current implementation is section information associated with the GlobalObject. If a section was set for it, and GlobalOpt is creating/modifying a new object based on this one (often copying the original name), without this change new object will be placed in a default section, resulting in inappropriate properties of the new variable.
The argument here is that if customer specified a section for a variable, any changes to it that compiler does should not cause it to change that section allocation.
Moreover, any other properties worth representation in copyAttributesFrom() should also be propagated.
Reviewers: jmolloy, joker-eph, joker.eph
Subscribers: slarin, joker.eph, rafael, tobiasvk, llvm-commits
Differential Revision: http://reviews.llvm.org/D16074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258556
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 22 Jan 2016 21:13:04 +0000 (21:13 +0000)]
Make InstProfWriter compile again after 258544 with MSVC.
\src\llvm-rw\include\llvm/Support/AlignOf.h(254) :
error C2872: 'detail' : ambiguous symbol
could be 'llvm::detail'
or 'llvm::support::detail'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258553
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jan 2016 21:11:47 +0000 (21:11 +0000)]
function names start with a lowercase letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258552
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 22 Jan 2016 21:02:55 +0000 (21:02 +0000)]
[PlaceSafepoints] Introduce a -spp-no-statepoints flag
Summary:
This change adds a `-spp-no-statepoints` flag to PlaceSafepoints that
bypasses the code that wraps newly introduced polls and existing calls
in gc.statepoint. With `-spp-no-statepoints` enabled, PlaceSafepoints
effectively becomes a safpeoint **poll** insertion pass.
The eventual goal is to "constant fold" this option, along with
`-rs4gc-use-deopt-bundles` to `true`, once clients using gc.statepoint
are okay doing so.
Reviewers: pgavlin, reames, JosephTremoulet
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258551
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 22 Jan 2016 20:25:56 +0000 (20:25 +0000)]
[PGO] Remove use of static variable. /NFC
Make the variable a member of the writer trait object owned
now by the writer. Also use a different generator interface
to pass the infoObject from the writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258544
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 22 Jan 2016 20:02:26 +0000 (20:02 +0000)]
[AArch64] Cleanup ccmp test check labels. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258541
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Jan 2016 19:58:18 +0000 (19:58 +0000)]
Typo fix and simplification.
Thanks to Justin Bogner for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258540
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 22 Jan 2016 19:53:31 +0000 (19:53 +0000)]
Revert 258486 -- for a better fix coming soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258538
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 19:47:54 +0000 (19:47 +0000)]
AMDGPU: Fix crash with invariant markers
The promote alloca pass didn't handle these intrinsics and crashed.
These intrinsics should accept any address space, but for now just
erase them to avoid breaking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258537
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Fri, 22 Jan 2016 19:47:26 +0000 (19:47 +0000)]
[NVPTX] expand mul_lohi to mul_lo and mul_hi
Summary: Fixes PR26186.
Reviewers: grosser, jholewinski
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D16479
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258536
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 22 Jan 2016 19:44:46 +0000 (19:44 +0000)]
Add ArrayRef support to EndianStream.
Using an array instead of ArrayRef would allow type inference, but
(short of using C99) one would still need to write
typedef uint16_t VT[];
LE.write(VT{0x1234, 0x5678});
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258535
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 22 Jan 2016 19:43:57 +0000 (19:43 +0000)]
[AArch64] Simplify emitConditionalCompare calls. NFC.
Now that both callsites are identical, we can simplify the
prototype and make it easier to reason about the 2-CC case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258534
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 22 Jan 2016 19:43:54 +0000 (19:43 +0000)]
[AArch64] Lower 2-CC FCCMPs (one/ueq) using AND'ed CCs.
The current behavior is incorrect, as the two CCs returned by
changeFPCCToAArch64CC, intended to be OR'ed, are instead used
in an AND ccmp chain.
Consider:
define i32 @t(float %a, float %b, float %c, float %d, i32 %e, i32 %f) {
%cc1 = fcmp one float %a, %b
%cc2 = fcmp olt float %c, %d
%and = and i1 %cc1, %cc2
%r = select i1 %and, i32 %e, i32 %f
ret i32 %r
}
Assuming (%a < %b) and (%c < %d); we used to do:
fcmp s0, s1 # nzcv <- 1000
orr w8, wzr, #0x1 # w8 <- 1
csel w9, w8, wzr, mi # w9 <- 1
csel w8, w8, w9, gt # w8 <- 1
fcmp s2, s3 # nzcv <- 1000
cset w9, mi # w9 <- 1
tst w8, w9 # (w8 & w9) == 1, so: nzcv <- 0000
csel w0, w0, w1, ne # w0 <- w0
We now do:
fcmp s2, s3 # nzcv <- 1000
fccmp s0, s1, #0, mi # mi, so: nzcv <- 1000
fccmp s0, s1, #8, le # !le, so: nzcv <- 1000
csel w0, w0, w1, pl # !pl, so: w0 <- w1
In other words, we transformed:
(c < d) && ((a < b) || (a > b))
into:
(c < d) && (a u>= b) && (a u<= b)
whereas, per De Morgan's, we wanted:
(c < d) && !((a u>= b) && (a u<= b))
Note that this problem doesn't occur in the test-suite.
changeFPCCToAArch64CC produces disjunct CCs; here, one -> mi/gt.
We can't represent that in the fccmp chain; it can't express
arbitrary OR sequences, as one comment explains:
In general we can create code for arbitrary "... (and (and A B) C)"
sequences. We can also implement some "or" expressions, because
"(or A B)" is equivalent to "not (and (not A) (not B))" and we can
implement some negation operations. [...] However there is no way
to negate the result of a partial sequence.
Instead, introduce changeFPCCToANDAArch64CC, which produces the
conjunct cond codes:
- (a one b)
== ((a olt b) || (a ogt b))
== ((a ord b) && (a une b))
- (a ueq b)
== ((a uno b) || (a oeq b))
== ((a ule b) && (a uge b))
Note that, at first, one might think that, when PushNegate is true,
we should use the disjunct CCs, in effect doing:
(a || b)
= !(!a && !(b))
= !(!a && !(b1 || b2)) <- changeFPCCToAArch64CC(b, b1, b2)
= !(!a && !b1 && !b2)
However, we can take advantage of the fact that the CC is already
negated, which lets us avoid special-casing PushNegate and doing
the simpler to reason about:
(a || b)
= !(!a && (!b))
= !(!a && (b1 && b2)) <- changeFPCCToANDAArch64CC(!b, b1, b2)
= !(!a && b1 && b2)
This makes both emitConditionalCompare cases behave identically,
and produces correct ccmp sequences for the 2-CC fcmps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258533
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 22 Jan 2016 19:43:43 +0000 (19:43 +0000)]
[AArch64] Assert that CCMP isel didn't fail inconsistently.
We verify that the op tree is eligible for CCMP emission in
isConjunctionDisjunctionTree, but it's also possible that
emitConjunctionDisjunctionTree fails later.
The initial check is useful, as it avoids building nodes
that will get discarded.
Still, make sure that inconsistencies don't happen with
an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258532
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 22 Jan 2016 19:20:40 +0000 (19:20 +0000)]
[RS4GC] Use OB_deopt instead of "deopt"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258529
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 22 Jan 2016 19:15:58 +0000 (19:15 +0000)]
[Hexagon] Use general purpose registers to spill pred/mod registers into
Patch by Tobias Edler Von Koch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258527
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 19:09:12 +0000 (19:09 +0000)]
AMDGPU: Fix getArchTypePrefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258525
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 19:00:09 +0000 (19:00 +0000)]
AMDGPU: Rename some r600 intrinsics to use correct TargetPrefix
These ones aren't directly emitted by mesa and inserted by a pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258523
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 18:52:14 +0000 (18:52 +0000)]
AMDGPU: Remove unused R600 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258522
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 22 Jan 2016 18:49:50 +0000 (18:49 +0000)]
[WinEH] Make collectFuncletMembers non-recursive
Use a worklist for the pre-order DFS instead of using recursion.
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258521
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 22 Jan 2016 18:47:14 +0000 (18:47 +0000)]
Fix MachOObjectFile::getSymbolName() to not call report_fatal_error()
but to return object_error::parse_failed. Then made the code in llvm-nm
do for Mach-O files what is done in the darwin native tools which is to
print "bad string index" for bad string indexes. Updated the error message
in the llvm-objdump test, and added tests to show llvm-nm prints
"bad string index" and a test to print the actual bad string index value
which in this case is 0xfe000002 when printing the fields as raw hex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258520
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 18:42:55 +0000 (18:42 +0000)]
AMDGPU: Change control flow intrinsics to use amdgcn prefix
These aren't supposed to be used outside of the backend,
so there aren't any users to worry about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258516
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 18:42:49 +0000 (18:42 +0000)]
AMDGPU: Don't use separate mulhu/mulhs Pats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258515
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 18:42:44 +0000 (18:42 +0000)]
AMDGPU: Remove random TGSI intrinsic
I don't think this was ever used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258514
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Jan 2016 18:42:38 +0000 (18:42 +0000)]
AMDGPU: Remove AMDGPU.fract intrinsic
Mesa doesn't use this, and this is pattern matched already
from fsub x, (ffloor x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258513
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 22 Jan 2016 18:13:34 +0000 (18:13 +0000)]
[PGO] add an interface needed by icall promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258509
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jan 2016 05:59:43 +0000 (05:59 +0000)]
[TableGen] Make a class member local to the function that populates it and consumes it later. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258490
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jan 2016 05:59:40 +0000 (05:59 +0000)]
[TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258489
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jan 2016 05:59:37 +0000 (05:59 +0000)]
[TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for anything. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258488
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 22 Jan 2016 05:48:40 +0000 (05:48 +0000)]
[PGO] eliminate use of static variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258486
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 22 Jan 2016 04:21:49 +0000 (04:21 +0000)]
NFC WebAssembly: update links
I got a vanity URL, and moved the github waterfall repo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258484
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 22 Jan 2016 03:57:34 +0000 (03:57 +0000)]
[SelectionDAG] Fold more offsets into GlobalAddresses
This reapplies r258296 and r258366, and also fixes an existing bug in
SelectionDAG.cpp's isMemSrcFromString, neglecting to account for the
offset in a GlobalAddressSDNode, which is uncovered by those patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258482
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Fri, 22 Jan 2016 03:30:27 +0000 (03:30 +0000)]
Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258480
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan Krasin [Fri, 22 Jan 2016 03:21:52 +0000 (03:21 +0000)]
Revert r258473 as it's breaking the build with libc++
Reviewers: kcc
Differential Revision: http://reviews.llvm.org/D16441
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258479
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Fri, 22 Jan 2016 03:08:27 +0000 (03:08 +0000)]
[opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType.
Summary:
Reviewers: mjacob, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16282
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258478
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Fri, 22 Jan 2016 01:51:51 +0000 (01:51 +0000)]
[opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just the pointer.
Reviewers: mjacob, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258477
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Fri, 22 Jan 2016 01:33:43 +0000 (01:33 +0000)]
[opaque pointer types] [NFC] gep_type_{begin,end} now take source element type and address space.
Reviewers: mjacob, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16436
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258474
91177308-0d34-0410-b5e6-
96231b3b80d8