Commit Graph

161397 Commits

Author SHA1 Message Date
Faisal Vali 218e94b6b6 COSMETIC: Fix 80 column overflow in some comments introduced in r194188
no functionality change.

llvm-svn: 194449
2013-11-12 03:56:08 +00:00
Faisal Vali 8bc2bc71f6 A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++.
See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev.

This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda.

A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME.

Patch was LGTM'd by Richard (just barely :)

http://llvm-reviews.chandlerc.com/D2144

llvm-svn: 194448
2013-11-12 03:48:27 +00:00
John Thompson c1a13f3f20 Fixed moduleImport and ident callbacks. Fixed modules test. Added ident callback test. A better test for moduleExport is coming.
llvm-svn: 194447
2013-11-12 03:12:18 +00:00
Richard Smith adf3018125 Remove C++11ism.
llvm-svn: 194446
2013-11-12 02:58:11 +00:00
Richard Smith e5a9e3fe5f Extra test for r194444.
llvm-svn: 194445
2013-11-12 02:42:08 +00:00
Richard Smith 16e1b07597 Rather than duplicating extension diagnostics to allow them to cause a
substitution failure, allow a flag to be set on the Diagnostic object,
to mark it as 'causes substitution failure'.

Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior
rather than a bunch of flags.

llvm-svn: 194444
2013-11-12 02:41:45 +00:00
Matt Arsenault 72b31eee0b R600/SI: Change formatting of printed registers.
Print the range of registers used with a single letter prefix.
This better matches what the shader compiler produces and
is overall less obnoxious than concatenating all of the
subregister names together.

Instead of SGPR0, it will print s0. Instead of SGPR0_SGPR1,
it will print s[0:1] and so on.

There doesn't appear to be a straightforward way
to get the actual register info in the InstPrinter,
so this parses the generated name to print with the
new syntax.

The required test changes are pretty nasty, and register
matching regexes are now worse. Since there isn't a way to
add to a variable in FileCheck, some of the tests now don't
check the exact number of registers used, but I don't think that
will be a real problem.

llvm-svn: 194443
2013-11-12 02:35:51 +00:00
Reed Kotler f0e6968e2f Change the default branch instruction to be the 16 bit variety for mips16.
This has no material effect at this time since we don't have a direct
object emitter for mips16 and the assembler can't tell them apart. I
place a comment "16 bit inst" for those so that I can tell them apart in the
output. The constant island pass has only been minimally changed to allow
this. More complete branch work is forthcoming but this is the first
step.

llvm-svn: 194442
2013-11-12 02:27:12 +00:00
Reid Kleckner a5eef14eba -fms-compatibility: Use C++98 null pointer constant rules
Patch by Will Wilson!

llvm-svn: 194441
2013-11-12 02:22:34 +00:00
John Thompson 0bc443b5c8 [extra] pp-trace - Add test for conditional callbacks.
llvm-svn: 194440
2013-11-12 02:04:53 +00:00
Faisal Vali 97d8c33fa7 COSMETIC: Right justify an asterix in the previous refactoring.
Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;)

No functionality change.

llvm-svn: 194439
2013-11-12 01:46:33 +00:00
Faisal Vali 524ca28b2b REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.
No Functionality change.

This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope. 

llvm-svn: 194438
2013-11-12 01:40:44 +00:00
Reid Kleckner e9f36afe7d Extract a bc attr parsing helper that returns Attribute::None on error
The parsing method still returns llvm::error_code for consistency with
other parsing methods.  Minor cleanup, no functionality change.

llvm-svn: 194437
2013-11-12 01:31:00 +00:00
Jason Molenda ee87e75090 Add object logging to HistoryThread. Call the DoDestroy() method from
the HistoryThread dtor.

llvm-svn: 194436
2013-11-12 00:09:58 +00:00
Fariborz Jahanian 04bf672537 ObjectiveC. Try to unbreak buildbot.
llvm-svn: 194435
2013-11-12 00:08:23 +00:00
Fariborz Jahanian 1236485573 ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://15363492

llvm-svn: 194434
2013-11-11 23:44:52 +00:00
Matt Arsenault dbf9f311b0 R600/SI: Add test that fails due to requiring i64 mul for pointers
llvm-svn: 194433
2013-11-11 23:31:02 +00:00
Marshall Clow c1cf981823 Patch from Bruce Mitchener; fixes two typos in comments. No functionality change. PR17843
llvm-svn: 194432
2013-11-11 23:27:19 +00:00
Lang Hames c2b772351e Lower X86::MORESTACK_RET and X86::MORESTACK_RET_RESTORE_R10 in
X86AsmPrinter::EmitInstruction, rather than X86MCInstLower::Lower.

The aim is to improve the reusability of the X86MCInstLower class by making it
more function-like. The X86::MORESTACK_RET_RESTORE_R10 pseudo broke the
function model by emitting an extra instruction to the MCStreamer attached to
the AsmPrinter.

The patch should have no impact on generated code. 
 

llvm-svn: 194431
2013-11-11 23:00:41 +00:00
Rafael Espindola 50e1f0095f Add a testcase where we replace a destructor with an alias.
This is a reduced testcase from a cast to Function failing during bootstrap.

llvm-svn: 194430
2013-11-11 22:55:13 +00:00
Tim Northover 38a0cb5201 ARM: make assembly files compile Thumb2 with nop IT block.
ARM's UAL syntax allows the same assembly file to be compiled in both ARM and
Thumb mode. Conditional execution is handled by requiring the Thumb IT blocks,
but essentially ignoring them when compiling for ARM.

llvm-svn: 194429
2013-11-11 22:50:13 +00:00
Andrew Trick a28099fdd4 Fix the recently added anyregcc convention to handle spilled operands.
Fixes <rdar://15432754> [JS] Assertion: "Folded a def to a non-store!"

The primary purpose of anyregcc is to prevent a patchpoint's call
arguments and return value from being spilled. They must be available
in a register, although the calling convention does not pin the
register. It's up to the front end to avoid using this convention for
calls with more arguments than allocatable registers.

llvm-svn: 194428
2013-11-11 22:40:25 +00:00
Andrew Trick 5ae6ed88fb Print new JavaScript calling conventions symbolically.
llvm-svn: 194427
2013-11-11 22:40:22 +00:00
Akira Hatanaka c4baedd71d [mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.

llvm-svn: 194426
2013-11-11 22:10:46 +00:00
Vincent Lejeune f143af3fe9 R600: Use function inputs to represent data stored in gpr
llvm-svn: 194425
2013-11-11 22:10:24 +00:00
Shuxin Yang 3168ab3376 Fix PR17952.
The symptom is that an assertion is triggered. The assertion was added by
me to detect the situation when value is propagated from dead blocks.
(We can certainly get rid of assertion; it is safe to do so, because propagating
 value from dead block to alive join node is certainly ok.)

  The root cause of this bug is : edge-splitting is conducted on the fly,
the edge being split could be a dead edge, therefore the block that 
split the critial edge needs to be flagged "dead" as well.

  There are 3 ways to fix this bug:
  1) Get rid of the assertion as I mentioned eariler 
  2) When an dead edge is split, flag the inserted block "dead".
  3) proactively split the critical edges connecting dead and live blocks when
     new dead blocks are revealed.

  This fix go for 3) with additional 2 LOC.

  Testing case was added by Rafael the other day.

llvm-svn: 194424
2013-11-11 22:00:23 +00:00
Akira Hatanaka 8f1caeb0e1 [mips] Partially revert r193641. Stack alignment should not be determined by
the floating point register mode.
 

llvm-svn: 194423
2013-11-11 21:49:03 +00:00
John Thompson da0b753035 [extra] pp-trace - Test for moduleImport.
llvm-svn: 194422
2013-11-11 21:20:02 +00:00
Simon Atanasyan 5c8377f32c Add support for DT_VERxxx and DT_MIPS_xxx .dynamic section entries to the
llvm-readobj.

The patch reviewed by Michael Spencer.
http://llvm-reviews.chandlerc.com/D2113

llvm-svn: 194421
2013-11-11 20:51:48 +00:00
Sylvestre Ledru e293b1a8d8 Revert "Using an invalid -O falls back on -O3 instead of an error"
This reverts commit r194403.

Was breaking too many tests...

llvm-svn: 194420
2013-11-11 20:51:44 +00:00
Sylvestre Ledru cc645758c7 Revert "Remove -### from the -O20 test, it was failing the test (?)"
This reverts commit r194414.

Was breaking too many tests...

llvm-svn: 194419
2013-11-11 20:46:40 +00:00
Bob Wilson ed1b2e5d98 Change libLTO back to linking with @executable_path instead of @rpath.
This partially reverts r187641 until ld64 adopts a change to link with an
rpath setting.

llvm-svn: 194418
2013-11-11 20:08:24 +00:00
Arnaud A. de Grandmaison f5f040fa1e CalcSpillWeights: allow overidding the spill weight normalizing function
This will enable the PBQP register allocator to provide its own normalizing function.

No functionnal change.

llvm-svn: 194417
2013-11-11 19:56:14 +00:00
Artyom Skrobov eff45103b3 [ARM] Add support for MVFR2 which is new in ARMv8
llvm-svn: 194416
2013-11-11 19:56:13 +00:00
Andrew Kaylor cfb4a996d0 Fixing a problem with iterator validity in RuntimeDyldImpl::resolveExternalSymbols
llvm-svn: 194415
2013-11-11 19:55:10 +00:00
Sylvestre Ledru 313e730eef Remove -### from the -O20 test, it was failing the test (?)
llvm-svn: 194414
2013-11-11 19:54:40 +00:00
Ed Maste d23dcbfb53 Increase log detail for size mismatch in EntityVariable::Materialize
llvm-svn: 194413
2013-11-11 19:40:51 +00:00
Sylvestre Ledru e19d5094ee Improve the documentation (bis) with Arthur and Chandler's comments
llvm-svn: 194412
2013-11-11 19:39:37 +00:00
Rafael Espindola b15683e635 Fix pr17875.
The assert this patch deletes was valid only when aliasing D2 to D1, not when
looking at a base class. Since the assert was in the path where we had already
decided to not produce an alias, just drop it.

llvm-svn: 194411
2013-11-11 19:35:06 +00:00
Justin Holewinski 124e93de93 [NVPTX] Properly handle bitcast ConstantExpr when checking for the alignment of function parameters
llvm-svn: 194410
2013-11-11 19:28:19 +00:00
Justin Holewinski 4f5bc9b33a [NVPTX] Fix logic error in loading vector parameters of more than 4 components
llvm-svn: 194409
2013-11-11 19:28:16 +00:00
Tim Northover e77f78cbad Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
llvm-svn: 194408
2013-11-11 19:11:22 +00:00
Chad Rosier 09f5251c4d [AArch64] The shift right/left and insert immediate builtins expect 3
source operands, a vector, an element to insert, and a shift amount.

llvm-svn: 194407
2013-11-11 19:11:19 +00:00
Chad Rosier d3684a0566 [AArch64] The shift right/left and insert immediate builtins expect 3
source operands, a vector, an element to insert, and a shift amount.

llvm-svn: 194406
2013-11-11 19:11:11 +00:00
Sylvestre Ledru fac93753b5 Improve the documentation of the optimization flags
Reviewers: rafael.espindola, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

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

llvm-svn: 194405
2013-11-11 19:04:47 +00:00
Arnaud A. de Grandmaison ea3ac1612c CalcSpillWeights: give a better describing name to calculateSpillWeights
Besides, this relates it more obviously to the VirtRegAuxInfo::calculateSpillWeightAndHint.

No functionnal change.

llvm-svn: 194404
2013-11-11 19:04:45 +00:00
Sylvestre Ledru 26386be183 Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c 
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c 
warning: invalid value '20' in '-O20'. Fall back on value '3'

Reviewers: rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits, hfinkel, rengolin

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

llvm-svn: 194403
2013-11-11 19:01:05 +00:00
Fariborz Jahanian b89e172ab6 ObjectiveC migrator. More testing of instancetype migration in
method implementations. // rdar://15438505

llvm-svn: 194402
2013-11-11 18:54:23 +00:00
Eric Christopher aeb105f9fe Unify the adding of enumerators with the construction of the enumeration.
llvm-svn: 194401
2013-11-11 18:52:39 +00:00
Eric Christopher 98b7f17c72 Formatting.
llvm-svn: 194400
2013-11-11 18:52:36 +00:00