OSDN Git Service

android-x86/external-llvm.git
8 years agoInline this into its only use. NFC.
Sean Silva [Sat, 28 May 2016 04:19:40 +0000 (04:19 +0000)]
Inline this into its only use. NFC.

The name was out of date at this point and it seems simple enough to
have in-line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271093 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBring back r271090 in a way that doesn't depend on r271089.
Sean Silva [Sat, 28 May 2016 04:05:36 +0000 (04:05 +0000)]
Bring back r271090 in a way that doesn't depend on r271089.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271092 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r271089 and r271090.
Sean Silva [Sat, 28 May 2016 03:56:25 +0000 (03:56 +0000)]
Revert r271089 and r271090.

It was triggering an msan bot.

Revert "[IRPGO] Set the function entry count metadata."

This reverts commit r271090.

Revert "[IRPGO] Centralize the function attribute inliner hint logic. NFC."

This reverts commit r271089.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271091 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IRPGO] Set the function entry count metadata.
Sean Silva [Sat, 28 May 2016 03:02:54 +0000 (03:02 +0000)]
[IRPGO] Set the function entry count metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271090 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IRPGO] Centralize the function attribute inliner hint logic. NFC.
Sean Silva [Sat, 28 May 2016 03:02:50 +0000 (03:02 +0000)]
[IRPGO] Centralize the function attribute inliner hint logic. NFC.

This keeps the logic in the same function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271089 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Add option to enable subregister liveness tracking
Krzysztof Parzyszek [Sat, 28 May 2016 02:02:51 +0000 (02:02 +0000)]
[Hexagon] Add option to enable subregister liveness tracking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271088 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Separate C8 and USR to avoid unwanted subregister composition
Krzysztof Parzyszek [Sat, 28 May 2016 01:51:16 +0000 (01:51 +0000)]
[Hexagon] Separate C8 and USR to avoid unwanted subregister composition

Composing subreg_loreg with subreg_oveflow leads to strange results with
lane masks for register classes with subreg_loreg. In particular, dead
lane detection generates incorrect code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271087 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopUnrollAnalyzer] Add a comment to visitCastInst.
Michael Zolotukhin [Sat, 28 May 2016 01:40:14 +0000 (01:40 +0000)]
[LoopUnrollAnalyzer] Add a comment to visitCastInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271086 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: Fix indentation
Matthias Braun [Sat, 28 May 2016 01:06:51 +0000 (01:06 +0000)]
AArch64: Fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271084 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[docs] Be a bit more precise.
Sean Silva [Sat, 28 May 2016 01:03:36 +0000 (01:03 +0000)]
[docs] Be a bit more precise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271083 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Cleanup vector insert/extract tests
Matt Arsenault [Sat, 28 May 2016 00:51:06 +0000 (00:51 +0000)]
AMDGPU: Cleanup vector insert/extract tests

This mostly makes sure that 3-vector dynamic inserts
and extracts are covered.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271082 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix trailing whitespace
Matt Arsenault [Sat, 28 May 2016 00:50:51 +0000 (00:50 +0000)]
AMDGPU: Fix trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271081 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Add fract intrinsic
Matt Arsenault [Sat, 28 May 2016 00:19:52 +0000 (00:19 +0000)]
AMDGPU: Add fract intrinsic

Remove broken patterns matching it. This was matching the
unsafe math pattern and expanding the fix for the buggy instruction
from the pattern. The problems are also on CI. Remove the workarounds
and only use fract with unsafe math or from the intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271078 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThe patch fixes r271071
Evgeny Stupachenko [Sat, 28 May 2016 00:14:58 +0000 (00:14 +0000)]
The patch fixes r271071
Summary:
unused variables in Release mode:
  BasicBlock *Header
  unsigned OrigCount
put under DEBUG

From: Evgeny Stupachenko <evstupac@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271076 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix windows build bot failure
Xinliang David Li [Sat, 28 May 2016 00:03:35 +0000 (00:03 +0000)]
Fix windows build bot failure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271075 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Port the Sample FDO to new PM (part-2)
Xinliang David Li [Fri, 27 May 2016 23:20:16 +0000 (23:20 +0000)]
[PM] Port the Sample FDO to new PM (part-2)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271072 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThe patch refactors unroll pass.
Evgeny Stupachenko [Fri, 27 May 2016 23:15:06 +0000 (23:15 +0000)]
The patch refactors unroll pass.
Summary:
Unroll factor (Count) calculations moved to a new function.
Early exits on pragma and "-unroll-count" defined factor added.
New type of unrolling "Force" introduced (previously used implicitly).
New unroll preference "AllowRemainder" introduced and set "true" by default.
(should be set to false for architectures that suffers from it).

Reviewers: hfinkel, mzolotukhin, zzheng

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

From: Evgeny Stupachenko <evstupac@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271071 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse C++ casts to avoid a warning
Sanjoy Das [Fri, 27 May 2016 23:04:28 +0000 (23:04 +0000)]
Use C++ casts to avoid a warning

warning: cast from type ‘const void*’ to type
‘llvm::PrettyStackTraceEntry*’ casts away qualifiers [-Wcast-qual]
   PrettyStackTraceHead = (PrettyStackTraceEntry*)Top;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271069 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate the stack coloring pass to remove lifetime intrinsics in the optnone/opt-bisec...
Andrew Kaylor [Fri, 27 May 2016 22:56:49 +0000 (22:56 +0000)]
Update the stack coloring pass to remove lifetime intrinsics in the optnone/opt-bisect skip case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271068 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Add option to enable asan-use-after-scope from clang.
Vitaly Buka [Fri, 27 May 2016 22:55:10 +0000 (22:55 +0000)]
[asan] Add option to enable asan-use-after-scope from clang.

Clang will have -fsanitize-address-use-after-scope flag.

PR27453

Reviewers: kcc, eugenis, aizatsky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271067 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoStart using shouldAssumeDSOLocal on ARM.
Rafael Espindola [Fri, 27 May 2016 22:41:51 +0000 (22:41 +0000)]
Start using shouldAssumeDSOLocal on ARM.

Given where this is used it should be a nop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271066 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Kaleidoscope][BuildingAJIT] Add stub chapter text for Building A JIT Chapter 4.
Lang Hames [Fri, 27 May 2016 22:34:56 +0000 (22:34 +0000)]
[Kaleidoscope][BuildingAJIT] Add stub chapter text for Building A JIT Chapter 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271064 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Port the Sample FDO to new PM (part-1)
Xinliang David Li [Fri, 27 May 2016 22:30:44 +0000 (22:30 +0000)]
[PM] Port the Sample FDO to new PM (part-1)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271062 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Kaleidoscope][Orc] Remove the reference to the Orc directory that was removed
Lang Hames [Fri, 27 May 2016 22:21:12 +0000 (22:21 +0000)]
[Kaleidoscope][Orc] Remove the reference to the Orc directory that was removed
in r271059.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271061 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.
Lang Hames [Fri, 27 May 2016 22:17:56 +0000 (22:17 +0000)]
[Kaleidoscope] Remove the old Kaleidoscope/ORC tutorial series.

This code has been superseded by the new Building A JIT series.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271059 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMachineScheduler: Introduce ONLY1 reason to improve debug output
Matthias Braun [Fri, 27 May 2016 22:14:26 +0000 (22:14 +0000)]
MachineScheduler: Introduce ONLY1 reason to improve debug output

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271058 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64Subtarget: Use default member initializers
Matthias Braun [Fri, 27 May 2016 22:14:09 +0000 (22:14 +0000)]
AArch64Subtarget: Use default member initializers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271057 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't discard errors
David Majnemer [Fri, 27 May 2016 22:07:50 +0000 (22:07 +0000)]
Don't discard errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271056 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Kaleidoscope][BuildingAJIT] Add code for chapter 4.
Lang Hames [Fri, 27 May 2016 21:50:13 +0000 (21:50 +0000)]
[Kaleidoscope][BuildingAJIT] Add code for chapter 4.

This chapter will cover lazy compilation directly from ASTs using the Compile
Callbacks and Indirect Stubs APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271054 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] use __sanitizer_set_report_fd with -close_fd_mask. This allows us to...
Kostya Serebryany [Fri, 27 May 2016 21:46:22 +0000 (21:46 +0000)]
[libFuzzer] use __sanitizer_set_report_fd with -close_fd_mask. This allows us to keep asan reports when closing target's stderr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271053 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMap DynamicNoPIC to Static on non-darwin.
Rafael Espindola [Fri, 27 May 2016 21:44:18 +0000 (21:44 +0000)]
Map DynamicNoPIC to Static on non-darwin.

DynamicNoPIC was only every used on darwin. This maps it to static on
ELF. It matches what is done on X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271052 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] move and/sext fold to helper function; NFCI
Sanjay Patel [Fri, 27 May 2016 21:41:29 +0000 (21:41 +0000)]
[InstCombine] move and/sext fold to helper function; NFCI

We need to enhance the pattern matching on these to look through bitcasts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271051 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't iterate endlessly if an error occurs.
David Majnemer [Fri, 27 May 2016 21:25:05 +0000 (21:25 +0000)]
Don't iterate endlessly if an error occurs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271048 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFileCheck: dump command line context with empty input
Xinliang David Li [Fri, 27 May 2016 21:23:25 +0000 (21:23 +0000)]
FileCheck: dump command line context with empty input

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271047 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Use standard macros to initialize HexagonExpandCondsets pass
Krzysztof Parzyszek [Fri, 27 May 2016 21:15:34 +0000 (21:15 +0000)]
[Hexagon] Use standard macros to initialize HexagonExpandCondsets pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271045 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix compilation with GCC, which treats this as a constructor name not a type
Richard Smith [Fri, 27 May 2016 21:05:35 +0000 (21:05 +0000)]
Fix compilation with GCC, which treats this as a constructor name not a type
name. (GCC is correct here per the latest language DRs.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271044 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Do not create passes in the constructor of HexagonPassConfig
Krzysztof Parzyszek [Fri, 27 May 2016 20:48:39 +0000 (20:48 +0000)]
[Hexagon] Do not create passes in the constructor of HexagonPassConfig

When running mir tests, a pass created in that constructor would not be
freed, leading to memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271043 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LCSSA] Simplify. Suggested by Sanjoy.
Davide Italiano [Fri, 27 May 2016 20:25:31 +0000 (20:25 +0000)]
[LCSSA] Simplify. Suggested by Sanjoy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271041 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Fix size check when reading stream bytes.
Zachary Turner [Fri, 27 May 2016 20:17:33 +0000 (20:17 +0000)]
[pdb] Fix size check when reading stream bytes.

We were accidentally bounds checking the read against the output
ArrayRef instead of against the size of the read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271040 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Timer] Add missing slash in doxygen commit.
Davide Italiano [Fri, 27 May 2016 20:04:16 +0000 (20:04 +0000)]
[Timer] Add missing slash in doxygen commit.

Pointed out by: Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271039 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[MC] Support symbolic expressions in assembly directives"
Petr Hosek [Fri, 27 May 2016 19:58:05 +0000 (19:58 +0000)]
Revert "[MC] Support symbolic expressions in assembly directives"

This reverts commit r271028, it causes the directive_fill.s to fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271038 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Timer] Expose an API to check if the timer is running.
Davide Italiano [Fri, 27 May 2016 19:12:26 +0000 (19:12 +0000)]
[Timer] Expose an API to check if the timer is running.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271037 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSmallVector: Replace some pre-C++11 move helpers with standard algorithms
David Blaikie [Fri, 27 May 2016 19:05:14 +0000 (19:05 +0000)]
SmallVector: Replace some pre-C++11 move helpers with standard algorithms

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271036 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GVN] Preserve !range metadata when PRE'ing loads
Sanjoy Das [Fri, 27 May 2016 19:03:10 +0000 (19:03 +0000)]
[GVN] Preserve !range metadata when PRE'ing loads

Reviewers: dberlin, reames, george.burgess.iv

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271034 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Detect SAD patterns and emit psadbw instructions.
Michael Kuperstein [Fri, 27 May 2016 18:53:22 +0000 (18:53 +0000)]
[X86] Detect SAD patterns and emit psadbw instructions.

This recommits r267649 with a fix for PR27539.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271033 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake sure data is available before dereferencing it
David Majnemer [Fri, 27 May 2016 18:50:02 +0000 (18:50 +0000)]
Make sure data is available before dereferencing it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271032 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid overflow when computing the size of an array
David Majnemer [Fri, 27 May 2016 18:50:00 +0000 (18:50 +0000)]
Avoid overflow when computing the size of an array

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271031 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't assume that there will be enough padding bytes
David Majnemer [Fri, 27 May 2016 18:49:58 +0000 (18:49 +0000)]
Don't assume that there will be enough padding bytes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271030 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't assume that there will be another null byte
David Majnemer [Fri, 27 May 2016 18:49:51 +0000 (18:49 +0000)]
Don't assume that there will be another null byte

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271029 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC] Support symbolic expressions in assembly directives
Petr Hosek [Fri, 27 May 2016 18:49:44 +0000 (18:49 +0000)]
[MC] Support symbolic expressions in assembly directives

This matches the behavior of GNU assembler which supports symbolic
expressions in absolute expressions used in assembly directives.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271028 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoResubmit "[pdb] Allow zero-copy read support for symbol streams.""
Zachary Turner [Fri, 27 May 2016 18:47:20 +0000 (18:47 +0000)]
Resubmit "[pdb] Allow zero-copy read support for symbol streams.""

Due to differences in template instantiation rules, it is not
portable to static_assert(false) inside of an invalid specialization
of a template.  Instead I just =delete the method so that it can't
be used, and leave a comment that it must be explicitly specialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271027 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[pdb] Allow zero-copy read support for symbol streams."
Chad Rosier [Fri, 27 May 2016 18:31:02 +0000 (18:31 +0000)]
Revert "[pdb] Allow zero-copy read support for symbol streams."

This reverts commit r271024 due to error: static_assert failed
"You must either provide a specialization of VarStreamArrayExtractor
or a custom extractor"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271026 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Allow zero-copy read support for symbol streams.
Zachary Turner [Fri, 27 May 2016 18:20:20 +0000 (18:20 +0000)]
[pdb] Allow zero-copy read support for symbol streams.

This reduces the amount of memory used by llvm-pdbdump by roughly
1/3 of the size of the PDB file.

Differential Revision: http://reviews.llvm.org/D20724
Reviewed By: ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271025 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Clarify PSHUFB+blend lowering function name. NFC.
Ahmed Bougacha [Fri, 27 May 2016 17:58:17 +0000 (17:58 +0000)]
[X86] Clarify PSHUFB+blend lowering function name. NFC.

Also guard against v32i8 users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271024 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Remove tBLXr Pat made redundant by r269101. NFCI.
Ahmed Bougacha [Fri, 27 May 2016 17:58:03 +0000 (17:58 +0000)]
[ARM] Remove tBLXr Pat made redundant by r269101. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271023 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfData] Remove global constructor from ProfileSummaryBuilder.
Benjamin Kramer [Fri, 27 May 2016 17:38:16 +0000 (17:38 +0000)]
[ProfData] Remove global constructor from ProfileSummaryBuilder.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271021 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't generate unnecessary signed ConstantRange during multiply. NFC
Pete Cooper [Fri, 27 May 2016 17:06:50 +0000 (17:06 +0000)]
Don't generate unnecessary signed ConstantRange during multiply.  NFC

r231483 taught ConstantRange::multiply to be clever about signed vs unsigned ranges. For example, an unsigned range could be full-set while the signed range is more specific than that.

In looking at the allocations trace for LTO'ing verify-uselistorder (see r236629 for details), millions of allocations are from APInt, many of which come from ConstantRange's.

This change tries to avoid some (3.2 million) allocations by returning the unsigned range if its suitable. The checks here are that it should not be a wrapping range, and should be positive. That should be enough to check for ranges such as [1, 10) which the signed range will be equal to, if we were to calculate it.

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

Reviewed by James Molloy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271020 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove test to X86 directory: I think it depends on X86 TTI.
Tim Northover [Fri, 27 May 2016 16:56:54 +0000 (16:56 +0000)]
Move test to X86 directory: I think it depends on X86 TTI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271019 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse StringRef::startswith instead of find(...) == 0.
Benjamin Kramer [Fri, 27 May 2016 16:54:57 +0000 (16:54 +0000)]
Use StringRef::startswith instead of find(...) == 0.

It's faster and easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271018 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sparc] Simplify a slow and verbose way of checking if a string starts with "ld".
Benjamin Kramer [Fri, 27 May 2016 16:45:37 +0000 (16:45 +0000)]
[sparc] Simplify a slow and verbose way of checking if a string starts with "ld".

PR27904.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271016 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVectorizer: track non-fast FP instructions through phis when finding reductions.
Tim Northover [Fri, 27 May 2016 16:40:27 +0000 (16:40 +0000)]
Vectorizer: track non-fast FP instructions through phis when finding reductions.

When we traced through a phi node looking for floating-point reductions, we
forgot whether we'd ever seen an instruction without fast-math flags (that
would block vectorization). This propagates it through to the end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271015 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReapply r270865 -- previous bot failure is unrelated
Xinliang David Li [Fri, 27 May 2016 16:22:03 +0000 (16:22 +0000)]
Reapply r270865 -- previous bot failure is unrelated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271014 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake sure these error codes are marked as checked
David Majnemer [Fri, 27 May 2016 16:16:56 +0000 (16:16 +0000)]
Make sure these error codes are marked as checked

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271013 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake sure there are enough blocks for the stream
David Majnemer [Fri, 27 May 2016 16:16:48 +0000 (16:16 +0000)]
Make sure there are enough blocks for the stream

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271012 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake sure the directory block array fits in the file
David Majnemer [Fri, 27 May 2016 16:16:45 +0000 (16:16 +0000)]
Make sure the directory block array fits in the file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271011 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove sample profile dependency to instcombine, which is not a analysis pass.
Dehao Chen [Fri, 27 May 2016 16:14:15 +0000 (16:14 +0000)]
Remove sample profile dependency to instcombine, which is not a analysis pass.

Summary: This patch removes dependency from sample profile pass to instcombine pass.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271009 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoValidate the blocksize before using it
David Majnemer [Fri, 27 May 2016 15:57:38 +0000 (15:57 +0000)]
Validate the blocksize before using it

The blocksize could be zero on disk causing later checks to divide by
zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271008 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Removed some remains of old (pre-regeneration) filechecks
Simon Pilgrim [Fri, 27 May 2016 15:56:19 +0000 (15:56 +0000)]
[X86][AVX] Removed some remains of old (pre-regeneration) filechecks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271007 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDisable lifetime-start-on-first-use analysis.
Than McIntosh [Fri, 27 May 2016 15:27:51 +0000 (15:27 +0000)]
Disable lifetime-start-on-first-use analysis.

Summary:
Turn off lifetime-start-on-first-use enhancement for the moment
pending a fix for bug 27903.

Bug: 27903

Reviewers: tejohnson, wmi, qcolombet, gbiv

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271003 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake header self-contained. NFC.
Benjamin Kramer [Fri, 27 May 2016 15:21:30 +0000 (15:21 +0000)]
Make header self-contained. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271002 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoApply clang-tidy's misc-move-constructor-init throughout LLVM.
Benjamin Kramer [Fri, 27 May 2016 14:27:24 +0000 (14:27 +0000)]
Apply clang-tidy's misc-move-constructor-init throughout LLVM.

No functionality change intended, maybe a tiny performance improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270997 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Weaken asm predicate for memory offsets
Simon Dardis [Fri, 27 May 2016 13:56:36 +0000 (13:56 +0000)]
[mips] Weaken asm predicate for memory offsets

The isMemWithSimmOffset predicate rejects relocations which is incorrect
behaviour. Linkers and other tools should handle|warn|error when the
field overflows.

Reviewers: dsanders, vkalintiris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270995 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] All constant should have null base pointer
Igor Laevsky [Fri, 27 May 2016 13:13:59 +0000 (13:13 +0000)]
[RewriteStatepointsForGC] All constant should have null base pointer

Currently we consider that each constant has itself as a base value. I.e "base(const) = const".
This introduces couple of problems when we are trying to avoid reporting constants in statepoint live sets:

1. When querying "base( phi(const1, const2) )" we will get "phi(const1, const2)" as a base pointer. Since
   it's not a constant we will record it in a stack map. However on practice we don't want this to happen
   (constant are never relocated).
2. base( phi(const, gc ptr) ) = phi( const, base(gc ptr) ). This particular case imposes challenge on our
   runtime - we don't expect to see constant base pointers other than null. This problems can be avoided
   by treating all constant as if they were derived from null pointer base. I.e in a first case we will
   not include constant pointer in a stack map at all. In a second case we will get "phi(null, base(gc ptr))"
   as a base pointer which is a lot more convenient.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270993 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAttemp to fix build bot after r270987
George Rimar [Fri, 27 May 2016 12:52:30 +0000 (12:52 +0000)]
Attemp to fix build bot after r270987

It was: "Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections."

Fix:
since test requires no zlib available and r270987 changed the
compression flag for llvm-mc to mandatory specify the compression style,
then just add 2 available styles to this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270992 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU][llvm-mc] Square-braced-syntax for registers - make ":expr2" optional.
Artem Tamazov [Fri, 27 May 2016 12:50:13 +0000 (12:50 +0000)]
[AMDGPU][llvm-mc] Square-braced-syntax for registers - make ":expr2" optional.

Register numbers may be specified as assembly-time expressions.
This feature can be useful in macros and alike. However, expressions
are supported within sqare braces only.

Sqare braces were initially intended to support specifying of multiple
(pairs/quads...) registers. Syntax like v[8:8] which specifies single register
is also supported. That allows expressions but looks a bit unnatural.

This change supports syntax REG[EXPR].
Tests added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270990 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid some copies by using const references.
Benjamin Kramer [Fri, 27 May 2016 12:30:51 +0000 (12:30 +0000)]
Avoid some copies by using const references.

clang-tidy's performance-unnecessary-copy-initialization with some manual
fixes. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270988 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRecommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.
George Rimar [Fri, 27 May 2016 12:27:32 +0000 (12:27 +0000)]
Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

Fix: updated clang code which was not updated by mistake.

Original commit message:
[llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

This patch is strongly based on previously reverted D20331.
(because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style)

Difference that this patch supports both zlib and zlib-gnu styles.

-compress-debug-sections option now supports next values:

-compress-debug-sections=zlib-gnu
-compress-debug-sections=zlib
-compress-debug-sections=none
Previously specifying -compress-debug-sections enabled zlib-gnu compression,
so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior
that was before this patch for case when compression was enabled.

Differential revision: http://reviews.llvm.org/D20676

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270987 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoApply clang-tidy's misc-static-assert where it makes sense.
Benjamin Kramer [Fri, 27 May 2016 11:36:04 +0000 (11:36 +0000)]
Apply clang-tidy's misc-static-assert where it makes sense.

Also fold conditions into assert(0) where it makes sense. No functional
change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270982 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sparc] Remove some unused (and undefined) declarations.
Benjamin Kramer [Fri, 27 May 2016 10:19:03 +0000 (10:19 +0000)]
[sparc] Remove some unused (and undefined) declarations.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270981 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[hexagon] Move BlockRanges and RDF stuff into the llvm namespace.
Benjamin Kramer [Fri, 27 May 2016 10:06:40 +0000 (10:06 +0000)]
[hexagon] Move BlockRanges and RDF stuff into the llvm namespace.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270980 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sparc] Move LEON passes into llvm namespace.
Benjamin Kramer [Fri, 27 May 2016 10:06:27 +0000 (10:06 +0000)]
[sparc] Move LEON passes into llvm namespace.

Also give them library visiblity while there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270979 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r270977 ([llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.)
George Rimar [Fri, 27 May 2016 10:06:16 +0000 (10:06 +0000)]
Revert r270977 ([llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.)

It broke buildbot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/13585/steps/build/logs/stdio

Initial commit message:
[llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

This patch is strongly based on previously reverted D20331.
(because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style)

Difference that this patch supports both zlib and zlib-gnu styles.

-compress-debug-sections option now supports next values:

-compress-debug-sections=zlib-gnu
-compress-debug-sections=zlib
-compress-debug-sections=none
Previously specifying -compress-debug-sections enabled zlib-gnu compression,
so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior
that was before this patch for case when compression was enabled.

Differential revision: http://reviews.llvm.org/D20676

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270978 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.
George Rimar [Fri, 27 May 2016 09:58:08 +0000 (09:58 +0000)]
[llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.

This patch is strongly based on previously reverted D20331.
(because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style)

Difference that this patch supports both zlib and zlib-gnu styles.

-compress-debug-sections option now supports next values:

-compress-debug-sections=zlib-gnu
-compress-debug-sections=zlib
-compress-debug-sections=none
Previously specifying -compress-debug-sections enabled zlib-gnu compression,
so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior
that was before this patch for case when compression was enabled.

Differential revision: http://reviews.llvm.org/D20676

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270977 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrin...
Simon Pilgrim [Fri, 27 May 2016 09:02:25 +0000 (09:02 +0000)]
Revert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270976 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic...
Simon Pilgrim [Fri, 27 May 2016 08:49:15 +0000 (08:49 +0000)]
[X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)

This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused.

A companion patch (D20684) removes/auto-upgrade the clang intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270973 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLinker: teach the IR mover to return llvm::Error.
Peter Collingbourne [Fri, 27 May 2016 05:21:35 +0000 (05:21 +0000)]
Linker: teach the IR mover to return llvm::Error.

This will be needed in order to consistently return an Error
to clients of the API being developed in D20268.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270967 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Remove StreamReader copying method.
Zachary Turner [Fri, 27 May 2016 03:51:53 +0000 (03:51 +0000)]
[codeview] Remove StreamReader copying method.

Since we want to move toward zero-copy access to stream data, we
want to remove all instances of copying operations.  So get rid
of some of those here.

Differential Revision: http://reviews.llvm.org/D20720
Reviewed By: ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270960 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't allocate unnecessarily in APInt::operator[+-]. NFC.
Pete Cooper [Fri, 27 May 2016 03:42:17 +0000 (03:42 +0000)]
Don't allocate unnecessarily in APInt::operator[+-].  NFC.

APInt::operator+(uint64_t) just forwarded to operator+(const APInt&).

Constructing the APInt for the RHS takes an allocation which isn't
required.  Also, for APInt's in the slow path, operator+ would
call add() internally which iterates over both arrays of values.  Instead
we can use add_1 and sub_1 which only iterate while there is something to do.

Using the memory for 'opt -O2 verify-uselistorder.lto.opt.bc -o opt.bc'
(see r236629 for details), this reduces the number of allocations from
23.9M to 22.7M.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270959 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibFuzzer] Refactor declaration of tests in CMake.
Dan Liew [Fri, 27 May 2016 03:14:40 +0000 (03:14 +0000)]
[LibFuzzer] Refactor declaration of tests in CMake.

Add a new CMake function (``add_libfuzzer_test()``) to simplify
declaration of executables for testing LibFuzzer and use it to
reorganise how tests are declared.

Note that configuration of the lit configuration files has been moved
as late as possible because we are going to need to disable some tests
for some platforms and we will need to propagate this information into
the lit configuration.

Note the code for custom mains was removed because no tests are
currently written for this and Kostya seems happy to remove this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270958 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove use of is_trivially_constructible.
Rui Ueyama [Fri, 27 May 2016 02:47:38 +0000 (02:47 +0000)]
Remove use of is_trivially_constructible.

type_traits header in libstdc++ 4.8 does not define is_trivially_contructible
so the code doesn't compile with it.

In this file we are using the trait for assertion to provide a better
error message. Removing it doesn't change the meaning of the code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270957 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Remove a stale comment.
Lang Hames [Fri, 27 May 2016 02:43:15 +0000 (02:43 +0000)]
[Support] Remove a stale comment.

This comment was included in Peter Collingbourne's original version of
StringError (see http://reviews.llvm.org/D20550), where it made sense. It was
accidentally copied over with the rest of the class, but no longer applies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270956 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoForm objc_storeStrong in the presence of bitcasts.
Pete Cooper [Fri, 27 May 2016 02:13:53 +0000 (02:13 +0000)]
Form objc_storeStrong in the presence of bitcasts.

objc_storeStrong can be formed from a sequence such as

  %0 = tail call i8* @objc_retain(i8* %p) nounwind
  %tmp = load i8*, i8** @x, align 8
  store i8* %0, i8** @x, align 8
  tail call void @objc_release(i8* %tmp) nounwind

The code was already looking through bitcasts for most of the values
involved, but had missed one case where the pointer operand for the
store was a bitcast.  Ultimately the pointer for the load and store
have to be the same value, after stripping casts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270955 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] #include missing header breaking builds.
Zachary Turner [Fri, 27 May 2016 02:12:35 +0000 (02:12 +0000)]
[codeview] #include missing header breaking builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270954 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview,pdb] Try really hard to conserve memory when reading.
Zachary Turner [Fri, 27 May 2016 01:54:44 +0000 (01:54 +0000)]
[codeview,pdb] Try really hard to conserve memory when reading.

PDBs can be extremely large.  We're already mapping the entire
PDB into the process's address space, but to make matters worse
the blocks of the PDB are not arranged contiguously.  So, when
we have something like an array or a string embedded into the
stream, we have to make a copy.  Since it's convenient to use
traditional data structures to iterate and manipulate these
records, we need the memory to be contiguous.

As a result of this, we were using roughly twice as much memory
as the file size of the PDB, because every stream was copied
out and re-stitched together contiguously.

This patch addresses this by improving the MappedBlockStream
to allocate from a BumpPtrAllocator only when a read requires
a discontiguous read.  Furthermore, it introduces some data
structures backed by a stream which can iterate over both
fixed and variable length records of a PDB.  Since everything
is backed by a stream and not a buffer, we can read almost
everything from the PDB with zero copies.

Differential Revision: http://reviews.llvm.org/D20654
Reviewed By: ruiu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270951 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Rename unconvertibleErrorCode to inconvertibleErrorCode.
Lang Hames [Fri, 27 May 2016 01:54:25 +0000 (01:54 +0000)]
[Support] Rename unconvertibleErrorCode to inconvertibleErrorCode.

Based on a totally scientific, 30 second google search "in-" appears to be the
preferred prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270950 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Add a StringError convenience class to Error.h
Lang Hames [Fri, 27 May 2016 01:37:32 +0000 (01:37 +0000)]
[Support] Add a StringError convenience class to Error.h

StringError can be used to represent Errors that aren't recoverable based on
the error type, but that have a useful error message that can be reported to
the user or logged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270948 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] make check-fuzzer a bit faster
Kostya Serebryany [Fri, 27 May 2016 01:12:21 +0000 (01:12 +0000)]
[libFuzzer] make check-fuzzer a bit faster

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270947 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopUnrollAnalyzer] Bail out instead of dying with assert when facing huge index.
Michael Zolotukhin [Fri, 27 May 2016 00:55:16 +0000 (00:55 +0000)]
[LoopUnrollAnalyzer] Bail out instead of dying with assert when facing huge index.

This fixes PR27902.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270946 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] make OOM-handling more portable. Instead of sending a signal to the main...
Kostya Serebryany [Fri, 27 May 2016 00:54:15 +0000 (00:54 +0000)]
[libFuzzer] make OOM-handling more portable. Instead of sending a signal to the main fuzzing thread, print the message in the getrusage thread and exit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270945 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoValueMapper: fix typo in minor optimization on constant mapping (NFC)
Mehdi Amini [Fri, 27 May 2016 00:32:12 +0000 (00:32 +0000)]
ValueMapper: fix typo in minor optimization on constant mapping (NFC)

If every operands of a constant are mapping to themselves, and the
type does not change, we have an early exit as acknowledged in the
comment:

  // Otherwise, we have some other constant to remap.  Start by checking to see
  // if all operands have an identity remapping.

However instead of checking for identity the code was checking if the
operands were mapped to the constant itself, which is rarely true.

As a consequence, the coverage report showed that the early exit was
never taken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270944 91177308-0d34-0410-b5e6-96231b3b80d8