platform/upstream/llvm.git
11 years agotsan: flush dead thread info earlier (when another thread is finished rather than...
Dmitry Vyukov [Tue, 19 Mar 2013 12:25:48 +0000 (12:25 +0000)]
tsan: flush dead thread info earlier (when another thread is finished rather than new thread is created)

llvm-svn: 177394

11 years agotsan: instruct malloc() to consume less memory
Dmitry Vyukov [Tue, 19 Mar 2013 12:24:19 +0000 (12:24 +0000)]
tsan: instruct malloc() to consume less memory

llvm-svn: 177393

11 years agoAdd virtual destructors to fix -Wnon-virtual-dtor warnings
Alexey Samsonov [Tue, 19 Mar 2013 11:41:16 +0000 (11:41 +0000)]
Add virtual destructors to fix -Wnon-virtual-dtor warnings

llvm-svn: 177392

11 years ago[ASan] Make -fsanitize=address always imply -fsanitize=init-order
Alexey Samsonov [Tue, 19 Mar 2013 10:48:37 +0000 (10:48 +0000)]
[ASan] Make -fsanitize=address always imply -fsanitize=init-order

llvm-svn: 177391

11 years agollvm-symbolizer: flush internal caches functionality
Dmitry Vyukov [Tue, 19 Mar 2013 10:24:42 +0000 (10:24 +0000)]
llvm-symbolizer: flush internal caches functionality

llvm-svn: 177390

11 years agotsan: symbolizer "flush caches" support
Dmitry Vyukov [Tue, 19 Mar 2013 10:24:01 +0000 (10:24 +0000)]
tsan: symbolizer "flush caches" support

llvm-svn: 177389

11 years agotsan: symbolizer "flush caches" functinality
Dmitry Vyukov [Tue, 19 Mar 2013 10:23:17 +0000 (10:23 +0000)]
tsan: symbolizer "flush caches" functinality

llvm-svn: 177388

11 years agotsan: fix memory leak
Dmitry Vyukov [Tue, 19 Mar 2013 10:22:33 +0000 (10:22 +0000)]
tsan: fix memory leak

llvm-svn: 177387

11 years agoThe testing to ensure a vector of zeros of type floating point isn't misclassified...
David Tweed [Tue, 19 Mar 2013 10:16:40 +0000 (10:16 +0000)]
The testing to ensure a vector of zeros of type floating point isn't misclassified as negative zero can be simplified, as pointed out by Duncan Sands.

llvm-svn: 177386

11 years agoEnable -Wnon-virtual-dtor build warning
Alexey Samsonov [Tue, 19 Mar 2013 10:10:03 +0000 (10:10 +0000)]
Enable -Wnon-virtual-dtor build warning

llvm-svn: 177385

11 years ago[sanitizer] Avoid use of uintptr_t.
Evgeniy Stepanov [Tue, 19 Mar 2013 09:39:15 +0000 (09:39 +0000)]
[sanitizer] Avoid use of uintptr_t.

llvm-svn: 177384

11 years ago[sanitizer] Don't adjust the size of the user-allocated stack.
Evgeniy Stepanov [Tue, 19 Mar 2013 09:30:52 +0000 (09:30 +0000)]
[sanitizer] Don't adjust the size of the user-allocated stack.

Moved this code to sanitizer_common.

llvm-svn: 177383

11 years agoSupport CMake build of profile runtime library on Linux
Alexey Samsonov [Tue, 19 Mar 2013 09:17:35 +0000 (09:17 +0000)]
Support CMake build of profile runtime library on Linux

llvm-svn: 177382

11 years agotsan: do not allocate sync vars on relaxed atomic operations
Dmitry Vyukov [Tue, 19 Mar 2013 09:15:31 +0000 (09:15 +0000)]
tsan: do not allocate sync vars on relaxed atomic operations
helps to reduce memory consumption if an atomic is used only with relaxed ops (stats)

llvm-svn: 177381

11 years agoImprove long vector sext/zext lowering on ARM
Renato Golin [Tue, 19 Mar 2013 08:15:38 +0000 (08:15 +0000)]
Improve long vector sext/zext lowering on ARM

The ARM backend currently has poor codegen for long sext/zext
operations, such as v8i8 -> v8i32. This patch addresses this
by performing a custom expansion in ARMISelLowering. It also
adds/changes the cost of such lowering in ARMTTI.

This partially addresses PR14867.

Patch by Pete Couperus

llvm-svn: 177380

11 years agoDon't reserve R31 on PPC64 unless the frame pointer is needed
Hal Finkel [Tue, 19 Mar 2013 08:09:38 +0000 (08:09 +0000)]
Don't reserve R31 on PPC64 unless the frame pointer is needed

llvm-svn: 177379

11 years agoAdd a clarifying note when a return statement is rejected because
John McCall [Tue, 19 Mar 2013 07:04:25 +0000 (07:04 +0000)]
Add a clarifying note when a return statement is rejected because
we expect a related result type.

rdar://12493140

llvm-svn: 177378

11 years agoRevert "Cleanup some SCEV logic a bit."
Andrew Trick [Tue, 19 Mar 2013 05:10:27 +0000 (05:10 +0000)]
Revert "Cleanup some SCEV logic a bit."

This reverts commit 82cd8f7382322bee7a71cdc31f7a923c44d37d32.

Just add a comment instead!

llvm-svn: 177377

11 years agoMore cleanup on the lldb-perf code:
Greg Clayton [Tue, 19 Mar 2013 04:41:22 +0000 (04:41 +0000)]
More cleanup on the lldb-perf code:
- TestCase.m_thread is now filled in with the first thread that has a valid
  stop reason. This eliminates the need for the SelectMyThread() functions.
- The first thread that stops for a reason is also set as the selected thread
  in the process in case any command line commands are run.
- Changed launch over to take a SBLaunchInfo parameter so that the launch
  function doesn't keep getting new arguments as they are needed.
- TestCase::Setup() and TestCase::Launch(SBLaunchInfo) now return bool to
  indicate success of setup and launch.
- ActionWanted::Next(SBThread) was renamed to ActionWanted::StepOver(SBThread)
- ActionWanted::Finish(SBThread) was renamed to ActionWanted::StepOut(SBThread)

llvm-svn: 177376

11 years agoCleanup some SCEV logic a bit.
Andrew Trick [Tue, 19 Mar 2013 04:14:59 +0000 (04:14 +0000)]
Cleanup some SCEV logic a bit.

Make the code more obvious to scan-build and humans.

llvm-svn: 177375

11 years agoTighten up an internal LSR API that should check for NULL.
Andrew Trick [Tue, 19 Mar 2013 04:14:57 +0000 (04:14 +0000)]
Tighten up an internal LSR API that should check for NULL.

No test case, but should fix a scan_build warning.

llvm-svn: 177374

11 years agoFixed handling of function pointers in the IR
Sean Callanan [Tue, 19 Mar 2013 01:45:02 +0000 (01:45 +0000)]
Fixed handling of function pointers in the IR
interpreter.  They now have correct values, even
when the process is not running.

llvm-svn: 177372

11 years agoEmit the linkage name instead of the function name, when available. This means
Nick Lewycky [Tue, 19 Mar 2013 01:37:55 +0000 (01:37 +0000)]
Emit the linkage name instead of the function name, when available. This means
that we'll prefer to emit the mangled C++ name (pending a clang change).

llvm-svn: 177371

11 years agoRemove stray semicolon
Douglas Gregor [Tue, 19 Mar 2013 00:41:04 +0000 (00:41 +0000)]
Remove stray semicolon

llvm-svn: 177370

11 years agoMinor optimization to r177367 to treat a module with missing dependencies as out...
Douglas Gregor [Tue, 19 Mar 2013 00:38:50 +0000 (00:38 +0000)]
Minor optimization to r177367 to treat a module with missing dependencies as out-of-date rather than missing.

llvm-svn: 177369

11 years agoFinish refactoring the tool selection logic.
Rafael Espindola [Tue, 19 Mar 2013 00:36:57 +0000 (00:36 +0000)]
Finish refactoring the tool selection logic.

The general pattern now is that Foobar::constructTool only creates tools
defined in the tools::foobar namespace and then delegates to the parent.

The remaining duplicated code is now in the tools themselves.

llvm-svn: 177368

11 years ago<rdar://problem/13363214> Eliminate race condition between module rebuild and the...
Douglas Gregor [Tue, 19 Mar 2013 00:28:20 +0000 (00:28 +0000)]
<rdar://problem/13363214> Eliminate race condition between module rebuild and the global module index.

The global module index was querying the file manager for each of the
module files it knows about at load time, to prune out any out-of-date
information. The file manager would then cache the results of the
stat() falls used to find that module file.

Later, the same translation unit could end up trying to import one of the
module files that had previously been ignored by the module cache, but
after some other Clang instance rebuilt the module file to bring it
up-to-date. The stale stat() results in the file manager would
trigger a second rebuild of the already-up-to-date module, causing
failures down the line.

The global module index now lazily resolves its module file references
to actual AST reader module files only after the module file has been
loaded, eliminating the stat-caching race. Moreover, the AST reader
can communicate to its caller that a module file is missing (rather
than simply being out-of-date), allowing us to simplify the
module-loading logic and allowing the compiler to recover if a
dependent module file ends up getting deleted.

llvm-svn: 177367

11 years agoThis checkin removes the last Cocoa formatters that were implemented in Python and...
Enrico Granata [Tue, 19 Mar 2013 00:27:22 +0000 (00:27 +0000)]
This checkin removes the last Cocoa formatters that were implemented in Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters

llvm-svn: 177366

11 years ago<rdar://problem/13443931>
Greg Clayton [Tue, 19 Mar 2013 00:20:55 +0000 (00:20 +0000)]
<rdar://problem/13443931>

Fixed a crasher in the SourceManager where it wasn't checking the m_target member variable for NULL.

In doing this fix, I hardened this class to have weak pointers to the debugger and target in case they do go away. I also changed SBSourceManager to hold onto weak pointers to the debugger and target so they don't keep objects alive by holding a strong reference to them.

llvm-svn: 177365

11 years agoRefactored the expression parser so that the IR
Sean Callanan [Tue, 19 Mar 2013 00:10:07 +0000 (00:10 +0000)]
Refactored the expression parser so that the IR
and the JITted code are managed by a standalone
class that handles memory management itself.

I have removed RecordingMemoryManager and
ProcessDataAllocator, which filled similar roles
and had confusing ownership, with a common class
called IRExecutionUnit.  The IRExecutionUnit
manages all allocations ever made for an expression
and frees them when it goes away.  It also contains
the code generator and can vend the Module for an
expression to other clases.

The end goal here is to make the output of the
expression parser re-usable; that is, to avoid
re-parsing when re-parsing isn't necessary.

I've also cleaned up some code and used weak pointers
in more places.  Please let me know if you see any
leaks; I checked myself as well but I might have
missed a case.

llvm-svn: 177364

11 years agoUpdate ubsan test for clang change r177362.
Richard Smith [Tue, 19 Mar 2013 00:04:20 +0000 (00:04 +0000)]
Update ubsan test for clang change r177362.

llvm-svn: 177363

11 years agoPR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
Richard Smith [Tue, 19 Mar 2013 00:01:12 +0000 (00:01 +0000)]
PR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.

llvm-svn: 177362

11 years agoFix a sign-extension bug in PPCCTRLoops
Hal Finkel [Mon, 18 Mar 2013 23:58:28 +0000 (23:58 +0000)]
Fix a sign-extension bug in PPCCTRLoops

Don't sign extend the immediate value from the OR instruction in
an LIS/OR pair.

llvm-svn: 177361

11 years agoCentralize the logic for using the integrated assembler.
Rafael Espindola [Mon, 18 Mar 2013 23:56:07 +0000 (23:56 +0000)]
Centralize the logic for using the integrated assembler.

llvm-svn: 177360

11 years ago[libclang] Modify clang_getCursorType to be able to handle a function template decl.
Argyrios Kyrtzidis [Mon, 18 Mar 2013 23:54:50 +0000 (23:54 +0000)]
[libclang] Modify clang_getCursorType to be able to handle a function template decl.

llvm-svn: 177359

11 years agodocumentation comment parsing. Added couple of
Fariborz Jahanian [Mon, 18 Mar 2013 23:45:52 +0000 (23:45 +0000)]
documentation comment parsing. Added couple of
top-level HeaderDoc tags @functiongroup and
@methodgroup to doc. tags recognized.
// rdar://12379114

llvm-svn: 177358

11 years agoMove #include of BitVector from .h to .cpp file.
Jakub Staszak [Mon, 18 Mar 2013 23:45:45 +0000 (23:45 +0000)]
Move #include of BitVector from .h to .cpp file.
Also remove unneeded #include and forward declaration.

llvm-svn: 177357

11 years agoAdd some constantness.
Jakub Staszak [Mon, 18 Mar 2013 23:40:46 +0000 (23:40 +0000)]
Add some constantness.

llvm-svn: 177356

11 years agoFix bug in test; found by AddressSanitizer
Marshall Clow [Mon, 18 Mar 2013 23:39:36 +0000 (23:39 +0000)]
Fix bug in test; found by AddressSanitizer

llvm-svn: 177355

11 years agoDiagnose uses of 'alignof' on functions in -pedantic mode.
Richard Smith [Mon, 18 Mar 2013 23:37:25 +0000 (23:37 +0000)]
Diagnose uses of 'alignof' on functions in -pedantic mode.

llvm-svn: 177354

11 years ago[analyzer] Do part of the work to find shortest bug paths up front.
Jordan Rose [Mon, 18 Mar 2013 23:34:37 +0000 (23:34 +0000)]
[analyzer] Do part of the work to find shortest bug paths up front.

Splitting the graph trimming and the path-finding (r177216) already
recovered quite a bit of performance lost to increased suppression.
We can still do better by also performing the reverse BFS up front
(needed for shortest-path-finding) and only walking the shortest path
for each report. This does mean we have to walk back up the path and
invalidate all the BFS numbers if the report turns out to be invalid,
but it's probably still faster than redoing the full BFS every time.

More performance work for <rdar://problem/13433687>

llvm-svn: 177353

11 years ago[analyzer] Replace uses of assume() with isNull() in BR visitors.
Jordan Rose [Mon, 18 Mar 2013 23:34:32 +0000 (23:34 +0000)]
[analyzer] Replace uses of assume() with isNull() in BR visitors.

Also, replace a std::string with a SmallString.

No functionality change.

llvm-svn: 177352

11 years agoRemove unneeded #includes.
Jakub Staszak [Mon, 18 Mar 2013 23:33:44 +0000 (23:33 +0000)]
Remove unneeded #includes.

llvm-svn: 177351

11 years agoMake methods const.
Jakub Staszak [Mon, 18 Mar 2013 23:33:14 +0000 (23:33 +0000)]
Make methods const.

llvm-svn: 177350

11 years agoTest case for r177347.
Chad Rosier [Mon, 18 Mar 2013 23:32:33 +0000 (23:32 +0000)]
Test case for r177347.

llvm-svn: 177349

11 years agoMake method private. Keep coding standard.
Jakub Staszak [Mon, 18 Mar 2013 23:31:30 +0000 (23:31 +0000)]
Make method private. Keep coding standard.

llvm-svn: 177348

11 years ago[ms-inline asm] Avoid emitting a redundant sizing directive, if we've already
Chad Rosier [Mon, 18 Mar 2013 23:31:24 +0000 (23:31 +0000)]
[ms-inline asm] Avoid emitting a redundant sizing directive, if we've already
parsed one.  Test case coming shortly.
rdar://13446980

llvm-svn: 177347

11 years agoFixed the README to match the current code.
Greg Clayton [Mon, 18 Mar 2013 23:25:00 +0000 (23:25 +0000)]
Fixed the README to match the current code.

llvm-svn: 177346

11 years agoPR15539: Record "evaluating if/elif condition" flag in the right place
David Blaikie [Mon, 18 Mar 2013 23:22:28 +0000 (23:22 +0000)]
PR15539: Record "evaluating if/elif condition" flag in the right place

The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.

llvm-svn: 177345

11 years agoUpdate testcase for r177340.
Bill Wendling [Mon, 18 Mar 2013 23:11:54 +0000 (23:11 +0000)]
Update testcase for r177340.

llvm-svn: 177344

11 years agoAdd a comment about how to add a target for a test case.
Jim Ingham [Mon, 18 Mar 2013 23:08:30 +0000 (23:08 +0000)]
Add a comment about how to add a target for a test case.

llvm-svn: 177343

11 years agoChange NULL to 0.
Jakub Staszak [Mon, 18 Mar 2013 23:08:01 +0000 (23:08 +0000)]
Change NULL to 0.

llvm-svn: 177342

11 years agoMove the performance test cases into their own project.
Jim Ingham [Mon, 18 Mar 2013 23:05:00 +0000 (23:05 +0000)]
Move the performance test cases into their own project.

llvm-svn: 177341

11 years agoRegister the flush function for each compile unit.
Bill Wendling [Mon, 18 Mar 2013 23:04:39 +0000 (23:04 +0000)]
Register the flush function for each compile unit.

For each compile unit, we want to register a function that will flush that
compile unit. Otherwise, __gcov_flush() would only flush the counters within the
current compile unit, and not any outside of it.

PR15191 & <rdar://problem/13167507>

llvm-svn: 177340

11 years agoRemove trailing spaces.
Jakub Staszak [Mon, 18 Mar 2013 23:04:30 +0000 (23:04 +0000)]
Remove trailing spaces.

llvm-svn: 177339

11 years agoFix PPC unaligned 64-bit loads and stores
Hal Finkel [Mon, 18 Mar 2013 23:00:58 +0000 (23:00 +0000)]
Fix PPC unaligned 64-bit loads and stores

PPC64 supports unaligned loads and stores of 64-bit values, but
in order to use the r+i forms, the offset must be a multiple of 4.
Unfortunately, this cannot always be determined by examining the
immediate itself because it might be available only via a TOC entry.

In order to get around this issue, we additionally predicate the
selection of the r+i form on the alignment of the load or store
(forcing it to be at least 4 in order to select the r+i form).

llvm-svn: 177338

11 years agoAdd some GCOV functions that register all of the __llvm_gcov_flush() functions.
Bill Wendling [Mon, 18 Mar 2013 22:59:47 +0000 (22:59 +0000)]
Add some GCOV functions that register all of the __llvm_gcov_flush() functions.

The __llvm_gcov_flush() functions only work for the local compile unit. However,
when __gcov_flush() is called, the user expects all of the counters to be
flushed, not just the ones in the current compile unit.

This adds some library functions that register the flush functions. It also
defined __gcov_flush() so that loops through that list and calls the functions.

PR15191 & <rdar://problem/13167507>

llvm-svn: 177337

11 years ago[frontend] Initialize the diagnostic client before loading an ast file.
Argyrios Kyrtzidis [Mon, 18 Mar 2013 22:55:24 +0000 (22:55 +0000)]
[frontend] Initialize the diagnostic client before loading an ast file.

Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377

llvm-svn: 177336

11 years agoAdd missing diagnostic for a nested-name-specifier on a free-standing type definition...
Richard Smith [Mon, 18 Mar 2013 22:52:47 +0000 (22:52 +0000)]
Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.

llvm-svn: 177335

11 years agoARM cost model: Make some vector integer to float casts cheaper
Arnold Schwaighofer [Mon, 18 Mar 2013 22:47:09 +0000 (22:47 +0000)]
ARM cost model: Make some vector integer to float casts cheaper

The default logic marks them as too expensive.

For example, before this patch we estimated:
  cost of 16 for instruction:   %r = uitofp <4 x i16> %v0 to <4 x float>

While this translates to:
  vmovl.u16 q8, d16
  vcvt.f32.u32  q8, q8

All other costs are left to the values assigned by the fallback logic. Theses
costs are mostly reasonable in the sense that they get progressively more
expensive as the instruction sequences emitted get longer.

radar://13445992

llvm-svn: 177334

11 years agoARM cost model: Correct cost for some cheap float to integer conversions
Arnold Schwaighofer [Mon, 18 Mar 2013 22:47:06 +0000 (22:47 +0000)]
ARM cost model: Correct cost for some cheap float to integer conversions

Fix cost of some "cheap" cast instructions. Before this patch we used to
estimate for example:
  cost of 16 for instruction:   %r = fptoui <4 x float> %v0 to <4 x i16>

While we would emit:
  vcvt.s32.f32  q8, q8
  vmovn.i32 d16, q8
  vuzp.8  d16, d17

All other costs are left to the values assigned by the fallback logic. Theses
costs are mostly reasonable in the sense that they get progressively more
expensive as the instruction sequences emitted get longer.

radar://13434072

llvm-svn: 177333

11 years agoCode cleanup:
Greg Clayton [Mon, 18 Mar 2013 22:34:00 +0000 (22:34 +0000)]
Code cleanup:
- don't use preprocessor macros
- use switch statements
- don't put anything in the lldb namespace, use "lldb_perf" namespace.
- Pass the action struct into each TestStep() for each step fill in
- Modify the ActionWanted class to have accessors to make the continue, next, finish, kill instead of using preproc macros

llvm-svn: 177332

11 years agoExtend global merge pass to optionally consider global constant variables.
Quentin Colombet [Mon, 18 Mar 2013 22:30:07 +0000 (22:30 +0000)]
Extend global merge pass to optionally consider global constant variables.
Also add some checks to not merge globals used within landing pad instructions or marked as "used".

llvm-svn: 177331

11 years ago[PCH] Fix assertion hit related to enum decls inside templated funtions.
Argyrios Kyrtzidis [Mon, 18 Mar 2013 22:23:49 +0000 (22:23 +0000)]
[PCH] Fix assertion hit related to enum decls inside templated funtions.

Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020

llvm-svn: 177330

11 years agoThis code works around what appears to be a bug in another part of clang.
Reed Kotler [Mon, 18 Mar 2013 22:18:00 +0000 (22:18 +0000)]
This code works around what appears to be a bug in another part of clang.
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.

llvm-svn: 177329

11 years agoChange test cases to handle unaligned references.
Bill Schmidt [Mon, 18 Mar 2013 22:12:04 +0000 (22:12 +0000)]
Change test cases to handle unaligned references.

Hal Finkel recently added code to allow unaligned memory references
for PowerPC.  Two tests were temporarily modified with
-disable-ppc-unaligned to keep them from failing.  This patch adjusts
the expected code generation for the unaligned references.

llvm-svn: 177328

11 years agoRemove unnecessary leading comment characters in lit-only file
David Blaikie [Mon, 18 Mar 2013 22:08:16 +0000 (22:08 +0000)]
Remove unnecessary leading comment characters in lit-only file

llvm-svn: 177327

11 years agoAdd SchedRW annotations to most of X86InstrSSE.td.
Jakob Stoklund Olesen [Mon, 18 Mar 2013 22:01:35 +0000 (22:01 +0000)]
Add SchedRW annotations to most of X86InstrSSE.td.

We hitch a ride with the existing OpndItins class that was used to add
instruction itinerary classes in the many multiclasses in this file.

Use the link provided by the X86FoldableSchedWrite.Folded to find the
right SchedWrite for folded loads.

llvm-svn: 177326

11 years agoAdd a linebreak. Linebreaks are cool.
Richard Smith [Mon, 18 Mar 2013 21:57:52 +0000 (21:57 +0000)]
Add a linebreak. Linebreaks are cool.

llvm-svn: 177325

11 years agoC++11 status: mark 'extended integral types' as N/A, since we don't support
Richard Smith [Mon, 18 Mar 2013 21:44:56 +0000 (21:44 +0000)]
C++11 status: mark 'extended integral types' as N/A, since we don't support
any, and add a note that we cannot treat __int128 as an extended integral type.

llvm-svn: 177324

11 years agoAnnotate X86 arithmetic instructions with SchedRW lists.
Jakob Stoklund Olesen [Mon, 18 Mar 2013 21:32:39 +0000 (21:32 +0000)]
Annotate X86 arithmetic instructions with SchedRW lists.

This new-style scheduling information is going to replace the
instruction iteneraries.

This also serves as a test case for Andy's fix in r177317.

llvm-svn: 177323

11 years agoCheck whether a pointer is non-null (isKnownNonNull) in isKnownNonZero.
Manman Ren [Mon, 18 Mar 2013 21:23:25 +0000 (21:23 +0000)]
Check whether a pointer is non-null (isKnownNonNull) in isKnownNonZero.

This handles the case where we have an inbounds GEP with alloca as the pointer.
This fixes the regression in PR12750 and rdar://13286434.
Note that we can also fix this by handling some GEP cases in isKnownNonNull.

llvm-svn: 177321

11 years agoBring inheriting constructor implementation up-to-date with current defect
Richard Smith [Mon, 18 Mar 2013 21:12:30 +0000 (21:12 +0000)]
Bring inheriting constructor implementation up-to-date with current defect
reports, and implement implicit definition of inheriting constructors.
Remaining missing features: inheriting constructor templates, implicit
exception specifications for inheriting constructors, inheriting constructors
from dependent bases.

llvm-svn: 177320

11 years agoCentralize the recording of which tools have been constructed.
Rafael Espindola [Mon, 18 Mar 2013 20:48:54 +0000 (20:48 +0000)]
Centralize the recording of which tools have been constructed.

llvm-svn: 177319

11 years ago[analyzer] Warn when a ‘nil’ object is added to NSArray or NSMutableArray.
Anna Zaks [Mon, 18 Mar 2013 20:46:56 +0000 (20:46 +0000)]
[analyzer] Warn when a ‘nil’ object is added to NSArray or NSMutableArray.

llvm-svn: 177318

11 years agoTableGen fix for the new machine model.
Andrew Trick [Mon, 18 Mar 2013 20:42:25 +0000 (20:42 +0000)]
TableGen fix for the new machine model.

Properly handle cases where a group of instructions have different
SchedRW lists with the same itinerary class.
This was supposed to work, but I left in an early break.

llvm-svn: 177317

11 years agoInclude '.test' suffix in target specific lit configs that need it
David Blaikie [Mon, 18 Mar 2013 20:31:44 +0000 (20:31 +0000)]
Include '.test' suffix in target specific lit configs that need it

Apparently my final cleanup to use a relevant suffix for these tests before
committing r176831 caused them to stop running since lit wasn't configured to
run tests with that suffix in those directories (why don't we just have a
global suffix list?). So, add the suffix to the relevant directories & fix the
test that has bitrotted over the last week due to my debug info schema changes.

llvm-svn: 177315

11 years agoMake the fields in the diagram match the descriptive text above them.
Eric Christopher [Mon, 18 Mar 2013 20:21:47 +0000 (20:21 +0000)]
Make the fields in the diagram match the descriptive text above them.

llvm-svn: 177314

11 years agoCorrect function to decide if a SCEV can be ignored
Sebastian Pop [Mon, 18 Mar 2013 20:21:13 +0000 (20:21 +0000)]
Correct function to decide if a SCEV can be ignored

When doing SCEV based code generation, we ignore instructions calculating values
that are fully defined by a SCEV expression. The values that are calculated by
this instructions are recalculated on demand.

This commit improves the check to verify if certain instructions can be ignored
and recalculated on demand.

llvm-svn: 177313

11 years agotsan: smaller memory block headers (32b->16b)
Dmitry Vyukov [Mon, 18 Mar 2013 19:47:36 +0000 (19:47 +0000)]
tsan: smaller memory block headers (32b->16b)

llvm-svn: 177312

11 years agoObjective-C modern translator. Don't put line info
Fariborz Jahanian [Mon, 18 Mar 2013 19:41:18 +0000 (19:41 +0000)]
Objective-C modern translator. Don't put line info
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://13138170

llvm-svn: 177311

11 years agoRemoved raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just...
Marshall Clow [Mon, 18 Mar 2013 19:34:07 +0000 (19:34 +0000)]
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.

llvm-svn: 177310

11 years agoScopHelper: clang-format
Tobias Grosser [Mon, 18 Mar 2013 19:19:57 +0000 (19:19 +0000)]
ScopHelper: clang-format

llvm-svn: 177309

11 years agoScopHelper: Remove some dead code
Tobias Grosser [Mon, 18 Mar 2013 19:17:07 +0000 (19:17 +0000)]
ScopHelper: Remove some dead code

llvm-svn: 177307

11 years agouse the canonical IV only when it exists
Sebastian Pop [Mon, 18 Mar 2013 19:09:49 +0000 (19:09 +0000)]
use the canonical IV only when it exists

llvm-svn: 177306

11 years agoUse early returns when checking if we already constructed a tool and when
Rafael Espindola [Mon, 18 Mar 2013 18:50:01 +0000 (18:50 +0000)]
Use early returns when checking if we already constructed a tool and when
delegating to Generic_GCC::SelectTool (it already updates the tool map).

llvm-svn: 177305

11 years agoRemoved raw references to _MSC_VER; now just check to see if it is defined.
Marshall Clow [Mon, 18 Mar 2013 18:20:48 +0000 (18:20 +0000)]
Removed raw references to _MSC_VER; now just check to see if it is defined.

llvm-svn: 177304

11 years agoRemove unused argument.
Rafael Espindola [Mon, 18 Mar 2013 18:19:46 +0000 (18:19 +0000)]
Remove unused argument.

llvm-svn: 177303

11 years agoPass an ArgList to every toolchain constructor. Remove the useIntegratedAs
Rafael Espindola [Mon, 18 Mar 2013 18:10:27 +0000 (18:10 +0000)]
Pass an ArgList to every toolchain constructor. Remove the useIntegratedAs
argument.

llvm-svn: 177301

11 years agoInline ShouldUseIntegratedAssembler and move the documentation to
Rafael Espindola [Mon, 18 Mar 2013 17:58:22 +0000 (17:58 +0000)]
Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs.

llvm-svn: 177300

11 years agoRefactor a bit of duplicated code to useIntegratedAs.
Rafael Espindola [Mon, 18 Mar 2013 17:52:57 +0000 (17:52 +0000)]
Refactor a bit of duplicated code to useIntegratedAs.

llvm-svn: 177299

11 years agoUpdate
Bill Wendling [Mon, 18 Mar 2013 17:47:33 +0000 (17:47 +0000)]
Update

llvm-svn: 177298

11 years agoRemoved raw references to __APPLE__; now just check to see if it is defined.
Marshall Clow [Mon, 18 Mar 2013 17:45:34 +0000 (17:45 +0000)]
Removed raw references to __APPLE__; now just check to see if it is defined.

llvm-svn: 177297

11 years agoFix 80-col. violations in PPCCTRLoops
Hal Finkel [Mon, 18 Mar 2013 17:40:46 +0000 (17:40 +0000)]
Fix 80-col. violations in PPCCTRLoops

llvm-svn: 177296

11 years agoFix large count and negative constant count handling in PPCCTRLoops
Hal Finkel [Mon, 18 Mar 2013 17:40:44 +0000 (17:40 +0000)]
Fix large count and negative constant count handling in PPCCTRLoops

This commit fixes an assert that would occur on loops with large constant counts
(like looping for ((uint32_t) -1) iterations on PPC64). The existing code did
not handle counts that it computed to be negative (asserting instead), but
these can be created with valid inputs.

This bug was discovered by bugpoint while I was attempting to isolate a
completely different problem.

Also, in writing test cases for the negative-count problem, I discovered that
the ori/lsi handling was broken (there was a typo which caused the logic that
was supposed to detect these pairs and extract the iteration count to always
fail). This has now also been corrected (and is covered by one of the new test
cases).

llvm-svn: 177295

11 years agoCleanup initial-value constants in PPCCTRLoops
Hal Finkel [Mon, 18 Mar 2013 17:40:27 +0000 (17:40 +0000)]
Cleanup initial-value constants in PPCCTRLoops

Because the initial-value constants had not been added to the list
of instructions considered for DCE the resulting code had redundant
constant-materialization instructions.

llvm-svn: 177294

11 years agoRemove unused argument.
Rafael Espindola [Mon, 18 Mar 2013 17:25:58 +0000 (17:25 +0000)]
Remove unused argument.

llvm-svn: 177293

11 years agotsan: add support for idle threads
Dmitry Vyukov [Mon, 18 Mar 2013 17:21:15 +0000 (17:21 +0000)]
tsan: add support for idle threads

llvm-svn: 177292

11 years agoRemoved raw references to _WIN32; now just check to see if it is defined.
Marshall Clow [Mon, 18 Mar 2013 17:04:29 +0000 (17:04 +0000)]
Removed raw references to _WIN32; now just check to see if it is defined.

llvm-svn: 177291

11 years agoFix integer comparison in DIEInteger::BestForm.
Hans Wennborg [Mon, 18 Mar 2013 17:03:05 +0000 (17:03 +0000)]
Fix integer comparison in DIEInteger::BestForm.

The always-true "(int)Int == (signed)Int" comparison was found
while experimenting with a potential new Clang warning.

llvm-svn: 177290