OSDN Git Service
Rui Ueyama [Tue, 7 Jun 2016 23:44:27 +0000 (23:44 +0000)]
[pdbdump] Print out TPI hash key size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272073
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 23:32:50 +0000 (23:32 +0000)]
[LibFuzzer] Declare and use sanitizer functions in ``fuzzer::ExternalFunctions``
This fixes linking problems on OSX.
Unfortunately it turns out we need to use an instance of the
``fuzzer::ExternalFunctions`` object in several places so this
commit also replaces all instances with a single global instance.
It also turns out initializing a global ``fuzzer::ExternalFunctions``
before main is entered (i.e. letting the object be initialised by the
global initializers) is not safe (on OSX the call to ``Printf()`` in the
CTOR crashes if it is called from a global initializer) so we instead
have a global ``fuzzer::ExternalFunctions*`` and initialize it inside
``FuzzerDriver()``.
Multiple unit tests depend also depend on the
``fuzzer::ExternalFunctions*`` global so a ``main()`` function has been
added that initializes it before running any tests.
Differential Revision: http://reviews.llvm.org/D20943
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272072
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 7 Jun 2016 23:13:54 +0000 (23:13 +0000)]
[docs] fix the build by including ScudoHardenedAllocator into toc; mention SourceBasedCodeCoverage.html in libFuzzer docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272070
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 7 Jun 2016 22:47:31 +0000 (22:47 +0000)]
Retry^4 "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit:
- Use echo instead of printf. This should side-step the character
escaping issues on Windows.
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272068
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Jun 2016 22:06:57 +0000 (22:06 +0000)]
[lit] Ignore errors when decoding redirected output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272066
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Tue, 7 Jun 2016 21:46:14 +0000 (21:46 +0000)]
Use FileCheck instead of grepping for patterns. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272065
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 7 Jun 2016 21:41:18 +0000 (21:41 +0000)]
[CFLAA] Kill dead code/fix comments in StratifiedSets.
Also use default/delete instead of hand-written ctors.
Thanks to Jia Chen for bringing this stuff up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272064
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Tue, 7 Jun 2016 21:37:17 +0000 (21:37 +0000)]
AMDGPU: Add amdgpu-ps-wqm-outputs function attributes
Summary:
The presence of this attribute indicates that VGPR outputs should be computed
in whole quad mode. This will be used by Mesa for prolog pixel shaders, so
that derivatives can be taken of shader inputs computed by the prolog, fixing
a bug.
The generated code could certainly be improved: if a prolog pixel shader is
used (which isn't common in modern OpenGL - they're used for gl_Color, polygon
stipples, and forcing per-sample interpolation), Mesa will use this attribute
unconditionally, because it has to be conservative. So WQM may be used in the
prolog when it isn't really needed, and furthermore a silly back-and-forth
switch is likely to happen at the boundary between prolog and main shader
parts.
Fixing this is a bit involved: we'd first have to add a mechanism by which
LLVM writes the WQM-related input requirements to the main shader part binary,
and then Mesa specializes the prolog part accordingly. At that point, we may
as well just compile a monolithic shader...
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95130
Reviewers: arsenm, tstellarAMD, mareko
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D20839
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272063
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 21:23:30 +0000 (21:23 +0000)]
[LibFuzzer] Split the fuzzer-oom.test into two tests.
This is necessary because the existing fuzzer-oom.test was Linux
specific due to its use of __sanitizer_print_memory_profile() which
is only available on Linux right now and so the test would fail on OSX.
Differential Revision: http://reviews.llvm.org/D20977
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272061
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 21:15:45 +0000 (21:15 +0000)]
[X86][SSE4A] Regenerated SSE4A intrinsics tests
There are no VEX encoded versions of SSE4A instructions, make sure that AVX targets give the same output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272060
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 20:46:39 +0000 (20:46 +0000)]
[pdb] Fix broken unit test compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272059
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 20:38:37 +0000 (20:38 +0000)]
[pdb] Convert StringRefs to ArrayRef<uint8_t>s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272058
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 7 Jun 2016 20:27:30 +0000 (20:27 +0000)]
Add info to SourceLevelDebugging about CodeView
Adds some discussion of the nature of the format, and some developer
docs on how to work with it in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272057
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 7 Jun 2016 20:27:12 +0000 (20:27 +0000)]
Revert "Differential Revision: reviews.llvm.org/D20557"
Author: Wei Ding <wei.ding2@amd.com>
Date: Tue Jun 7 19:04:44 2016 +0000
Differential Revision: http://reviews.llvm.org/D20557
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272044
91177308-0d34-0410-b5e6-
96231b3b80d8
as it was breaking the bots.
This reverts commit r272044.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272056
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 7 Jun 2016 20:27:06 +0000 (20:27 +0000)]
Reformat for some clarity and 80-columns. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272055
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Tue, 7 Jun 2016 20:22:15 +0000 (20:22 +0000)]
[libfuzzer] custom crossover interface function.
Differential Revision: http://reviews.llvm.org/D21089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272054
91177308-0d34-0410-b5e6-
96231b3b80d8
Etienne Bergeron [Tue, 7 Jun 2016 20:15:35 +0000 (20:15 +0000)]
[stack-protection] Add support for MSVC buffer security check
Summary:
This patch is adding support for the MSVC buffer security check implementation
The buffer security check is turned on with the '/GS' compiler switch.
* https://msdn.microsoft.com/en-us/library/
8dbf701c.aspx
* To be added to clang here: http://reviews.llvm.org/D20347
Some overview of buffer security check feature and implementation:
* https://msdn.microsoft.com/en-us/library/
aa290051(VS.71).aspx
* http://www.ksyash.com/2011/01/buffer-overflow-protection-3/
* http://blog.osom.info/2012/02/understanding-vs-c-compilers-buffer.html
For the following example:
```
int example(int offset, int index) {
char buffer[10];
memset(buffer, 0xCC, index);
return buffer[index];
}
```
The MSVC compiler is adding these instructions to perform stack integrity check:
```
push ebp
mov ebp,esp
sub esp,50h
[1] mov eax,dword ptr [__security_cookie (01068024h)]
[2] xor eax,ebp
[3] mov dword ptr [ebp-4],eax
push ebx
push esi
push edi
mov eax,dword ptr [index]
push eax
push 0CCh
lea ecx,[buffer]
push ecx
call _memset (010610B9h)
add esp,0Ch
mov eax,dword ptr [index]
movsx eax,byte ptr buffer[eax]
pop edi
pop esi
pop ebx
[4] mov ecx,dword ptr [ebp-4]
[5] xor ecx,ebp
[6] call @__security_check_cookie@4 (01061276h)
mov esp,ebp
pop ebp
ret
```
The instrumentation above is:
* [1] is loading the global security canary,
* [3] is storing the local computed ([2]) canary to the guard slot,
* [4] is loading the guard slot and ([5]) re-compute the global canary,
* [6] is validating the resulting canary with the '__security_check_cookie' and performs error handling.
Overview of the current stack-protection implementation:
* lib/CodeGen/StackProtector.cpp
* There is a default stack-protection implementation applied on intermediate representation.
* The target can overload 'getIRStackGuard' method if it has a standard location for the stack protector cookie.
* An intrinsic 'Intrinsic::stackprotector' is added to the prologue. It will be expanded by the instruction selection pass (DAG or Fast).
* Basic Blocks are added to every instrumented function to receive the code for handling stack guard validation and errors handling.
* Guard manipulation and comparison are added directly to the intermediate representation.
* lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
* lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
* There is an implementation that adds instrumentation during instruction selection (for better handling of sibbling calls).
* see long comment above 'class StackProtectorDescriptor' declaration.
* The target needs to override 'getSDagStackGuard' to activate SDAG stack protection generation. (note: getIRStackGuard MUST be nullptr).
* 'getSDagStackGuard' returns the appropriate stack guard (security cookie)
* The code is generated by 'SelectionDAGBuilder.cpp' and 'SelectionDAGISel.cpp'.
* include/llvm/Target/TargetLowering.h
* Contains function to retrieve the default Guard 'Value'; should be overriden by each target to select which implementation is used and provide Guard 'Value'.
* lib/Target/X86/X86ISelLowering.cpp
* Contains the x86 specialisation; Guard 'Value' used by the SelectionDAG algorithm.
Function-based Instrumentation:
* The MSVC doesn't inline the stack guard comparison in every function. Instead, a call to '__security_check_cookie' is added to the epilogue before every return instructions.
* To support function-based instrumentation, this patch is
* adding a function to get the function-based check (llvm 'Value', see include/llvm/Target/TargetLowering.h),
* If provided, the stack protection instrumentation won't be inlined and a call to that function will be added to the prologue.
* modifying (SelectionDAGISel.cpp) do avoid producing basic blocks used for inline instrumentation,
* generating the function-based instrumentation during the ISEL pass (SelectionDAGBuilder.cpp),
* if FastISEL (not SelectionDAG), using the fallback which rely on the same function-based implemented over intermediate representation (StackProtector.cpp).
Modifications
* adding support for MSVC (lib/Target/X86/X86ISelLowering.cpp)
* adding support function-based instrumentation (lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp, .h)
Results
* IR generated instrumentation:
```
clang-cl /GS test.cc /Od /c -mllvm -print-isel-input
```
```
*** Final LLVM Code input to ISel ***
; Function Attrs: nounwind sspstrong
define i32 @"\01?example@@YAHHH@Z"(i32 %offset, i32 %index) #0 {
entry:
%StackGuardSlot = alloca i8* <<<-- Allocated guard slot
%0 = call i8* @llvm.stackguard() <<<-- Loading Stack Guard value
call void @llvm.stackprotector(i8* %0, i8** %StackGuardSlot) <<<-- Prologue intrinsic call (store to Guard slot)
%index.addr = alloca i32, align 4
%offset.addr = alloca i32, align 4
%buffer = alloca [10 x i8], align 1
store i32 %index, i32* %index.addr, align 4
store i32 %offset, i32* %offset.addr, align 4
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %buffer, i32 0, i32 0
%1 = load i32, i32* %index.addr, align 4
call void @llvm.memset.p0i8.i32(i8* %arraydecay, i8 -52, i32 %1, i32 1, i1 false)
%2 = load i32, i32* %index.addr, align 4
%arrayidx = getelementptr inbounds [10 x i8], [10 x i8]* %buffer, i32 0, i32 %2
%3 = load i8, i8* %arrayidx, align 1
%conv = sext i8 %3 to i32
%4 = load volatile i8*, i8** %StackGuardSlot <<<-- Loading Guard slot
call void @__security_check_cookie(i8* %4) <<<-- Epilogue function-based check
ret i32 %conv
}
```
* SelectionDAG generated instrumentation:
```
clang-cl /GS test.cc /O1 /c /FA
```
```
"?example@@YAHHH@Z": # @"\01?example@@YAHHH@Z"
# BB#0: # %entry
pushl %esi
subl $16, %esp
movl ___security_cookie, %eax <<<-- Loading Stack Guard value
movl 28(%esp), %esi
movl %eax, 12(%esp) <<<-- Store to Guard slot
leal 2(%esp), %eax
pushl %esi
pushl $204
pushl %eax
calll _memset
addl $12, %esp
movsbl 2(%esp,%esi), %esi
movl 12(%esp), %ecx <<<-- Loading Guard slot
calll @__security_check_cookie@4 <<<-- Epilogue function-based check
movl %esi, %eax
addl $16, %esp
popl %esi
retl
```
Reviewers: kcc, pcc, eugenis, rnk
Subscribers: majnemer, llvm-commits, hans, thakis, rnk
Differential Revision: http://reviews.llvm.org/D20346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272053
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Jun 2016 20:14:17 +0000 (20:14 +0000)]
[lit] Fix an uninitialized var on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272052
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 19:32:09 +0000 (19:32 +0000)]
[yaml] Add a ScalarTraits for mapping endian aware types.
This allows mapping of any endian-aware type whose underlying
type (e.g. uint32_t) provides a ScalarTraits specialization.
Reviewed by: majnemer
Differential Revision: http://reviews.llvm.org/D21057
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272049
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 7 Jun 2016 19:25:28 +0000 (19:25 +0000)]
Revert r272045 since GCC doesn't know how to compile it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272048
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 7 Jun 2016 19:06:23 +0000 (19:06 +0000)]
[Hexagon] Modify HexagonExpandCondsets to handle subregisters
Also, switch to using functions from LiveIntervalAnalysis to update
live intervals, instead of performing the updates manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272045
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Ding [Tue, 7 Jun 2016 19:04:44 +0000 (19:04 +0000)]
Differential Revision: reviews.llvm.org/D20557
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272044
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 18:42:39 +0000 (18:42 +0000)]
[pdb] Fix a potential overflow and remove unnecessary comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272043
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 7 Jun 2016 18:35:37 +0000 (18:35 +0000)]
[CFLAA] Add AttrEscaped, remove bit twiddling functions.
This patch does a few things:
- Unifies AttrAll and AttrUnknown (since they were used for more or less
the same purpose anyway).
- Introduces AttrEscaped, an attribute that notes that a value escapes
our analysis for a given set, but not that an unknown value flows into
said set.
- Removes functions that take bit indices, since we also had functions
that took bitsets, and the use of both (with similar names) was
unclear and bug-prone.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272040
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Tue, 7 Jun 2016 18:16:32 +0000 (18:16 +0000)]
[libfuzzer] prune_corpus option for disabling pruning during the load.
Summary:
The option is very useful for testing, plus I intend to measure
its effect on fuzzer effectiveness.
Differential Revision: http://reviews.llvm.org/D21084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 7 Jun 2016 18:04:37 +0000 (18:04 +0000)]
Revert "Use CMAKE_INSTALL_BINDIR instead of hardcoding bin for tools install paths"
This reverts commit
0dc5a55f66ed06d7859c4e0474a87428d27775e6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 7 Jun 2016 18:01:16 +0000 (18:01 +0000)]
Use CMAKE_INSTALL_BINDIR instead of hardcoding bin for tools install paths
Summary:
This allows customizing the location executables and symlinks get installed to,
as with --bindir in autotools.
Reviewers: loladiro, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20934
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272031
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 7 Jun 2016 16:48:43 +0000 (16:48 +0000)]
Reapply [AArch64] Fix isLegalAddImmediate() to return true for valid negative values.
Originally reviewed here: http://reviews.llvm.org/D17463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272023
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Jun 2016 16:22:24 +0000 (16:22 +0000)]
[utils/lit] Show available_features with --show-suites.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272022
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 7 Jun 2016 16:13:40 +0000 (16:13 +0000)]
[lit] Improve logging with file redirection.
- This will cause lit to automatically include the first 1K of data in
redirected output files when a command fails (previously if the command
failed, but the main point of the test was, say, a `FileCheck` later on, then
the log wasn't helpful in showing why the command failed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272021
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Tue, 7 Jun 2016 15:52:35 +0000 (15:52 +0000)]
Quick fix for the test from rL272014 "[LAA] Improve non-wrapping pointer
detection by handling loop-invariant case" (s couple of buildbots failed).
Patch by Roman Shirokiy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272019
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Tue, 7 Jun 2016 15:17:21 +0000 (15:17 +0000)]
Revert "[MBP] Reduce code size by running tail merging in MBP."
This reverts commit r271930, r271915, r271923. They break a thumb selfhosting
bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272017
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 15:12:47 +0000 (15:12 +0000)]
[X86][AVX512] Added 512-bit integer vector non-temporal load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272016
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 7 Jun 2016 14:58:48 +0000 (14:58 +0000)]
[ARM] Accept conditional versions of BXNS and BLXNS
These instructions end in "S" but are not flag-setting, so they need including
in the list of special cases in the assembly parser.
Differential Revision: http://reviews.llvm.org/D21077
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272015
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Tue, 7 Jun 2016 14:55:27 +0000 (14:55 +0000)]
[LAA] Improve non-wrapping pointer detection by handling loop-invariant case.
This fixes PR26314. This patch adds new helper “isNoWrap” with detection of
loop-invariant pointer case.
Patch by Roman Shirokiy.
Ref: https://llvm.org/bugs/show_bug.cgi?id=26314
Differential Revision: http://reviews.llvm.org/D17268
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272014
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 7 Jun 2016 14:55:04 +0000 (14:55 +0000)]
[Linker/IRMover] Simplify the code a bit. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272013
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 13:47:23 +0000 (13:47 +0000)]
[X86][SSE] Add general lowering of nontemporal vector loads (fixed bad merge)
Currently the only way to use the (V)MOVNTDQA nontemporal vector loads instructions is through the int_x86_sse41_movntdqa style builtins.
This patch adds support for lowering nontemporal loads from general IR, allowing us to remove the movntdqa builtins in a future patch.
We currently still fold nontemporal loads into suitable instructions, we should probably look at removing this (and nontemporal stores as well) or at least make the target's folding implementation aware that its dealing with a nontemporal memory transaction.
There is also an issue that VMOVNTDQA only acts on 128-bit vectors on pre-AVX2 hardware - so currently a normal ymm load is still used on AVX1 targets.
Differential Review: http://reviews.llvm.org/D20965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272011
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 13:34:24 +0000 (13:34 +0000)]
[X86][SSE] Add general lowering of nontemporal vector loads
Currently the only way to use the (V)MOVNTDQA nontemporal vector loads instructions is through the int_x86_sse41_movntdqa style builtins.
This patch adds support for lowering nontemporal loads from general IR, allowing us to remove the movntdqa builtins in a future patch.
We currently still fold nontemporal loads into suitable instructions, we should probably look at removing this (and nontemporal stores as well) or at least make the target's folding implementation aware that its dealing with a nontemporal memory transaction.
There is also an issue that VMOVNTDQA only acts on 128-bit vectors on pre-AVX2 hardware - so currently a normal ymm load is still used on AVX1 targets.
Differential Review: http://reviews.llvm.org/D20965
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272010
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 7 Jun 2016 13:21:17 +0000 (13:21 +0000)]
[PM] Preserve GlobalsAA for SROA.
Differential Revision: http://reviews.llvm.org/D21040
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272009
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 7 Jun 2016 13:10:14 +0000 (13:10 +0000)]
[Thumb-1] Add optimized constant materialization for integers [256..512)
We can materialize these integers using a MOV; ADDi8 pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272007
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Tue, 7 Jun 2016 13:08:45 +0000 (13:08 +0000)]
[AVX512] Fix load opcode for fast isel.
Differential Revision: http://reviews.llvm.org/D21067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272006
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 7 Jun 2016 12:48:22 +0000 (12:48 +0000)]
[PowerPC] Support multiple return values with fast isel
Using an LLVM IR aggregate return value type containing three
or more integer values causes an abort in the fast isel pass.
This patch adds two more registers to RetCC_PPC64_ELF_FIS to
allow returning up to four integers with fast isel, just the
same as is currently supported with regular isel (RetCC_PPC).
This is needed for Swift and (possibly) other non-clang frontends.
Fixes PR26190.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272005
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 12:20:14 +0000 (12:20 +0000)]
[X86][SSE] Improved blend+zero target shuffle combining to use combined shuffle mask directly
We currently only combine to blend+zero if the target value type has 8 elements or less, but this was missing a lot of cases where the combined mask had been widened.
This change makes it so we use the combined mask to determine the blend value type, allowing us to catch more widened cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272003
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 7 Jun 2016 12:13:34 +0000 (12:13 +0000)]
[ARM] Shrink post-indexed LDR and STR to LDM/STM
A Thumb-2 post-indexed LDR instruction such as:
ldr.w r0, [r1], #4
Can be rewritten as:
ldm.n r1!, {r0}
LDMs can be more expensive than LDRs on some cores, so this has been enabled only in minsize mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272002
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Tue, 7 Jun 2016 11:47:24 +0000 (11:47 +0000)]
[ARM] Transform LDMs into writeback form to save code size
If we have an LDM that uses only low registers and doesn't write to its base register:
ldm.w r0, {r1, r2, r3}
And that base register is dead after the LDM, then we can convert it to writeback form and use a narrow encoding:
ldm.n r0!, {r1, r2, r3}
Obviously, this introduces a new register write and so can cause WAW hazards, so I've enabled it only in minsize mode. This is a code size trick that ARM Compiler 5 ("armcc") does that we don't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272000
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 7 Jun 2016 11:04:49 +0000 (11:04 +0000)]
[llvm-readobj] - Teach llvm-readobj to dump .gnu.version_r sections
SHT_GNU_verneed (.gnu.version_r) is a version dependency section.
It was the last symbol versioning relative section that was not dumped,
now it is.
Differential revision: http://reviews.llvm.org/D21024
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271998
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Smith [Tue, 7 Jun 2016 10:34:33 +0000 (10:34 +0000)]
[ARM] Incorrect relocation type for Thumb2 B<cond>.w
The Thumb2 conditional branch B<cond>.W has a different encoding (T3)
to the unconditional branch B.W (T4) as it needs to record <cond>.
As the encoding is different the B<cond>.W is given a different
relocation type.
ELF for the ARM Architecture 4.6.1.6 (Table-13) states that
R_ARM_THM_JUMP19 should be used for B<cond>.W. At present the
MC layer is using the R_ARM_THM_JUMP24 from B.W.
This change makes B<cond>.W use R_ARM_THM_JUMP19 and alters the
existing test that checks for R_ARM_THM_JUMP24 to expect
R_ARM_THM_JUMP19.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271997
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 10:27:15 +0000 (10:27 +0000)]
[InstCombine][AVX2] Add support for simplifying AVX2 per-element shifts to native shifts
Unlike native shifts, the AVX2 per-element shift instructions VPSRAV/VPSRLV/VPSLLV handle out of range shift values (logical shifts set the result to zero, arithmetic shifts splat the sign bit).
If the shift amount is constant we can sometimes convert these instructions to native shifts:
1 - if all shift amounts are in range then the conversion is trivial.
2 - out of range arithmetic shifts can be clamped to the (bitwidth - 1) (a legal shift amount) before conversion.
3 - logical shifts just return zero if all elements have out of range shift amounts.
In addition, UNDEF shift amounts are handled - either as an UNDEF shift amount in a native shift or as an UNDEF in the logical 'all out of range' zero constant special case for logical shifts.
Differential Revision: http://reviews.llvm.org/D19675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271996
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 08:18:35 +0000 (08:18 +0000)]
[InstCombine][SSE] Add MOVMSK constant folding (PR27982)
This patch adds support for folding undef/zero/constant inputs to MOVMSK instructions.
The SSE/AVX versions can be fully folded, but the MMX version can only handle undef inputs.
Differential Revision: http://reviews.llvm.org/D20998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271990
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:57 +0000 (07:27 +0000)]
[AVX512] Allow avx2 and sse41 nontemporal load intrinsics to select EVEX encoded instructions when VLX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271988
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:54 +0000 (07:27 +0000)]
[AVX512] Remove unnecessary mayLoad, mayStore, hasSidEffects flags from instructions that have patterns that imply them. Add the same set of flags to instructions that don't have patterns to imply them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271987
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:51 +0000 (07:27 +0000)]
[AVX512] Add NoVLX to a couple patterns that have VLX equivalents. Ordering of the patterns in the .td file protects this, but its better to be explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271986
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 7 Jun 2016 05:40:08 +0000 (05:40 +0000)]
[Kaleidoscope] Update Chapter 3 of the "Implementing a Language" tutorial to
take into account modernizations in r246002 and r270381.
Patch based on http://reviews.llvm.org/D20954 by Miroslav Hrncir.
Thanks Miroslav!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271985
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 05:32:48 +0000 (05:32 +0000)]
[pdb] Fix broken unit tests after r271982.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271983
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 05:28:55 +0000 (05:28 +0000)]
[pdb] Use MappedBlockStream to parse the PDB directory.
In order to efficiently write PDBs, we need to be able to make a
StreamWriter class similar to a StreamReader, which can transparently deal
with writing to discontiguous streams, and we need to use this for all
writing, similar to how we use StreamReader for all reading.
Most discontiguous streams are the typical numbered streams that appear in
a PDB file and are described by the directory, but the exception to this,
that until now has been parsed by hand, is the directory itself.
MappedBlockStream works by querying the directory to find out which blocks
a stream occupies and various other things, so naturally the same logic
could not possibly work to describe the blocks that the directory itself
resided on.
To solve this, I've introduced an abstraction IPDBStreamData, which allows
the client to query for the list of blocks occupied by the stream, as well
as the stream length. I provide two implementations of this: one which
queries the directory (for indexed streams), and one which queries the
super block (for the directory stream).
This has the side benefit of vastly simplifying the code to parse the
directory. Whereas before a mini state machine was rolled by hand, now we
simply use FixedStreamArray to read out the stream sizes, then build a
vector of FixedStreamArrays for the stream map, all in just a few lines of
code.
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271982
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 04:44:49 +0000 (04:44 +0000)]
[LibFuzzer] s/dataflow sanitizer/DataflowSanitizer/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271980
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 04:44:39 +0000 (04:44 +0000)]
[LibFuzzer] Disable building and running LSan tests on Apple platforms because LSan is not currently supported.
Differential Revision: http://reviews.llvm.org/D20947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271979
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:15:07 +0000 (03:15 +0000)]
ARM: correct TLS access on WoA
TLS access requires an offset from the TLS index. The index itself is the
section-relative distance of the symbol. For ARM, the relevant relocation
(IMAGE_REL_ARM_SECREL) is applied as a constant. This means that the value may
not be an immediate and must be lowered into a constant pool. This offset will
not be base relocated. We were previously emitting the actual address of the
symbol which would be base relocated and would therefore be the vaue offset by
the ImageBase + TLS Offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271974
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:15:01 +0000 (03:15 +0000)]
ARM: clang-format a couple of switches, add comments
clang-format a couple of switches in preparation for a future change. Add some
enumeration comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271973
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:14:57 +0000 (03:14 +0000)]
ARM: normalise space in the patterns
Just adjust the whitespace for the selection patterns. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271972
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 7 Jun 2016 01:20:26 +0000 (01:20 +0000)]
[sanitizer] Initial implementation of a Hardened Allocator
Summary:
This is an initial implementation of a Hardened Allocator based on Sanitizer Common's CombinedAllocator.
It aims at mitigating heap based vulnerabilities by adding several features to the base allocator, while staying relatively fast.
The following were implemented:
- additional consistency checks on the allocation function parameters and on the heap chunks;
- use of checksum protected chunk header, to detect corruption;
- randomness to the allocator base;
- delayed freelist (quarantine), to mitigate use after free and overall determinism.
Additional mitigations are in the works.
Reviewers: eugenis, aizatsky, pcc, krasin, vitalybuka, glider, dvyukov, kcc
Subscribers: kubabrecka, filcab, llvm-commits
Differential Revision: http://reviews.llvm.org/D20084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271968
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 7 Jun 2016 00:59:04 +0000 (00:59 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271967
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 7 Jun 2016 00:02:03 +0000 (00:02 +0000)]
Re-land "[codeview] Emit information about global variables"
This reverts commit r271962 and reinstantes r271957.
MSVC's linker doesn't appear to like it if you have an empty symbol
substream, so only open a symbol substream if we're going to emit
something about globals into it.
Makes check-asan pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271965
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:46:14 +0000 (23:46 +0000)]
Try one more time to pacify -Wpessimizing-move, MSVC, libstdc++4.7, and the world without a named variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271964
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:43:56 +0000 (23:43 +0000)]
Revert "Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file""
This reverts commit r271953. It's still breaking on Windows, though the
list initialization issue is fixed:
http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/3751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271963
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:41:38 +0000 (23:41 +0000)]
Revert "[codeview] Emit information about global variables"
This reverts commit r271957, it broke check-asan on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271962
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Mon, 6 Jun 2016 23:38:33 +0000 (23:38 +0000)]
[InstCombine] scalarizePHI should not assume the code it sees has been CSE'd
scalarizePHI only looked for phis that have exactly two uses - the "latch"
use, and an extract. Unfortunately, we can not assume all equivalent extracts
are CSE'd, since InstCombine itself may create an extract which is a duplicate
of an existing one. This extends it to handle several distinct extracts from
the same index.
This should fix at least some of the performance regressions from PR27988.
Differential Revision: http://reviews.llvm.org/D20983
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271961
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 23:35:52 +0000 (23:35 +0000)]
Fix CRLF -> LF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271960
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:28:03 +0000 (23:28 +0000)]
Attempt to work around lack of std::map::emplace in libstdc++4.7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271958
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:23:47 +0000 (23:23 +0000)]
[codeview] Emit information about global variables
This currently emits everything as S_GDATA32, which isn't right for
things like thread locals, but it's a start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271957
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 6 Jun 2016 23:21:27 +0000 (23:21 +0000)]
Verifier: Simplify and fix issue where we were not verifying unmaterialized functions.
Arrange to call verify(Function &) on each function, followed by
verify(Module &), whether the verifier is being used from the pass or
from verifyModule(). As a side effect, this fixes an issue that caused
us not to call verify(Function &) on unmaterialized functions from
verifyModule().
Differential Revision: http://reviews.llvm.org/D21042
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271956
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 23:19:23 +0000 (23:19 +0000)]
[pdbdump] Verify the size of TPI hash records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271954
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:17:22 +0000 (23:17 +0000)]
Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit:
- Normalize file paths read from the file to prevent Windows path
separators from escaping parts of the path.
- Since we need to store the normalized file paths in WeightedFile,
don't do tricky things to keep the source MemoryBuffer alive.
- Don't use list-initialization for a std::string in WeightedFile.
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271953
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:01:42 +0000 (23:01 +0000)]
Revert "Retry "[llvm-profdata] Add option to ingest filepaths from a file"
This reverts commit r271949. It breaks the Windows build:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271952
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 22:39:22 +0000 (22:39 +0000)]
Retry "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit:
- Normalize file paths read from the file to prevent Windows path
separators from escaping parts of the path.
- Since we need to store the normalized file paths in WeightedFile,
don't do tricky things to keep the source MemoryBuffer alive.
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271949
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 6 Jun 2016 22:32:52 +0000 (22:32 +0000)]
Verifier: Remove dead code.
Remove previously unreachable code that verifies that a function definition has
an entry block. By definition, a function definition has at least one block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 6 Jun 2016 22:02:16 +0000 (22:02 +0000)]
Updating release notes for CMake version bump
CMake 3.4.3 is now required for building LLVM-based projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271945
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 21:34:55 +0000 (21:34 +0000)]
[pdbdump] Print section header flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271943
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 6 Jun 2016 21:18:43 +0000 (21:18 +0000)]
[yaml2obj] Get rid of MachO header union
This is based on post-commit feedback from Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271942
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 6 Jun 2016 20:37:17 +0000 (20:37 +0000)]
[llvm-pdbdump] Dump stream sizes and stream blocks to yaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271940
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 6 Jun 2016 20:37:05 +0000 (20:37 +0000)]
[llvm-pdbdump] Dump MSF headers to YAML.
This is the simplest possible patch to get some kind of YAML
output. All it dumps is the MSF header fields so that in
theory an empty MSF file could be reconstructed.
Reviewed By: ruiu, majnemer
Differential Revision: http://reviews.llvm.org/D20971
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271939
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 6 Jun 2016 20:27:09 +0000 (20:27 +0000)]
[LibFuzzer] Provide stub implementation of __sanitizer_cov_trace_pc_indir
Calls to this function are currently injected by the
``SanitizerCoverageModule`` pass when the both the ``indirect-calls``
and ``trace-pc`` sanitizer coverage options are enabled and the code
being instrumented has indirect calls. Previously because LibFuzzer did
not define this function this would lead to link errors when building
some of the tests on OSX.
Differential Revision: http://reviews.llvm.org/D20946
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271938
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 6 Jun 2016 20:10:33 +0000 (20:10 +0000)]
AMDGPU: Add function for getting instruction size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271936
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 6 Jun 2016 20:03:31 +0000 (20:03 +0000)]
AMDGPU: Fix constantexpr addrspacecasts
If we had a constant group address space cast the queue pointer
wasn't enabled for the function, resulting in a crash on noreg
later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271935
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 6 Jun 2016 20:01:50 +0000 (20:01 +0000)]
[PM] Preserve the correct set of analyses for GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271934
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 6 Jun 2016 19:24:27 +0000 (19:24 +0000)]
[GVN] Switch dump() definition over to LLVM_DUMP_METHOD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271932
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Mon, 6 Jun 2016 19:21:40 +0000 (19:21 +0000)]
[LoopUnrollAnalyzer] Fix a crash in analyzeLoopUnrollCost.
In some cases, when simplifying with SCEV, we might consider pointer values as
just usual integer values. Thus, we might get a different type from what we
had originally in the map of simplified values, and hence we need to check
types before operating on the values.
This fixes PR28015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271931
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 19:11:53 +0000 (19:11 +0000)]
Fix a test case. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271930
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 6 Jun 2016 19:10:46 +0000 (19:10 +0000)]
Reapply [LSR] Create fewer redundant instructions.
Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs. This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.
Originally reviewed in http://reviews.llvm.org/D18001
Reviewers: atrick
Subscribers: llvm-commits, mzolotukhin, mcrosier
Differential Revision: http://reviews.llvm.org/D18480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271929
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 18:39:21 +0000 (18:39 +0000)]
[pdbdump] Print out New FPO stream contents.
The data strucutre in the new FPO stream is described in the
PE/COFF spec. There is one record per function if frame pointer
is omitted.
Differential Revision: http://reviews.llvm.org/D20999
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271926
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 18:36:07 +0000 (18:36 +0000)]
[MBP] Reduce code size by running tail merging in MBP.
The code layout that TailMerging (inside BranchFolding) works on is not the
final layout optimized based on the branch probability. Generally, after
BlockPlacement, many new merging opportunities emerge.
This patch calls Tail Merging after MBP and calls MBP again if Tail Merging
merges anything.
Differential Revision: http://reviews.llvm.org/D20276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271925
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:35:44 +0000 (18:35 +0000)]
[Kaleidoscope][BuildingAJIT] Fix hyphenation in chapter 2 title.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271924
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 18:35:41 +0000 (18:35 +0000)]
[BranchFolding] Replace MachineBlockFrequencyInfo with MBFIWrapper. NFC.
Differential Revision: http://reviews.llvm.org/D20184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271923
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 6 Jun 2016 18:29:59 +0000 (18:29 +0000)]
[cpu-detection] Substantial refactor of Host CPU detection code (x86)
Summary:
Following D20970 (committed as r271726).
This is a substantial refactoring of the host CPU detection code.
There is no functionality change intended, but the changes are extensive.
Definitions of architecture types and subtypes are by no means exhaustive or
perfectly defined, but a fair starting point.
Suggestions for futher improvements are welcome.
Reviewers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20988
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271921
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:22:47 +0000 (18:22 +0000)]
[Kaleidoscope][BuildingAJIT] More cleanup of Chapter 2.
Streamline some wording, fix a bug in the markup for the layer interface table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271917
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:07:23 +0000 (18:07 +0000)]
[Kaleidoscope][BuildingAJIT] Clean up sentence, remove comments from code block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271913
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 16:56:57 +0000 (16:56 +0000)]
[InstCombine] limit icmp transform to ConstantInt (PR28011)
In r271810 ( http://reviews.llvm.org/rL271810 ), I loosened the check
above this to work for any Constant rather than ConstantInt. AFAICT,
that part makes sense if we can determine that the shrunken/extended
constant remained equal. But it doesn't make sense for this later
transform where we assume that the constant DID change.
This could assert for a ConstantExpr:
https://llvm.org/bugs/show_bug.cgi?id=28011
And it could be wrong for a vector as shown in the added regression test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271908
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 16:03:06 +0000 (16:03 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271904
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 15:55:00 +0000 (15:55 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271903
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Mon, 6 Jun 2016 15:23:43 +0000 (15:23 +0000)]
[AMDGPU][llvm-mc] v_cndmask_b32: src2 is mandatory; do not enforce VOP2 when src2 == VCC.
Another step for unification llvm assembler/disassembler with sp3.
Besides, CodeGen output is a bit improved, thus changes in CodeGen tests.
Assembler/Disassembler tests updated/added.
Differential Revision: http://reviews.llvm.org/D20796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271900
91177308-0d34-0410-b5e6-
96231b3b80d8