platform/upstream/llvm.git
9 years agoRemove duplicated code for synthetic array members.
Bruce Mitchener [Thu, 26 Feb 2015 23:55:39 +0000 (23:55 +0000)]
Remove duplicated code for synthetic array members.

Summary:
The code for GetSyntheticArrayMemberFromPointer and
GetSyntheticArrayMemberFromArray was identical, so just collapse the
the methods into one.

Reviewers: granata.enrico, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 230708

9 years agoPut jump tables in distinct sections if -ffunction-sections is used.
Rafael Espindola [Thu, 26 Feb 2015 23:55:11 +0000 (23:55 +0000)]
Put jump tables in distinct sections if -ffunction-sections is used.

A small regression in r230411 was that we were basing the decision on
-fdata-sections.

llvm-svn: 230707

9 years ago[swig] Fix some typos in the build scripts.
Bruce Mitchener [Thu, 26 Feb 2015 23:53:49 +0000 (23:53 +0000)]
[swig] Fix some typos in the build scripts.

Reviewers: zturner, ki.stfu

Reviewed By: zturner, ki.stfu

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 230706

9 years ago[Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.
Lang Hames [Thu, 26 Feb 2015 23:52:42 +0000 (23:52 +0000)]
[Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.

llvm-svn: 230705

9 years ago[llvm-pdbdump] Add missing files.
Zachary Turner [Thu, 26 Feb 2015 23:51:49 +0000 (23:51 +0000)]
[llvm-pdbdump] Add missing files.

llvm-svn: 230704

9 years ago[llvm-pdbdump] Fix dumping of function pointers and basic types.
Zachary Turner [Thu, 26 Feb 2015 23:49:23 +0000 (23:49 +0000)]
[llvm-pdbdump] Fix dumping of function pointers and basic types.

Function pointers were not correctly handled by the dumper, and
they would print as "* name".  They now print as
"int (__cdecl *name)(int arg1, int arg2)" as they should.

Also, doubles were being printed as floats.  This fixes that bug
as well, and adds tests for all builtin types. as well as a test
for function pointers.

llvm-svn: 230703

9 years agoPECOFF: allow more than one /alternatename for the same symbol.
Rui Ueyama [Thu, 26 Feb 2015 23:43:04 +0000 (23:43 +0000)]
PECOFF: allow more than one /alternatename for the same symbol.

Previously we have a string -> string map to keep the weak alias
symbol mapping. Naturally we can't define more than one weak alias
with that data structure.

This patch is to allow multiple aliases for the same symbol by
changing the map type to string -> set of string map.

llvm-svn: 230702

9 years agoRemove commented out function.
Eric Christopher [Thu, 26 Feb 2015 23:36:28 +0000 (23:36 +0000)]
Remove commented out function.

(Saving files works, who knew?)

llvm-svn: 230701

9 years agoRemove DebugLoc::print(LLVMContext, raw_ostream), it was just
Eric Christopher [Thu, 26 Feb 2015 23:32:17 +0000 (23:32 +0000)]
Remove DebugLoc::print(LLVMContext, raw_ostream), it was just
forwarding to the one that didn't take a context.

llvm-svn: 230700

9 years agogetRegForInlineAsmConstraint wants to use TargetRegisterInfo for
Eric Christopher [Thu, 26 Feb 2015 22:38:43 +0000 (22:38 +0000)]
getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl.
This involved passing down and around either a TargetMachine or
TargetRegisterInfo. Update all callers/definitions around the targets
and SelectionDAG.

llvm-svn: 230699

9 years agoAdd a TargetMachine argument to the AddressingModeMatcher, we'll
Eric Christopher [Thu, 26 Feb 2015 22:38:34 +0000 (22:38 +0000)]
Add a TargetMachine argument to the AddressingModeMatcher, we'll
need this shortly to get a TargetRegisterInfo from the subtarget
for TargetLowering routines.

llvm-svn: 230698

9 years agoDon't crash on leaving nested __finally blocks through an EH edge.
Nico Weber [Thu, 26 Feb 2015 22:34:33 +0000 (22:34 +0000)]
Don't crash on leaving nested __finally blocks through an EH edge.

The __finally emission block tries to be clever by removing unused continuation
edges if there's an unconditional jump out of the __finally block. With
exception edges, the EH continuation edge isn't always unused though and we'd
crash in a few places.

Just don't be clever. That makes the IR for __finally blocks a bit longer in
some cases (hence small and behavior-preserving changes to existing tests), but
it makes no difference in general and it fixes the last crash from PR22553.

http://reviews.llvm.org/D7918

llvm-svn: 230697

9 years ago[x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
Chandler Carruth [Thu, 26 Feb 2015 22:15:34 +0000 (22:15 +0000)]
[x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
blend as legal.

We made the same mistake in two different places. Whenever we are custom
lowering a v32i8 blend we need to check whether we are custom lowering
it only for constant conditions that can be shuffled, or whether we
actually have AVX2 and full dynamic blending support on bytes. Both are
fixed, with comments added to make it clear what is going on and a new
test case.

llvm-svn: 230695

9 years agoFix Bug 20400
Chaoren Lin [Thu, 26 Feb 2015 22:15:16 +0000 (22:15 +0000)]
Fix Bug 20400

Summary:
http://llvm.org/bugs/show_bug.cgi?id=20400

The default triple of i686-pc-linux-gnu for 32 bit linux targets is compatible
but not necessarily identical to the inferior binaries.

Applying Azat Khuzhin's solution of using ArchSpec::IsCompatibleMatch() instead
of ArchSpec::IsExactMatch() when comparing ObjectFile and Modules architecture.

Reviewers: vharron

Subscribers: lldb-commits

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

llvm-svn: 230694

9 years agoSimplify arange output.
Rafael Espindola [Thu, 26 Feb 2015 22:02:02 +0000 (22:02 +0000)]
Simplify arange output.

Move SectionMap to its only user (emitDebugARanges) and
reorder to save a call to sort.

llvm-svn: 230693

9 years agoRe-instate the pragma optimize hack for MSVC, but not clang-cl
Reid Kleckner [Thu, 26 Feb 2015 21:34:11 +0000 (21:34 +0000)]
Re-instate the pragma optimize hack for MSVC, but not clang-cl

Reverts commit r230686 with define modifications.

llvm-svn: 230692

9 years agoAdd synchronization to TestWatchLocation.
Chaoren Lin [Thu, 26 Feb 2015 21:31:27 +0000 (21:31 +0000)]
Add synchronization to TestWatchLocation.

Summary:
There was no guarantee that the three threads haven't already exited by the
time the watchpoint is set.

Reviewers: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 230691

9 years ago[x86] Restructure the comments and the conditions for handling
Chandler Carruth [Thu, 26 Feb 2015 21:29:06 +0000 (21:29 +0000)]
[x86] Restructure the comments and the conditions for handling
dynamic blends.

This makes it much more clear what is going on. The case we're handling
is that of dynamic conditions, and we're bailing when the nature of the
vector types and subtarget preclude lowering the dynamic condition
vselect as an actual blend.

No functionality changed here, but this will make a subsequent bug-fix
to this code much more clear.

llvm-svn: 230690

9 years ago[x86] Re-order the combines of select in the X86 backend. This doesn't
Chandler Carruth [Thu, 26 Feb 2015 21:21:36 +0000 (21:21 +0000)]
[x86] Re-order the combines of select in the X86 backend. This doesn't
change functionality, but makes it more clear that the dynamic case and
the shuffle case don't overlap in any interesting way.

llvm-svn: 230689

9 years ago[x86] Add an assert to catch if we ever try to blend a v32i8 without
Chandler Carruth [Thu, 26 Feb 2015 21:18:20 +0000 (21:18 +0000)]
[x86] Add an assert to catch if we ever try to blend a v32i8 without
AVX2.

llvm-svn: 230688

9 years agoGive enum an unsigned type to silence -Wmicrosoft clang-cl warning
Reid Kleckner [Thu, 26 Feb 2015 21:10:01 +0000 (21:10 +0000)]
Give enum an unsigned type to silence -Wmicrosoft clang-cl warning

llvm-svn: 230687

9 years agoRemove stale pragma hack for an unsupported MSVC version
Reid Kleckner [Thu, 26 Feb 2015 21:08:27 +0000 (21:08 +0000)]
Remove stale pragma hack for an unsupported MSVC version

llvm-svn: 230686

9 years agoSilence some Win64 clang-cl warnings about unused stuff due to ifdefs
Reid Kleckner [Thu, 26 Feb 2015 21:08:21 +0000 (21:08 +0000)]
Silence some Win64 clang-cl warnings about unused stuff due to ifdefs

llvm-svn: 230685

9 years agoUse wider type for overflow check on LLP64 platforms like Win64, found by clang-cl...
Reid Kleckner [Thu, 26 Feb 2015 21:07:30 +0000 (21:07 +0000)]
Use wider type for overflow check on LLP64 platforms like Win64, found by clang-cl -Wtautological

llvm-svn: 230684

9 years ago[CMake] Make sure we built one variant of i386/i686 runtime libraries.
Alexey Samsonov [Thu, 26 Feb 2015 21:03:41 +0000 (21:03 +0000)]
[CMake] Make sure we built one variant of i386/i686 runtime libraries.

llvm-svn: 230683

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Thu, 26 Feb 2015 20:43:00 +0000 (20:43 +0000)]
Wrap to 80 columns. No behavior change.

llvm-svn: 230682

9 years agoAdd myself as a code owner for Microsoft C++ ABI code and general Windows support
Reid Kleckner [Thu, 26 Feb 2015 20:37:49 +0000 (20:37 +0000)]
Add myself as a code owner for Microsoft C++ ABI code and general Windows support

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 230681

9 years agoIRCE: add a test case for r230619.
Sanjoy Das [Thu, 26 Feb 2015 20:14:32 +0000 (20:14 +0000)]
IRCE: add a test case for r230619.

llvm-svn: 230680

9 years ago[Driver] Use paths explicitly provided by the -L option before default paths
Simon Atanasyan [Thu, 26 Feb 2015 20:09:50 +0000 (20:09 +0000)]
[Driver] Use paths explicitly provided by the -L option before default paths

User should be able to override default search paths using the -L
option.

http://reviews.llvm.org/D7902

llvm-svn: 230679

9 years ago[ELF] Reduce the code indentation
Simon Atanasyan [Thu, 26 Feb 2015 20:09:42 +0000 (20:09 +0000)]
[ELF] Reduce the code indentation

No functional changes.

llvm-svn: 230678

9 years ago[Mips] Mark some MipsELFFile member functions as constant
Simon Atanasyan [Thu, 26 Feb 2015 20:09:37 +0000 (20:09 +0000)]
[Mips] Mark some MipsELFFile member functions as constant

No functional changes.

llvm-svn: 230677

9 years agoInstrProf: Simplify the construction of BinaryCoverageReader
Justin Bogner [Thu, 26 Feb 2015 20:06:28 +0000 (20:06 +0000)]
InstrProf: Simplify the construction of BinaryCoverageReader

Creating BinaryCoverageReader is a strange and complicated dance where
the constructor sets error codes that member functions will later
read, and the object is in an invalid state if readHeader isn't
immediately called after construction.

Instead, make the constructor private and add a static create method
to do the construction properly. This also has the benefit of removing
readHeader completely and simplifying the interface of the object.

llvm-svn: 230676

9 years agoInstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader
Justin Bogner [Thu, 26 Feb 2015 20:06:24 +0000 (20:06 +0000)]
InstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader

The current name is long and confusing. A shorter one is both easier
to understand and easier to work with.

llvm-svn: 230675

9 years agoUse getProcessTriple inside HostInfoBase::ComputeHostArchitectureSupport instead...
Oleksiy Vyalov [Thu, 26 Feb 2015 20:02:13 +0000 (20:02 +0000)]
Use getProcessTriple inside HostInfoBase::ComputeHostArchitectureSupport instead of getDefaultTargetTriple.

http://reviews.llvm.org/D7893

llvm-svn: 230674

9 years agoSCEVExpander incorrectly marks generated subtractions as nuw/nsw
Sanjoy Das [Thu, 26 Feb 2015 19:51:35 +0000 (19:51 +0000)]
SCEVExpander incorrectly marks generated subtractions as nuw/nsw

It is not sound to mark the increment operation as `nuw` or `nsw`
based on a proof off of the add recurrence if the increment operation
we emit happens to be a `sub` instruction.

I could not come up with a test case for this -- the cases where
SCEVExpander decides to emit a `sub` instruction is quite small, and I
cannot think of a way I'd be able to get SCEV to prove that the
increment does not overflow in those cases.

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

llvm-svn: 230673

9 years agoTry to fix a docs link.
Nico Weber [Thu, 26 Feb 2015 19:48:43 +0000 (19:48 +0000)]
Try to fix a docs link.

llvm-svn: 230672

9 years agoCan't set watchpoints on launching threads on Linux LLGS.
Chaoren Lin [Thu, 26 Feb 2015 19:48:15 +0000 (19:48 +0000)]
Can't set watchpoints on launching threads on Linux LLGS.

Summary:
They'll be set anyway when the thread starts running, so the launching threads
should just ignore the set request.

Reviewers: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 230671

9 years ago[MC] Use the non-EH register mapping in the debug_frame section.
Frederic Riss [Thu, 26 Feb 2015 19:48:07 +0000 (19:48 +0000)]
[MC] Use the non-EH register mapping in the debug_frame section.

On 32bits x86 Darwin, the register mappings for the eh_frane and
debug_frame sections are different. Thus the same CFI instructions
should result in different registers in the object file. The
problem isn't target specific though, but it requires that the
mappings for EH register numbers be different from the standard
Dwarf one.

The patch looks a bit clumsy. LLVM uses the EH mapping as
canonical for everything frame related. Thus we need to do a
double conversion EH -> LLVM -> Non-EH, when emitting the
debug_frame section.

Fixes PR22363.

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

llvm-svn: 230670

9 years agoSupport bitrig in autoconf build system.
Eric Christopher [Thu, 26 Feb 2015 19:46:32 +0000 (19:46 +0000)]
Support bitrig in autoconf build system.

Patch by Dave Huseby.

llvm-svn: 230669

9 years agoWin64: Silently ignore __stdcall, __fastcall, and __thiscall
Reid Kleckner [Thu, 26 Feb 2015 19:43:46 +0000 (19:43 +0000)]
Win64: Silently ignore __stdcall, __fastcall, and __thiscall

MSVC doesn't warn on this. Users are expected to apply the WINAPI macro
to functions passed by pointer to the Win32 API, and this macro expands
to __stdcall. This means we end up with a lot of useless noisy warnings
about ignored calling conventions when compiling code with clang for
Win64.

llvm-svn: 230668

9 years agoDon't sibcall between SysV and Win64 convention functions
Reid Kleckner [Thu, 26 Feb 2015 19:43:20 +0000 (19:43 +0000)]
Don't sibcall between SysV and Win64 convention functions

The shadow stack space expectations won't match.

Fixes PR22709.

llvm-svn: 230667

9 years agoChange argument "class" keyword to "const"
Johannes Doerfert [Thu, 26 Feb 2015 19:33:42 +0000 (19:33 +0000)]
Change argument "class" keyword to "const"

llvm-svn: 230666

9 years agoFixed canonical path function.
John Thompson [Thu, 26 Feb 2015 19:31:10 +0000 (19:31 +0000)]
Fixed canonical path function.

llvm-svn: 230665

9 years ago[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
Lang Hames [Thu, 26 Feb 2015 19:28:37 +0000 (19:28 +0000)]
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.

llvm-svn: 230664

9 years agoFix a typo Debugger::ExecuteIOHanders to Debugger::ExecuteIOHandlers.
Siva Chandra [Thu, 26 Feb 2015 19:26:36 +0000 (19:26 +0000)]
Fix a typo Debugger::ExecuteIOHanders to Debugger::ExecuteIOHandlers.

Test Plan: Build LLDB.

Reviewers: zturner, vharron, clayborg

Reviewed By: vharron, clayborg

Subscribers: jingham, lldb-commits

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

llvm-svn: 230663

9 years ago[UBSan] Run all UBSan tests in 32-bit mode as well.
Alexey Samsonov [Thu, 26 Feb 2015 19:19:44 +0000 (19:19 +0000)]
[UBSan] Run all UBSan tests in 32-bit mode as well.

We build and support UBSan on 32-bit platforms. We should run tests
there as well. Fixes PR22683.

llvm-svn: 230662

9 years agoFix a bug where LLDB could be convinced to attempt to extract a bitfield of size...
Enrico Granata [Thu, 26 Feb 2015 19:00:23 +0000 (19:00 +0000)]
Fix a bug where LLDB could be convinced to attempt to extract a bitfield of size 0, and consequently crash

llvm-svn: 230661

9 years ago[InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores
Hal Finkel [Thu, 26 Feb 2015 18:56:03 +0000 (18:56 +0000)]
[InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores

InstCombine has long had logic to convert aligned Altivec load/store intrinsics
into regular loads and stores. This mirrors that functionality for QPX vector
load/store intrinsics.

llvm-svn: 230660

9 years agoWhen the source has a series of assignments, users reasonably want to
Paul Robinson [Thu, 26 Feb 2015 18:47:57 +0000 (18:47 +0000)]
When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the
combine for adjacent stores at -O0 so we get this behavior.

Possibly, DAGCombine shouldn't run at all at -O0, but that's for
another day; see PR22346.

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

llvm-svn: 230659

9 years ago[Orc][Kaleidoscope] More diff-reduction between tutorial versions.
Lang Hames [Thu, 26 Feb 2015 18:36:34 +0000 (18:36 +0000)]
[Orc][Kaleidoscope] More diff-reduction between tutorial versions.

llvm-svn: 230658

9 years agoFix justify error for small structures in varargs for MIPS64BE
Petar Jovanovic [Thu, 26 Feb 2015 18:35:15 +0000 (18:35 +0000)]
Fix justify error for small structures in varargs for MIPS64BE

There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.

This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608

Patch by Aleksandar Beserminji.

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

llvm-svn: 230657

9 years agoAdd -frtti/-fexceptions to some more tests that assume they're on
Filipe Cabecinhas [Thu, 26 Feb 2015 18:29:41 +0000 (18:29 +0000)]
Add -frtti/-fexceptions to some more tests that assume they're on

llvm-svn: 230656

9 years agogold-plugin: "Upgrade" debug info and handle its warnings.
Rafael Espindola [Thu, 26 Feb 2015 18:24:37 +0000 (18:24 +0000)]
gold-plugin: "Upgrade" debug info and handle its warnings.

The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

llvm-svn: 230655

9 years agoFix handling of double quotes (MI)
Ilia K [Thu, 26 Feb 2015 18:21:22 +0000 (18:21 +0000)]
Fix handling of double quotes (MI)

Summary:
* Clean CMICmdArgValString::Validate: now it's based on CMIUtilString::SplitConsiderQuotes method:
A bit of introduction:
# Command line is wrapped into CMICmdArgContext.
# CMICmdArgSet is a set of arguments to be parsed. This class contains CMICmdArgContext as a private member.
# MI command is class which is inhereted from CMICmdBase. It contains CMICmdArgSet as a private member.

When command is executed CMICmdBase::ParseArgs() is called. This method adds args for parsing using CMICmdArgSet::Add(). Then CMICmdBase::ParseValidateCmdOptions() is called, which calls CMICmdArgSet::Validate(). Then it gets a number of arguments (using SplitConsiderQuotes().array_length) and for each arguments registered in ParseArgs() tries to validate it using CMICmdArgValBase::Validate(). Every user commands parses this string again (first time it was made in SplitConsiderQuotes) and in case of CMICmdArgValString it was made incorrectly. It searches the first and last quotes (but it should be first and next after first). Besides, it was splitted into 4 cases.
I'm just using SplitConsiderQuotes directly, and I don't split them by hand again.

Actually, I think we should do so in every CMICmdArgVal_XXX::Validate() method.

* Enable MiInterpreterExecTestCase.test_lldbmi_target_create test
* Fix MiExecTestCase.test_lldbmi_exec_arguments_set test

All tests pass on OS X.

Reviewers: abidh, emaste, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, zturner, emaste, clayborg, abidh

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

llvm-svn: 230654

9 years agoAdd support for generating MIPS legacy NaN
Petar Jovanovic [Thu, 26 Feb 2015 18:19:22 +0000 (18:19 +0000)]
Add support for generating MIPS legacy NaN

Currently, the NaN values emitted for MIPS architectures do not cover
non-IEEE754-2008 compliant case. This change fixes the issue.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 230653

9 years agoFix process's output to stdout/stderr (MI)
Ilia K [Thu, 26 Feb 2015 18:14:30 +0000 (18:14 +0000)]
Fix process's output to stdout/stderr (MI)

Summary:
* Add CMIUtilString::Escape/Unescape methods (MI)
* Fix process's output to stdout/stderr (MI):
lldb-mi escapes process's output to show it in the following format:
```
~"..."
```

But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of
```
printf("'\n` - it's \\n\x12\"\\\"")
```
looked like:
```
~"'\r\n` - it's \n"\""
```

This patch fixes it by using CMIUtilString::Escape method and now it looks like:
```
~"'\r\n` - it's \\n\x12\"\\\""
```

Reviewers: abidh, emaste, clayborg

Reviewed By: clayborg

Subscribers: zturner, lldb-commits, emaste, clayborg, abidh

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

llvm-svn: 230652

9 years agoUse ".arch_extension" ARM directive to support hwdiv on krait
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:08:41 +0000 (18:08 +0000)]
Use ".arch_extension" ARM directive to support hwdiv on krait

In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet

llvm-svn: 230651

9 years agoUse ".arch_extension" ARM directive to specify the additional CPU features
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:07:35 +0000 (18:07 +0000)]
Use ".arch_extension" ARM directive to specify the additional CPU features

This patch is in response to r223147 where the avaiable features are
computed based on ".cpu" directive. This will work clean for the standard
variants like cortex-a9. For custom variants which rely on standard cpu names
for assembly, the additional features of a CPU should be propagated. This can be
done via ".arch_extension" as long as the assembler supports it. The
implementation for krait along with unit test will be submitted in next patch.

llvm-svn: 230650

9 years agoPatch to prevent crash when default argument expression
Fariborz Jahanian [Thu, 26 Feb 2015 17:59:54 +0000 (17:59 +0000)]
Patch to prevent crash when default argument expression
is null due to its previous bad declaration, etc.
rdar://19871240

llvm-svn: 230649

9 years agoFix comments in tools/lldb-mi/MIDriver.h
Ilia K [Thu, 26 Feb 2015 17:59:44 +0000 (17:59 +0000)]
Fix comments in tools/lldb-mi/MIDriver.h

llvm-svn: 230648

9 years ago[LV/LoopAccesses] Backward dependences are not safe just because the
Adam Nemet [Thu, 26 Feb 2015 17:58:48 +0000 (17:58 +0000)]
[LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types

Noticed this while generalizing the code for loop distribution.

I confirmed with Arnold that this was indeed a bug and managed to create
a testcase.

llvm-svn: 230647

9 years ago[swig] Generate bindings for SBDebugger::*UseColor().
Bruce Mitchener [Thu, 26 Feb 2015 17:46:16 +0000 (17:46 +0000)]
[swig] Generate bindings for SBDebugger::*UseColor().

Summary:
These functions were added in 2013, but not added to the SWIG
bindings.

Reviewers: ki.stfu, clayborg

Reviewed By: ki.stfu, clayborg

Subscribers: lldb-commits

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

llvm-svn: 230646

9 years agoR600/SI: Remove M0 from DS assembly strings
Tom Stellard [Thu, 26 Feb 2015 17:08:43 +0000 (17:08 +0000)]
R600/SI: Remove M0 from DS assembly strings

This matches the assembly syntax for the proprietary compiler.

llvm-svn: 230645

9 years ago[msan] Change track-origins default mode from 1 to 2.
Evgeniy Stepanov [Thu, 26 Feb 2015 15:59:30 +0000 (15:59 +0000)]
[msan] Change track-origins default mode from 1 to 2.

Change -fsanitize-memory-track-origins to be equivalent to
-fsanitize-memory-track-origins=2.

Track-origins=2 provides a lot more detailed reports at the cost of
some additional slowdown (ranging from none to, sometimes, 3x; ~3% average on
SPEC2006).

llvm-svn: 230644

9 years agoAdd remote testing support to the lit config
Jonathan Roelofs [Thu, 26 Feb 2015 15:55:01 +0000 (15:55 +0000)]
Add remote testing support to the lit config

Now that the corresponding support in libcxx has landed (r230592), adding
support here is pretty simple.

llvm-svn: 230643

9 years agoUpdate comment
Tobias Grosser [Thu, 26 Feb 2015 15:55:00 +0000 (15:55 +0000)]
Update comment

Suggest-by: Johannes Doerfert
llvm-svn: 230642

9 years agolibclc/math: Add cospi
Aaron Watry [Thu, 26 Feb 2015 15:42:00 +0000 (15:42 +0000)]
libclc/math: Add cospi

Ported from the libclc/amd-builtins branch

v2: Rename sincos_f_piby4 to __libclc__sincosf_piby4
    Add cospi(double) implementation instead of using llvm.cos

Notes:
The sincosD_piby4.h file is mostly the same as the builtin implementation
released by AMD. The inline attribute declaration is changed, and M_PI is
used instead of a constant double. Otherwise, the only difference is that
the header explicitly enables the fp64 pragma.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
CC: Tom Stellard <tom@stellard.net>
CC: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 230641

9 years agoUse isl_ast_expr_call to create run-time checks
Tobias Grosser [Thu, 26 Feb 2015 15:21:10 +0000 (15:21 +0000)]
Use isl_ast_expr_call to create run-time checks

isl recently introduced a new interface to create run-time checks from
constraint sets. Use this interface to simplify our run-time check generation.

llvm-svn: 230640

9 years ago[msan] Fix MsanTest to pass in track_origins=2 mode.
Evgeniy Stepanov [Thu, 26 Feb 2015 15:19:33 +0000 (15:19 +0000)]
[msan] Fix MsanTest to pass in track_origins=2 mode.

llvm-svn: 230639

9 years ago[X86][MMX] Fix a typo in a couple of tests
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:16:09 +0000 (15:16 +0000)]
[X86][MMX] Fix a typo in a couple of tests

llvm-svn: 230638

9 years ago[X86][MMX] Remove widening experimental flag from MMX tests.
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:10:38 +0000 (15:10 +0000)]
[X86][MMX] Remove widening experimental flag from MMX tests.

Turns out that after the past MMX commits, we don't need to rely on this
flag to get better codegen for MMX. Also update the tests to become
triple neutral.

llvm-svn: 230637

9 years agoUpdate isl to 88d60cfe1 'add isl_ast_expr_call'
Tobias Grosser [Thu, 26 Feb 2015 15:08:35 +0000 (15:08 +0000)]
Update isl to 88d60cfe1 'add isl_ast_expr_call'

For Polly the two interesting changes are short_circuit && and || AST
expressions as well as the introduction of isl_ast_build_expr_from_set,
a well defined interface to compute ast expressions from constraint sets.

llvm-svn: 230636

9 years ago[X86][Haswell][SchedModel] Fix WriteMULm latency.
Michael Kuperstein [Thu, 26 Feb 2015 14:30:09 +0000 (14:30 +0000)]
[X86][Haswell][SchedModel] Fix WriteMULm latency.

The latency for the WriteMULm class was set to 4, which is actually lower than the latency for WriteMULr (5).
A better estimate would be 4 added to WriteMULr, that is, 9.

llvm-svn: 230634

9 years ago[lsan] Fix indent.
Sergey Matveev [Thu, 26 Feb 2015 14:25:25 +0000 (14:25 +0000)]
[lsan] Fix indent.

llvm-svn: 230633

9 years ago[InstCombine] Add a test for altivec load/store intrinsic simplification
Hal Finkel [Thu, 26 Feb 2015 14:22:41 +0000 (14:22 +0000)]
[InstCombine] Add a test for altivec load/store intrinsic simplification

InstCombine has logic to convert aligned Altivec load/store intrinsics into
regular loads and stores. Unfortunately, there seems to be no regression test
covering this behavior. Adding one...

llvm-svn: 230632

9 years agoLSan: fix a deadlock caused by dl_iterate_phdr().
Sergey Matveev [Thu, 26 Feb 2015 14:01:08 +0000 (14:01 +0000)]
LSan: fix a deadlock caused by dl_iterate_phdr().

Wrap the StopTheWorld call in a dl_iterate_phdr() callback. This ensures that no
other threads are holding the libdl lock, and we can safely reenter it in the
tracer thread.

llvm-svn: 230631

9 years agoFix usage of shared_ptr for array which may cause a undefined behaviour (use unique_p...
Ilia K [Thu, 26 Feb 2015 13:28:58 +0000 (13:28 +0000)]
Fix usage of shared_ptr for array which may cause a undefined behaviour (use unique_ptr instead)

llvm-svn: 230630

9 years agoTest commit - fix typo.
Robert Flack [Thu, 26 Feb 2015 13:03:57 +0000 (13:03 +0000)]
Test commit - fix typo.

llvm-svn: 230629

9 years agoReplace obsolete -mattr=n64 command line option with -target-abi=n64. No functional...
Vladimir Medic [Thu, 26 Feb 2015 12:29:48 +0000 (12:29 +0000)]
Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.

llvm-svn: 230628

9 years agoclang-format: Make braced list formatting more consistent.
Daniel Jasper [Thu, 26 Feb 2015 11:46:29 +0000 (11:46 +0000)]
clang-format: Make braced list formatting more consistent.

Before:
  Aaaa aaaaaaaaaaa{
      {
       a, // +1 indent weird.
       b, // trailing comma signals one per line.
      },  // trailing comma signals one per line.
  };

After:
  Aaaa aaaaaaaaaaa{
      {
          a, // better!?
          b, // trailing comma signals one per line.
      },     // trailing comma signals one per line.
  };

Interesting that this apparently was entirely untested :-(.

llvm-svn: 230627

9 years agoIncrease default packet timeout for android to 20s
Tamas Berghammer [Thu, 26 Feb 2015 11:37:21 +0000 (11:37 +0000)]
Increase default packet timeout for android to 20s

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

llvm-svn: 230626

9 years agoclang-format: Fix space of arrays of pointers to templated types.
Daniel Jasper [Thu, 26 Feb 2015 11:30:50 +0000 (11:30 +0000)]
clang-format: Fix space of arrays of pointers to templated types.

Before:
  vector<int>(*foo_)[6];

After:
  vector<int> (*foo_)[6];

llvm-svn: 230625

9 years agoAllow non-affine control flow by default
Johannes Doerfert [Thu, 26 Feb 2015 11:09:24 +0000 (11:09 +0000)]
Allow non-affine control flow by default

  With the patches r230325, r230329 and r230340 we can handle non-affine
  control flow in (loop-free) subregions. As all LLVM test-suite tests pass and
  we get ~20% more non-trivial SCoPs, we activate it now by default.

llvm-svn: 230624

9 years ago[x86] Sink the single-input v8i16 lowering code that is actually
Chandler Carruth [Thu, 26 Feb 2015 11:00:40 +0000 (11:00 +0000)]
[x86] Sink the single-input v8i16 lowering code that is actually
formulaic into the top v8i16 lowering routine.

This makes the generalized lowering a completely general and single path
lowering which will allow generalizing it in turn for multiple 128-bit
lanes.

llvm-svn: 230623

9 years ago[x86] Remove a SimpleTy usage. No need for it here, we already have the
Chandler Carruth [Thu, 26 Feb 2015 10:37:01 +0000 (10:37 +0000)]
[x86] Remove a SimpleTy usage. No need for it here, we already have the
MVT.

llvm-svn: 230622

9 years ago[OPENMP] Fixed codegen for directives without function outlining.
Alexey Bataev [Thu, 26 Feb 2015 10:27:34 +0000 (10:27 +0000)]
[OPENMP] Fixed codegen for directives without function outlining.
Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions.

llvm-svn: 230621

9 years agoclang-format: Allow breaking after "else if(" as a last resort.
Daniel Jasper [Thu, 26 Feb 2015 09:49:08 +0000 (09:49 +0000)]
clang-format: Allow breaking after "else if(" as a last resort.

This isn't generally nice, but better than violating the column limit.

llvm-svn: 230620

9 years agoIRCE: only touch loops that have been shown to have a high
Sanjoy Das [Thu, 26 Feb 2015 08:56:04 +0000 (08:56 +0000)]
IRCE: only touch loops that have been shown to have a high
backedge-taken count in profiliing data.

llvm-svn: 230619

9 years agoIRCE: generalize to handle loops with decreasing induction variables.
Sanjoy Das [Thu, 26 Feb 2015 08:19:31 +0000 (08:19 +0000)]
IRCE: generalize to handle loops with decreasing induction variables.

IRCE can now split the iteration space for loops like:

   for (i = n; i >= 0; i--)
     a[i + k] = 42; // bounds check on access

llvm-svn: 230618

9 years ago[x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
Chandler Carruth [Thu, 26 Feb 2015 08:19:24 +0000 (08:19 +0000)]
[x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
This ordering matches that of DAG.getNode.

llvm-svn: 230617

9 years ago[X86] Remove the blendps/blendpd builtins. They aren't used by the intrinsic headers...
Craig Topper [Thu, 26 Feb 2015 08:09:05 +0000 (08:09 +0000)]
[X86] Remove the blendps/blendpd builtins. They aren't used by the intrinsic headers. We use appropriate shuffle vector instead.

llvm-svn: 230616

9 years ago[X86] Correct immediate range checking for blendps/blendpd/blendpd256 builtins.
Craig Topper [Thu, 26 Feb 2015 06:23:15 +0000 (06:23 +0000)]
[X86] Correct immediate range checking for blendps/blendpd/blendpd256 builtins.

llvm-svn: 230615

9 years ago[Core] Do not reclaim absolute atoms in resolver.
Davide Italiano [Thu, 26 Feb 2015 05:39:57 +0000 (05:39 +0000)]
[Core] Do not reclaim absolute atoms in resolver.

This fixes a linker crash (found out while testing --gc-sections,
testcase provided by Rafael Avila de Espindola).
While this behaviour was found while testing ELF, it' not necessarily
ELF specific and this change is (apparently) harmless on all the
other drivers.

Differential Revision:  D7823
Reviewed by:    ruiu

llvm-svn: 230614

9 years agoIR: Use '= default' instead of r230609, NFC
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 05:00:42 +0000 (05:00 +0000)]
IR: Use '= default' instead of r230609, NFC

Apparently we can use this now!

llvm-svn: 230613

9 years agoFileCheck: Add CHECK-SAME
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:53:00 +0000 (04:53 +0000)]
FileCheck: Add CHECK-SAME

Add `CHECK-SAME`, which requires that the pattern matches on the *same*
line as the previous `CHECK`/`CHECK-NEXT` -- in other words, no newline
is allowed in the skipped region.  This is similar to `CHECK-NEXT`,
which requires exactly 1 newline in the skipped region.

My motivation is to simplify checking the long lines of LLVM assembly
for the new debug info hierarchy.  This allows CHECK sequences like the
following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-SAME: otherField: 93{{[,)]}}

which is equivalent to:

    CHECK: ![[REF]] = !SomeMDNode({{.*}}file: ![[FILE:[0-9]+]]{{.*}}otherField: 93{{[,)]}}

While this example just has two fields, many nodes in debug info have
more than that.  `CHECK-SAME` will keep the logic easy to follow.

Morever, it enables interleaving `CHECK-NOT`s without allowing newlines.
Consider the following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-NOT:  unexpectedField:
    CHECK-SAME: otherField: 93{{[,)]}}
    CHECK-NOT:  otherUnexpectedField:
    CHECK-SAME: )

which doesn't seem to have an equivalent `CHECK` line.

llvm-svn: 230612

9 years ago[Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting lib/headers paths
Simon Atanasyan [Thu, 26 Feb 2015 04:45:57 +0000 (04:45 +0000)]
[Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting lib/headers paths

There is no supported toolchain which provides headers / libs / object
files specific to the mips32r[3|5] and mips64r[3|5] ISA. So select "r2"
specific folders when they are available.

http://reviews.llvm.org/D7879

llvm-svn: 230611

9 years agoCGDebugInfo: Use DIImportedEntity default constructor, NFC
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:44:27 +0000 (04:44 +0000)]
CGDebugInfo: Use DIImportedEntity default constructor, NFC

Use the newly minted `DIImportedEntity` default constructor (r230609)
rather than explicitly specifying `nullptr`.  The latter will become
ambiguous when the new debug info hierarchy is committed, since we'll
have both of the following:

    explicit DIImportedEntity(const MDNode *);
    DIImportedEntity(const MDImportedEntity *);

(Currently we just have the former.)

A default constructor is just as clear.

llvm-svn: 230610

9 years agoIR: Add default constructor for DIImportedEntity
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:41:10 +0000 (04:41 +0000)]
IR: Add default constructor for DIImportedEntity

Add a default constructor for `DIImportedEntity`, to be used in clang in
a follow-up.

llvm-svn: 230609

9 years ago[LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold
Adam Nemet [Thu, 26 Feb 2015 04:39:09 +0000 (04:39 +0000)]
[LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold

Also remove the somewhat misleading initializers from
VectorizationFactor and VectorizationInterleave.  They will get
initialized with the default ctor since no cl::init is provided.

llvm-svn: 230608

9 years agoIRCE: print newline after printing an InductiveRangeCheck.
Sanjoy Das [Thu, 26 Feb 2015 04:03:31 +0000 (04:03 +0000)]
IRCE: print newline after printing an InductiveRangeCheck.

llvm-svn: 230607