platform/upstream/llvm.git
9 years ago[dsymutil] Add DebugMapObject::lookupObjectAddress()
Frederic Riss [Fri, 13 Feb 2015 23:18:16 +0000 (23:18 +0000)]
[dsymutil] Add DebugMapObject::lookupObjectAddress()

It turns out the debug map will be interogated both by name and
by object file address. Add the latter capability.

llvm-svn: 229177

9 years agoFixing broken bots.
Chris Bieneman [Fri, 13 Feb 2015 23:10:31 +0000 (23:10 +0000)]
Fixing broken bots.

llvm-svn: 229176

9 years agoMinor tweak to MDA
Philip Reames [Fri, 13 Feb 2015 23:08:37 +0000 (23:08 +0000)]
Minor tweak to MDA

Two minor tweaks I noticed when reading through the code:
- No need to recompute begin() on every iteration.  We're not modifying the instructions in this loop.
- We can ignore PHINodes and Dbg intrinsics.  The current code does this anyways, but it will spend slightly more time doing so and will count towards the limit of instructions in the block.  It seems really silly to give up due the presence of PHIs...

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

llvm-svn: 229175

9 years agoRoll gofrontend to 0fde0b6a7eb2
Peter Collingbourne [Fri, 13 Feb 2015 22:59:07 +0000 (22:59 +0000)]
Roll gofrontend to 0fde0b6a7eb2

This gives us the sources for cgo, go and gofmt.

llvm-svn: 229174

9 years agoUpdate for API change
Peter Collingbourne [Fri, 13 Feb 2015 22:58:36 +0000 (22:58 +0000)]
Update for API change

llvm-svn: 229173

9 years agoNFC. Moving the RegisteredOptionCategories global into the CommandLineParser class.
Chris Bieneman [Fri, 13 Feb 2015 22:54:32 +0000 (22:54 +0000)]
NFC. Moving the RegisteredOptionCategories global into the CommandLineParser class.

llvm-svn: 229172

9 years agoNFC. clang-format wants to change this from two lines to one.
Chris Bieneman [Fri, 13 Feb 2015 22:54:29 +0000 (22:54 +0000)]
NFC. clang-format wants to change this from two lines to one.

llvm-svn: 229171

9 years agoNFC. More code cleanup making LookupOption a member of the CommandLineParser.
Chris Bieneman [Fri, 13 Feb 2015 22:54:27 +0000 (22:54 +0000)]
NFC. More code cleanup making LookupOption a member of the CommandLineParser.

llvm-svn: 229170

9 years agoThe base pointer save offset can be computed at initialization time,
Eric Christopher [Fri, 13 Feb 2015 22:48:53 +0000 (22:48 +0000)]
The base pointer save offset can be computed at initialization time,
do so and fix up the calls.

llvm-svn: 229169

9 years agoMove the target machine variable so that it's initialized early
Eric Christopher [Fri, 13 Feb 2015 22:48:51 +0000 (22:48 +0000)]
Move the target machine variable so that it's initialized early
enough we can use it to initialize frame lowering.

llvm-svn: 229168

9 years ago[modules] Guard against recursively re-entering diagnosing ODR violations while
Richard Smith [Fri, 13 Feb 2015 22:43:51 +0000 (22:43 +0000)]
[modules] Guard against recursively re-entering diagnosing ODR violations while
in the middle of emitting an ODR violation diagnostic. I don't yet have a
reduced testcase for this issue, working on it...

llvm-svn: 229167

9 years agoFix build: revert r229148 "Fix argdumper build in cmake (OS X) after r228636" and...
Ilia K [Fri, 13 Feb 2015 22:30:11 +0000 (22:30 +0000)]
Fix build: revert r229148 "Fix argdumper build in cmake (OS X) after r228636" and r229159 "Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it requires 4 arguments"

llvm-svn: 229166

9 years ago[ELF] Replace std::set with StringSet.
Shankar Easwaran [Fri, 13 Feb 2015 22:26:51 +0000 (22:26 +0000)]
[ELF] Replace std::set with StringSet.

Wrap functionality was using a std::set to record symbols that need to be
wrapped. This changes the implementation to use a StringSet instead.

No change in functionality.

llvm-svn: 229165

9 years agoStash the TargetMachine on the subtarget so we can access it later.
Eric Christopher [Fri, 13 Feb 2015 22:23:04 +0000 (22:23 +0000)]
Stash the TargetMachine on the subtarget so we can access it later.
Clean up a subtarget function that has it passed in while we're at it.

llvm-svn: 229164

9 years agoPPC LinkageSize can be computed at initialization time, do so.
Eric Christopher [Fri, 13 Feb 2015 22:22:57 +0000 (22:22 +0000)]
PPC LinkageSize can be computed at initialization time, do so.

llvm-svn: 229163

9 years agoHandle function name conflicts in _LIBCPP_MSVCRT mode
Saleem Abdulrasool [Fri, 13 Feb 2015 22:15:32 +0000 (22:15 +0000)]
Handle function name conflicts in _LIBCPP_MSVCRT mode

Visual Studio's SAL extension uses a macro named __deallocate. This macro is
used pervasively, and gets included through various different ways. This
conflicts with the similarly named interfaces in libc++. Introduce a undef
header similar to __undef_min_max to handle this. This fixes a number of errors
due to the macro replacing the function name.

llvm-svn: 229162

9 years agocctype: tweak inclusions for _LIBCPP_MSVCRT case
Saleem Abdulrasool [Fri, 13 Feb 2015 22:15:28 +0000 (22:15 +0000)]
cctype: tweak inclusions for _LIBCPP_MSVCRT case

cctype uses ctype functions such as isblank. However, when building against
msvcrt, this is provided by the support header. Include the support header if
building for Windows to ensure that the definition is properly visible.

llvm-svn: 229161

9 years agoTriple: Make setEnvironment not override the object format
Reid Kleckner [Fri, 13 Feb 2015 22:05:50 +0000 (22:05 +0000)]
Triple: Make setEnvironment not override the object format

Discovered by Halide users who had C++ code like this:
  Triple.setArch(Triple::x86);
  Triple.setOS(Triple::Windows);
  Triple.setObjectFormat(Triple::ELF);
  Triple.setEnvironment(Triple::MSVC);

This would produce the stringified triple of x86-windows-msvc, instead
of the x86-windows-msvc-elf string needed to run MCJIT.

With this change, they retain the -elf suffix.

llvm-svn: 229160

9 years agoFix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it...
Ilia K [Fri, 13 Feb 2015 21:54:52 +0000 (21:54 +0000)]
Fix build: make_symlink_darwin_debug passes 2 arguments into make_symlink, but it requires 4 arguments

llvm-svn: 229159

9 years ago[SSE/AVX] Use multiclasses to reduce the mass of scalar math patterns; NFCI
Sanjay Patel [Fri, 13 Feb 2015 21:52:42 +0000 (21:52 +0000)]
[SSE/AVX] Use multiclasses to reduce the mass of scalar math patterns; NFCI

This takes the preposterous number of patterns in this section
that were last added to in r219033 down to just plain obnoxious.

With a little more work, we might get this down to just comical.

I've added more test cases to the existing file that checks these
patterns, but it seems that some of these patterns simply don't
exist with today's shuffle lowering.

llvm-svn: 229158

9 years agoFix R600 test deadlock on Windows by giving FileCheck an argument
Reid Kleckner [Fri, 13 Feb 2015 21:27:28 +0000 (21:27 +0000)]
Fix R600 test deadlock on Windows by giving FileCheck an argument

llc would hang trying to write output to a full pipe that FileCheck
wasn't reading. FileCheck wasn't reading from stdin because it needs a
file as a positional argument.

llvm-svn: 229157

9 years ago[PM] Fix a compile error I introduced in r229094 and didn't notice
Chandler Carruth [Fri, 13 Feb 2015 21:10:58 +0000 (21:10 +0000)]
[PM] Fix a compile error I introduced in r229094 and didn't notice
because I didn't have binutils set up properly to build the gold plugin.

Fixes PR22581 which was filed because this broke the build for folks
relying on the plugin. Very sorry! =]

I've gotten the plugin stuff building now as well so it shouldn't keep
happening.

llvm-svn: 229156

9 years agofix typos; NFC
Sanjay Patel [Fri, 13 Feb 2015 21:07:22 +0000 (21:07 +0000)]
fix typos; NFC

llvm-svn: 229155

9 years ago[modules] Mark include/llvm/Support/Dwarf.def as being a textually-included header.
Richard Smith [Fri, 13 Feb 2015 21:06:45 +0000 (21:06 +0000)]
[modules] Mark include/llvm/Support/Dwarf.def as being a textually-included header.

llvm-svn: 229154

9 years agoClean up some inappropriate choices of type in the bitcode reader. None of
Richard Smith [Fri, 13 Feb 2015 21:05:11 +0000 (21:05 +0000)]
Clean up some inappropriate choices of type in the bitcode reader. None of
these are expected to fix any 64->32 bit real truncation issues.

llvm-svn: 229153

9 years agoR600/SI: Refactor SOP1 classes
Tom Stellard [Fri, 13 Feb 2015 21:02:37 +0000 (21:02 +0000)]
R600/SI: Refactor SOP1 classes

llvm-svn: 229152

9 years agoR600/SI: Lowercase register names
Tom Stellard [Fri, 13 Feb 2015 21:02:36 +0000 (21:02 +0000)]
R600/SI: Lowercase register names

llvm-svn: 229151

9 years agoR600/SI: Remove some unused TableGen classes
Tom Stellard [Fri, 13 Feb 2015 21:02:33 +0000 (21:02 +0000)]
R600/SI: Remove some unused TableGen classes

llvm-svn: 229150

9 years agoReapply r229142 with some enable_if magic to avoid memcpying between differing types.
Benjamin Kramer [Fri, 13 Feb 2015 20:45:14 +0000 (20:45 +0000)]
Reapply r229142 with some enable_if magic to avoid memcpying between differing types.

Original commit message:
SmallVector: Resolve a long-standing fixme by using the existing unitialized_copy dispatch.

This makes append() use memcpy for trivially copyable types.

llvm-svn: 229149

9 years agoFix argdumper build in cmake (OS X) after r228636
Ilia K [Fri, 13 Feb 2015 20:28:27 +0000 (20:28 +0000)]
Fix argdumper build in cmake (OS X) after r228636

Summary:
This patch fixes the following tests on OS X:

```
  FAIL: test_with_dsym (TestLaunchWithGlob.LaunchWithGlobTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 456, in wrapper
      return func(self, *args, **kwargs)
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 21, in test_with_dsym
      self.do_test ()
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test
      self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd()))
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd
      msg if msg else CMD_MSG(cmd))
  AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully
  Config=x86_64-clang
  ======================================================================
  FAIL: test_with_dwarf (TestLaunchWithGlob.LaunchWithGlobTestCase)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 473, in wrapper
      return func(self, *args, **kwargs)
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 28, in test_with_dwarf
      self.do_test ()
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob/TestLaunchWithGlob.py", line 42, in do_test
      self.runCmd("process launch -G true -w %s -- fi*.tx?" % (os.getcwd()))
    File "/Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/lldbtest.py", line 1953, in runCmd
      msg if msg else CMD_MSG(cmd))
  AssertionError: False is not True : Command 'process launch -G true -w /Users/testuser/build/workspace/LLDB_master_release_OSX/llvm_master/tools/lldb/test/functionalities/launch_with_glob -- fi*.tx?' returns successfully
```

Reviewers: epertoso, emaste, abidh, clayborg, zturner

Reviewed By: clayborg

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

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

llvm-svn: 229148

9 years ago[modules] Don't produce duplicate lookup results if the same declaration is
Richard Smith [Fri, 13 Feb 2015 20:17:14 +0000 (20:17 +0000)]
[modules] Don't produce duplicate lookup results if the same declaration is
visible through multiple imported modules. No functionality change.

llvm-svn: 229147

9 years agoPR17938: This has already been fixed, add regression test.
Richard Smith [Fri, 13 Feb 2015 19:49:59 +0000 (19:49 +0000)]
PR17938: This has already been fixed, add regression test.

llvm-svn: 229146

9 years ago[modules] Improve llvm-bcanalyzer output on AST files a little. No functionality...
Richard Smith [Fri, 13 Feb 2015 19:48:37 +0000 (19:48 +0000)]
[modules] Improve llvm-bcanalyzer output on AST files a little. No functionality change.

llvm-svn: 229145

9 years agoRevert r229142. It breaks the world for unknown reasons.
Benjamin Kramer [Fri, 13 Feb 2015 19:45:28 +0000 (19:45 +0000)]
Revert r229142. It breaks the world for unknown reasons.

llvm-svn: 229144

9 years agoIncrease the CPU time timeout for testing from 10 to 20 minutes, to
Dimitry Andric [Fri, 13 Feb 2015 19:45:19 +0000 (19:45 +0000)]
Increase the CPU time timeout for testing from 10 to 20 minutes, to
compensate for slow machines, and the growing number of tests.

Prodded by: Hans Wennborg

llvm-svn: 229143

9 years agoSmallVector: Resolve a long-standing fixme by using the existing unitialized_copy...
Benjamin Kramer [Fri, 13 Feb 2015 19:20:39 +0000 (19:20 +0000)]
SmallVector: Resolve a long-standing fixme by using the existing unitialized_copy dispatch.

This makes append() use memcpy for trivially copyable types.

llvm-svn: 229142

9 years agoFix TestProcessIO.py when run against a remote target
Vince Harron [Fri, 13 Feb 2015 19:15:24 +0000 (19:15 +0000)]
Fix TestProcessIO.py when run against a remote target

Fixed test case to copy redirected stdout/stderr files from remote
target to host

llgs wasn't bothering to put the pty master file handle in the right
place if stdout/stderr were redirected to a file. It is still needed
for stdin.

Corrected some log message text

llvm-svn: 229141

9 years ago[mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.
Vasileios Kalintiris [Fri, 13 Feb 2015 19:14:22 +0000 (19:14 +0000)]
[mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 229140

9 years agoAdd test that checks (gdb) prompt in case of unknown command (MI)
Ilia K [Fri, 13 Feb 2015 19:13:42 +0000 (19:13 +0000)]
Add test that checks (gdb) prompt in case of unknown command (MI)

llvm-svn: 229139

9 years ago[mips] Use isa<> instead of dyn_cast<> with unused value. NFC.
Vasileios Kalintiris [Fri, 13 Feb 2015 19:12:16 +0000 (19:12 +0000)]
[mips] Use isa<> instead of dyn_cast<> with unused value. NFC.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 229138

9 years agoFix test_lldbmi_prompt test by enabling ShowPrompt in CMICmnStreamStdin by default
Ilia K [Fri, 13 Feb 2015 19:11:39 +0000 (19:11 +0000)]
Fix test_lldbmi_prompt test by enabling ShowPrompt in CMICmnStreamStdin by default

llvm-svn: 229137

9 years agoR600/SI: Remove handling of fpimm
Matt Arsenault [Fri, 13 Feb 2015 19:05:07 +0000 (19:05 +0000)]
R600/SI: Remove handling of fpimm

llvm-svn: 229136

9 years agoR600/SI: Allow f64 inline immediates in i64 operands
Matt Arsenault [Fri, 13 Feb 2015 19:05:03 +0000 (19:05 +0000)]
R600/SI: Allow f64 inline immediates in i64 operands

This requires considering the size of the operand when
checking immediate legality.

llvm-svn: 229135

9 years agoR600/SI: Minor test scheduling fixes
Matt Arsenault [Fri, 13 Feb 2015 19:04:56 +0000 (19:04 +0000)]
R600/SI: Minor test scheduling fixes

This prevents these from failing in a later commit.

llvm-svn: 229134

9 years agounwind: always export unw_local_addr_space
Saleem Abdulrasool [Fri, 13 Feb 2015 19:04:48 +0000 (19:04 +0000)]
unwind: always export unw_local_addr_space

It seems that the remote unwinder is entirely unused at this moment.
unw_local_addr_space was referencing sThisAddressSpace which use to be a static
in global namespace.  It has since then become a member variable of
LocalAddressSpace.  Update this definition and always export it (needed to
implement unw_get_proc_info_by_ip for ARM).

llvm-svn: 229133

9 years agoFix -data-read-memory-bytes command (MI)
Ilia K [Fri, 13 Feb 2015 18:42:25 +0000 (18:42 +0000)]
Fix -data-read-memory-bytes command (MI)

Summary:
* Add IsHexadecimalNumber method to CMIUtilString (MI)
* Add number format (dec,hex,auto) to CMICmdArgValNumber (MI)
* Fix -data-read-memory-bytes to pass address in hex format (MI)
* Fix output begin/end/offset fields format in -data-read-memory-bytes
* Fix CMICmdArgValNumber::ExtractNumber to extract 64bit value
* + tests

All tests passed on OS X

Reviewers: abidh, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, zturner, clayborg, abidh

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

llvm-svn: 229132

9 years agoAdd missing prompt when command doesn't exist (MI)
Ilia K [Fri, 13 Feb 2015 18:36:48 +0000 (18:36 +0000)]
Add missing prompt when command doesn't exist (MI)

It fixes the following example:
```
$ bin/lldb-mi --interpreter
(gdb)
-not-found
^error,msg="Driver. Received command '-not-found'. It was not handled. Command 'not-found' not in Command Factory"
-not-found
^error,msg="Driver. Received command '-not-found'. It was not handled. Command 'not-found' not in Command Factory"
```

After the fix it looks like:
```
$ bin/lldb-mi --interpreter
-not-found
^error,msg="Driver. Received command '-not-found'. It was not handled. Command 'not-found' not in Command Factory"
(gdb)
-not-dounf
^error,msg="Driver. Received command '-not-dounf'. It was not handled. Command 'not-dounf' not in Command Factory"
(gdb)
```

llvm-svn: 229131

9 years agoFix -Wunused-variable warning.
Zachary Turner [Fri, 13 Feb 2015 18:11:49 +0000 (18:11 +0000)]
Fix -Wunused-variable warning.

llvm-svn: 229130

9 years agollvm-pdbdump: Improve printing of functions and signatures.
Zachary Turner [Fri, 13 Feb 2015 17:57:09 +0000 (17:57 +0000)]
llvm-pdbdump: Improve printing of functions and signatures.

This correctly prints the function pointers, and also prints
function signatures for symbols as opposed to just types.  So
actual functions in your program will now be printed with full
name and signature, as opposed to just name as before.

llvm-svn: 229129

9 years ago[mips][microMIPS] Delay slot filler: Replace the microMIPS JR with the JRC
Jozef Kolek [Fri, 13 Feb 2015 17:51:27 +0000 (17:51 +0000)]
[mips][microMIPS] Delay slot filler: Replace the microMIPS JR with the JRC

This patch adds functionality in MIPS delay slot filler such as if delay slot
filler have to put NOP instruction into the delay slot of microMIPS JR
instruction, then instead of emitting NOP this instruction is replaced by
compact jump instruction JRC.

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

llvm-svn: 229128

9 years agotsan: don't initialize trace header in release mode
Dmitry Vyukov [Fri, 13 Feb 2015 17:39:03 +0000 (17:39 +0000)]
tsan: don't initialize trace header in release mode

We are going to use only a small part of the trace with the default
value of history_size. However, the constructor writes to the whole trace.
It writes mostly zeros, so freshly mmaped memory will do.
The only non-zero field if mutex type used for debugging.

Reduces per-goroutine overhead by 8K.

https://code.google.com/p/thread-sanitizer/issues/detail?id=89

llvm-svn: 229127

9 years agounwind: use sizeof() instead of hardcoded sizes
Saleem Abdulrasool [Fri, 13 Feb 2015 17:36:11 +0000 (17:36 +0000)]
unwind: use sizeof() instead of hardcoded sizes

The statically allocated strings have a fixed size which can be computed using
the sizeof operator rather than duplicating the allocation size which can drift.
NFC.

llvm-svn: 229126

9 years agoFix Arg0 argument after r229110. The problem was that Arg0ValueChangedCallback isn...
Ilia K [Fri, 13 Feb 2015 17:07:55 +0000 (17:07 +0000)]
Fix Arg0 argument after r229110. The problem was that Arg0ValueChangedCallback isn't twitching when Arg0 was updated, therefore target was launched with empty 1st argument or without it at all. In this patch I update Arg0 by hand.

llvm-svn: 229125

9 years ago[InstCombine] Fix regression introduced at r227197.
Andrea Di Biagio [Fri, 13 Feb 2015 16:33:34 +0000 (16:33 +0000)]
[InstCombine] Fix regression introduced at r227197.

This patch fixes a problem I accidentally introduced in an instruction combine
on select instructions added at r227197. That revision taught the instruction
combiner how to fold a cttz/ctlz followed by a icmp plus select into a single
cttz/ctlz with flag 'is_zero_undef' cleared.

However, the new rule added at r227197 would have produced wrong results in the
case where a cttz/ctlz with flag 'is_zero_undef' cleared was follwed by a
zero-extend or truncate. In that case, the folded instruction would have
been inserted in a wrong location thus leaving the CFG in an inconsistent
state.

This patch fixes the problem and add two reproducible test cases to
existing test 'InstCombine/select-cmp-cttz-ctlz.ll'.

llvm-svn: 229124

9 years agoRevert r229082 for a bit, it caused PR22577.
Nico Weber [Fri, 13 Feb 2015 16:27:00 +0000 (16:27 +0000)]
Revert r229082 for a bit, it caused PR22577.

llvm-svn: 229123

9 years agoHelp: Document how to build and install with CMake.
Tom Stellard [Fri, 13 Feb 2015 16:15:32 +0000 (16:15 +0000)]
Help: Document how to build and install with CMake.

Resolves PR21569.

Patch by: Stephen Kelly

llvm-svn: 229122

9 years agoHelp: Document the minimum CMake version required.
Tom Stellard [Fri, 13 Feb 2015 16:15:29 +0000 (16:15 +0000)]
Help: Document the minimum CMake version required.

Patch by: Stephen Kelly

llvm-svn: 229121

9 years agotsan: fix build
Dmitry Vyukov [Fri, 13 Feb 2015 16:08:43 +0000 (16:08 +0000)]
tsan: fix build

llvm-svn: 229120

9 years agoRooting out more undefined behavior in char_traits.
Marshall Clow [Fri, 13 Feb 2015 16:04:42 +0000 (16:04 +0000)]
Rooting out more undefined behavior in char_traits.

llvm-svn: 229119

9 years agoAdd run line that was missing in r228999.
Akira Hatanaka [Fri, 13 Feb 2015 16:00:03 +0000 (16:00 +0000)]
Add run line that was missing in r228999.

Also, change the run lines to use -allow-empty.

llvm-svn: 229118

9 years agotsan: reduce history size in Go mode
Dmitry Vyukov [Fri, 13 Feb 2015 15:59:23 +0000 (15:59 +0000)]
tsan: reduce history size in Go mode

The ContainsSameAccess optimization substantially reduces pressure
on trace by eliminating duplicate accesses. So now we can reduce
default trace size to reduce per-goroutine memory consumption.
Current default size is 64K events, new -- 32K events.
In either case user can change it with GORACE env var.

Reduces per-goroutine memory consumption from 356K to 226K.

llvm-svn: 229117

9 years agotsan: disable deadlock detector in Go mode
Dmitry Vyukov [Fri, 13 Feb 2015 15:44:50 +0000 (15:44 +0000)]
tsan: disable deadlock detector in Go mode

Go does not use that.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89

llvm-svn: 229116

9 years agotsan: remove internal deadlock detector from ThreadState in Go mode
Dmitry Vyukov [Fri, 13 Feb 2015 15:37:11 +0000 (15:37 +0000)]
tsan: remove internal deadlock detector from ThreadState in Go mode

Go does not use that.
https://code.google.com/p/thread-sanitizer/issues/detail?id=89

llvm-svn: 229115

9 years agoAppease buildbots
Jonathan Roelofs [Fri, 13 Feb 2015 15:34:01 +0000 (15:34 +0000)]
Appease buildbots

llvm-svn: 229114

9 years agotsan: reduce size of vector clock in Go mode
Dmitry Vyukov [Fri, 13 Feb 2015 15:32:34 +0000 (15:32 +0000)]
tsan: reduce size of vector clock in Go mode

Go does not have freed memory.
Reduces per-goroutine overhead from 455K to 356K.

https://code.google.com/p/thread-sanitizer/issues/detail?id=89

llvm-svn: 229113

9 years agotsan: remove stats from ThreadState ifndef TSAN_COLLECT_STATS
Dmitry Vyukov [Fri, 13 Feb 2015 15:25:47 +0000 (15:25 +0000)]
tsan: remove stats from ThreadState ifndef TSAN_COLLECT_STATS

Issue 89: Uses a lot of memory for each goroutine
https://code.google.com/p/thread-sanitizer/issues/detail?id=89

llvm-svn: 229112

9 years agoModularize TargetInfo discovery in the lit config
Jonathan Roelofs [Fri, 13 Feb 2015 15:25:21 +0000 (15:25 +0000)]
Modularize TargetInfo discovery in the lit config

When the remote execution patch lands, this will allow us to drop in a
replacement TargetInfo object for locale support discovery, alleviating
the assumption that host==target.

http://reviews.llvm.org/D7601

llvm-svn: 229111

9 years agoAdd -exec-arguments command
Ilia K [Fri, 13 Feb 2015 14:31:06 +0000 (14:31 +0000)]
Add -exec-arguments command

Summary:
This patch adds -exec-arguments command for lldb-mi. -exec-arguments command allows to specify arguments for executable file in MI mode. Also it contains tests for that command.

Btw, new added files was formatted by clang-format.

Reviewers: abidh, zturner, clayborg

Reviewed By: clayborg

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

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

llvm-svn: 229110

9 years agoRemove file not used anywhere.
Jean-Daniel Dupas [Fri, 13 Feb 2015 14:30:22 +0000 (14:30 +0000)]
Remove file not used anywhere.

llvm-svn: 229109

9 years agoMoved header list loading to new class. This is staging for adding module map loading...
John Thompson [Fri, 13 Feb 2015 14:29:22 +0000 (14:29 +0000)]
Moved header list loading to new class. This is staging for adding module map loading and checking support.

llvm-svn: 229108

9 years agoUsing 'isa' instead of 'dyn_cast'
Jean-Daniel Dupas [Fri, 13 Feb 2015 14:28:18 +0000 (14:28 +0000)]
Using 'isa' instead of 'dyn_cast'

llvm-svn: 229107

9 years agotsan: fix stack printing
Dmitry Vyukov [Fri, 13 Feb 2015 14:27:43 +0000 (14:27 +0000)]
tsan: fix stack printing

strip_path_prefix was not stripped from file names.

llvm-svn: 229106

9 years ago[CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to speculate...
Andrea Di Biagio [Fri, 13 Feb 2015 14:15:48 +0000 (14:15 +0000)]
[CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to speculate calls to cttz/ctlz.

SimplifyCFG now knows how to speculate calls to intrinsic cttz/ctlz that are
'cheap' for the target. Therefore, some of the logic in CodeGenPrepare
that was originally added at revision 224899 can now be removed.

This patch is basically a no functional change. It removes the duplicated
logic in CodeGenPrepare and converts all the existing target specific tests
for cttz/ctlz into SimplifyCFG tests.

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

llvm-svn: 229105

9 years agoFix configure+make build broken by r228943 (part 2)
Tamas Berghammer [Fri, 13 Feb 2015 12:27:24 +0000 (12:27 +0000)]
Fix configure+make build broken by r228943 (part 2)

llvm-svn: 229104

9 years ago[PBQP] Conservativelly allocatable nodes can be spilled and give a better solution
Arnaud A. de Grandmaison [Fri, 13 Feb 2015 12:04:42 +0000 (12:04 +0000)]
[PBQP] Conservativelly allocatable nodes can be spilled and give a better solution

Although such nodes are allocatable, the cost of spilling may be less than
allocating to register, so spilling the node may provide a better solution.
The assert does not account for this case, so remove it for now.

llvm-svn: 229103

9 years agoFix for http://llvm.org/bugs/show_bug.cgi?id=21744
Hafiz Abid Qadeer [Fri, 13 Feb 2015 11:53:50 +0000 (11:53 +0000)]
Fix for http://llvm.org/bugs/show_bug.cgi?id=21744

GetVariableInfo () collected the values of the variable in a list. But it also
tried to generate the name/value pairs for children. This caused generation of
a wrong value string for may items. This function has been fixed to put value in
the list only.

The handling of --print-value related option has been moved to caller.

GetVariableInfo2 and MIResponseFormVariableInfo3 have been removed. They were
almost the duplicate of functions of similar names. I dont see any difference in
the output of -stack-list-locals and -stack-list-arguments. So these functions
just seemed unnecessary.

Char variable was being printed as a string which caused garbage output. This has
been fixed.

Some misc. cleanup.

Test cases have been added that check -stack-list-locals for struct, array and
pointers. Modified other tests which depended on hard coded line numbers.

Reviewed in http://reviews.llvm.org/D7589

llvm-svn: 229102

9 years ago[SimplifyCFG] Add test for r229099
James Molloy [Fri, 13 Feb 2015 11:08:40 +0000 (11:08 +0000)]
[SimplifyCFG] Add test for r229099

Add extra test that was accidentally not staged.

llvm-svn: 229101

9 years agoFix build after r229094: replace llvm/PassManager.h -> llvm/IR/LegacyPassManager.h
Ilia K [Fri, 13 Feb 2015 10:49:18 +0000 (10:49 +0000)]
Fix build after r229094: replace llvm/PassManager.h -> llvm/IR/LegacyPassManager.h

llvm-svn: 229100

9 years ago[SimplifyCFG] Be more aggressive
James Molloy [Fri, 13 Feb 2015 10:48:30 +0000 (10:48 +0000)]
[SimplifyCFG] Be more aggressive

Up the phi node folding threshold from a cheap "1" to a meagre "2".

Update tests for extra added selects and slight code churn.

llvm-svn: 229099

9 years agoFix configure+make build broken by r228943
Tamas Berghammer [Fri, 13 Feb 2015 10:39:23 +0000 (10:39 +0000)]
Fix configure+make build broken by r228943

llvm-svn: 229098

9 years ago[mips] Improve support for the .set at/noat assembler directives.
Toma Tabacu [Fri, 13 Feb 2015 10:30:57 +0000 (10:30 +0000)]
[mips] Improve support for the .set at/noat assembler directives.

Summary:
Made the following changes:
  Added calls to emitDirectiveSetNoAt() and emitDirectiveSetAt().
  Added special emit function for .set at=$reg, emitDirectiveSetAtWithArg(unsigned RegNo).
  Improved parsing error checks for .set at.
  Refactored parser code for .set at.
  Improved testing of both directives.
  Improved code readability and comments.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 229097

9 years agoDisable a warning for the python modules as the python C API headers
Chandler Carruth [Fri, 13 Feb 2015 10:22:00 +0000 (10:22 +0000)]
Disable a warning for the python modules as the python C API headers
trigger this warning. With this, 'ninja' succeeds without warnings for
me on Linux.

llvm-svn: 229096

9 years ago[PM] Update the examples to reflect the removal of the
Chandler Carruth [Fri, 13 Feb 2015 10:21:05 +0000 (10:21 +0000)]
[PM] Update the examples to reflect the removal of the
llvm/PassManager.h wrapper header and its using declarations. These now
directly use the legacy namespace.

I had updated the #include lines in my large commit but forgot that the
examples weren't being built and didn't update the code to use the
correct namespace. Sorry for the noise here.

llvm-svn: 229095

9 years ago[PM] Remove the old 'PassManager.h' header file at the top level of
Chandler Carruth [Fri, 13 Feb 2015 10:01:29 +0000 (10:01 +0000)]
[PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.

This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.

The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".

llvm-svn: 229094

9 years agoRemove a stray blank line that my sort_include.py script found.
Chandler Carruth [Fri, 13 Feb 2015 09:57:05 +0000 (09:57 +0000)]
Remove a stray blank line that my sort_include.py script found.

llvm-svn: 229093

9 years ago[PM] Fix #include order here that I forgot to update before changing it.
Chandler Carruth [Fri, 13 Feb 2015 09:57:03 +0000 (09:57 +0000)]
[PM] Fix #include order here that I forgot to update before changing it.

llvm-svn: 229092

9 years ago[PM] Convert Polly over to directly use the legacy pass manager
Chandler Carruth [Fri, 13 Feb 2015 09:51:50 +0000 (09:51 +0000)]
[PM] Convert Polly over to directly use the legacy pass manager
namespace and header rather than the top-level header and using
declarations. These helpers impede modular builds and are going away.
Migrating away from them will also be necessary to start mixing in any
usage of the new pass manager.

llvm-svn: 229091

9 years ago[PM] Move away from the old llvm/PassManager.h header and its using
Chandler Carruth [Fri, 13 Feb 2015 09:47:49 +0000 (09:47 +0000)]
[PM] Move away from the old llvm/PassManager.h header and its using
declarations and just use the legacy namespace qualifier in this file
and the permanent header name.

The old wrapper header is going away to make LLVM's build more modular,
and without updating Clang I can't easily start to add usage of the new
pass manager to Clang. This should make it more clear in the code which
set of types is doing what.

llvm-svn: 229090

9 years agoRe-sort the #include lines in bindings and examples which I managed to
Chandler Carruth [Fri, 13 Feb 2015 09:14:30 +0000 (09:14 +0000)]
Re-sort the #include lines in bindings and examples which I managed to
miss previously.

llvm-svn: 229089

9 years agoRe-sort #include lines using my handy dandy ./utils/sort_includes.py
Chandler Carruth [Fri, 13 Feb 2015 09:09:03 +0000 (09:09 +0000)]
Re-sort #include lines using my handy dandy ./utils/sort_includes.py
script. This is in preparation for changes to lots of include lines.

llvm-svn: 229088

9 years agoRe-sort includes using the LLVM utils/sort_includes.py script.
Chandler Carruth [Fri, 13 Feb 2015 09:07:58 +0000 (09:07 +0000)]
Re-sort includes using the LLVM utils/sort_includes.py script.

llvm-svn: 229087

9 years agoFix the last two warnings I see on Linx building 'lldb': mismatched
Chandler Carruth [Fri, 13 Feb 2015 08:16:15 +0000 (08:16 +0000)]
Fix the last two warnings I see on Linx building 'lldb': mismatched
signed and unsigned types in comparisons.

For the text offset, use the addr_t type that is used elsewhere to get
these kinds of offsets, and which it is being compared against. This
seems to make things more consistent.

For the other, the numbers are clearly small and uninteresting, so just
cast them to the most boring 'int' type.

llvm-svn: 229085

9 years agoFix four missing 'override' specifiers found with the Clang
Chandler Carruth [Fri, 13 Feb 2015 08:07:00 +0000 (08:07 +0000)]
Fix four missing 'override' specifiers found with the Clang
'-Winconsistent-missing-override' warning. I suggest folks use this to
ensure that override is consistently used to mark virtual function
overrides.

llvm-svn: 229084

9 years agoRemove an unused variable found with a Clang warning.
Chandler Carruth [Fri, 13 Feb 2015 08:04:18 +0000 (08:04 +0000)]
Remove an unused variable found with a Clang warning.

llvm-svn: 229083

9 years agoMS ABI: Implement /volatile:ms
David Majnemer [Fri, 13 Feb 2015 07:55:47 +0000 (07:55 +0000)]
MS ABI: Implement /volatile:ms

The /volatile:ms semantics turn volatile loads and stores into atomic
acquire and release operations.  This distinction is important because
volatile memory operations do not form a happens-before relationship
with non-atomic memory.  This means that a volatile store is not
sufficient for implementing a mutex unlock routine.

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

llvm-svn: 229082

9 years agoFix the windows build *again*. Grrr, MSVC.
Zachary Turner [Fri, 13 Feb 2015 07:55:29 +0000 (07:55 +0000)]
Fix the windows build *again*.  Grrr, MSVC.

llvm-svn: 229081

9 years agoRevert a series of commits starting at r228886 which is triggering some
Chandler Carruth [Fri, 13 Feb 2015 07:52:39 +0000 (07:52 +0000)]
Revert a series of commits starting at r228886 which is triggering some
regressions for LLDB on Linux. Rafael indicated on lldb-dev that we
should just go ahead and revert these but that he wasn't at a computer.
The patches backed out are as follows:

r228980: Add support for having multiple sections with the name and ...
r228889: Invert the section relocation map.
r228888: Use the existing SymbolTableIndex intsead of doing a lookup.
r228886: Create the Section -> Rel Section map when it is first needed.

These patches look pretty nice to me, so hoping its not too hard to get
them re-instated. =D

llvm-svn: 229080

9 years agoFix non-windows builds unhappy about a missing header.
Zachary Turner [Fri, 13 Feb 2015 07:45:49 +0000 (07:45 +0000)]
Fix non-windows builds unhappy about a missing header.

llvm-svn: 229079

9 years ago[X86] Add support for parsing and printing the mnemonic aliases for the XOP VPCOM...
Craig Topper [Fri, 13 Feb 2015 07:42:25 +0000 (07:42 +0000)]
[X86] Add support for parsing and printing the mnemonic aliases for the XOP VPCOM instructions.

llvm-svn: 229078

9 years ago[X86] Fix XOP vpcom intrinsic autoupgrade to map 'true' and 'false' to the correct...
Craig Topper [Fri, 13 Feb 2015 07:42:15 +0000 (07:42 +0000)]
[X86] Fix XOP vpcom intrinsic autoupgrade to map 'true' and 'false' to the correct immediates. Seems they were swapped.

llvm-svn: 229077