platform/upstream/llvm.git
12 years agoFix a typo.
Johnny Chen [Tue, 22 May 2012 19:41:53 +0000 (19:41 +0000)]
Fix a typo.

llvm-svn: 157278

12 years agoAdd a test case to check that eax's content equals the lower half of rax.
Johnny Chen [Tue, 22 May 2012 19:37:01 +0000 (19:37 +0000)]
Add a test case to check that eax's content equals the lower half of rax.
Plus fix the test class name as well as wrong directory path.

llvm-svn: 157277

12 years agoThe RegisterInfo descriptors for the convenience registers can specify an offset...
Johnny Chen [Tue, 22 May 2012 18:59:38 +0000 (18:59 +0000)]
The RegisterInfo descriptors for the convenience registers can specify an offset to be added to the offset as derived from
the value_regs field, which is useful for future expansion purposes.  As of now, we have:

    calculated_offset_of_eax = offset_of_rax + (offset_of_eax_from_the_descriptor which is 0)

llvm-svn: 157275

12 years agoUntabify and 80-col.
Eric Christopher [Tue, 22 May 2012 18:45:24 +0000 (18:45 +0000)]
Untabify and 80-col.

llvm-svn: 157274

12 years agoFormatting consistency.
Eric Christopher [Tue, 22 May 2012 18:45:18 +0000 (18:45 +0000)]
Formatting consistency.

llvm-svn: 157273

12 years agoFix wrong offset of eax and friends pointed out by Greg.
Johnny Chen [Tue, 22 May 2012 18:34:18 +0000 (18:34 +0000)]
Fix wrong offset of eax and friends pointed out by Greg.

rdar://problem/11487457

llvm-svn: 157272

12 years agoAlso compute TopoSigs in synthetic register classes.
Jakob Stoklund Olesen [Tue, 22 May 2012 18:20:28 +0000 (18:20 +0000)]
Also compute TopoSigs in synthetic register classes.

CodeGenRegisterClass has two constructors. Both need to compute the
TopoSigs BitVector.

llvm-svn: 157271

12 years agotsan: add shadow memory flush + fix few bugs
Dmitry Vyukov [Tue, 22 May 2012 18:07:45 +0000 (18:07 +0000)]
tsan: add shadow memory flush + fix few bugs

llvm-svn: 157270

12 years agoTest that we emit a subrange type for vlas.
Eric Christopher [Tue, 22 May 2012 18:04:48 +0000 (18:04 +0000)]
Test that we emit a subrange type for vlas.

Part of rdar://11457152

llvm-svn: 157269

12 years agotsan: fix sizeof sigset_t
Dmitry Vyukov [Tue, 22 May 2012 18:01:33 +0000 (18:01 +0000)]
tsan: fix sizeof sigset_t

llvm-svn: 157268

12 years agoFixes the autoconf build.
Manuel Klimek [Tue, 22 May 2012 17:45:33 +0000 (17:45 +0000)]
Fixes the autoconf build.

llvm-svn: 157266

12 years agohopefully fix the CMake build. sorry for breakage
Nuno Lopes [Tue, 22 May 2012 17:40:46 +0000 (17:40 +0000)]
hopefully fix the CMake build. sorry for breakage

llvm-svn: 157264

12 years agoLSR fix: add a missing phi check during IV hoisting.
Andrew Trick [Tue, 22 May 2012 17:39:59 +0000 (17:39 +0000)]
LSR fix: add a missing phi check during IV hoisting.

Fixes PR12898: SCEVExpander crash.

llvm-svn: 157263

12 years agowire -fbounds-checking to the new LLVM bounds checking pass
Nuno Lopes [Tue, 22 May 2012 17:19:45 +0000 (17:19 +0000)]
wire -fbounds-checking to the new LLVM bounds checking pass

llvm-svn: 157262

12 years agoadd a new pass to instrument loads and stores for run-time bounds checking
Nuno Lopes [Tue, 22 May 2012 17:19:09 +0000 (17:19 +0000)]
add a new pass to instrument loads and stores for run-time bounds checking
move EmitGEPOffset from InstCombine to Transforms/Utils/Local.h

(a draft of this) patch reviewed by Andrew, thanks.

llvm-svn: 157261

12 years agoAdds a method overwriteChangedFiles to the Rewriter. This is implemented by
Manuel Klimek [Tue, 22 May 2012 17:01:35 +0000 (17:01 +0000)]
Adds a method overwriteChangedFiles to the Rewriter. This is implemented by
first writing the changed files to a temporary location and then overwriting
the original files atomically.

Also adds a RewriterTestContext to aid unit testing rewrting logic in general.

llvm-svn: 157260

12 years agotsan: fix makefile
Dmitry Vyukov [Tue, 22 May 2012 16:46:05 +0000 (16:46 +0000)]
tsan: fix makefile
allow to build custom configurations

llvm-svn: 157259

12 years agorevert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)
Nuno Lopes [Tue, 22 May 2012 15:26:48 +0000 (15:26 +0000)]
revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)

llvm-svn: 157256

12 years agorevert my previous patches that introduced an additional parameter to the objectsize...
Nuno Lopes [Tue, 22 May 2012 15:25:31 +0000 (15:25 +0000)]
revert my previous patches that introduced an additional parameter to the objectsize intrinsic.
After a lot of discussion, we realized it's not the best option for run-time bounds checking

llvm-svn: 157255

12 years agoOnly erase virtregs with no uses left.
Jakob Stoklund Olesen [Tue, 22 May 2012 14:52:12 +0000 (14:52 +0000)]
Only erase virtregs with no uses left.

Also make sure registers aren't erased twice if the dead def mentions
the register twice.

This fixes PR12911.

llvm-svn: 157254

12 years agoRemove some compilation warnings.
Filipe Cabecinhas [Tue, 22 May 2012 14:45:44 +0000 (14:45 +0000)]
Remove some compilation warnings.

llvm-svn: 157253

12 years agotsan: reduce per-thread memory usage
Dmitry Vyukov [Tue, 22 May 2012 14:34:43 +0000 (14:34 +0000)]
tsan: reduce per-thread memory usage

llvm-svn: 157252

12 years agoFix PR12858, a crash due to GVN's PRE not fully removing an instruction from the
Duncan Sands [Tue, 22 May 2012 14:17:53 +0000 (14:17 +0000)]
Fix PR12858, a crash due to GVN's PRE not fully removing an instruction from the
leader table.  That's because it wasn't expecting instructions to turn up as
leader for a value number that is not its own, but equality propagation could
create this situation.  One solution is to have the leader table use a WeakVH
but this slows down GVN by about 5%.  Instead just have equality propagation not
add instructions to the leader table, only constants and arguments.  In theory
this might cause GVN to run more (each time it changes something it runs again)
but it doesn't seem to occur enough to cause a slow down.

llvm-svn: 157251

12 years ago[asan] nuke some old unused code
Kostya Serebryany [Tue, 22 May 2012 13:31:35 +0000 (13:31 +0000)]
[asan] nuke some old unused code

llvm-svn: 157250

12 years ago[asan] increase the stack size limit to 256M (yes, that happens); also CHECK that...
Kostya Serebryany [Tue, 22 May 2012 11:54:44 +0000 (11:54 +0000)]
[asan] increase the stack size limit to 256M (yes, that happens); also CHECK that the stack size is less than that on a non-main thread

llvm-svn: 157249

12 years agotsan: simple memory profiler
Dmitry Vyukov [Tue, 22 May 2012 11:33:03 +0000 (11:33 +0000)]
tsan: simple memory profiler

llvm-svn: 157248

12 years agoReplace inline asm constraint "=a" by the more general constraint "=r".
Simon Atanasyan [Tue, 22 May 2012 11:03:10 +0000 (11:03 +0000)]
Replace inline asm constraint "=a" by the more general constraint "=r".
That extend a range of platforms support this test case.

llvm-svn: 157247

12 years agoScheduleOptimizer: Simplify some code
Tobias Grosser [Tue, 22 May 2012 10:47:31 +0000 (10:47 +0000)]
ScheduleOptimizer: Simplify some code

We now use isl_map_equate, which makes the code a lot simpler.

llvm-svn: 157246

12 years agoScopInfo: Add parameter bounds to context
Tobias Grosser [Tue, 22 May 2012 10:47:27 +0000 (10:47 +0000)]
ScopInfo: Add parameter bounds to context

Derive the maximal and minimal values of a parameter from the type it has. Add
this information to the scop context. This information is needed, to derive
optimal types during code generation.

llvm-svn: 157245

12 years agoReplace some asserts with llvm_unreachable
Tobias Grosser [Tue, 22 May 2012 10:47:21 +0000 (10:47 +0000)]
Replace some asserts with llvm_unreachable

llvm-svn: 157244

12 years agoScopInfo: SCEVUnknowns are always parameters
Tobias Grosser [Tue, 22 May 2012 10:47:17 +0000 (10:47 +0000)]
ScopInfo: SCEVUnknowns are always parameters

There is no need for special code to handle SCEVUnknowns. SCEVUnkowns are always
parameters and will be handled by the generic parameter handling code in
visit().

llvm-svn: 157243

12 years agoMove isParallelFor into CodeGeneration
Tobias Grosser [Tue, 22 May 2012 08:46:07 +0000 (08:46 +0000)]
Move isParallelFor into CodeGeneration

This removes another include of CLooG header files.

llvm-svn: 157242

12 years agoReturn a constant of the appropriate type.
Filipe Cabecinhas [Tue, 22 May 2012 08:38:06 +0000 (08:38 +0000)]
Return a constant of the appropriate type.

llvm-svn: 157241

12 years agoRemove trailing semicolons.
Filipe Cabecinhas [Tue, 22 May 2012 08:36:18 +0000 (08:36 +0000)]
Remove trailing semicolons.

llvm-svn: 157240

12 years ago[asan] use -fno-builtin to build asan-rt on Mac
Kostya Serebryany [Tue, 22 May 2012 07:59:37 +0000 (07:59 +0000)]
[asan] use -fno-builtin to build asan-rt on Mac

llvm-svn: 157239

12 years ago[asan] use -fPIE -fno-builtin for building asan-rt
Kostya Serebryany [Tue, 22 May 2012 07:56:09 +0000 (07:56 +0000)]
[asan] use  -fPIE -fno-builtin for building asan-rt

llvm-svn: 157238

12 years ago[asan] fix one test on 32-bit Mac 10.7; enable another test on Mac
Kostya Serebryany [Tue, 22 May 2012 07:44:30 +0000 (07:44 +0000)]
[asan] fix one test on 32-bit Mac 10.7; enable another test on Mac

llvm-svn: 157237

12 years agoFix constant used for pshufb mask when lowering v16i8 shuffles. Bug introduced in...
Craig Topper [Tue, 22 May 2012 06:09:38 +0000 (06:09 +0000)]
Fix constant used for pshufb mask when lowering v16i8 shuffles. Bug introduced in r157043. Fixes PR12908.

llvm-svn: 157236

12 years agoThis patch adds a predicate to existing mips32 and mips64 so that those
Akira Hatanaka [Tue, 22 May 2012 03:10:09 +0000 (03:10 +0000)]
This patch adds a predicate to existing mips32 and mips64 so that those
instruction encodings can be excluded during mips16 processing.

This revision fixes the issue raised by Jim Grosbach.

bool hasStandardEncoding() const { return !inMips16Mode(); }

When micromips is added it will be

bool StandardEncoding() const { return !inMips16Mode()&&  !inMicroMipsMode(); }

No additional testing is needed other than to assure that there is no regression
from this patch.

Patch by Reed Kotler.

llvm-svn: 157234

12 years agoTruthify a comment.
Richard Smith [Tue, 22 May 2012 01:41:27 +0000 (01:41 +0000)]
Truthify a comment.

llvm-svn: 157232

12 years agofix the quotient returned by sdivrem() for the case when LHS is negative and RHS...
Nuno Lopes [Tue, 22 May 2012 01:09:48 +0000 (01:09 +0000)]
fix the quotient returned by sdivrem() for the case when LHS is negative and RHS is positive
based on a patch by Preston Briggs, with some modifications

llvm-svn: 157231

12 years agordar://problem/11487457
Johnny Chen [Tue, 22 May 2012 00:57:05 +0000 (00:57 +0000)]
rdar://problem/11487457

Add convenience registers eax, ebx, ecx, edx, edi, esi, ebp, esp to the 'register read' command for x86_64.
Add a GDBRemoteRegisterContext::Addx86_64ConvenienceRegisters() method called from ProcessGDBRemote::BuildDynamicRegisterInfo().
Servicing of eax, for example, is accomplished by delegating to rax with an adjusted offset into the register context.

llvm-svn: 157230

12 years agoFix typo.
Ted Kremenek [Tue, 22 May 2012 00:54:40 +0000 (00:54 +0000)]
Fix typo.

llvm-svn: 157229

12 years agoUse Perl prototypes instead of shift.
Ted Kremenek [Tue, 22 May 2012 00:52:49 +0000 (00:52 +0000)]
Use Perl prototypes instead of shift.

llvm-svn: 157228

12 years ago[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
Argyrios Kyrtzidis [Tue, 22 May 2012 00:47:53 +0000 (00:47 +0000)]
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.

rdar://11501256

llvm-svn: 157227

12 years agoFix a bug where if I just run:
Johnny Chen [Tue, 22 May 2012 00:22:18 +0000 (00:22 +0000)]
Fix a bug where if I just run:

    ./dotest.py

No progress bar appears.

llvm-svn: 157226

12 years agoAlso push file & line breakpoints past the prologue. Also added a "-K" argument...
Jim Ingham [Tue, 22 May 2012 00:12:20 +0000 (00:12 +0000)]
Also push file & line breakpoints past the prologue.  Also added a "-K" argument to the relevant
"break set" commands to set this per breakpoint.  Also, some CreateBreakpoint API's in the lldb_private
namespace had "internal" first and "skip_prologue" second.  "internal should always be last.  Fixed that.

rdar://problem/11484729

llvm-svn: 157225

12 years agoFileCheck'ize test, and add a bit to test for r157221.
Jim Grosbach [Mon, 21 May 2012 23:50:00 +0000 (23:50 +0000)]
FileCheck'ize test, and add a bit to test for r157221.

llvm-svn: 157222

12 years agoARM: .end_data_region mismatch in Thumb2.
Jim Grosbach [Mon, 21 May 2012 23:34:42 +0000 (23:34 +0000)]
ARM: .end_data_region mismatch in Thumb2.

32-bit offset jump tables just use real branch instructions and so aren't
marked as data regions. We were still emitting the .end_data_region
marker though, which assert()ed.

rdar://11499158

llvm-svn: 157221

12 years agoAdded support for rvalue references in debug information
Sean Callanan [Mon, 21 May 2012 23:31:51 +0000 (23:31 +0000)]
Added support for rvalue references in debug information
(actually, mainly just hooked up support that was already
there).  Added a test case, although it's expected to fail
right now unless you're using top-of-tree LLVM.

llvm-svn: 157220

12 years agoAdd basic delta-debugging script used for reducing analyzer crasher test cases.
Ted Kremenek [Mon, 21 May 2012 23:29:01 +0000 (23:29 +0000)]
Add basic delta-debugging script used for reducing analyzer crasher test cases.

llvm-svn: 157219

12 years agoAdded address space qualifier to intrinsic PointerType arguments.
Pete Cooper [Mon, 21 May 2012 23:21:28 +0000 (23:21 +0000)]
Added address space qualifier to intrinsic PointerType arguments.

llvm-svn: 157218

12 years agoCompileUnit::ResolveSymbolContext was only filling in the LineEntry regardless of...
Jim Ingham [Mon, 21 May 2012 23:06:47 +0000 (23:06 +0000)]
CompileUnit::ResolveSymbolContext was only filling in the LineEntry regardless of what was passed in for "resolve_scope".  I fixed that.

llvm-svn: 157217

12 years agoobjective-c: provide a useful 'fixit' suggestion when
Fariborz Jahanian [Mon, 21 May 2012 22:43:44 +0000 (22:43 +0000)]
objective-c: provide a useful 'fixit' suggestion when
errornously using commas to separate ObjC message arguments.
// rdar://11376372

llvm-svn: 157216

12 years agoFix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in...
Owen Anderson [Mon, 21 May 2012 22:39:20 +0000 (22:39 +0000)]
Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB.  No in-tree targets exercise this path.

Patch by Micah Villmow.

llvm-svn: 157215

12 years agoUpdated the object-pointer lookup logic to fix
Sean Callanan [Mon, 21 May 2012 22:25:52 +0000 (22:25 +0000)]
Updated the object-pointer lookup logic to fix
Objective-C "self," which is not a regular pointer.

llvm-svn: 157214

12 years agoFixed the new-syntax testcase to reflect how we
Sean Callanan [Mon, 21 May 2012 22:25:12 +0000 (22:25 +0000)]
Fixed the new-syntax testcase to reflect how we
print string literals.

llvm-svn: 157213

12 years agoRevert r115805. An array type is required to have a range type,
Eric Christopher [Mon, 21 May 2012 22:13:23 +0000 (22:13 +0000)]
Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.

Testcase to follow.

Part of rdar://11457152

llvm-svn: 157212

12 years ago[analyzer] Bind UnknownVal to InitListExpr for unsupported types
Anna Zaks [Mon, 21 May 2012 22:07:00 +0000 (22:07 +0000)]
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
(ex: float).

llvm-svn: 157211

12 years agoFixes for performance to data formatters - Python < 3.0 is much slower when using...
Enrico Granata [Mon, 21 May 2012 21:52:38 +0000 (21:52 +0000)]
Fixes for performance to data formatters - Python < 3.0 is much slower when using True/False as compared to 1/0 for logical values. Wexploit this to our advantage. Other minor tweaks

llvm-svn: 157209

12 years agoFixed a nasty bug where JIT expressions didn't work
Sean Callanan [Mon, 21 May 2012 21:29:52 +0000 (21:29 +0000)]
Fixed a nasty bug where JIT expressions didn't work
when stopped in a const method.  Also updated our
testsuite to ensure that JIT is forced in this case.

llvm-svn: 157208

12 years agoFunction template version of the previous patch.
Rafael Espindola [Mon, 21 May 2012 20:31:27 +0000 (20:31 +0000)]
Function template version of the previous patch.

llvm-svn: 157207

12 years agoProduce a hidden symbol for zed in
Rafael Espindola [Mon, 21 May 2012 20:15:56 +0000 (20:15 +0000)]
Produce a hidden symbol for zed in

  struct HIDDEN foo {
  };
  template <class P>
  struct bar {
  };
  template <>
  struct HIDDEN bar<foo> {
    DEFAULT static void zed();
  };
  void bar<foo>::zed() {
  }

Before we would produce a hidden symbol in

  struct HIDDEN foo {
  };
  template <class P>
  struct bar {
  };
  template <>
  struct bar<foo> {
    DEFAULT static void zed();
  };
  void bar<foo>::zed() {
  }

But adding HIDDEN to the specialization would cause us to produce a default
symbol.

llvm-svn: 157206

12 years ago[driver] When creating the compiler invocation out of command-line
Argyrios Kyrtzidis [Mon, 21 May 2012 20:11:54 +0000 (20:11 +0000)]
[driver] When creating the compiler invocation out of command-line
arguments, force use of clang frontend for the driver.

Fixes rdar://11356765.

llvm-svn: 157205

12 years agoAnalyzer: Fix PR12905, a crash when encountering a call to a function named "C".
Benjamin Kramer [Mon, 21 May 2012 19:40:38 +0000 (19:40 +0000)]
Analyzer: Fix PR12905, a crash when encountering a call to a function named "C".

While there clean up indentation.

llvm-svn: 157204

12 years agoAdded an "rb" alias that sets breakpoints by
Sean Callanan [Mon, 21 May 2012 18:25:19 +0000 (18:25 +0000)]
Added an "rb" alias that sets breakpoints by
regular expression.

llvm-svn: 157202

12 years agoThumb2: RSB source register should be rGRP not GPRnopc.
Jim Grosbach [Mon, 21 May 2012 17:57:17 +0000 (17:57 +0000)]
Thumb2: RSB source register should be rGRP not GPRnopc.

t2RSB defined the operand correctly, but tRSBS didn't.

llvm-svn: 157200

12 years agoIntegrated a check into Clang that make sure that
Sean Callanan [Mon, 21 May 2012 17:54:55 +0000 (17:54 +0000)]
Integrated a check into Clang that make sure that
it doesn't try to call LookupDestructor on an
incomplete class.

llvm-svn: 157199

12 years ago[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease...
Argyrios Kyrtzidis [Mon, 21 May 2012 17:48:31 +0000 (17:48 +0000)]
[arcmt] Revert r156999 "Remove the "it is not safe to remove an unused 'autorelease' message" ARC
migration error".

Per feedback from John this is useful to have in general.

llvm-svn: 157198

12 years agoMark an unreachable region of code with llvm_unreachable.
Dan Gohman [Mon, 21 May 2012 17:41:28 +0000 (17:41 +0000)]
Mark an unreachable region of code with llvm_unreachable.

llvm-svn: 157197

12 years agotsan: implement malloc/free hooks
Dmitry Vyukov [Mon, 21 May 2012 17:39:40 +0000 (17:39 +0000)]
tsan: implement malloc/free hooks

llvm-svn: 157196

12 years agoTypo.
Chad Rosier [Mon, 21 May 2012 17:13:41 +0000 (17:13 +0000)]
Typo.

llvm-svn: 157195

12 years agoRemove unused argument in my last patch.
Fariborz Jahanian [Mon, 21 May 2012 17:10:28 +0000 (17:10 +0000)]
Remove unused argument in my last patch.

llvm-svn: 157194

12 years agoobjective-c: When default synthesizing readonly IBOutlet properties
Fariborz Jahanian [Mon, 21 May 2012 17:02:43 +0000 (17:02 +0000)]
objective-c: When default synthesizing readonly IBOutlet properties
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209

llvm-svn: 157193

12 years agoAdded a GDB equivalent for saving binary memory
Sean Callanan [Mon, 21 May 2012 17:01:59 +0000 (17:01 +0000)]
Added a GDB equivalent for saving binary memory
data.

llvm-svn: 157192

12 years agoMake it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.
Owen Anderson [Mon, 21 May 2012 16:57:17 +0000 (16:57 +0000)]
Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.

Patch by Jose Fonseca.

llvm-svn: 157191

12 years ago<rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine...
Enrico Granata [Mon, 21 May 2012 16:51:35 +0000 (16:51 +0000)]
<rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.

llvm-svn: 157190

12 years ago[ASan] Make for-Windows RTL compileable using Clang++
Timur Iskhodzhanov [Mon, 21 May 2012 14:25:36 +0000 (14:25 +0000)]
[ASan] Make for-Windows RTL compileable using Clang++

llvm-svn: 157188

12 years agotsan: do not assume non-recursive signal handlers
Dmitry Vyukov [Mon, 21 May 2012 14:24:20 +0000 (14:24 +0000)]
tsan: do not assume non-recursive signal handlers

llvm-svn: 157187

12 years agoTest and document a difference from gcc in the handling of visibility
Rafael Espindola [Mon, 21 May 2012 14:22:37 +0000 (14:22 +0000)]
Test and document a difference from gcc in the handling of visibility
attributes.

llvm-svn: 157186

12 years agotest commit
Patrik Hägglund [Mon, 21 May 2012 13:18:06 +0000 (13:18 +0000)]
test commit

llvm-svn: 157184

12 years agoPR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) related...
Stepan Dyatkovskiy [Mon, 21 May 2012 10:44:40 +0000 (10:44 +0000)]
PR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) related changes for Execution and Verifier.

llvm-svn: 157183

12 years agoUnpack enums in CodeCompletetionResult.
Benjamin Kramer [Mon, 21 May 2012 10:42:01 +0000 (10:42 +0000)]
Unpack enums in CodeCompletetionResult.

In theory they should be wide enough even when the enum type is signed, but it
looks like MSVC9 still has problems with it.

llvm-svn: 157182

12 years agotsan: replace CHECK with CHECK_EQ for better diagnostics
Dmitry Vyukov [Mon, 21 May 2012 10:20:53 +0000 (10:20 +0000)]
tsan: replace CHECK with CHECK_EQ for better diagnostics

llvm-svn: 157181

12 years agotsan: better, more realistic handling of signals
Dmitry Vyukov [Mon, 21 May 2012 08:26:51 +0000 (08:26 +0000)]
tsan: better, more realistic handling of signals

llvm-svn: 157178

12 years agotsan: add more checks for OOM conditions
Dmitry Vyukov [Mon, 21 May 2012 06:46:27 +0000 (06:46 +0000)]
tsan: add more checks for OOM conditions
tests like to try to malloc((size_t)-1)

llvm-svn: 157176

12 years agoAllow 256-bit shuffles to still be split even if only half of the shuffle comes from...
Craig Topper [Mon, 21 May 2012 06:40:16 +0000 (06:40 +0000)]
Allow 256-bit shuffles to still be split even if only half of the shuffle comes from two 128-bit pieces.

llvm-svn: 157175

12 years agoGive a small negative bias to giant edge bundles.
Jakob Stoklund Olesen [Mon, 21 May 2012 03:11:23 +0000 (03:11 +0000)]
Give a small negative bias to giant edge bundles.

This helps compile time when the greedy register allocator splits live
ranges in giant functions. Without the bias, we would try to grow
regions through the giant edge bundles, usually to find out that the
region became too big and expensive.

If a live range has many uses in blocks near the giant bundle, the small
negative bias doesn't make a big difference, and we still consider
regions including the giant edge bundle.

Giant edge bundles are usually connected to landing pads or indirect
branches.

llvm-svn: 157174

12 years agoTeach Clang about the NVPTX backend.
Peter Collingbourne [Sun, 20 May 2012 23:28:41 +0000 (23:28 +0000)]
Teach Clang about the NVPTX backend.

llvm-svn: 157173

12 years agoTell the driver that CUDA is a C++-like language, so that we get C++
Peter Collingbourne [Sun, 20 May 2012 23:28:36 +0000 (23:28 +0000)]
Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.

llvm-svn: 157172

12 years agoCUDA: the device and host attributes must be inheritable, in order
Peter Collingbourne [Sun, 20 May 2012 23:28:32 +0000 (23:28 +0000)]
CUDA: the device and host attributes must be inheritable, in order
to deal with NVIDIA's headers.  We'll need to think of another way
to handle multiple host/device definitions within the same TU.

llvm-svn: 157171

12 years agotest/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in...
NAKAMURA Takumi [Sun, 20 May 2012 22:28:03 +0000 (22:28 +0000)]
test/Tooling/clang-check-pwd.cpp: Mark as XFAIL:mingw for now. Fixing is work-in-progress.

llvm-svn: 157170

12 years agoClear kill flags on the fly when joining intervals.
Jakob Stoklund Olesen [Sun, 20 May 2012 21:41:05 +0000 (21:41 +0000)]
Clear kill flags on the fly when joining intervals.

With physreg joining out of the way, it is easy to recognize the
instructions that need their kill flags cleared while testing for
interference.

This allows us to skip the final scan of all instructions for an 11%
speedup of the coalescer pass.

llvm-svn: 157169

12 years agoCUDA: add CodeGen support for global variable address spaces.
Peter Collingbourne [Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)]
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0.  This relies on address
space 0 being a unified address space.

llvm-svn: 157167

12 years agoAdd RPO to the lexicon.
Nick Lewycky [Sun, 20 May 2012 20:30:47 +0000 (20:30 +0000)]
Add RPO to the lexicon.

llvm-svn: 157166

12 years agoMake the global base reg GR32_NOSP.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:43:00 +0000 (18:43 +0000)]
Make the global base reg GR32_NOSP.

It can sometimes be used in addressing modes that don't support %ESP.

llvm-svn: 157165

12 years agoConstrain regclasses in PeepholeOptimizer.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:55 +0000 (18:42 +0000)]
Constrain regclasses in PeepholeOptimizer.

It can be necessary to restrict to a sub-class before accessing
sub-registers.

llvm-svn: 157164

12 years agoConstrain register classes in TailDup.
Jakob Stoklund Olesen [Sun, 20 May 2012 18:42:51 +0000 (18:42 +0000)]
Constrain register classes in TailDup.

When rewriting operands, make sure the new registers have a compatible
register class.

llvm-svn: 157163

12 years agoWhen legalising shifts, do not pre-build a list of operands which
Peter Collingbourne [Sun, 20 May 2012 18:36:15 +0000 (18:36 +0000)]
When legalising shifts, do not pre-build a list of operands which
may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve
the other operands when calling UpdateNodeOperands.  Fixes PR12889.

llvm-svn: 157162

12 years agoEmit memcmp directly from the StringMatcherEmitter.
Benjamin Kramer [Sun, 20 May 2012 18:10:42 +0000 (18:10 +0000)]
Emit memcmp directly from the StringMatcherEmitter.

There should be no difference in the resulting binary, given a sufficiently
smart compiler. However we already had compiler timeouts on the generated
code in Intrinsics.gen, this hopefully makes the lives of slow buildbots a
little easier.

llvm-svn: 157161