platform/upstream/llvm.git
9 years ago[PM/AA] Cleanup some loops to be range-based. NFC.
Chandler Carruth [Wed, 15 Jul 2015 08:09:23 +0000 (08:09 +0000)]
[PM/AA] Cleanup some loops to be range-based. NFC.

llvm-svn: 242275

9 years ago[TableGen] Improve decoding options for non-orthogonal instructions
Petr Pavlu [Wed, 15 Jul 2015 08:04:27 +0000 (08:04 +0000)]
[TableGen] Improve decoding options for non-orthogonal instructions

When FixedLenDecoder matches an input bitpattern of form [01]+ with an
instruction bitpattern of form [01?]+ (where 0/1 are static bits and ? are
mixed/variable bits) it passes the input bitpattern to a specific instruction
decoder method which then makes a final decision whether the bitpattern is a
valid instruction or not. This means the decoder must handle all possible
values of the variable bits which sometimes leads to opcode rewrites in the
decoder method when the instructions are not fully orthogonal.

The patch provides a way for the decoder method to say that when it returns
Fail it does not necessarily mean the bitpattern is invalid, but rather that
the bitpattern is definitely not an instruction that is recognized by the
decoder method. The decoder can then try to match the input bitpattern with
other possible instruction bitpatterns.

For example, this allows to solve a situation on AArch64 where the `MSR
(immediate)` instruction has form:
1101 0101 0000 0??? 0100 ???? ???1 1111
but not all values of the ? bits are allowed. The rejected values should be
handled by the `extended MSR (register)` instruction:
1101 0101 000? ???? ???? ???? ???? ????

The decoder will first try to decode an input bitpattern that matches both
bitpatterns as `MSR (immediate)` but currently this puts the decoder method of
`MSR (immediate)` into a situation when it must be able to decode all possible
values of the ? bits, i.e. it would need to rewrite the instruction to `MSR
(register)` when it is not `MSR (immediate)`.

The patch allows to specify that the decoder method cannot determine if the
instruction is valid for all variable values. The decoder method can simply
return Fail when it knows it is definitely not `MSR (immediate)`. The decoder
will then backtrack the decoding and find that it can match the input
bitpattern with the more generic `MSR (register)` bitpattern too.

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

llvm-svn: 242274

9 years ago[X86][SSE] Added i686/SSE2 vector shift tests.
Simon Pilgrim [Wed, 15 Jul 2015 08:04:07 +0000 (08:04 +0000)]
[X86][SSE] Added i686/SSE2 vector shift tests.

We were only testing on x86-64, but we should be ensuring decent code gen of i64 shifts on 32-bit targets.

llvm-svn: 242273

9 years agoFix comments for several methods, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:53:08 +0000 (07:53 +0000)]
Fix comments for several methods, NFC

llvm-svn: 242272

9 years agoRemove extra \brief comment, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:48:02 +0000 (07:48 +0000)]
Remove extra \brief comment, NFC

llvm-svn: 242271

9 years agoAVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only...
Igor Breger [Wed, 15 Jul 2015 07:08:10 +0000 (07:08 +0000)]
AVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only if AVX512BW present.
Tests added.

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

llvm-svn: 242270

9 years agoInitial support for writing thin archives.
Rafael Espindola [Wed, 15 Jul 2015 05:47:46 +0000 (05:47 +0000)]
Initial support for writing thin archives.

llvm-svn: 242269

9 years agoTidy-up test case from r242257.
Michael Zolotukhin [Wed, 15 Jul 2015 01:51:51 +0000 (01:51 +0000)]
Tidy-up test case from r242257.

llvm-svn: 242268

9 years ago[vim] Update the syntax to mark REQUIRES lines and not talk about
Chandler Carruth [Wed, 15 Jul 2015 01:48:40 +0000 (01:48 +0000)]
[vim] Update the syntax to mark REQUIRES lines and not talk about
dejagnu.

I wonder if it would be useful to handle FileCheck prefixes specially?
Especially if we could get some error checking. Suggestions welcome.
Patches more welcome as I have no idea what I'm doing with vim
script....

llvm-svn: 242267

9 years ago[vim] Add the IR's comment prefix to the comments list. This allows vim
Chandler Carruth [Wed, 15 Jul 2015 01:36:50 +0000 (01:36 +0000)]
[vim] Add the IR's comment prefix to the comments list. This allows vim
to intelligently wrap prose written in IR comment blocks. This has
bothered me for roughly ever, and my fellow IRC denziens convinced me to
fix it.

llvm-svn: 242266

9 years agoUse enum instead of unsigned. NFC.
Pete Cooper [Wed, 15 Jul 2015 01:31:26 +0000 (01:31 +0000)]
Use enum instead of unsigned.  NFC.

The unsigned opcode argument here was the result of BinaryOperator->getOpcode().
That returns a BinaryOps enum which is more accurate than passing around an
unsigned.

llvm-svn: 242265

9 years agoUse cast<> instead of dyn_cast to remove llvm_unreachable. NFC.
Pete Cooper [Wed, 15 Jul 2015 01:31:23 +0000 (01:31 +0000)]
Use cast<> instead of dyn_cast to remove llvm_unreachable.  NFC.

This code was checking if we are an ICmpInst or FCmpInst then throwing
unreachable if we are neither.  We must be one or the other, so use a
cast on the FCmpInst case to ensure that we are that case.  Then we can
avoid having an unreachable but still catch an error if we ever had another
subclass of CmpInst.

llvm-svn: 242264

9 years agoUse another foreach loop. NFC
Pete Cooper [Wed, 15 Jul 2015 01:31:20 +0000 (01:31 +0000)]
Use another foreach loop.  NFC

llvm-svn: 242263

9 years agoFix another little nit with detach and keep stopped, you have to check
Jim Ingham [Wed, 15 Jul 2015 00:59:25 +0000 (00:59 +0000)]
Fix another little nit with detach and keep stopped, you have to check
both for packet success and that the response is OK.

llvm-svn: 242262

9 years agoUse getAnyExtOrTrunc helper instead of manually doing ext/trunc check. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:43:57 +0000 (00:43 +0000)]
Use getAnyExtOrTrunc helper instead of manually doing ext/trunc check.  NFC.

The code here was doing exactly what is already in getAnyExtOrTrunc().
Just use that method instead.

llvm-svn: 242261

9 years agoUse getZExtOrTrunc helper instead of manually doing zext/trunc check. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:43:54 +0000 (00:43 +0000)]
Use getZExtOrTrunc helper instead of manually doing zext/trunc check.  NFC.

The code here was doing exactly what is already in getZExtOrTrunc().
Just use that method instead.

llvm-svn: 242260

9 years agoCOFF: Fix base relocations for __imp_ symbols on x86.
Rui Ueyama [Wed, 15 Jul 2015 00:25:38 +0000 (00:25 +0000)]
COFF: Fix base relocations for __imp_ symbols on x86.

Because thunks for dllimported symbols contain absolute addresses on x86,
they need to be relocated at load-time. This bug was a cause of crashes
in DLL initialization routines.

llvm-svn: 242259

9 years agoDocumentation cleanup, mostly fixing summaries. No functional change intended.
James Dennett [Wed, 15 Jul 2015 00:22:41 +0000 (00:22 +0000)]
Documentation cleanup, mostly fixing summaries.  No functional change intended.

llvm-svn: 242258

9 years ago[LoopUnrolling] Handle cast instructions.
Michael Zolotukhin [Wed, 15 Jul 2015 00:19:51 +0000 (00:19 +0000)]
[LoopUnrolling] Handle cast instructions.

During estimation of unrolling effect we should be able to propagate
constants through casts.

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

llvm-svn: 242257

9 years agoCorrect length of packet that GDBRemoteCommunicationClient::Detach
Jason Molenda [Wed, 15 Jul 2015 00:16:09 +0000 (00:16 +0000)]
Correct length of packet that GDBRemoteCommunicationClient::Detach
should send when detaching and leaving the remote process/system
halted.  Previously only the 'D' initial char was sent, which
resumed the process like a normal detach.

llvm-svn: 242256

9 years agoChange conditional to assert. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:07:57 +0000 (00:07 +0000)]
Change conditional to assert.  NFC.

This code was breaking from the case statement if the getStoreSizeInBits()
value was not a multiple of 0.  Given that the implementation returns
getStoreSize() * 8, it can only be a multiple of 8.

llvm-svn: 242255

9 years agoUse getStoreSize() instead of getStoreSizeInBits()/8. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:07:55 +0000 (00:07 +0000)]
Use getStoreSize() instead of getStoreSizeInBits()/8.  NFC.

The calls here were both to getStoreSizeInBits() which multiplies by 8.
We then immediately divided by 8.  Calling getStoreSize() returns the
values we need without the extra arithmetic.

llvm-svn: 242254

9 years ago[modules] Switch to the normal reverse postorder visitation algorithm when computing...
Richard Smith [Wed, 15 Jul 2015 00:02:40 +0000 (00:02 +0000)]
[modules] Switch to the normal reverse postorder visitation algorithm when computing redeclaration chains.

llvm-svn: 242253

9 years agoUse a range loop.
Rafael Espindola [Tue, 14 Jul 2015 23:51:01 +0000 (23:51 +0000)]
Use a range loop.

llvm-svn: 242250

9 years agoUse more foreach loops in SelectionDAG. NFC
Pete Cooper [Tue, 14 Jul 2015 23:43:29 +0000 (23:43 +0000)]
Use more foreach loops in SelectionDAG.  NFC

llvm-svn: 242249

9 years agoCreate a wrapper pass for BlockFrequencyInfo.
Wei Mi [Tue, 14 Jul 2015 23:40:50 +0000 (23:40 +0000)]
Create a wrapper pass for BlockFrequencyInfo.

This is useful when we want to do block frequency analysis
conditionally (e.g. only in PGO mode) but don't want to add
one more pass dependence.

Patch by congh.
Approved by dexonsmith.
Differential Revision: http://reviews.llvm.org/D11196

llvm-svn: 242248

9 years agodocs/conf.py: bump version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 23:37:08 +0000 (23:37 +0000)]
docs/conf.py: bump version to 3.8

llvm-svn: 242247

9 years ago[Sema] Don't emit "pure virtual" warning for fully qualified calls.
Davide Italiano [Tue, 14 Jul 2015 23:36:10 +0000 (23:36 +0000)]
[Sema] Don't emit "pure virtual" warning for fully qualified calls.

-fapple-kext is an exception because calls will still go through
the vtable in that mode. Add a note to make the user aware of that.

PR:   23215
Differential Revision:  http://reviews.llvm.org/D10935

llvm-svn: 242246

9 years agoFix Sphinx error about duplicate label in CommandLine.rst:1560 and CoverageMappingFor...
Hans Wennborg [Tue, 14 Jul 2015 23:29:53 +0000 (23:29 +0000)]
Fix Sphinx error about duplicate label in CommandLine.rst:1560 and CoverageMappingFormat.rst

llvm-svn: 242245

9 years agoUpdate cxx_dr_status.html after 3.7 branch
Hans Wennborg [Tue, 14 Jul 2015 23:21:53 +0000 (23:21 +0000)]
Update cxx_dr_status.html after 3.7 branch

llvm-svn: 242244

9 years agoSmall fix to ThreadPlanStepRange::DumpRanges to logging
Jason Molenda [Tue, 14 Jul 2015 23:17:29 +0000 (23:17 +0000)]
Small fix to ThreadPlanStepRange::DumpRanges to logging
output when stepping through multiple ranges.

llvm-svn: 242243

9 years agoWebAssembly: fix build breakage.
JF Bastien [Tue, 14 Jul 2015 23:06:07 +0000 (23:06 +0000)]
WebAssembly: fix build breakage.

Summary:
processFunctionBeforeCalleeSavedScan was renamed to determineCalleeSaves and now takes a BitVector parameter as of rL242165, reviewed in http://reviews.llvm.org/D10909

WebAssembly is still marked as experimental and therefore doesn't build by default. It does, however, grep by default! I notice that processFunctionBeforeCalleeSavedScan is still mentioned in a few comments and error messages, which I also fixed.

Reviewers: qcolombet, sunfish

Subscribers: jfb, dsanders, hfinkel, MatzeB, llvm-commits

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

llvm-svn: 242242

9 years agoMake the variable names match the name of the metadata they control.
Tyler Nowicki [Tue, 14 Jul 2015 23:03:09 +0000 (23:03 +0000)]
Make the variable names match the name of the metadata they control.

Rename Vectorizer to Vectorize and VectorizeUnroll to InterleaveCount.

llvm-svn: 242241

9 years agodocs/conf.py: update version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 22:53:35 +0000 (22:53 +0000)]
docs/conf.py: update version to 3.8

llvm-svn: 242240

9 years ago[PowerPC] Support symbolic targets in patchpoints
Hal Finkel [Tue, 14 Jul 2015 22:53:11 +0000 (22:53 +0000)]
[PowerPC] Support symbolic targets in patchpoints

Follow-up r235483, with the corresponding support in PPC. We use a regular call
for symbolic targets (because they're much cheaper than indirect calls).

llvm-svn: 242239

9 years agoReleaseNotes.rst: Bump version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 22:52:36 +0000 (22:52 +0000)]
ReleaseNotes.rst: Bump version to 3.8

The notes for 3.7 are on the 3.7 branch.

llvm-svn: 242238

9 years agoReleaseNotes.rst: Bump version to 3.8
Hans Wennborg [Tue, 14 Jul 2015 22:49:27 +0000 (22:49 +0000)]
ReleaseNotes.rst: Bump version to 3.8

The notes for 3.7 are on the 3.7 branch.

llvm-svn: 242237

9 years agoAccept lower case to handle windows error messages.
Rafael Espindola [Tue, 14 Jul 2015 22:42:21 +0000 (22:42 +0000)]
Accept lower case to handle windows error messages.

llvm-svn: 242236

9 years ago[InstCombine] Generalize sub of selects optimization to all BinaryOperators
David Majnemer [Tue, 14 Jul 2015 22:39:23 +0000 (22:39 +0000)]
[InstCombine] Generalize sub of selects optimization to all BinaryOperators

This exposes further optimization opportunities if the selects are
correlated.

llvm-svn: 242235

9 years agoDriver: Delete dead code
Justin Bogner [Tue, 14 Jul 2015 22:36:22 +0000 (22:36 +0000)]
Driver: Delete dead code

VerifyJobActions never have multiple inputs.

llvm-svn: 242223

9 years agoUpdate the trunk version to 3.8.0svn.
Hans Wennborg [Tue, 14 Jul 2015 22:35:57 +0000 (22:35 +0000)]
Update the trunk version to 3.8.0svn.

llvm-svn: 242222

9 years agoSema.h: Just prune a redundant \brief introduced in r242133, for now. [-Wdocumentation]
NAKAMURA Takumi [Tue, 14 Jul 2015 22:35:36 +0000 (22:35 +0000)]
Sema.h: Just prune a redundant \brief introduced in r242133, for now. [-Wdocumentation]

llvm-svn: 242221

9 years ago[LAA] Turn RuntimePointerChecking into a class, start hiding things, NFC
Adam Nemet [Tue, 14 Jul 2015 22:32:52 +0000 (22:32 +0000)]
[LAA] Turn RuntimePointerChecking into a class, start hiding things, NFC

The goal is to start hiding internal APIs.

llvm-svn: 242220

9 years ago[LAA] Introduce RuntimePointerChecking::PointerInfo, NFC
Adam Nemet [Tue, 14 Jul 2015 22:32:50 +0000 (22:32 +0000)]
[LAA] Introduce RuntimePointerChecking::PointerInfo, NFC

Turn this structure-of-arrays (i.e. the various pointer attributes) into
array-of-structures.

llvm-svn: 242219

9 years ago[LAA] Lift RuntimePointerCheck out of LoopAccessInfo, NFC
Adam Nemet [Tue, 14 Jul 2015 22:32:44 +0000 (22:32 +0000)]
[LAA] Lift RuntimePointerCheck out of LoopAccessInfo, NFC

I am planning to add more nested classes inside RuntimePointerCheck so
all these triple-nesting would be hard to follow.

Also rename it to RuntimePointerChecking (i.e. append 'ing').

llvm-svn: 242218

9 years ago[PowerPC] Use the ABI indirect-call protocol for patchpoints
Hal Finkel [Tue, 14 Jul 2015 22:26:06 +0000 (22:26 +0000)]
[PowerPC] Use the ABI indirect-call protocol for patchpoints

We used to take the address specified as the direct target of the patchpoint
and did no TOC-pointer handling.  This, however, as not all that useful,
because MCJIT tends to create a lot of modules, and they have their own TOC
sections. Thus, to call from the generated code to other generated code, you
really need to switch TOC pointers. Make this work as expected, and under
ELFv1, tread the address as the function descriptor address so that the correct
TOC pointer can be loaded.

llvm-svn: 242217

9 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 14 Jul 2015 22:19:09 +0000 (22:19 +0000)]
Update for llvm api change.

llvm-svn: 242216

9 years agoAdd support for reading members out of thin archives.
Rafael Espindola [Tue, 14 Jul 2015 22:18:43 +0000 (22:18 +0000)]
Add support for reading members out of thin archives.

For now the Archive owns the buffers of the thin archive members.
This makes for a simple API, but all the buffers are destructed
only when the archive is destructed. This should be fine since we
close the files after mmap so we should not hit an open file
limit.

llvm-svn: 242215

9 years agoCleanup; remove trailing spaces.
Dawn Perchik [Tue, 14 Jul 2015 22:12:43 +0000 (22:12 +0000)]
Cleanup; remove trailing spaces.

llvm-svn: 242214

9 years ago[ExecutionEngine] Re-apply r241962 with fixes for ARM.
Lang Hames [Tue, 14 Jul 2015 22:11:10 +0000 (22:11 +0000)]
[ExecutionEngine] Re-apply r241962 with fixes for ARM.

Patch by Pierre-Andre Saulais. Thanks Pierre-Andre!

llvm-svn: 242213

9 years agoAdd allnodes() iterator range to SelectionDAG. NFC.
Pete Cooper [Tue, 14 Jul 2015 22:10:54 +0000 (22:10 +0000)]
Add allnodes() iterator range to SelectionDAG.  NFC.

SelectionDAG already had begin/end methods for iterating over all
the nodes, but didn't define an iterator_range for us in foreach
loops.

This adds such a method and uses it in some of the eligible places
throughout the backends.

llvm-svn: 242212

9 years agoMove SDNode::IROrder in to padding to save space. NFC.
Pete Cooper [Tue, 14 Jul 2015 21:54:55 +0000 (21:54 +0000)]
Move SDNode::IROrder in to padding to save space.  NFC.

There was a 32-bit padding gap between 'unsigned short NumOperands, NumValues;' and 'DebugLoc debugLoc.  Move 'unsigned IROrder' in to that gap.

This trims the size of SDNode's from 76 bytes (really 80 due to alignment) to 72 bytes.

llvm-svn: 242211

9 years agoConstify parameters in SelectionDAG methods. NFC
Pete Cooper [Tue, 14 Jul 2015 21:54:52 +0000 (21:54 +0000)]
Constify parameters in SelectionDAG methods.  NFC

llvm-svn: 242210

9 years agoRemove unnecessary .getNode() in SelectionDAG. NFC.
Pete Cooper [Tue, 14 Jul 2015 21:54:48 +0000 (21:54 +0000)]
Remove unnecessary .getNode() in SelectionDAG.  NFC.

The simplify_type specialisation allows us to cast directly from
SDValue to an SDNode* subclass so we don't need to pass a SDNode*
to cast<>.

llvm-svn: 242209

9 years agoUse more foreach loops in SelectionDAG. NFC
Pete Cooper [Tue, 14 Jul 2015 21:54:45 +0000 (21:54 +0000)]
Use more foreach loops in SelectionDAG.  NFC

llvm-svn: 242208

9 years agoUse getChildOffset instead of getBuffer for identifying a member.
Rafael Espindola [Tue, 14 Jul 2015 21:28:07 +0000 (21:28 +0000)]
Use getChildOffset instead of getBuffer for identifying a member.

I am adding support for thin archives. On those, getting the buffer
involves reading another file.

Since we only need an id in here, use the member offset in the archive.

llvm-svn: 242205

9 years agoMIR Serialization: Serialize the machine basic block live in registers.
Alex Lorenz [Tue, 14 Jul 2015 21:24:41 +0000 (21:24 +0000)]
MIR Serialization: Serialize the machine basic block live in registers.

llvm-svn: 242204

9 years agoMIR Printer: move the function 'printReg'. NFC.
Alex Lorenz [Tue, 14 Jul 2015 21:18:25 +0000 (21:18 +0000)]
MIR Printer: move the function 'printReg'. NFC.

This commit moves the function 'printReg' towards the start of the file so that
it can be used by the conversion methods in MIRPrinter and not just the printing
methods in MIPrinter.

llvm-svn: 242203

9 years agoGVN: use a static array instead of regenerating it each time. NFC.
Tim Northover [Tue, 14 Jul 2015 21:14:58 +0000 (21:14 +0000)]
GVN: use a static array instead of regenerating it each time. NFC.

llvm-svn: 242202

9 years agoWebAssembly: add basic int/fp instruction codegen.
JF Bastien [Tue, 14 Jul 2015 21:13:29 +0000 (21:13 +0000)]
WebAssembly: add basic int/fp instruction codegen.

Summary: This patch has the most basic instruction codegen for 32 and 64 bit int/fp.

Reviewers: sunfish

Subscribers: llvm-commits, jfb

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

llvm-svn: 242201

9 years agoFix NDEBUG build warning
Krzysztof Parzyszek [Tue, 14 Jul 2015 21:03:24 +0000 (21:03 +0000)]
Fix NDEBUG build warning

llvm-svn: 242200

9 years agoGVN: tolerate an instruction being replaced without existing in the leaderboard
Tim Northover [Tue, 14 Jul 2015 21:03:18 +0000 (21:03 +0000)]
GVN: tolerate an instruction being replaced without existing in the leaderboard

Sometimes an incidentally created instruction can duplicate a Value used
elsewhere. It then often doesn't end up in the leader table. If it's later
removed, we attempt to remove it from the leader table and segfault.

Instead we should just ignore the removal request, which won't cause any
problems. The reverse situation, where the original instruction is replaced by
the new one (which you might think could leave the leader table empty) cannot
occur, because the incidental instruction will never be found in the first
place.

llvm-svn: 242199

9 years agoAdd a "maximum TLS alignment" characteristic to the target info, so it
Paul Robinson [Tue, 14 Jul 2015 20:52:32 +0000 (20:52 +0000)]
Add a "maximum TLS alignment" characteristic to the target info, so it
can be different from the normal variable maximum.
Add an error diagnostic for when TLS variables exceed maximum TLS alignment.
Currenty only PS4 sets an explicit maximum TLS alignment.

Patch by Charles Li!

llvm-svn: 242198

9 years agoRemove non-ascii characters
Eric Fiselier [Tue, 14 Jul 2015 20:45:48 +0000 (20:45 +0000)]
Remove non-ascii characters

llvm-svn: 242197

9 years ago[Makefiles] Align library names with CMake build
Keno Fischer [Tue, 14 Jul 2015 20:25:19 +0000 (20:25 +0000)]
[Makefiles] Align library names with CMake build

Summary: This aligns the library names used by the Makefile build to be the same as those create by the CMake build to make switching between the two easier. The only major difficulty was lldbHost which was one library in the CMake system and several in the Makefile system. Most of the other changes are trivial renames.

Reviewers: labath

Subscribers: emaste, tberghammer, lldb-commits

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

llvm-svn: 242196

9 years agoImplement n4169 - Add invoke function template
Eric Fiselier [Tue, 14 Jul 2015 20:16:15 +0000 (20:16 +0000)]
Implement n4169 - Add invoke function template

llvm-svn: 242195

9 years agotest-release.sh: Remove the InstallDir parameter from configure_llvmCore
Hans Wennborg [Tue, 14 Jul 2015 20:15:15 +0000 (20:15 +0000)]
test-release.sh: Remove the InstallDir parameter from configure_llvmCore

After r242187, it's never set.

llvm-svn: 242194

9 years ago[Sanitizer] Fix fopencookie() interceptor to work with null hook functions.
Alexey Samsonov [Tue, 14 Jul 2015 20:13:42 +0000 (20:13 +0000)]
[Sanitizer] Fix fopencookie() interceptor to work with null hook functions.

llvm-svn: 242193

9 years agoFix Windows build: replace __func__ with LLVM_FUNCTION_NAME
Krzysztof Parzyszek [Tue, 14 Jul 2015 20:11:28 +0000 (20:11 +0000)]
Fix Windows build: replace __func__ with LLVM_FUNCTION_NAME

llvm-svn: 242192

9 years ago[MMX] Use the appropriate instructions for GR64 <-> VR64 copies.
Bruno Cardoso Lopes [Tue, 14 Jul 2015 20:09:34 +0000 (20:09 +0000)]
[MMX] Use the appropriate instructions for GR64 <-> VR64 copies.

MOVSDto64rr and MOV64toSDrr are defined to convert between FR64 (%xmm)
<-> GR64 registers, not VR64 (%mm) <-> GR64. This is wrong.

I found this by inspection and could not find a suitable testcase for it
since (1) we don't handle MMX bitcasts in Peephole optimizer as to
generate COPYs that (2) could be expanded back to the appropriate x86
instruction in ExpandPostRA.

Switch to use the appropriate instructions: MMX_MOVD64from64rr and
MMX_MOVD64to64rr here.

llvm-svn: 242191

9 years ago[Sema] Emit a better diagnostic when variable redeclarations disagree
David Majnemer [Tue, 14 Jul 2015 20:08:49 +0000 (20:08 +0000)]
[Sema] Emit a better diagnostic when variable redeclarations disagree

We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate.  Instead, classify the declaration and emit
an appropriate diagnostic for the new declaration and an appropriate
note pointing to the old one.

This fixes PR24116.

llvm-svn: 242190

9 years agoMark LWG2308 as complete; fix link. No code change necessary.
Marshall Clow [Tue, 14 Jul 2015 20:07:45 +0000 (20:07 +0000)]
Mark LWG2308 as complete; fix link. No code change necessary.

llvm-svn: 242189

9 years ago[PowerPC] Fix the PPCInstrInfo::getInstrLatency implementation
Hal Finkel [Tue, 14 Jul 2015 20:02:02 +0000 (20:02 +0000)]
[PowerPC] Fix the PPCInstrInfo::getInstrLatency implementation

PowerPC uses itineraries to describe processor pipelines (and dispatch-group
restrictions for P7/P8 cores). Unfortunately, the target-independent
implementation of TII.getInstrLatency calls ItinData->getStageLatency, and that
looks for the largest cycle count in the pipeline for any given instruction.
This, however, yields the wrong answer for the PPC itineraries, because we
don't encode the full pipeline. Because the functional units are fully
pipelined, we only model the initial stages (there are no relevant hazards in
the later stages to model), and so the technique employed by getStageLatency
does not really work. Instead, we should take the maximum output operand
latency, and that's what PPCInstrInfo::getInstrLatency now does.

This caused some test-case churn, including two unfortunate side effects.
First, the new arrangement of copies we get from function parameters now
sometimes blocks VSX FMA mutation (a FIXME has been added to the code and the
test cases), and we have one significant test-suite regression:

SingleSource/Benchmarks/BenchmarkGame/spectral-norm
56.4185% +/- 18.9398%

In this benchmark we have a loop with a vectorized FP divide, and it with the
new scheduling both divides end up in the same dispatch group (which in this
case seems to cause a problem, although why is not exactly clear). The grouping
structure is hard to predict from the bottom of the loop, and there may not be
much we can do to fix this.

Very few other test-suite performance effects were really significant, but
almost all weakly favor this change. However, in light of the issues
highlighted above, I've left the old behavior available via a
command-line flag.

llvm-svn: 242188

9 years agoFix several issues with the test-release.sh script
Dan Liew [Tue, 14 Jul 2015 19:46:19 +0000 (19:46 +0000)]
Fix several issues with the test-release.sh script

* Use the default install prefix (/usr/local) and use DESTDIR instead to
  set a temporary install location for tarballing. This is the correct
  way to package binary releases (otherwise the temporary install path
  ends up in files in the binary release).
* Remove ``-disable-clang`` option. It did not work correctly
  (tarballing assumed phase 3 was run) and when doing a release
  we should always be doing a three-phased build and test.

Note: Technically we should only be using DESTDIR for the third phase
and use --prefix for the first and second phase because we run the built
clang from phase 1 and 2 (and in general an application's behaviour
may depend on the install prefix). However in the case of clang it
seems to not care what the install prefix was so to simplify the script
we use DESTDIR for all three stages.

llvm-svn: 242187

9 years ago[Hexagon] Generate instructions for operations on predicate registers
Krzysztof Parzyszek [Tue, 14 Jul 2015 19:30:21 +0000 (19:30 +0000)]
[Hexagon] Generate instructions for operations on predicate registers

Convert logical operations on general-purpose registers to the correspon-
ding operations on predicate registers.

llvm-svn: 242186

9 years ago[CodeGen] Force emission of personality directive if explicitly specified
Keno Fischer [Tue, 14 Jul 2015 19:22:51 +0000 (19:22 +0000)]
[CodeGen] Force emission of personality directive if explicitly specified

Summary:
Before this change, personality directives were not emitted
if there was no invoke left in the function (of course until
recently this also meant that we couldn't know what
the personality actually was). This patch forces personality directives
to still be emitted, unless it is known to be a noop in the absence of
invokes, or the user explicitly specified `nounwind` (and not
`uwtable`) on the function.

Reviewers: majnemer, rnk

Subscribers: rnk, llvm-commits

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

llvm-svn: 242185

9 years agoAdd comment explaning sanity check on packet size in the packet decompression method.
Jason Molenda [Tue, 14 Jul 2015 19:19:07 +0000 (19:19 +0000)]
Add comment explaning sanity check on packet size in the packet decompression method.

llvm-svn: 242184

9 years agoUse target.exec-search-paths setting when resolving executable path for remote target.
Oleksiy Vyalov [Tue, 14 Jul 2015 18:59:32 +0000 (18:59 +0000)]
Use target.exec-search-paths setting when resolving executable path for remote target.

http://reviews.llvm.org/D11163

llvm-svn: 242183

9 years agoFix temp port file path generation in lldb-platform.
Oleksiy Vyalov [Tue, 14 Jul 2015 18:54:52 +0000 (18:54 +0000)]
Fix temp port file path generation in lldb-platform.

http://reviews.llvm.org/D11152

llvm-svn: 242182

9 years agoRun cuda options test only with specific target.
Artem Belevich [Tue, 14 Jul 2015 18:49:17 +0000 (18:49 +0000)]
Run cuda options test only with specific target.
For now it's only x86_64-linux-gnu.

llvm-svn: 242181

9 years ago[modules] Avoid repeatedly hashing the same name when looking it up in multiple modul...
Richard Smith [Tue, 14 Jul 2015 18:42:41 +0000 (18:42 +0000)]
[modules] Avoid repeatedly hashing the same name when looking it up in multiple module files.

llvm-svn: 242180

9 years agoAdd support for on-disk hash table lookup with a known hash, for situations where...
Richard Smith [Tue, 14 Jul 2015 18:40:59 +0000 (18:40 +0000)]
Add support for on-disk hash table lookup with a known hash, for situations where the same key will be looked up in multiple tables.

llvm-svn: 242179

9 years agoTeach config.guess that MSYS exists.
Yaron Keren [Tue, 14 Jul 2015 18:33:55 +0000 (18:33 +0000)]
Teach config.guess that MSYS exists.

We might not want to upgrade config.guess to the current
version due to the license change from GPL2 to GPL3.

llvm-svn: 242178

9 years agoAMDGPU: Avoid using 64-bit shift for i64 (shl x, 32)
Matt Arsenault [Tue, 14 Jul 2015 18:20:33 +0000 (18:20 +0000)]
AMDGPU: Avoid using 64-bit shift for i64 (shl x, 32)

This can be done only with moves which theoretically
will optimize better later.

Although this transform increases the instruction count,
it should be code size / cycle count neutral in the worst
VALU case. It also seems to slightly improve a couple
of testcases due to other DAG combines this exposes.

This is probably slightly worse for the SALU case, so
it might be better to handle this during moveToVALU,
although then you lose some simplifications like
the load width reducing in the simple testcase.

llvm-svn: 242177

9 years ago[clang-cl] Disable C++ exceptions a different way
Reid Kleckner [Tue, 14 Jul 2015 18:16:48 +0000 (18:16 +0000)]
[clang-cl] Disable C++ exceptions a different way

Rather than making -fexceptions a core option that enables C++ EH in
clang-cl, users can use the '-Xclang -fexceptions -Xclang
-fcxx-exceptions' flag set. We weren't going to expose -fexceptions in
clang-cl in the long run, so this way we don't add and then remove a
flag.

llvm-svn: 242176

9 years agoFixed 22941: Integer template parameter as immediate 'I' expectes an integer constant
Sunil Srivastava [Tue, 14 Jul 2015 18:08:50 +0000 (18:08 +0000)]
Fixed 22941: Integer template parameter as immediate 'I' expectes an integer constant
Basically fixed premature testing of integer constraints during template parsing
Reviewed at http://reviews.llvm.org/D10452

llvm-svn: 242175

9 years agoAMDGPU/SI: Fix read2 merging into a super register.
Matt Arsenault [Tue, 14 Jul 2015 17:57:36 +0000 (17:57 +0000)]
AMDGPU/SI: Fix read2 merging into a super register.

If the read2 produced was supposed to be writing into a
super register, it would use the wrong subregister indices.
Fix this by inserting copies, so we only ever write to a vreg_64.
Run the register coalescer again to clean this up, although this
isn't ideal and often does result in an extra move.

Also remove the assert that offset1 > offset0.

There isn't a real reason to not allow this other than a minor
convenience in the compiler, and it doesn't seem worth the effort
of avoiding it.

llvm-svn: 242174

9 years agoMachineRegisterInfo: Remove UsedPhysReg infrastructure
Matthias Braun [Tue, 14 Jul 2015 17:52:07 +0000 (17:52 +0000)]
MachineRegisterInfo: Remove UsedPhysReg infrastructure

We have a detailed def/use lists for every physical register in
MachineRegisterInfo anyway, so there is little use in maintaining an
additional bitset of which ones are used.

Removing it frees us from extra book keeping. This simplifies
VirtRegMap.

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

llvm-svn: 242173

9 years agoFix PR24114 - std::atomic for non-Clang is not a literal type
Eric Fiselier [Tue, 14 Jul 2015 17:50:27 +0000 (17:50 +0000)]
Fix PR24114 - std::atomic for non-Clang is not a literal type

Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t.

llvm-svn: 242172

9 years agoAdd missing builtins to altivec.h for ABI compliance (vol. 4)
Nemanja Ivanovic [Tue, 14 Jul 2015 17:50:27 +0000 (17:50 +0000)]
Add missing builtins to altivec.h for ABI compliance (vol. 4)

This patch corresponds to review:
http://reviews.llvm.org/D11184

A number of new interfaces for altivec.h (as mandated by the ABI):
vector float vec_cpsgn(vector float, vector float)
vector double vec_cpsgn(vector double, vector double)
vector double vec_or(vector bool long long, vector double)
vector double vec_or(vector double, vector bool long long)
vector double vec_re(vector double)
vector signed char vec_cntlz(vector signed char)
vector unsigned char vec_cntlz(vector unsigned char)
vector short vec_cntlz(vector short)
vector unsigned short vec_cntlz(vector unsigned short)
vector int vec_cntlz(vector int)
vector unsigned int vec_cntlz(vector unsigned int)
vector signed long long vec_cntlz(vector signed long long)
vector unsigned long long vec_cntlz(vector unsigned long long)
vector signed char vec_nand(vector bool signed char, vector signed char)
vector signed char vec_nand(vector signed char, vector bool signed char)
vector signed char vec_nand(vector signed char, vector signed char)
vector unsigned char vec_nand(vector bool unsigned char, vector unsigned char)
vector unsigned char vec_nand(vector unsigned char, vector bool unsigned char)
vector unsigned char vec_nand(vector unsigned char, vector unsigned char)
vector short vec_nand(vector bool short, vector short)
vector short vec_nand(vector short, vector bool short)
vector short vec_nand(vector short, vector short)
vector unsigned short vec_nand(vector bool unsigned short, vector unsigned short)
vector unsigned short vec_nand(vector unsigned short, vector bool unsigned short)
vector unsigned short vec_nand(vector unsigned short, vector unsigned short)
vector int vec_nand(vector bool int, vector int)
vector int vec_nand(vector int, vector bool int)
vector int vec_nand(vector int, vector int)
vector unsigned int vec_nand(vector bool unsigned int, vector unsigned int)
vector unsigned int vec_nand(vector unsigned int, vector bool unsigned int)
vector unsigned int vec_nand(vector unsigned int, vector unsigned int)
vector signed long long vec_nand(vector bool long long, vector signed long long)
vector signed long long vec_nand(vector signed long long, vector bool long long)
vector signed long long vec_nand(vector signed long long, vector signed long long)
vector unsigned long long vec_nand(vector bool long long, vector unsigned long long)
vector unsigned long long vec_nand(vector unsigned long long, vector bool long long)
vector unsigned long long vec_nand(vector unsigned long long, vector unsigned long long)
vector signed char vec_orc(vector bool signed char, vector signed char)
vector signed char vec_orc(vector signed char, vector bool signed char)
vector signed char vec_orc(vector signed char, vector signed char)
vector unsigned char vec_orc(vector bool unsigned char, vector unsigned char)
vector unsigned char vec_orc(vector unsigned char, vector bool unsigned char)
vector unsigned char vec_orc(vector unsigned char, vector unsigned char)
vector short vec_orc(vector bool short, vector short)
vector short vec_orc(vector short, vector bool short)
vector short vec_orc(vector short, vector short)
vector unsigned short vec_orc(vector bool unsigned short, vector unsigned short)
vector unsigned short vec_orc(vector unsigned short, vector bool unsigned short)
vector unsigned short vec_orc(vector unsigned short, vector unsigned short)
vector int vec_orc(vector bool int, vector int)
vector int vec_orc(vector int, vector bool int)
vector int vec_orc(vector int, vector int)
vector unsigned int vec_orc(vector bool unsigned int, vector unsigned int)
vector unsigned int vec_orc(vector unsigned int, vector bool unsigned int)
vector unsigned int vec_orc(vector unsigned int, vector unsigned int)
vector signed long long vec_orc(vector bool long long, vector signed long long)
vector signed long long vec_orc(vector signed long long, vector bool long long)
vector signed long long vec_orc(vector signed long long, vector signed long long)
vector unsigned long long vec_orc(vector bool long long, vector unsigned long long)
vector unsigned long long vec_orc(vector unsigned long long, vector bool long long)
vector unsigned long long vec_orc(vector unsigned long long, vector unsigned long long)
vector signed char vec_div(vector signed char, vector signed char)
vector unsigned char vec_div(vector unsigned char, vector unsigned char)
vector signed short vec_div(vector signed short, vector signed short)
vector unsigned short vec_div(vector unsigned short, vector unsigned short)
vector signed int vec_div(vector signed int, vector signed int)
vector unsigned int vec_div(vector unsigned int, vector unsigned int)
vector signed long long vec_div(vector signed long long, vector signed long long)
vector unsigned long long vec_div(vector unsigned long long, vector unsigned long long)
vector unsigned char vec_mul(vector unsigned char, vector unsigned char)
vector unsigned int vec_mul(vector unsigned int, vector unsigned int)
vector unsigned long long vec_mul(vector unsigned long long, vector unsigned long long)
vector unsigned short vec_mul(vector unsigned short, vector unsigned short)
vector signed char vec_mul(vector signed char, vector signed char)
vector signed int vec_mul(vector signed int, vector signed int)
vector signed long long vec_mul(vector signed long long, vector signed long long)
vector signed short vec_mul(vector signed short, vector signed short)
vector signed long long vec_mergeh(vector signed long long, vector signed long long)
vector signed long long vec_mergeh(vector signed long long, vector bool long long)
vector signed long long vec_mergeh(vector bool long long, vector signed long long)
vector unsigned long long vec_mergeh(vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_mergeh(vector unsigned long long, vector bool long long)
vector unsigned long long vec_mergeh(vector bool long long, vector unsigned long long)
vector double vec_mergeh(vector double, vector double)
vector double vec_mergeh(vector double, vector bool long long)
vector double vec_mergeh(vector bool long long, vector double)
vector signed long long vec_mergel(vector signed long long, vector signed long long)
vector signed long long vec_mergel(vector signed long long, vector bool long long)
vector signed long long vec_mergel(vector bool long long, vector signed long long)
vector unsigned long long vec_mergel(vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_mergel(vector unsigned long long, vector bool long long)
vector unsigned long long vec_mergel(vector bool long long, vector unsigned long long)
vector double vec_mergel(vector double, vector double)
vector double vec_mergel(vector double, vector bool long long)
vector double vec_mergel(vector bool long long, vector double)
vector signed int vec_pack(vector signed long long, vector signed long long)
vector unsigned int vec_pack(vector unsigned long long, vector unsigned long long)
vector bool int vec_pack(vector bool long long, vector bool long long)

llvm-svn: 242171

9 years agoAvoid MSVC-incompatible use of init list.
David Blaikie [Tue, 14 Jul 2015 17:40:53 +0000 (17:40 +0000)]
Avoid MSVC-incompatible use of init list.

llvm-svn: 242170

9 years agoRAGreedy: Keep track of allocated PhysRegs internally
Matthias Braun [Tue, 14 Jul 2015 17:38:17 +0000 (17:38 +0000)]
RAGreedy: Keep track of allocated PhysRegs internally

Do not use MachineRegisterInfo::setPhysRegUsed()/isPhysRegUsed()
anymore. This bitset changes function-global state and is set by the
VirtRegRewriter anyway.
Simply use a bitvector private to RAGreedy.

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

llvm-svn: 242169

9 years agoRely on default zero-arg value for IRBuilder::CreateCall calls to zero-arg functions
David Blaikie [Tue, 14 Jul 2015 17:27:39 +0000 (17:27 +0000)]
Rely on default zero-arg value for IRBuilder::CreateCall calls to zero-arg functions

Patch by servuswiegehtz at yahoo.de

llvm-svn: 242168

9 years agoAdd missing builtins to the PPC back end for ABI compliance (vol. 4)
Nemanja Ivanovic [Tue, 14 Jul 2015 17:25:20 +0000 (17:25 +0000)]
Add missing builtins to the PPC back end for ABI compliance (vol. 4)

This patch corresponds to review:
http://reviews.llvm.org/D11183

Back end portion of the fourth round of additions to altivec.h.

llvm-svn: 242167

9 years agoARM: add at least one real test for r242123.
Tim Northover [Tue, 14 Jul 2015 17:23:55 +0000 (17:23 +0000)]
ARM: add at least one real test for r242123.

The ones committed were orthogonal to the change and would have passed before
that revision. What it *did* do was prevent an assertion failure when
generating object files.

llvm-svn: 242166

9 years agoPrologEpilogInserter: Rewrite API to determine callee save regsiters.
Matthias Braun [Tue, 14 Jul 2015 17:17:13 +0000 (17:17 +0000)]
PrologEpilogInserter: Rewrite API to determine callee save regsiters.

This changes TargetFrameLowering::processFunctionBeforeCalleeSavedScan():

- Rename the function to determineCalleeSaves()
- Pass a bitset of callee saved registers by reference, thus avoiding
  the function-global PhysRegUsed bitset in MachineRegisterInfo.
- Without PhysRegUsed the implementation is fine tuned to not save
  physcial registers which are only read but never modified.

Related to rdar://21539507

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

llvm-svn: 242165

9 years agoAArch64: add rev64 alias for 64-bit rev instruction.
Tim Northover [Tue, 14 Jul 2015 17:07:29 +0000 (17:07 +0000)]
AArch64: add rev64 alias for 64-bit rev instruction.

It could be useful to assembly programmers and makes the permitted variants a
little more uniform.

llvm-svn: 242164

9 years ago[Hexagon] Generate "extract" instructions more aggressively
Krzysztof Parzyszek [Tue, 14 Jul 2015 17:07:24 +0000 (17:07 +0000)]
[Hexagon] Generate "extract" instructions more aggressively

Generate extract instructions (via intrinsics) before the DAG combiner
folds shifts into unrecognizable forms.

llvm-svn: 242163

9 years agollvm-ar: Don't try to extract from thin archives.
Rafael Espindola [Tue, 14 Jul 2015 16:55:13 +0000 (16:55 +0000)]
llvm-ar: Don't try to extract from thin archives.

This matches the gnu ar behavior.

llvm-svn: 242162

9 years agoAST Matchers: pass ast_type_traits::DynTypedNode by const-ref
Hans Wennborg [Tue, 14 Jul 2015 16:50:14 +0000 (16:50 +0000)]
AST Matchers: pass ast_type_traits::DynTypedNode by const-ref

(Broken out from http://reviews.llvm.org/D11168)

llvm-svn: 242161