Jozef Kolek [Thu, 27 Nov 2014 18:18:42 +0000 (18:18 +0000)]
[mips][microMIPS] Implement BREAK16 and SDBBP16 instructions
Patch by Radovan Obradovic.
Differential Revision: http://reviews.llvm.org/D5048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222900
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 27 Nov 2014 17:28:10 +0000 (17:28 +0000)]
[mips] Add synci instruction.
Patch by Amaury Pouly
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222899
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Newton [Thu, 27 Nov 2014 17:20:48 +0000 (17:20 +0000)]
Widen ELFYAML relocation type to 32 bits
The current 8 bits is sufficient for ELF32 targets but ELF64 requires
32 bits. Add a test for AArch64 that exposes the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222898
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Nov 2014 17:13:56 +0000 (17:13 +0000)]
Commit back the correct bits of r222760 (was r222538).
I also added a test.
Original message:
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222897
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Nov 2014 17:13:51 +0000 (17:13 +0000)]
Revert "Reapply 222538 and update tests to explicitly request small code model and PIC:"
This reverts commit r222760.
It changed our behaviour on PIC so we don't match gas anymore. It also
included lots of unnecessary changes to tests.
If those changes are desirable, there should be an independent discussion
as they are out of scope for that patch.
I will recommit the other bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222896
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 27 Nov 2014 17:01:10 +0000 (17:01 +0000)]
Revert "Fix overly aggressive type merging."
This reverts commit r222727, which causes LTO bootstrap failures.
Last passing @ r222698:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/532/
First failing @ r222843:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/
Internal bootstraps pointed at a much narrower range: r222725 is
passing, and r222731 is failing.
LTO crashes while handling libclang.dylib:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/consoleFull#-
158682280549ba4694-19c4-4d7e-bec5-
911270d8a58c
GEP is not of right type for indices!
%InfoObj.i.i = getelementptr inbounds %"class.llvm::OnDiskIterableChainedHashTable"* %.lcssa, i64 0, i32 0, i32 4, !dbg !123627
%"class.clang::serialization::reader::ASTIdentifierLookupTrait" = type { %"class.clang::ASTReader.31859"*, %"class.clang::serialization::ModuleFile.31870"*, %"class.clang::IdentifierInfo"* }LLVM ERROR: Broken function found, compilation aborted!
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like the new algorithm doesn't merge types aggressively enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222895
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 15:13:14 +0000 (15:13 +0000)]
reinstate r222872: Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
Fixed missing dominance check.
Original commit message:
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
if (idx < tablesize)
r = table[idx]; // table does not contain default_value
else
r = default_value;
if (r != default_value)
...
Is optimized to:
cond = idx < tablesize;
if (cond)
r = table[idx];
else
r = default_value;
if (cond)
...
Jump threading will then eliminate the second if(cond).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222891
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 27 Nov 2014 14:54:02 +0000 (14:54 +0000)]
[msan] Remove indirect call wrapping code.
This functionality was only used in MSanDR, which is deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222889
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Thu, 27 Nov 2014 14:41:44 +0000 (14:41 +0000)]
[mips][microMIPS] Implement disassembler support for 16-bit instructions LI16, ADDIUR1SP, ADDIUR2 and ADDIUS5
Differential Revision: http://reviews.llvm.org/D6419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222887
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Thu, 27 Nov 2014 12:13:56 +0000 (12:13 +0000)]
Stop uppercasing build attribute data.
The string data for string-valued build attributes were being unconditionally
uppercased. There is no mention in the ARM ABI addenda about case conventions,
so it's technically implementation defined as to whether the data are
capitialised in some way or not. However, there are good reasons not to
captialise the data.
* It's less work.
* Some vendors may legitimately have case-sensitive checks for these
attributes which would fail on LLVM generated object files.
* There could be locale issues with uppercasing.
The original reasons for uppercasing appear to have stemmed from an
old codesourcery toolchain behaviour, see
http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133
This patch makes the object file emitted no longer captialise string
data, it encodes as seen in the assembly source.
Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222882
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Thu, 27 Nov 2014 11:22:49 +0000 (11:22 +0000)]
Use FileCheck instead of grep. Change by Ankur Garg.
Differential Revision: http://reviews.llvm.org/D6430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222879
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 10:59:08 +0000 (10:59 +0000)]
Revert "Peephole optimization in switch table lookup: reuse the guarding table comparison if possible."
It is breaking the clang bootstrag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222877
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Thu, 27 Nov 2014 10:57:24 +0000 (10:57 +0000)]
Use FileCheck instead of grep. Change by Sonam.
Differential Revision: http://reviews.llvm.org/D6432
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222876
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 08:33:51 +0000 (08:33 +0000)]
Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
if (idx < tablesize)
r = table[idx]; // table does not contain default_value
else
r = default_value;
if (r != default_value)
...
Is optimized to:
cond = idx < tablesize;
if (cond)
r = table[idx];
else
r = default_value;
if (cond)
...
\endcode
Jump threading will then eliminate the second if(cond).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222872
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 27 Nov 2014 07:25:21 +0000 (07:25 +0000)]
InstCombine: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) == 0 ? X ^ C : X into X | C
(X & C) != 0 ? X ^ C : X into X & ~C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222871
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 27 Nov 2014 06:36:22 +0000 (06:36 +0000)]
Add LLVMObject to LLVMExecutionEngine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222869
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 27 Nov 2014 06:32:46 +0000 (06:32 +0000)]
InstSimplify: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) ? X & ~C : X into X & ~C
(X & C) ? X : X & ~C into X
(X & C) ? X | C : X into X
(X & C) ? X : X | C into X | C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222868
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 05:40:13 +0000 (05:40 +0000)]
[MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.
All symbols have to be stored in the global symbol to enable
cross-rtdyld-instance linking, so the local symbol table content is
redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222867
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 04:18:50 +0000 (04:18 +0000)]
[MCJIT] Update CMakeLists.txt for llvm-rtdyld to add Object as a requirement.
Hopefully this will fix
http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8271/steps/stage1_build/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222866
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 01:41:16 +0000 (01:41 +0000)]
[MCJIT] Replace JITEventListener::anchor (temporarily removed in r222861), and
move GDBRegistrationListener into ExecutionEngine to avoid layering violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222864
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 00:15:28 +0000 (00:15 +0000)]
[MCJIT] Remove JITEventListener's anchor until I can determine the right place
to put it. This should unbreak the Mips bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222861
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 27 Nov 2014 00:15:21 +0000 (00:15 +0000)]
Teach LLVM about llgo subproject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222860
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 00:12:28 +0000 (00:12 +0000)]
[MCJIT] Move get-any-symbol-load-address logic out of RuntimeDyld and into
RuntimeDyldChecker.
RuntimeDyld instances should only provide lookup for locally defined
symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222859
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 26 Nov 2014 23:00:38 +0000 (23:00 +0000)]
Revert "Added inst combine transforms for single bit tests from Chris's note"
This reverts commit r210006, it miscompiled libapr which is used in who
knows how many projects.
A test has been added to ensure that we don't regress again.
I'll work on a rewrite of what the optimization was trying to do later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222856
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 26 Nov 2014 22:53:46 +0000 (22:53 +0000)]
Add a small "usage:" comment at the top of not.cpp
Mostly pulled from Rafael's r185678 commit message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222855
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 26 Nov 2014 22:17:25 +0000 (22:17 +0000)]
Object/COFF: Fix off-by-one error for object having lots of relocations
llvm-objdump printed out an error message for this off-by-one error,
but because it always exits with 0 whether or not it found an error,
the test (llvm-objdump/coff-many-relocs.test) succeeded.
I made llvm-objdump exit with EXIT_FAILURE when an error is found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222852
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 26 Nov 2014 21:23:15 +0000 (21:23 +0000)]
R600/SI: Use ZeroOrNegativeOneBooleanContent
This sort of doesn't matter since the setcc type is i1, but
this previously was using the default UndefinedBooleanContent. This
makes it more consistent with R600. This enables more optimizations
which typically give up on UndefinedBooleanContent. For example,
there is already a special case target DAG combine for
setcc + sext which can be eliminated in favor of what the generic
DAG combiner can do if it assumes boolean values are sign extended.
Since -1 is an inline immediate, using it is basically free and the
backend already uses it when a boolean value is needed in a wider type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222850
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 26 Nov 2014 19:43:12 +0000 (19:43 +0000)]
[Hexagon] Adding cmp* immediate form instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222849
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Wed, 26 Nov 2014 18:56:38 +0000 (18:56 +0000)]
[mips][microMIPS] Implement disassembler support for 16-bit instructions LBU16, LHU16, LW16, SB16, SH16 and SW16
Differential Revision: http://reviews.llvm.org/D6405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222847
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 26 Nov 2014 18:55:59 +0000 (18:55 +0000)]
[Hexagon] Adding and64, or64, and xor64 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222846
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 26 Nov 2014 18:18:28 +0000 (18:18 +0000)]
R600/SI: Create e64 versions of and/or/xor in SILowerI1Copies
This fixes moving boolean constants into registers before operating
on them. They get permuted and shrunk down to e32 anyway later. This
is a temporary fix until the patch that removes these pseudos is
committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222844
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 26 Nov 2014 17:21:41 +0000 (17:21 +0000)]
[MCJIT] Fix missing return statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222841
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 26 Nov 2014 16:54:40 +0000 (16:54 +0000)]
[MCJIT] Reapply r222828 and r222810-r222812 with fix for MSVC move-op issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222840
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 26 Nov 2014 15:27:39 +0000 (15:27 +0000)]
Reverting r222828 and r222810-r222812 as they broke the build on Windows.
http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222833
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 26 Nov 2014 13:55:55 +0000 (13:55 +0000)]
Removing a spurious semicolon; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222830
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 26 Nov 2014 12:26:03 +0000 (12:26 +0000)]
Add missing "override".
Fixes compilation failure in r222810.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222828
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Newton [Wed, 26 Nov 2014 10:49:18 +0000 (10:49 +0000)]
Update AArch64 ELF relocations to ABI 1.0
This mostly entails adding relocations, however there are a couple of
changes to existing relocations:
1. R_AARCH64_NONE is defined to be zero rather than 256
R_AARCH64_NONE has been defined to be zero for a long time elsewhere
e.g. binutils and glibc since the submission of the AArch64 port in
2012 so this is required for compatibility.
2. R_AARCH64_TLSDESC_ADR_PAGE renamed to R_AARCH64_TLSDESC_ADR_PAGE21
I don't think there is any way for relocation names to leak out of LLVM
so this should not break anything.
Tested with check-all with no regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222821
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 26 Nov 2014 10:46:49 +0000 (10:46 +0000)]
AVX-512: Scalar ERI intrinsics
including SAE mode and memory operand.
Added AVX512_maskable_scalar template, that should cover all scalar instructions in the future.
The main difference between AVX512_maskable_scalar<> and AVX512_maskable<> is using X86select instead of vselect.
I need it, because I can't create vselect node for MVT::i1 mask for scalar instruction.
http://reviews.llvm.org/D6378
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222820
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Newton [Wed, 26 Nov 2014 10:36:03 +0000 (10:36 +0000)]
Update ARM ELF relocations to ABI 2.09
Add R_ARM_IRELATIVE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222817
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 26 Nov 2014 07:39:03 +0000 (07:39 +0000)]
[MCJIT] Re-enable GDB registration (temporarily disabled in r222811), but check
that we actually have an object to register first.
For MachO objects, RuntimeDyld::LoadedObjectInfo::getObjectForDebug returns an
empty OwningBinary<ObjectFile> which was causing crashes in the GDB registration
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222812
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 26 Nov 2014 07:25:26 +0000 (07:25 +0000)]
[MCJIT] Temporarily disable automatic JIT debugger registration.
The RuntimeDyld cleanup patch r222810 turned on GDB registration for MachO
objects. I expected this to be harmless, but it seems to have broken on
MacsOS. Temporarily disabling debugger registration while I dig in to what's
gone wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222811
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 26 Nov 2014 06:53:26 +0000 (06:53 +0000)]
[MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme.
Previously, when loading an object file, RuntimeDyld (1) took ownership of the
ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the
object in-place, and (3) returned an ObjectImage that managed ownership of the
now-modified object and provided some convenience methods. This scheme accreted
over several years as features were tacked on to RuntimeDyld, and was both
unintuitive and unsafe (See e.g. http://llvm.org/PR20722).
This patch fixes the issue by removing all ownership and in-place modification
of object files from RuntimeDyld. Existing behavior, including debugger
registration, is preserved.
Noteworthy changes include:
(1) ObjectFile instances are now passed to RuntimeDyld by const-ref.
(2) The ObjectImage and ObjectBuffer classes have been removed entirely, they
existed to model ownership within RuntimeDyld, and so are no longer needed.
(3) RuntimeDyld::loadObject now returns an instance of a new class,
RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified
object suitable for registration with the debugger, following the existing
debugger registration scheme.
(4) The JITRegistrar class has been removed, and the GDBRegistrar class has been
re-written as a JITEventListener.
This should fix http://llvm.org/PR20722 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222810
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Nov 2014 04:11:14 +0000 (04:11 +0000)]
Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222809
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 26 Nov 2014 03:44:47 +0000 (03:44 +0000)]
Try to make the modules buildbot happy again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222808
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Nov 2014 02:57:33 +0000 (02:57 +0000)]
Reformat with gofmt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222806
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Nov 2014 02:54:24 +0000 (02:54 +0000)]
Make SetMCJITOptimizationLevel more of a method and pass options
as a reference. Move closer to the type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222805
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Nov 2014 02:27:46 +0000 (02:27 +0000)]
Make sure that the go bindings call LLVMInitializeMCJITCompilerOptions
so that they initialize the code generation model to the correct
(non-zero) default model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222804
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 26 Nov 2014 00:46:26 +0000 (00:46 +0000)]
Replace neverHasSideEffects=1 with hasSideEffects=0 in all .td files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222801
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 25 Nov 2014 22:34:59 +0000 (22:34 +0000)]
[X86][SSE] Improvements to byte shift shuffle matching
Since (v)pslldq / (v)psrldq instructions resolve to a single input argument it is useful to match it much earlier than we currently do - this prevents more complicated shuffles (notably insertion into a zero vector) matching before it.
Differential Revision: http://reviews.llvm.org/D6409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222796
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 22:15:44 +0000 (22:15 +0000)]
[Hexagon] Adding add64 and sub64 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222795
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 21:39:57 +0000 (21:39 +0000)]
Reverting 222792
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222793
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 21:30:28 +0000 (21:30 +0000)]
[Hexagon] Adding compare with immediate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222792
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 21:23:07 +0000 (21:23 +0000)]
[Hexagon] Adding NOP encoding bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222791
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 25 Nov 2014 21:05:04 +0000 (21:05 +0000)]
Go bindings: add DIBuilder.InsertValueAtEnd
Expose llvm::DIBuilder::insertDbgValueIntrinsic as
DIBuilder.InsertValueAtEnd in the Go bindings, to support attaching
debug metadata to register values.
Patch by Andrew Wilkins!
Differential Revision: http://reviews.llvm.org/D6374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222790
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 25 Nov 2014 21:03:22 +0000 (21:03 +0000)]
R600/SI: Only use one DEBUG()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222789
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 20:56:56 +0000 (20:56 +0000)]
This test requires asserts because of -stats.
Sorry about that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222788
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 20:52:49 +0000 (20:52 +0000)]
gold plugin: call llvm_shutdown so that -stats works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222787
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Tue, 25 Nov 2014 20:41:51 +0000 (20:41 +0000)]
[AVX512] Add 512b integer shift by variable intrinsics and patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222786
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 20:22:24 +0000 (20:22 +0000)]
[Hexagon] [NFC] Adding trailing whitespace to test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222785
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 20:20:09 +0000 (20:20 +0000)]
[Hexagon] Adding C2_mux instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222784
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:34 +0000 (20:11 +0000)]
Remove unncessary check for Int_* and *_Int in AsmMatcherEmitter. These are all marked isCodeGenOnly these days.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222783
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:31 +0000 (20:11 +0000)]
Use range-based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222782
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:29 +0000 (20:11 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222781
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:27 +0000 (20:11 +0000)]
Remove unused MaxSize variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222780
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:25 +0000 (20:11 +0000)]
Move a vector instead of copying it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222779
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 25 Nov 2014 20:11:23 +0000 (20:11 +0000)]
Remove space before tab in all AVX512 mnemonic strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222778
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 25 Nov 2014 18:45:23 +0000 (18:45 +0000)]
Remove useless rdar:// comment from switch_to_lookup_table.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222772
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 18:20:52 +0000 (18:20 +0000)]
[Hexagon] Replacing cmp* instructions with ones that contain encoding bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222771
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 25 Nov 2014 18:03:08 +0000 (18:03 +0000)]
Cleaning out google tests from MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222770
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 25 Nov 2014 17:23:05 +0000 (17:23 +0000)]
LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue()
If solveBlockValue() needs results from predecessors that are not already
computed, it returns false with the intention of resuming when the dependencies
have been resolved. However, the computation would never be resumed since an
'overdefined' result had been placed in the cache, preventing any further
computation.
The point of placing the 'overdefined' result in the cache seems to have been
to break cycles, but we can check for that when inserting work items in the
BlockValue stack instead. This makes the "stop and resume" mechanism of
solveBlockValue() work as intended, unlocking more analysis.
Using this patch shaves 120 KB off a 64-bit Chromium build on Linux.
I benchmarked compiling bzip2.c at -O2 but couldn't measure any difference in
compile time.
Tests by Jiangning Liu from r215343 / PR21238, Pete Cooper, and me.
Differential Revision: http://reviews.llvm.org/D6397
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222768
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 25 Nov 2014 17:14:22 +0000 (17:14 +0000)]
Small model and JIT generally don't go well with each other.
On LP64 platforms, it will work or not depending on the choosen memory
layout, so neither PASS nor XFAIL is appropiate.
As UNSUPPORTED as per-test target doesn't exist (yet), remove the test
instead to unbreak the builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222767
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 15:33:40 +0000 (15:33 +0000)]
Set the body of a new struct as soon as it is created.
This changes the order in which different types are passed to get, but
one order is not inherently better than the other.
The main motivation is that this simplifies linkDefinedTypeBodies now that
it is only linking "real" opaque types. It is also means that we only have to
call it once and that we don't need getImpl.
A small change in behavior is that we don't copy type names when resolving
opaque types. This is an improvement IMHO, but it can be added back if
desired. A test is included with the new behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222764
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 25 Nov 2014 15:24:07 +0000 (15:24 +0000)]
[msan] Annotate zlib functions for MemorySanitizer.
Mark destination buffer in zlib::compress and zlib::decompress as fully
initialized.
When building LLVM with system zlib and MemorySanitizer instrumentation,
MSan does not observe memory writes in zlib code and erroneously considers
zlib output buffers as uninitialized, resulting in false use-of-uninitialized
memory reports. This change helps MSan understand the state of that memory
and prevents such reports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222763
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 14:35:53 +0000 (14:35 +0000)]
Misc style fixes. NFC.
This just reduces the noise in the next patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222761
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 25 Nov 2014 13:37:55 +0000 (13:37 +0000)]
Reapply 222538 and update tests to explicitly request small code model
and PIC:
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222760
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 25 Nov 2014 13:28:56 +0000 (13:28 +0000)]
Mark as explicit failing on x86-64 -- small memory model doesn't agree
with default address selections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222759
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 13:19:46 +0000 (13:19 +0000)]
Remove a bit of duplicated code.
Exactly the same checks are present in areTypesIsomorphic.
This might have been a premature performance optimization. I cannot reproduce
any slowdown with this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Nov 2014 10:50:41 +0000 (10:50 +0000)]
Revert r222746: That commit did not update any tests and caused two R600
tests to start failing.
Original commit log: R600/SI: Disable commutativity for MIN/MAX_LEGACY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222753
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Tue, 25 Nov 2014 10:50:00 +0000 (10:50 +0000)]
[mips][micromips] Use call instructions with short delay slots
Differential Revision: http://reviews.llvm.org/D6338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222752
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Nov 2014 10:09:51 +0000 (10:09 +0000)]
[InstCombine] Change LLVM To canonicalize toward the value type being
stored rather than the pointer type.
This change is analogous to r220138 which changed the canonicalization
for loads. The rationale is the same: memory does not have a type,
operations (and thus the values they produce) have a type. We should
match that type as closely as possible rather than reading some form of
semantics into the pointer type.
With this change, loads and stores should no longer be made with
nonsensical types for the values that tehy load and store. This is
particularly important when trying to match specific loaded and stored
types in the process of doing other instcombines, which is what led me
down this twisty maze of miscanonicalization.
I've put quite some effort into looking through IR to find places where
LLVM's optimizer was being unreasonably conservative in the face of
mismatched load and store types, however it is possible (let's say,
likely!) I have missed some. If you see regressions here, or from
r220138, the likely cause is some part of LLVM failing to cope with load
and store types differing. Test cases appreciated, it is important that
we root all of these out of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222748
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Tue, 25 Nov 2014 09:49:23 +0000 (09:49 +0000)]
R600/SI: Disable commutativity for MIN/MAX_LEGACY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222746
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Tue, 25 Nov 2014 09:30:09 +0000 (09:30 +0000)]
Correctly handle Tag_CPU_arch_profile.
Fix ARMAttributeParser::CPU_arch_profile so that it doesn't switch on the value
'0' as a legal value of this build attribute.
Change-Id: Ie05a08900a82bb10b78c841b437df747ce3bb38e
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222743
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Tue, 25 Nov 2014 08:44:56 +0000 (08:44 +0000)]
Change the test case file to use FileCheck instead of grep. NFC.
Change by Ankur Garg.
Differential Revision: http://reviews.llvm.org/D6382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Nov 2014 08:20:27 +0000 (08:20 +0000)]
Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite
clearly only exactly equal width ptrtoint and inttoptr casts are no-op
casts, it says so right there in the langref. Make the code agree.
Original log from r220277:
Teach the load analysis to allow finding available values which require
inttoptr or ptrtoint cast provided there is datalayout available.
Eventually, the datalayout can just be required but in practice it will
always be there today.
To go with the ability to expose available values requiring a ptrtoint
or inttoptr cast, helpers are added to perform one of these three casts.
These smarts are necessary to finish canonicalizing loads and stores to
the operational type requirements without regressing fundamental
combines.
I've added some test cases. These should actually improve as the load
combining and store combining improves, but they may fundamentally be
highlighting some missing combines for select in addition to exercising
the specific added logic to load analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222739
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 25 Nov 2014 07:53:06 +0000 (07:53 +0000)]
R600/SI: Fix allocating flat_scr_lo / flat_scr_hi
Only the super register flat_scr was marked as reserved,
so in some cases with high register usage it would still
try to allocate the subregisters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222737
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 25 Nov 2014 07:45:56 +0000 (07:45 +0000)]
Forgot to add a file for r222734
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222736
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 25 Nov 2014 07:43:14 +0000 (07:43 +0000)]
COFF: Add back an assertion that is superseded by r222124
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222735
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 25 Nov 2014 07:42:36 +0000 (07:42 +0000)]
COFF: Add another test for r222124
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222734
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 06:16:27 +0000 (06:16 +0000)]
Use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222730
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 06:11:24 +0000 (06:11 +0000)]
Style fix: don't indent inside a namemespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222729
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 06:07:51 +0000 (06:07 +0000)]
Remove a nested anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222728
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 05:59:24 +0000 (05:59 +0000)]
Fix overly aggressive type merging.
If we find out that two types are *not* isomorphic, we learn nothing about
opaque sub types in both the source and destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222727
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 25 Nov 2014 05:57:55 +0000 (05:57 +0000)]
[Object][Mips] Return address of MIPS symbol with cleared microMIPS indicator bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222726
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 04:43:59 +0000 (04:43 +0000)]
Link the type of aliases.
They are not more or less "well typed" than GlobalVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222725
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 04:28:31 +0000 (04:28 +0000)]
Don't repeat name in comment or duplicate comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222724
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 04:26:19 +0000 (04:26 +0000)]
Use range loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222723
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 25 Nov 2014 04:16:15 +0000 (04:16 +0000)]
[FastISel][AArch64] Fix and extend the tbz/tbnz pattern matching.
The pattern matching failed to recognize all instances of "-1", because when
comparing against "-1" we didn't use an APInt of the same bitwidth.
This commit fixes this and also adds inverse versions of the conditon to catch
more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222722
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Nov 2014 03:47:57 +0000 (03:47 +0000)]
Add an interesting test that we already get right. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222720
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 25 Nov 2014 02:55:48 +0000 (02:55 +0000)]
InstSimplify: Handle some simple tautological comparisons
This handles cases where we are comparing a masked value against itself.
The analysis could be further improved by making it recursive but such
expense is not currently justified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222716
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 25 Nov 2014 02:26:22 +0000 (02:26 +0000)]
Revert "unique_ptrify LLVMContextImpl::CAZConstants"
Missed the complexities of how these elements are destroyed.
This reverts commit r222714.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222715
91177308-0d34-0410-b5e6-
96231b3b80d8