Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:06:14 +0000 (23:06 +0000)]
UseListOrder: Order GlobalValue uses after initializers
To avoid unnecessary forward references, the reader doesn't process
initializers of `GlobalValue`s until after the constant pool has been
processed, and then in reverse order. Model this when predicting
use-list order. This gets two more Bitcode tests passing with
`llvm-uselistorder`.
Part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214242
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 23:03:40 +0000 (23:03 +0000)]
UseListOrder: Create a struct around OrderMap, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214241
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Jul 2014 22:58:13 +0000 (22:58 +0000)]
Feedback on r214189, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214240
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 29 Jul 2014 22:57:59 +0000 (22:57 +0000)]
Add missing test for r214210.
Thanks dblaikie for reminding me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214239
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Jul 2014 22:42:44 +0000 (22:42 +0000)]
Fix typo in alias: DSIR -> DSISR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214238
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 29 Jul 2014 22:29:23 +0000 (22:29 +0000)]
llvm-profdata: Clean up and reorganize some tests
This moves some tests around to make it clearer what's being tested,
and adds very rudimentary comment syntax to the text input format to
make specifying this kind of test a little bit simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214235
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Jul 2014 22:21:57 +0000 (22:21 +0000)]
Support move to/from segment register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214234
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 29 Jul 2014 21:48:22 +0000 (21:48 +0000)]
[MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properly
endian-aware yet, and this is causing failures when cross-linking on MIPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214231
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 21:46:05 +0000 (21:46 +0000)]
Use nullptr instead of NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214229
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 29 Jul 2014 21:42:24 +0000 (21:42 +0000)]
Coverage: improve efficiency of the counter propagation to the expansion regions.
This patch reduces the complexity of the two inner loops in order to speed up
the loading of coverage data for very large functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214228
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 29 Jul 2014 21:38:20 +0000 (21:38 +0000)]
[MCJIT] Make sure we print the full 64-bit result of exprs in RuntimeDyldChecker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214227
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 21:38:05 +0000 (21:38 +0000)]
Remove unused includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214226
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 21:34:55 +0000 (21:34 +0000)]
R600/SI: Implement getLdStBaseRegImmOfs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214225
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 21:30:21 +0000 (21:30 +0000)]
UseListOrder: Try to resolve buildbot failure
MSVC [1] thinks `UseListShuffleVector` needs a copy constructor, but I
don't. Let's see if being explicit about `UseListOrder` is convincing.
[1]: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/11664/steps/build_Lld/logs/stdio
Here's the failure:
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(92): error C2248: 'llvm::UseListShuffleVector::operator =' : cannot access private member declared in class 'llvm::UseListShuffleVector' (C:\lld-x86_64_win7\lld-x86_64-win7\llvm.src\lib\Bitcode\Writer\ValueEnumerator.cpp) [C:\lld-x86_64_win7\lld-x86_64-win7\llvm.obj\lib\Bitcode\Writer\LLVMBitWriter.vcxproj]
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(56) : see declaration of 'llvm::UseListShuffleVector::operator ='
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(32) : see declaration of 'llvm::UseListShuffleVector'
This diagnostic occurred in the compiler generated function 'llvm::UseListOrder &llvm::UseListOrder::operator =(const llvm::UseListOrder &)'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214224
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 21:09:43 +0000 (21:09 +0000)]
Delete dead code.
The gold plugin doesn't call lseek or read directly any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214221
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 21:01:24 +0000 (21:01 +0000)]
Have a single enum for "not a bitcode" error.
This is more convenient for callers. No functionality change, this will
be used in a next patch to the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214218
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 21:00:56 +0000 (21:00 +0000)]
R600/SI: Enable named operand table for DS instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214217
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 21:00:53 +0000 (21:00 +0000)]
Remove line with no effect
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214216
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 20:46:19 +0000 (20:46 +0000)]
gold plugin: Fix handling of corrupted bitcode files.
We should still claim them and tell gold about the error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214214
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:52 +0000 (20:45 +0000)]
UseListShuffleVector: Remove copy constructor
Remove the copy constructor added in r214178 to appease MSVC17 since it
shouldn't be called at all. My guess is that explicitly deleting it
will make the compiler happy. To round out the operations I've also
deleted copy assignment and added move assignment. Otherwise no
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214213
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 20:45:49 +0000 (20:45 +0000)]
UseListShuffleVector: Code reorganization, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214212
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 29 Jul 2014 20:40:37 +0000 (20:40 +0000)]
[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
full paths for its first argument.
This allows us to remove the annoying sed lines in the test cases, and write
direct references to file names in stub_addr calls (rather than <filename>
placeholders).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214211
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 29 Jul 2014 20:30:53 +0000 (20:30 +0000)]
Fix FileCheck crash when empty prefix is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214210
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 20:22:46 +0000 (20:22 +0000)]
Move the bitcode error enum to the include directory.
This will let users in other libraries know which error occurred. In particular,
it will be possible to check if the parsing failed or if the file is not
bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214209
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 29 Jul 2014 19:58:16 +0000 (19:58 +0000)]
Coverage: fix the missing output stream in recursive call to CoverageMappingContext::dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214206
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 29 Jul 2014 19:57:15 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214205
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 29 Jul 2014 19:57:11 +0000 (19:57 +0000)]
[RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the relocation enum type. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214204
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 19:17:44 +0000 (19:17 +0000)]
Small gold plugin simplifications.
* Use a range loop.
* Store the extra options as "const char *".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214199
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Jul 2014 18:55:43 +0000 (18:55 +0000)]
Add a number of aliases for SPR access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214196
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 18:51:56 +0000 (18:51 +0000)]
R600/SI: Add isMUBUF / isMTBUF
Also add missing comments about how the flags work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214195
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 18:51:54 +0000 (18:51 +0000)]
R600/SI: Set bits on SMRD instructions
Set mayStore = 0 and enable named operand table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214194
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 29 Jul 2014 18:28:16 +0000 (18:28 +0000)]
Install the `obj2yaml` and `yaml2obj` utilities together with other LLVM tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214191
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Jul 2014 18:20:39 +0000 (18:20 +0000)]
[Debug Info] remove DITrivialType and use null to represent unspecified param.
Per feedback on r214111, we are going to use null to represent unspecified
parameter. If the type array is {null}, it means a function that returns void;
If the type array is {null, null}, it means a variadic function that returns
void. In summary if we have more than one element in the type array and the last
element is null, it is a variadic function.
rdar://
17628609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214189
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 17:44:26 +0000 (17:44 +0000)]
llvm-uselistorder: Fix header comments from r214144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214187
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 17:27:07 +0000 (17:27 +0000)]
Add a test for the mtriple plugin option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214186
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 16:58:18 +0000 (16:58 +0000)]
IR: Create the use-list order shuffle vector in-place
Per David Blaikie's review of r214135, this is a more natural way to
initialize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214184
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 29 Jul 2014 15:56:06 +0000 (15:56 +0000)]
ProfileData: Don't redundantly default initialize a member
We're default constructing RecordIterator anyway, so it needn't appear
in the mem-initializer-list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214182
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Jul 2014 15:49:09 +0000 (15:49 +0000)]
Add rfi instruction. Based on feedback by Ulrich Weigand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214181
91177308-0d34-0410-b5e6-
96231b3b80d8
Sasa Stankovic [Tue, 29 Jul 2014 14:39:24 +0000 (14:39 +0000)]
[mips] Don't use odd-numbered single precision registers for fastcc calling
convention if -mno-odd-spreg is used.
Differential Revision: http://reviews.llvm.org/D4682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214180
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 29 Jul 2014 12:48:14 +0000 (12:48 +0000)]
[PowerPC] Fix ppc64-elf-abi.ll test case on Darwin
Use full -mtriple instead of just -march to ensure Linux ABI
(ELFv1 or ELFv2) is selected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214179
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Jul 2014 12:20:50 +0000 (12:20 +0000)]
UseListShuffleVector: Add a copy constructor to appease msc17.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214178
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Jul 2014 10:20:22 +0000 (10:20 +0000)]
CodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT.
The test being performed is just an approximation anyway, so it really
shouldn't crash when things don't go entirely as expected.
Should fix PR20474.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214177
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Jul 2014 09:56:45 +0000 (09:56 +0000)]
ARM: add __aeabi_d2h for truncation on AEABI systems
ARM does actually define the name for this conversion, so we should use it on
"-eabi" platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214176
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Jul 2014 09:56:38 +0000 (09:56 +0000)]
ARM: fix @llvm.convert.from.fp16 on softfloat targets.
We need to make sure we use the softened version of all appropriate operands in
the libcall, or things go horribly wrong. This may entail actually executing a
1-stage softening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214175
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Jul 2014 09:54:35 +0000 (09:54 +0000)]
UseListShuffleVector::~UseListShuffleVector(): Fix inappropriate delete. It should be delete[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214174
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Jul 2014 08:35:03 +0000 (08:35 +0000)]
[autoconf] Fixup s/3.5/3.6/. Clang's ident was 3.5.0svn in autoconf build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214167
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Tue, 29 Jul 2014 02:09:26 +0000 (02:09 +0000)]
Implement AArch64 TTI interface isAsCheapAsAMove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214159
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Tue, 29 Jul 2014 01:55:19 +0000 (01:55 +0000)]
Add TargetInstrInfo interface isAsCheapAsAMove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214158
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:13:56 +0000 (01:13 +0000)]
Bitcode: Correctly compare a Use against itself
Fix the sort of expected order in the reader to correctly return `false`
when comparing a `Use` against itself.
This was caught by test/Bitcode/binaryIntInstructions.3.2.ll, so I'm
adding a `RUN` line using `llvm-uselistorder` for every test in
`test/Bitcode` that passes.
A few tests still fail, so I'll investigate those next.
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214157
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:10:57 +0000 (01:10 +0000)]
Fix line-endings, NFC
A follow-up commit is adding a RUN line to each of these tests, so fix
the line endings first. This is a whitespace-only change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214156
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 29 Jul 2014 01:09:46 +0000 (01:09 +0000)]
IR: Augment debug statements for use-list order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214155
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Jul 2014 00:38:55 +0000 (00:38 +0000)]
Delete dead code.
It was added 12 years ago, but never used (and in the case of sort, never
implemented).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214150
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 00:02:40 +0000 (00:02 +0000)]
Fix typos / grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214147
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Jul 2014 00:02:37 +0000 (00:02 +0000)]
Fix header including itself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214146
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 23:25:21 +0000 (23:25 +0000)]
llvm-uselistorder: Add -num-shuffles option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214144
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 28 Jul 2014 23:17:38 +0000 (23:17 +0000)]
Tweak llvm-nm’s -undefined-only (aka -u) printing for Mach-O files
to just print the symbol name. So it matches darwin’s nm(1) -u option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214143
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 23:16:05 +0000 (23:16 +0000)]
Clean up testing cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214142
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 23:04:20 +0000 (23:04 +0000)]
[Debug Info] unique MDNodes in the enum types of each compile unit.
The enum types array by design contains pointers to MDNodes rather than DIRefs.
Unique them when handling the enum types in DwarfDebug.
rdar://
17628609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214139
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 22:46:46 +0000 (22:46 +0000)]
Remove extra ; in testing case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214137
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 22:41:50 +0000 (22:41 +0000)]
IR: Optimize size of use-list order shuffle vectors
Since we're storing lots of these, save two-pointers per vector with a
custom type rather than using the relatively heavy `SmallVector`.
Part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214135
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 22:24:06 +0000 (22:24 +0000)]
[Debug Info] add DISubroutineType and its creation takes DITypeArray.
DITypeArray is an array of DITypeRef, at its creation, we will create
DITypeRef (i.e use the identifier if the type node has an identifier).
This is the last patch to unique the type array of a subroutine type.
rdar://
17628609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214132
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 28 Jul 2014 22:10:52 +0000 (22:10 +0000)]
Update LLVM version: 3.5 => 3.6
We branched 3.5, it's now time to work on 3.6.
This is Sylvestre's patch from [1] plus regenerated configure
file by me, and minus the release notes reset, which Sean
pointed out [2] should happen later.
1. http://reviews.llvm.org/D4660
2. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20140721/111137.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214131
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 28 Jul 2014 22:00:44 +0000 (22:00 +0000)]
Regenerate autoconf, previous updates to the configury haven't
been updating configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214129
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:47:40 +0000 (21:47 +0000)]
llvm-uselistorder: Get it building in configure+make after r214125
Somehow this wasn't being built before (only noticed now since the test
was XFAILed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214128
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:19:41 +0000 (21:19 +0000)]
Bitcode: Serialize (and recover) use-list order
Predict and serialize use-list order in bitcode. This makes the option
`-preserve-bc-use-list-order` work *most* of the time, but this is still
experimental.
- Builds a full value-table up front in the writer, sets up a list of
use-list orders to write out, and discards the table. This is a
simpler first step than determining the order from the various
overlapping IDs of values on-the-fly.
- The shuffles stored in the use-list order list have an unnecessarily
large memory footprint.
- `blockaddress` expressions cause functions to be materialized
out-of-order. For now I've ignored this problem, so use-list orders
will be wrong for constants used by functions that have block
addresses taken. There are a couple of ways to fix this, but I
don't have a concrete plan yet.
- When materializing functions lazily, the use-lists for constants
will not be correct. This use case is out of scope: what should the
use-list order be, if it's incomplete?
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214125
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:19 +0000 (21:12 +0000)]
llvm-uselistorder: Add -save-temps option
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214123
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:12:17 +0000 (21:12 +0000)]
llvm-uselistorder: Check the correct flag for assembly
This is part of PR5680.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214122
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 28 Jul 2014 21:09:32 +0000 (21:09 +0000)]
IR: Expose Module::rbegin() and rend()
A follow-up commit for PR5680 needs to visit functions in reverse order.
Expose iterators to allow that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214121
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 28 Jul 2014 21:00:48 +0000 (21:00 +0000)]
[MCJIT] Remove extraneous parentheses in test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214117
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Jul 2014 20:42:29 +0000 (20:42 +0000)]
Test the linker plugin handling of llvm.used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214116
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 19:33:20 +0000 (19:33 +0000)]
[Debug Info] add a template class DITypedArray.
Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.
This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.
This commit should have no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214115
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 19:14:13 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the second of a series of patches to handle type uniqueing of the
type array for a subroutine type.
For vector and array types, getElements returns the array of subranges, so it
is a better name than getTypeArray. Even for class, struct and enum types,
getElements returns the members, which can be subprograms.
setArrays can set up to two arrays, the second is the templates.
This commit should have no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214112
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 28 Jul 2014 18:52:30 +0000 (18:52 +0000)]
[Debug Info] replace DIUnspecifiedParameter with DITrivialType.
This is the first of a series of patches to handle type uniqueing of the
type array for a subroutine type.
This commit makes sure unspecified_parameter is a DIType to enable converting
the type array for a subroutine type to an array of DITypes.
This commit should have no functionality change. With this commit, we may
change unspecified type to be a DITrivialType instead of a DIType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214111
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 28 Jul 2014 18:06:08 +0000 (18:06 +0000)]
R600: Modernize test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214108
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 28 Jul 2014 18:03:51 +0000 (18:03 +0000)]
llvm-cov: move the gcov code into a separate file.
The gcov compatible code is moved to its own file and
llvm-cov is updated to be a wrapper that always calls
the gcov main function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214107
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 28 Jul 2014 17:59:38 +0000 (17:59 +0000)]
R600/SI: Fix return type for isMIMG / isSMRD
All the others use bool, so these should too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Jul 2014 17:55:07 +0000 (17:55 +0000)]
[SDAG] Add DEBUG logging to the legalizer, fixing a "bug" found by
inspection in the proccess, and shuffle the logging in the DAG combiner
around a bit.
With this it is much easier to follow what the legalizer is doing. It
should even accurately present most of the strange legalization
operations where a single node is replaced by multiple nodes, etc. There
is still some information lost (we log SDNodes not SDValues so we don't
log which result is used for which thing), but I think this is much
closer to a usable system. Notably, this will make it *much* more
apparant when legalization is actually happening inside the combiner, or
when there is a cycle caused by interactions of the legalizer and the
combiner.
The "bug" I fixed here I'm not sure is remotely possible to trigger. We
were only adding one of the nodes in a replacement to the updated set
rather than all of the nodes in the replacement. Realistically, the
worst result of this are nodes not getting back onto the worklist in the
DAG combiner. I doubt it is possible to trigger this today, and
I certainly don't have any ideas about how, but this at least brings the
code into alignment with the principled operation of the routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214105
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 28 Jul 2014 17:49:26 +0000 (17:49 +0000)]
R600/SI: Implement getOptimalMemOpType
The default guess uses i32. This needs an address space argument
to really do the right thing in all cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214104
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Jul 2014 17:37:25 +0000 (17:37 +0000)]
Add tests for the various emit-llvm plugin options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214102
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 28 Jul 2014 17:31:39 +0000 (17:31 +0000)]
R600/SI: Make argument loads invariant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214101
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 28 Jul 2014 17:31:37 +0000 (17:31 +0000)]
Update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214100
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Jul 2014 14:44:33 +0000 (14:44 +0000)]
Test the mcpu option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214087
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Mon, 28 Jul 2014 13:46:45 +0000 (13:46 +0000)]
[SKX] Enabling mask logic instructions: encoding, lowering
Instructions: KAND{BWDQ}, KANDN{BWDQ}, KOR{BWDQ}, KXOR{BWDQ}, KXNOR{BWDQ}
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214081
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 28 Jul 2014 13:36:50 +0000 (13:36 +0000)]
Emit a warning if llvm_map_components_to_libraries() is used noting that its
use is deprecated in favour of llvm_map_components_to_libnames()
Although message(DEPRECATION "msg") would probably be a better fit this
does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are
both off, which is the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214078
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 28 Jul 2014 13:36:37 +0000 (13:36 +0000)]
Document the new LLVM CMake interface for building against LLVM
libraries. With many contributions from Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214077
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 28 Jul 2014 13:33:51 +0000 (13:33 +0000)]
Fixed sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214076
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 28 Jul 2014 13:10:25 +0000 (13:10 +0000)]
[PowerPC] Add testcase forgotten in the 214072 commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214073
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 28 Jul 2014 13:09:28 +0000 (13:09 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via features
While LLVM now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.
These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).
This patch implements the LLVM side of supporting this. As precedent
on other platforms suggests, ABI options are passed to the back-end as
features. Thus, this patch implements two features "elfv1" and "elfv2"
that select the desired ABI if present. (If not, the LLVM uses the
same default rules as now.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214072
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 27 Jul 2014 23:11:06 +0000 (23:11 +0000)]
Start adding some tests for the gold plugin.
These are only used when the 'ld' in the path is gold and the plugin has
been built, but it is already a start to make sure we don't regress features
that cannot be tested with llvm-lto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214058
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 27 Jul 2014 19:07:09 +0000 (19:07 +0000)]
ARM: correct handling of features in arch_extension
The subtarget information is the ultimate source of truth for the feature set
that is enabled at this point. We would previously not propagate the feature
information to the subtarget. While this worked for the most part (features
would be enabled/disabled as requested), if another operation that changed the
feature bits was encountered (such as a mode switch via a .arm or .thumb
directive), we would end up resetting the behaviour of the architectural
extensions.
Handling this properly requires a slightly more complicated handling. We need
to check if the feature is now being toggled. If so, only then do we toggle the
features. In return, we no longer have to calculate the feature bits ourselves.
The test changes are mostly to the diagnosis, which is now more uniform (a nice
side effect!). Add an additional test to ensure that we handle this case
properly.
Thanks to Nico Weber for alerting me to this issue!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214057
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 27 Jul 2014 19:07:05 +0000 (19:07 +0000)]
ARM: convert loop to range based
Convert a loop to use range based iteration. Rename structure members to help
naming, and make structure definition anonymous. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214056
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 27 Jul 2014 17:46:40 +0000 (17:46 +0000)]
Add alignment value to allowsUnalignedMemoryAccess
Rename to allowsMisalignedMemoryAccess.
On R600, 8 and 16 byte accesses are mostly OK with 4-byte alignment,
and don't need to be split into multiple accesses. Vector loads with
an alignment of the element type are not uncommon in OpenCL code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214055
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 27 Jul 2014 07:10:29 +0000 (07:10 +0000)]
AArch64: fix conversion of 'J' inline asm constraints.
'J' represents a negative number suitable for an add/sub alias
instruction, but while preparing it to become an int64_t we were
mangling the sign extension. So "i32 -1" became 0xffffffffLL, for
example.
Should fix one half of PR20456.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 27 Jul 2014 01:45:49 +0000 (01:45 +0000)]
[x86] Sink a variable only used by asserts into the asserts. Should fix
some -Werror bots, sorry for the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 27 Jul 2014 01:15:58 +0000 (01:15 +0000)]
[x86] Add a much more powerful framework for combining x86 shuffle
instructions in the legalized DAG, and leverage it to combine long
sequences of instructions to PSHUFB.
Eventually, the other x86-instruction-specific shuffle combines will
probably all be driven out of this routine. But the real motivation is
to detect after we have fully legalized and optimized a shuffle to the
minimal number of x86 instructions whether it is profitable to replace
the chain with a fully generic PSHUFB instruction even though doing so
requires either a load from a constant pool or tying up a register with
the mask.
While the Intel manuals claim it should be used when it replaces 5 or
more instructions (!!!!) my experience is that it is actually very fast
on modern chips, and so I've gon with a much more aggressive model of
replacing any sequence of 3 or more instructions.
I've also taught it to do some basic canonicalization to special-purpose
instructions which have smaller encodings than their generic
counterparts.
There are still quite a few FIXMEs here, and I've not yet implemented
support for lowering blends with PSHUFB (where its power really shines
due to being able to zero out lanes), but this starts implementing real
PSHUFB support even when using the new, fancy shuffle lowering. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214042
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 27 Jul 2014 01:11:19 +0000 (01:11 +0000)]
[ADT] Add a remarkbly useful little helper routine to ArrayRef for
checking whether the ArrayRef is equal to an explicit list of arguments.
This is particularly easy to implement even without variadic templates
because ArrayRef happens to be homogeneously typed. As a consequence we
can use a "clever" wrapper type and default arguments to capture in
a single method many arguments as well as *how many* arguments the user
specified.
Thanks to Dave Blaikie for helping me pull together this little helper.
Suggestions for how to improve or generalize it are of course welcome.
I'll be using it immediately in my follow-up patch. =D
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214041
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 26 Jul 2014 21:21:42 +0000 (21:21 +0000)]
R600/SI: Fix broken test.
There was no check prefix for the instruction lines.
Match what is emitted though, although I'm pretty sure it is
incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214035
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Sat, 26 Jul 2014 10:58:14 +0000 (10:58 +0000)]
Fix the failing test 'vector-idiv.ll'.
On Darwin the comment character is ##.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214028
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 26 Jul 2014 06:23:37 +0000 (06:23 +0000)]
R600: Move intrinsic lowering to separate functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214023
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 26 Jul 2014 05:53:16 +0000 (05:53 +0000)]
[SDAG] Add an assert that we don't mess up the number of values when
replacing nodes in the legalizer.
This caught a number of bugs for me during development.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214022
91177308-0d34-0410-b5e6-
96231b3b80d8