platform/upstream/llvm.git
11 years ago[ubsan] Refactor handlers to have separate entry points for aborting.
Will Dietz [Sun, 2 Dec 2012 19:47:29 +0000 (19:47 +0000)]
[ubsan] Refactor handlers to have separate entry points for aborting.

If user specifies aborting after a recoverable failed check is
appropriate, frontend should emit call to the _abort variant.

Test this behavior with newly added -fsanitize-recover flag.

llvm-svn: 169113

11 years ago[ubsan] Replace "fatal error" with "runtime error".
Will Dietz [Sun, 2 Dec 2012 18:43:33 +0000 (18:43 +0000)]
[ubsan] Replace "fatal error" with "runtime error".

llvm-svn: 169112

11 years agoAllow merging multiple store sequences on the same chain.
Nadav Rotem [Sun, 2 Dec 2012 17:14:09 +0000 (17:14 +0000)]
Allow merging multiple store sequences on the same chain.

llvm-svn: 169111

11 years agoBring vim keyword lists up to date.
Benjamin Kramer [Sun, 2 Dec 2012 16:40:38 +0000 (16:40 +0000)]
Bring vim keyword lists up to date.

llvm-svn: 169110

11 years agoFix a bug in FileCheck that wouldn't let define variables as follows:
Eli Bendersky [Sun, 2 Dec 2012 16:02:41 +0000 (16:02 +0000)]
Fix a bug in FileCheck that wouldn't let define variables as follows:

; CHECK: [[VAR:[a-z]]]

The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.

llvm-svn: 169109

11 years agoFix an invalid regex in the test
Eli Bendersky [Sun, 2 Dec 2012 15:46:02 +0000 (15:46 +0000)]
Fix an invalid regex in the test

llvm-svn: 169108

11 years agoSimplify the coding standards for #include ordering. The ordering is now
Chandler Carruth [Sun, 2 Dec 2012 11:53:27 +0000 (11:53 +0000)]
Simplify the coding standards for #include ordering. The ordering is now
trivially achievable with an editor. I'll likely check in a silly python
script to help with this too.

llvm-svn: 169107

11 years agoUnbreak Sphinx build
Justin Holewinski [Sun, 2 Dec 2012 02:47:48 +0000 (02:47 +0000)]
Unbreak Sphinx build

llvm-svn: 169106

11 years agoAnother fix attempt to Makefile.sphinx - copy the PNGs from tutorial/ as well,
Eli Bendersky [Sat, 1 Dec 2012 22:21:04 +0000 (22:21 +0000)]
Another fix attempt to Makefile.sphinx - copy the PNGs from tutorial/ as well,
and recursive copying is not required for the tutorial/ directory.

llvm-svn: 169105

11 years agoAttempt to fix Makefile.sphinx to not generate errors while trying to copy
Eli Bendersky [Sat, 1 Dec 2012 22:11:59 +0000 (22:11 +0000)]
Attempt to fix Makefile.sphinx to not generate errors while trying to copy
files from tutorial/.svn

llvm-svn: 169104

11 years agoUpdate FileCheck's documentation to mention recently added feature of
Eli Bendersky [Sat, 1 Dec 2012 22:03:57 +0000 (22:03 +0000)]
Update FileCheck's documentation to mention recently added feature of
matching a variable defined on the same line.

llvm-svn: 169103

11 years ago[python] Add markup option to disassembler
Gregory Szorc [Sat, 1 Dec 2012 21:57:30 +0000 (21:57 +0000)]
[python] Add markup option to disassembler

Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com>

llvm-svn: 169102

11 years agoSupport referencing variables defined on the same line.
Eli Bendersky [Sat, 1 Dec 2012 21:54:48 +0000 (21:54 +0000)]
Support referencing variables defined on the same line.

See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html
and related discussions.

llvm-svn: 169101

11 years agoUpdate the recommended isl version
Tobias Grosser [Sat, 1 Dec 2012 21:51:10 +0000 (21:51 +0000)]
Update the recommended isl version

Recent changes in isl:

- Allow analysis of loops during code generation

This simplifies the detection of parallel loops.

- Simplify the way costumized ast printers are defined

This enables us to highlight parallel / vector loops in our debug output.

- Compile time improvements for codegen contexts that include parameters

- Various bug fixes

This update also gets us in sync for the isl 0.11 release.

llvm-svn: 169100

11 years agoMake helper classes anonymous. Make helper functions static instead of private member...
Benjamin Kramer [Sat, 1 Dec 2012 20:58:01 +0000 (20:58 +0000)]
Make helper classes anonymous. Make helper functions static instead of private members so the anonymous class doesn't leak out.

No functionality change.

llvm-svn: 169099

11 years ago[MIPS] Add -mxgot/-mno-xgot command line options
Simon Atanasyan [Sat, 1 Dec 2012 18:27:21 +0000 (18:27 +0000)]
[MIPS] Add -mxgot/-mno-xgot command line options
to enable/disable support of GOT larger than 64k.

llvm-svn: 169098

11 years agoAdd raw_ostream include to pacify MSVC.
Benjamin Kramer [Sat, 1 Dec 2012 17:54:07 +0000 (17:54 +0000)]
Add raw_ostream include to pacify MSVC.

llvm-svn: 169097

11 years agoUpdate unit tests not to rely on transitive includes.
Benjamin Kramer [Sat, 1 Dec 2012 17:22:05 +0000 (17:22 +0000)]
Update unit tests not to rely on transitive includes.

llvm-svn: 169096

11 years agoInclude pruning and general cleanup.
Benjamin Kramer [Sat, 1 Dec 2012 17:12:56 +0000 (17:12 +0000)]
Include pruning and general cleanup.

llvm-svn: 169095

11 years agoDon't include Type.h in DeclarationName.h.
Benjamin Kramer [Sat, 1 Dec 2012 16:35:25 +0000 (16:35 +0000)]
Don't include Type.h in DeclarationName.h.

Recursively prune some includes.

llvm-svn: 169094

11 years agoMake ASTVector.h standalone without including all of ASTContext.
Benjamin Kramer [Sat, 1 Dec 2012 15:18:03 +0000 (15:18 +0000)]
Make ASTVector.h standalone without including all of ASTContext.

llvm-svn: 169093

11 years agoPull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull...
Benjamin Kramer [Sat, 1 Dec 2012 15:09:41 +0000 (15:09 +0000)]
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

llvm-svn: 169092

11 years agoRemove bugzilla link.
James Molloy [Sat, 1 Dec 2012 14:44:23 +0000 (14:44 +0000)]
Remove bugzilla link.

llvm-svn: 169091

11 years agoFix a test that was redefining FileCheck variables while referencing old ones.
Eli Bendersky [Sat, 1 Dec 2012 13:50:51 +0000 (13:50 +0000)]
Fix a test that was redefining FileCheck variables while referencing old ones.

In preparation for the FileCheck enhancement to support backreferences.

llvm-svn: 169090

11 years agoSwitch to using -### as mentioned by chandlerc.
Joey Gouly [Sat, 1 Dec 2012 13:07:22 +0000 (13:07 +0000)]
Switch to using -### as mentioned by chandlerc.

llvm-svn: 169089

11 years agoAdd -emit-llvm to test/Driver/fsanitize.c to stop this failing on the ARM bot. Approv...
Joey Gouly [Sat, 1 Dec 2012 12:15:28 +0000 (12:15 +0000)]
Add -emit-llvm to test/Driver/fsanitize.c to stop this failing on the ARM bot. Approved by d0k.

llvm-svn: 169088

11 years agoDocumentation: convert WritingAnLLVMBackend.html to reST
Dmitri Gribenko [Sat, 1 Dec 2012 12:13:48 +0000 (12:13 +0000)]
Documentation: convert WritingAnLLVMBackend.html to reST

llvm-svn: 169087

11 years agoAdd .arcconfig to the repository. Useful if someone wants to use phabricator's comman...
Benjamin Kramer [Sat, 1 Dec 2012 12:08:08 +0000 (12:08 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.

llvm-svn: 169086

11 years agoAdd .arcconfig to the repository. Useful if someone wants to use phabricator's comman...
Benjamin Kramer [Sat, 1 Dec 2012 12:07:58 +0000 (12:07 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.

llvm-svn: 169085

11 years agoSROA: Avoid struct and array types early to avoid creating an overly large integer...
Benjamin Kramer [Sat, 1 Dec 2012 11:53:32 +0000 (11:53 +0000)]
SROA: Avoid struct and array types early to avoid creating an overly large integer type.

Fixes PR14465.

Differential Revision: http://llvm-reviews.chandlerc.com/D148

llvm-svn: 169084

11 years agoRevert previous check in r168581, r169079 as they are still in code review status.
Zhou Sheng [Sat, 1 Dec 2012 10:54:28 +0000 (10:54 +0000)]
Revert previous check in r168581, r169079 as they are still in code review status.

llvm-svn: 169083

11 years agoDon't re-add kexts and the kernel each time we get a notification
Jason Molenda [Sat, 1 Dec 2012 06:13:29 +0000 (06:13 +0000)]
Don't re-add kexts and the kernel each time we get a notification
that kexts were newly added.

The Darwin userland dynamic loader provides lldb with a list of
newly-added or newly-removed binaries but in the kernel case we
only know that something has changed.  DynamicLoaderDarwinKernel
really needs to maintain its own persistent list of kexts that
it has been notified about (most importantly, it will not detect
kext unlods) but for now we'll at least avoid re-adding an already
present kext.

<rdar://problem/12658487>, <rdar://problem/12658487>

llvm-svn: 169082

11 years agoBump lldb version num to lldb-178, debugserver version to debugserver-198.
Jason Molenda [Sat, 1 Dec 2012 04:50:09 +0000 (04:50 +0000)]
Bump lldb version num to lldb-178, debugserver version to debugserver-198.

llvm-svn: 169081

11 years agoRead full 64 bits of kernel address when locating a
Jason Molenda [Sat, 1 Dec 2012 04:46:58 +0000 (04:46 +0000)]
Read full 64 bits of kernel address when locating a
64-bit kernel in ProcessGDBRemote.
<rdar://problem/12657369>

llvm-svn: 169080

11 years agoThe patch is to improve the memory footprint of pass GlobalOpt.
Zhou Sheng [Sat, 1 Dec 2012 04:38:53 +0000 (04:38 +0000)]
The patch is to improve the memory footprint of pass GlobalOpt.
Also check in a case to repeat the issue, on which 'opt -globalopt' consumes 1.6GB memory.
The big memory footprint cause is that current GlobalOpt one by one hoists and stores the leaf element constant into the global array, in each iteration, it recreates the global array initializer constant and leave the old initializer alone. This may result in many obsolete constants left.
For example:  we have global array @rom = global [16 x i32] zeroinitializer
After the first element value is hoisted and installed:   @rom = global [16 x i32] [ 1, 0, 0, ... ]
After the second element value is installed:  @rom = global [16 x 32] [ 1, 2, 0, 0, ... ]        // here the previous initializer is obsolete
...
When the transform is done, we have 15 obsolete initializers left useless.

llvm-svn: 169079

11 years agoFix a typo in comment.
Michael Han [Sat, 1 Dec 2012 04:35:48 +0000 (04:35 +0000)]
Fix a typo in comment.

llvm-svn: 169078

11 years agoMake these functions more clearly express the test they are performing. No functional...
Richard Smith [Sat, 1 Dec 2012 03:15:03 +0000 (03:15 +0000)]
Make these functions more clearly express the test they are performing. No functionality change.

llvm-svn: 169077

11 years agoAdd caching to the MemoryMappingLayout class on Linux. This is necessary for the...
Alexander Potapenko [Sat, 1 Dec 2012 02:39:45 +0000 (02:39 +0000)]
Add caching to the MemoryMappingLayout class on Linux. This is necessary for the cases when a sandbox prevents ASan from reading the mappings
from /proc/self/maps.
The mappings are currently being cached on each access to /proc/self/maps. In the future we'll need to add an API that allows the client to notify ASan about the sandbox.

llvm-svn: 169076

11 years agoConsistently use 'needsImplicit<special member>' to determine whether we need
Richard Smith [Sat, 1 Dec 2012 02:35:44 +0000 (02:35 +0000)]
Consistently use 'needsImplicit<special member>' to determine whether we need
an implicit special member, rather than sometimes using '!hasDeclared<special
member>'. No functionality change.

llvm-svn: 169075

11 years agoVMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
NAKAMURA Takumi [Sat, 1 Dec 2012 02:23:45 +0000 (02:23 +0000)]
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().

2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.

llvm-svn: 169074

11 years agoMC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()
Daniel Dunbar [Sat, 1 Dec 2012 01:38:48 +0000 (01:38 +0000)]
MC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()

 - Each macro instantiation introduces a new buffer, and FindBufferForLoc() is
   linear, so previously macro instantiation could be N^2 for some pathological
   inputs.

llvm-svn: 169073

11 years agomisched: Fix RegisterPressureTracker handling of DebugVals.
Andrew Trick [Sat, 1 Dec 2012 01:22:49 +0000 (01:22 +0000)]
misched: Fix RegisterPressureTracker handling of DebugVals.

Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker").
rdar://12790302.

llvm-svn: 169072

11 years agomisched: Fix the DAG builder to handle an undef operand at ExitSU.
Andrew Trick [Sat, 1 Dec 2012 01:22:44 +0000 (01:22 +0000)]
misched: Fix the DAG builder to handle an undef operand at ExitSU.

Assertion failed: (VNI && "No value to read by operand")
rdar://12790267.

llvm-svn: 169071

11 years agomisched: Fix LiveInterval update to better handle DebugVal.
Andrew Trick [Sat, 1 Dec 2012 01:22:41 +0000 (01:22 +0000)]
misched: Fix LiveInterval update to better handle DebugVal.

Assertion failed: (itr != mi2iMap.end() && "Instruction not found in maps.")
rdar://12777252.

llvm-svn: 169070

11 years agomisched: fix RegionBegin when DebugValues get shuffled to the top.
Andrew Trick [Sat, 1 Dec 2012 01:22:38 +0000 (01:22 +0000)]
misched: fix RegionBegin when DebugValues get shuffled to the top.

assert (RemainingInstrs == 0 && "Instruction count mismatch!")

rdar://12776937.

llvm-svn: 169069

11 years agoTry to make the source location information for token pastes a bit more consistent.
Eli Friedman [Sat, 1 Dec 2012 01:15:54 +0000 (01:15 +0000)]
Try to make the source location information for token pastes a bit more consistent.

Fixes a crash printing diagnostics on the gcc testsuite, and also makes
diagnostic range printing print nicer results for token pastes.

llvm-svn: 169068

11 years agoSimplify REG_SEQUENCE lowering.
Jakob Stoklund Olesen [Sat, 1 Dec 2012 01:06:44 +0000 (01:06 +0000)]
Simplify REG_SEQUENCE lowering.

The TwoAddressInstructionPass takes the machine code out of SSA form by
expanding REG_SEQUENCE instructions into copies. It is no longer
necessary to rewrite the registers used by a REG_SEQUENCE instruction
because the new coalescer algorithm can do it now.

REG_SEQUENCE is just converted to a sequence of sub-register copies now.

llvm-svn: 169067

11 years agoRemove restriction on combining ubsan with asan or tsan. This has worked for a while.
Richard Smith [Sat, 1 Dec 2012 01:02:45 +0000 (01:02 +0000)]
Remove restriction on combining ubsan with asan or tsan. This has worked for a while.

llvm-svn: 169066

11 years agoFix the determination of whether a capture refers to an enclosing
Douglas Gregor [Sat, 1 Dec 2012 01:01:09 +0000 (01:01 +0000)]
Fix the determination of whether a capture refers to an enclosing
scope when dealing with nested blocks. Fixes <rdar://problem/12778708>.

llvm-svn: 169065

11 years agoUpdate the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
Michael Ilseman [Sat, 1 Dec 2012 00:42:27 +0000 (00:42 +0000)]
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp

llvm-svn: 169064

11 years agoAdded support for PtrToInt to the IR
Sean Callanan [Sat, 1 Dec 2012 00:09:34 +0000 (00:09 +0000)]
Added support for PtrToInt to the IR
interpreter.

<rdar://problem/12657742>

llvm-svn: 169063

11 years agoAdded logging to the code that determines
Sean Callanan [Sat, 1 Dec 2012 00:08:33 +0000 (00:08 +0000)]
Added logging to the code that determines
whether the current frame is in a C++/Objective-C
class or instance method.

llvm-svn: 169062

11 years agoAdd some first skeleton work for the DWARF5 Fission proposal. Emit
Eric Christopher [Fri, 30 Nov 2012 23:59:06 +0000 (23:59 +0000)]
Add some first skeleton work for the DWARF5 Fission proposal. Emit
part of the compile unit CU and start separating out information into
the various sections that will be pulled out later.

WIP.

llvm-svn: 169061

11 years agoConvert COPY instructions into KILLs if they have implicit defs.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 23:53:00 +0000 (23:53 +0000)]
Convert COPY instructions into KILLs if they have implicit defs.

MachineCopyPropagation doesn't understand super-register liveness well
enough to be able to remove implicit defs of super-registers.

This fixes a problem in ARM/2012-01-26-CopyPropKills.ll that is exposed
by an future TwoAddressInstructionPass change. The KILL instructions are
removed before the machine code is emitted.

llvm-svn: 169060

11 years agoDon't emit a warning with an input/output parameter. We assume the user knows what...
Bill Wendling [Fri, 30 Nov 2012 23:46:56 +0000 (23:46 +0000)]
Don't emit a warning with an input/output parameter. We assume the user knows what they're doing here.

llvm-svn: 169059

11 years agoFix test for Windows path separators
Douglas Gregor [Fri, 30 Nov 2012 23:40:49 +0000 (23:40 +0000)]
Fix test for Windows path separators

llvm-svn: 169058

11 years agoTeach the serialized diagnostic writer to clone() itself, sharing
Douglas Gregor [Fri, 30 Nov 2012 23:32:31 +0000 (23:32 +0000)]
Teach the serialized diagnostic writer to clone() itself, sharing
state so that all of the various clones end up rendering their
diagnostics into the same serialized-diagnostics file. This is
important when we actually want failures during module build to be
reported back to the translation unit that tried to import the
not-yet-built or out-of-date module. <rdar://problem/12565727>

llvm-svn: 169057

11 years agoAdd support for fission attributes/forms/operations -> string.
Eric Christopher [Fri, 30 Nov 2012 23:20:43 +0000 (23:20 +0000)]
Add support for fission attributes/forms/operations -> string.

llvm-svn: 169056

11 years agoVim mode updated to recognize fast-math flags
Michael Ilseman [Fri, 30 Nov 2012 23:18:21 +0000 (23:18 +0000)]
Vim mode updated to recognize fast-math flags

llvm-svn: 169055

11 years agoDon't warn if the input size is less than the register size. Also don't warn if
Bill Wendling [Fri, 30 Nov 2012 23:18:12 +0000 (23:18 +0000)]
Don't warn if the input size is less than the register size. Also don't warn if
the output size is greater than the register size. No truncation occurs with
those. Reword warning to make it clearer what's the problem is.

llvm-svn: 169054

11 years agoRemoved redundancy in wording
Michael Ilseman [Fri, 30 Nov 2012 23:14:52 +0000 (23:14 +0000)]
Removed redundancy in wording

llvm-svn: 169053

11 years agoClean up the documentation to have a common description area for fast-math flags.
Michael Ilseman [Fri, 30 Nov 2012 23:12:42 +0000 (23:12 +0000)]
Clean up the documentation to have a common description area for fast-math flags.

llvm-svn: 169052

11 years agoMake -Wtautological-constant-out-of-range-compare behave sanely for enums with a...
Eli Friedman [Fri, 30 Nov 2012 23:09:29 +0000 (23:09 +0000)]
Make -Wtautological-constant-out-of-range-compare behave sanely for enums with a signed fixed type.
<rdar://problem/12780159>.

llvm-svn: 169051

11 years agoBe more clear on what parts of code I own.
Bill Wendling [Fri, 30 Nov 2012 23:00:25 +0000 (23:00 +0000)]
Be more clear on what parts of code I own.

llvm-svn: 169050

11 years agoreversed the logic of the log2 detection routine to reduce the number of nested ifs
Pedro Artigas [Fri, 30 Nov 2012 22:47:15 +0000 (22:47 +0000)]
reversed the logic of the log2 detection routine to reduce the number of nested ifs

llvm-svn: 169049

11 years agominor cleanups
Nadav Rotem [Fri, 30 Nov 2012 22:37:11 +0000 (22:37 +0000)]
minor cleanups

llvm-svn: 169048

11 years agoFix a bug in APFloat.cpp: declare APFloat after fltSemantics it
Alexey Samsonov [Fri, 30 Nov 2012 22:27:54 +0000 (22:27 +0000)]
Fix a bug in APFloat.cpp: declare APFloat after fltSemantics it
uses. APFloat::convert() takes the pointer to the fltSemantics
variable, which is later accessed it in ~APFloat() desctructor.
That is, semantics must still be alive at the moment we delete
APFloat.

Found by experimental AddressSanitizer use-after-scope checker.

llvm-svn: 169047

11 years agoAdd me as LTO code owner.
Bill Wendling [Fri, 30 Nov 2012 22:15:08 +0000 (22:15 +0000)]
Add me as LTO code owner.

llvm-svn: 169046

11 years agoRename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!
Douglas Gregor [Fri, 30 Nov 2012 22:11:57 +0000 (22:11 +0000)]
Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!

llvm-svn: 169045

11 years agoReplace r168930 with a more reasonable patch.
Bill Wendling [Fri, 30 Nov 2012 22:08:55 +0000 (22:08 +0000)]
Replace r168930 with a more reasonable patch.

The original patch removed a bunch of code that the SjLjEHPrepare pass placed
into the entry block if all of the landing pads were removed during the
CodeGenPrepare class. The more natural way of doing things is to run the CGP
*before* we run the SjLjEHPrepare pass.

Make it so!

llvm-svn: 169044

11 years agoAddresses many style issues with prior checkin (r169025)
Pedro Artigas [Fri, 30 Nov 2012 22:07:05 +0000 (22:07 +0000)]
Addresses many style issues with prior checkin (r169025)

llvm-svn: 169043

11 years agoWhen we're emitting a diagnostic with a source location in an imported
Douglas Gregor [Fri, 30 Nov 2012 21:58:49 +0000 (21:58 +0000)]
When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for
an include stack, e.g.,

In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module

<rdar://problem/12696425>

llvm-svn: 169042

11 years agoFixing a precedence issue with my previous commit.
Aaron Ballman [Fri, 30 Nov 2012 21:44:01 +0000 (21:44 +0000)]
Fixing a precedence issue with my previous commit.

llvm-svn: 169041

11 years agoAdd a -time-compilations=<N> option to llc.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:47 +0000 (21:42 +0000)]
Add a -time-compilations=<N> option to llc.

This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.

llvm-svn: 169040

11 years agoAggregate pass execution time report by pass ID instead of pass instance.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:45 +0000 (21:42 +0000)]
Aggregate pass execution time report by pass ID instead of pass instance.

This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.

llvm-svn: 169039

11 years agolit: Add a simple test suite for checking test runner parallelism.
Daniel Dunbar [Fri, 30 Nov 2012 21:34:04 +0000 (21:34 +0000)]
lit: Add a simple test suite for checking test runner parallelism.

llvm-svn: 169038

11 years agoFixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a...
Aaron Ballman [Fri, 30 Nov 2012 21:15:20 +0000 (21:15 +0000)]
Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.

llvm-svn: 169037

11 years ago[CMake] Add support for selecting which c++ abi library to use.
Michael J. Spencer [Fri, 30 Nov 2012 21:02:29 +0000 (21:02 +0000)]
[CMake] Add support for selecting which c++ abi library to use.

llvm-svn: 169036

11 years agoSave and restore terminal state when lldb is suspended with SIGTSTP and resumed with...
Jim Ingham [Fri, 30 Nov 2012 20:23:19 +0000 (20:23 +0000)]
Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.

llvm-svn: 169032

11 years ago<rdar://problem/12676084> Dump the traceback when a Python error occurs in "command...
Enrico Granata [Fri, 30 Nov 2012 20:15:16 +0000 (20:15 +0000)]
<rdar://problem/12676084> Dump the traceback when a Python error occurs in "command script import" and the exception is not an ImportError

llvm-svn: 169031

11 years agoComments: no need to escape any characters in \code ... \endcode.
Dmitri Gribenko [Fri, 30 Nov 2012 20:04:39 +0000 (20:04 +0000)]
Comments: no need to escape any characters in \code ... \endcode.

llvm-svn: 169030

11 years agotsan: fix int overflow and several instances where tid is used with ignore
Dmitry Vyukov [Fri, 30 Nov 2012 20:02:11 +0000 (20:02 +0000)]
tsan: fix int overflow and several instances where tid is used with ignore

llvm-svn: 169029

11 years agoSupport for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic!
Aaron Ballman [Fri, 30 Nov 2012 19:52:30 +0000 (19:52 +0000)]
Support for #pragma region/endregion for MSVC compatibility.  Patch thanks to pravic!

llvm-svn: 169028

11 years agoActually keep track of the source locations at which particular module
Douglas Gregor [Fri, 30 Nov 2012 19:28:05 +0000 (19:28 +0000)]
Actually keep track of the source locations at which particular module
files are loaded.

llvm-svn: 169027

11 years agotest/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.
Chad Rosier [Fri, 30 Nov 2012 19:15:10 +0000 (19:15 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.

llvm-svn: 169026

11 years agoAdd fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X
Pedro Artigas [Fri, 30 Nov 2012 19:09:41 +0000 (19:09 +0000)]
Add fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X

reviewed by Michael Ilseman <milseman@apple.com>

llvm-svn: 169025

11 years agoCodegen failure for vmull with small vectors
Sebastian Pop [Fri, 30 Nov 2012 19:08:04 +0000 (19:08 +0000)]
Codegen failure for vmull with small vectors

Codegen was failing with an assertion because of unexpected vector
operands when legalizing the selection DAG for a MUL instruction.

The asserting code was legalizing multiplies for vectors of size 128
bits. It uses a custom lowering to try and detect cases where it can
use a VMULL instruction instead of a VMOVL + VMUL.  The code was
looking for input operands to the MUL that had been sign or zero
extended. If it found the extended operands it would drop the
sign/zero extension and use the original vector size as input to a
VMULL instruction.

The code assumed that the original input vector was 64 bits so that
after dropping the extension it would fit directly into a D register
and could be used as an operand of a VMULL instruction. The input
code that trigger the failure used a vector of <4 x i8> that was
sign extended to <4 x i32>. It was not safe to drop the sign
extension in this case because the original vector is only 32 bits
wide. The fix is to insert a sign extension for the vector to reach
the required 64 bit size. In this particular example, the vector would
need to be sign extented to a <4 x i16>.

llvm-svn: 169024

11 years agoAdded new options to "target create" and "target modules add".
Greg Clayton [Fri, 30 Nov 2012 19:05:35 +0000 (19:05 +0000)]
Added new options to "target create" and "target modules add".

For "target create" you can now specify "--no-dependents" to not track down and add all dependent shared libraries. This can be handy when doing manual symbolication. Also added the "--symfile" or "-s" for short so you can specify a module and a stand alone debug info file:

(lldb) target create --symfile /tmp/a.dSYM /usr/bin/a

Added the "--symfile" option to the "target modules add" for the same reason. These all help with manualy symbolication and expose functionality that was previously only available through the public API layer.

llvm-svn: 169023

11 years ago__list::ends_with_template was giving the wrong answer for empty lists. And __parse_...
Howard Hinnant [Fri, 30 Nov 2012 18:43:50 +0000 (18:43 +0000)]
__list::ends_with_template was giving the wrong answer for empty lists.  And __parse_unnamed_type_name wasn't properly handling the list of paramters and was not safe against incorrectly mangled lambdas (running past last).

llvm-svn: 169022

11 years agoWhen an error occurs while building a module on demand, provide "While
Douglas Gregor [Fri, 30 Nov 2012 18:38:50 +0000 (18:38 +0000)]
When an error occurs while building a module on demand, provide "While
building module 'Foo' imported from..." notes (the same we we provide
"In file included from..." notes) in the diagnostic, so that we know
how this module got included in the first place. This is part of
<rdar://problem/12696425>.

llvm-svn: 169021

11 years agotest/CodeGen/PowerPC/vec_mul.ll: Fix register operands.
Chad Rosier [Fri, 30 Nov 2012 18:29:01 +0000 (18:29 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Fix register operands.

llvm-svn: 169020

11 years agotsan: suppress weird race reports when JVM is embed into the process
Dmitry Vyukov [Fri, 30 Nov 2012 17:45:53 +0000 (17:45 +0000)]
tsan: suppress weird race reports when JVM is embed into the process

llvm-svn: 169019

11 years agoUse multiclass for the load instructions with MEMri operand.
Jyotsna Verma [Fri, 30 Nov 2012 17:31:52 +0000 (17:31 +0000)]
Use multiclass for the load instructions with MEMri operand.

llvm-svn: 169018

11 years agotsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for...
Dmitry Vyukov [Fri, 30 Nov 2012 17:27:58 +0000 (17:27 +0000)]
tsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for dlopen'ed modules)

llvm-svn: 169017

11 years agoRemove the use of LPPassManager. We can remove LPM because we dont need to run any...
Nadav Rotem [Fri, 30 Nov 2012 17:27:53 +0000 (17:27 +0000)]
Remove the use of LPPassManager. We can remove LPM because we dont need to run any additional loop passes on the new vector loop.

llvm-svn: 169016

11 years agotsan: add sanity checks into memory allocator
Dmitry Vyukov [Fri, 30 Nov 2012 17:26:50 +0000 (17:26 +0000)]
tsan: add sanity checks into memory allocator

llvm-svn: 169015

11 years agoClean up whitespace and add comments
Eli Bendersky [Fri, 30 Nov 2012 14:22:14 +0000 (14:22 +0000)]
Clean up whitespace and add comments

llvm-svn: 169002

11 years agoMake FileCheck return 2 in case of an error as documented,
Eli Bendersky [Fri, 30 Nov 2012 13:51:33 +0000 (13:51 +0000)]
Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)

llvm-svn: 169001

11 years agoAllow matchers to access the ASTContext.
Manuel Klimek [Fri, 30 Nov 2012 13:45:19 +0000 (13:45 +0000)]
Allow matchers to access the ASTContext.

Patch by Edwin Vane.

llvm-svn: 169000

11 years agotest/CodeGen/PowerPC: Add explicit -march=ppc32.
NAKAMURA Takumi [Fri, 30 Nov 2012 13:28:31 +0000 (13:28 +0000)]
test/CodeGen/PowerPC: Add explicit -march=ppc32.

FIXME: Please add another RUN line if you would like to check also on ppc64.
llvm-svn: 168999