Commit Graph

151017 Commits

Author SHA1 Message Date
Logan Chien 325823a189 Fix ARM unwind opcode assembler in several cases.
Changes to ARM unwind opcode assembler:

* Fix multiple .save or .vsave directives.  Besides, the
  order is preserved now.

* For the directives which will generate multiple opcodes,
  such as ".save {r0-r11}", the order of the unwind opcode
  is fixed now, i.e. the registers with less encoding value
  are popped first.

* Fix the $sp offset calculation.  Now, we can use the
  .setfp, .pad, .save, and .vsave directives at any order.

Changes to test cases:

* Add test cases to check the order of multiple opcodes
  for the .save directive.

* Fix the incorrect $sp offset in the test case.  The
  stack pointer offset specified in the test case was
  incorrect.  (Changed test cases: ehabi-mc-section.ll and
  ehabi-mc.ll)

* The opcode to restore $sp are slightly reordered.  The
  behavior are not changed, and the new output is same
  as the output of GNU as.  (Changed test cases:
  eh-directive-pad.s and eh-directive-setfp.s)

llvm-svn: 183627
2013-06-09 12:22:30 +00:00
Elena Demikhovsky 89703c06f2 Removed PackedDouble domain from scalar instructions. Added more formats for the scalar stuff.
llvm-svn: 183626
2013-06-09 07:37:10 +00:00
Tim Northover 64280fbba1 Make DeadArgumentElimination more conservative on variadic functions
Variadic functions are particularly fragile in the face of ABI changes, so this
limits how much the pass changes them

llvm-svn: 183625
2013-06-09 02:17:27 +00:00
JF Bastien 652fa6a8b2 ARM FastISel fix load register classes
The register classes when emitting loads weren't quite restricting enough, leading to MI verification failure on the result register.

These are new failures that weren't there the first time I tried enabling ARM FastISel for new targets.

llvm-svn: 183624
2013-06-09 00:20:24 +00:00
David Majnemer 0fc8670cb0 TargetLowering: Clean up method description comments
llvm-svn: 183623
2013-06-08 23:51:45 +00:00
Rui Ueyama 9dd08d912d [PECOFF][Driver] Add -heap command line option.
llvm-svn: 183622
2013-06-08 22:59:10 +00:00
Aaron Ballman f0b5384ef9 sys::process::get_id() now returns the process ID instead of a process handle on Windows. Patch thanks to Kim Gräsman!
llvm-svn: 183621
2013-06-08 20:29:03 +00:00
Faisal Vali 475671057c Fix the parser's updating of the template depth when parsing local templates and late-parsed templates.
This is a slight tweak of r180708; It avoids incrementing depth when non-template local classes nested within member templates of local classes are encountered.  
This patch was LGTM'd by Doug http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130506/079656.html and passed the regression tests that normally pass (i.e. excluding many Module and Index tests on Windows that fail regardless)

llvm-svn: 183620
2013-06-08 19:47:52 +00:00
Faisal Vali 6a79ca1c6d Revert r183618.
I ran clang-format on my patch but it seemed to have wreaked havoc with new lines  - might have to do with using it on windows :( will resubmit once i've cleaned this issue up. sorry.

llvm-svn: 183619
2013-06-08 19:39:00 +00:00
Faisal Vali 9b629831a7 Fix the parser's updating of the template depth when parsing local templates and late-parsed templates. This is a slight tweak of r180708; It avoids incrementing depth when non-template local classes nested within member templates of local classes are encountered.
This patch was LGTM'd by Doug http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130506/079656.html and passed the regression tests that normally pass (i.e. excluding many Module and Index tests on Windows that fail regardless)

llvm-svn: 183618
2013-06-08 19:33:09 +00:00
Reid Kleckner 88709c6952 Add a test case for blocks taking an array typedef
r183614 was failing because va_list on some platforms is defined in a
similar manner.  This test fails on Windows with r183614 applied.

llvm-svn: 183617
2013-06-08 18:51:21 +00:00
Reid Kleckner 17aeeeb311 Revert "[Sema] Make FunctionType's TSI use unadjusted argument types"
This reverts commit r183614.

It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms,
and the fix is not trivial.

llvm-svn: 183616
2013-06-08 18:19:52 +00:00
Reid Kleckner 4c124ffd5b [Sema] Make FunctionType's TSI use unadjusted argument types
This helps preserve the type-as-written in the AST, which we need for
MSVC mangling.  In particular, we need to preserve the types of array
parameters in function pointer types.

The essence of this change is:
-  QualType ArgTy = Param->getType();
+  QualType ArgTy = Param->getTypeSourceInfo()->getType();

... followed by the adjustment in ActOnFunctionDeclarator().

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

llvm-svn: 183614
2013-06-08 17:28:56 +00:00
Venkatraman Govindaraju 7dae9ce021 [Sparc] Delete FPMover Pass and remove Fp* Pseudo-instructions from Sparc backend.
llvm-svn: 183613
2013-06-08 15:32:59 +00:00
Amaury de la Vieuville f4ec0c8510 ARM: fix VMOVvnf32 decoding when ambiguous with VCVT
Enforce Table A7-15 (op=1, cmode=0b111) -> UNDEF

llvm-svn: 183612
2013-06-08 13:54:05 +00:00
Amaury de la Vieuville 68bcd021fd ARM: enforce SRS decoding constraints
llvm-svn: 183611
2013-06-08 13:43:59 +00:00
Amaury de la Vieuville 631df63e54 ARM: fix CPS decoding when ambiguous with QADD
Handle the case when the disassembler table can't tell
the difference between some encodings of QADD and CPS.

Add some necessary safe guards in CPS decoding as well.

llvm-svn: 183610
2013-06-08 13:38:52 +00:00
Serge Pavlov 89578fd439 Recognition of empty structures and unions is moved to semantic stage
Differential Revision: http://llvm-reviews.chandlerc.com/D586

llvm-svn: 183609
2013-06-08 13:29:58 +00:00
Amaury de la Vieuville ea7bb57058 ARM: fix VCVT decoding
UNPRED was reported instead of UNDEF

llvm-svn: 183608
2013-06-08 13:29:11 +00:00
Logan Chien 855b17d1bc Update code listings in LLVM tutorial.
Several LLVM headers are moved.  The code listings in
LLVM tutorial are not updated yet.

This CL removes the code replica in the .rst, and replace
them with a literalinclude directive, so that sphinx can
include the latest code automatically.

llvm-svn: 183607
2013-06-08 09:03:03 +00:00
Shuxin Yang 140d592d84 Fix a potential bug in r183584.
r183584 tries to derive some info from the code *AFTER* a call and apply
these derived info to the code *BEFORE* the call, which is not always safe
as the call in question may never return, and in this case, the derived
info is invalid.
  
  Thank Duncan for pointing out this potential bug.

rdar://14073661 

llvm-svn: 183606
2013-06-08 04:56:05 +00:00
Sean Silva 4bf5c4b746 Don't artifically restrict input object size.
sys::IdentifyFileType is already conscious of the length, and
object_error::invalid_file_type is returned below anyway if
sys::IdentifyFileType doesn't recognize the file.

llvm-svn: 183605
2013-06-08 04:32:59 +00:00
Rui Ueyama eb0cc96e4b [PECOFF][Driver] Add -stack command line option.
llvm-svn: 183604
2013-06-08 03:59:00 +00:00
Rui Ueyama 7b5592bc0b [WinLink] Fix use-after-return.
llvm-svn: 183603
2013-06-08 03:39:35 +00:00
Jin-Gu Kang 0b5ca604a9 Added a type checking which handle the case of an ext vector and integral scalar
llvm-svn: 183602
2013-06-08 02:15:36 +00:00
JF Bastien 60a2442476 Fix unused variable warning from my previous patch.
llvm-svn: 183601
2013-06-08 00:51:51 +00:00
Anna Zaks 8ebeb643fd [analyzer] Minor fixups to r183062
Based on feedback from Jordan.

llvm-svn: 183600
2013-06-08 00:29:29 +00:00
Anna Zaks 22895473af [analyzer; alternate edges] Fix the edge locations in presence of macros.
We drew the diagnostic edges to wrong statements in cases the note was on a macro.
The fix is simple, but seems to work just fine for a whole bunch of test cases (plist-macros.cpp).

Also, removes an unnecessary edge in edges-new.mm, when function signature starts with a macro.

llvm-svn: 183599
2013-06-08 00:29:24 +00:00
Michael Gottesman abfeabb565 Fixed comment typo.
llvm-svn: 183598
2013-06-08 00:27:19 +00:00
Adrian Prantl 0ffce6ec99 Debug info: An if condition now creates a lexical scope of its own.
Two variables with the same name declared in two if conditions in the same
scope are no longer coalesced into one.

rdar://problem/14024005

llvm-svn: 183597
2013-06-08 00:16:55 +00:00
Akira Hatanaka ae9d8e21d6 [mips] Use a helper function which compares the size of the source and
destination operands of an instruction.

No functionality changes.

llvm-svn: 183596
2013-06-08 00:14:54 +00:00
Quentin Colombet 249cb6756c Reapply r183552. This time, use a standard type for the option to avoid template
instantiation issue with non-standard type.

Add a backend option to warn on a given stack size limit.
Option: -mllvm -warn-stack-size=<limit>
Output (if limit is exceeded):
warning: Stack size limit exceeded (<actual size>) in <functionName>.

The longer term plan is to hook that to a clang warning.
PR:4072
<rdar://problem/13987214>.

llvm-svn: 183595
2013-06-08 00:07:54 +00:00
Richard Smith faadef7369 Recursively lifetime-extend into array temporaries. These can get implicitly
created through binding a reference-to-array to an initializer list.

llvm-svn: 183594
2013-06-08 00:02:08 +00:00
Vincent Lejeune d1a9d18120 R600: Use a refined heuristic to choose when switching clause
This is using a hint from AMD APP OpenCL Programming Guide with
empirically tweaked parameters.
I used Unigine Heaven 3.0 to determine best parameters on my system
(i7 2600/Radeon 6950/Kernel 3.9.4) the benchmark :
it went from 38.8 average fps to 39.6, which is ~3% gain.
(Lightmark 2008.2 gain is much more marginal: from 537 to 539)

There is no lit test provided as the parameter were determined
empirically and it it would be nearly impossiblet to find a test
program that check for optimal behavior.

llvm-svn: 183593
2013-06-07 23:30:34 +00:00
Vincent Lejeune 4d143328df R600: Anti dep better handled in tex clause
llvm-svn: 183592
2013-06-07 23:30:26 +00:00
Eric Christopher ac0217424c When we're compiling with -pg make sure to link with gcrt1.o on linux. Be
sure to do this always, this matches the behavior for the gcc driver.

Fixes PR16251.

Based on a patch by Qiao Yang.

llvm-svn: 183591
2013-06-07 23:25:01 +00:00
Eli Friedman c11c169530 Fix va_arg on x86-64 for a struct containing a single int128_t. PR16248
llvm-svn: 183590
2013-06-07 23:20:55 +00:00
Jakob Stoklund Olesen fdc9d0a991 Remember the anyext patterns.
llvm-svn: 183589
2013-06-07 22:59:29 +00:00
Douglas Gregor 5e46119fbe Loosen r178109 even further, to assume that all redefined macros in system headers and system modules are equivalent.
Fixes <rdar://problem/14025673>.

llvm-svn: 183588
2013-06-07 22:56:11 +00:00
Jakob Stoklund Olesen 9f812b97ba Add missing zextloadi1 to i64 patterns. PR16721.
llvm-svn: 183587
2013-06-07 22:55:05 +00:00
Eric Christopher 1ecc5634d6 80-column fixup after recent change to getOrCreateType.
llvm-svn: 183586
2013-06-07 22:54:39 +00:00
Douglas Gregor ae3a4dfac0 Even in a modules world, people will depend on the weird xmmintrin.h -> emmintrin.h forwarding.
llvm-svn: 183585
2013-06-07 22:49:44 +00:00
Shuxin Yang bd254f2601 Fix an assertion in MemCpyOpt pass.
The MemCpyOpt pass is capable of optimizing:
      callee(&S); copy N bytes from S to D.
    into:
      callee(&D);
subject to some legality constraints. 

  Assertion is triggered when the compiler tries to evalute "sizeof(typeof(D))",
while D is an opaque-typed, 'sret' formal argument of function being compiled.
i.e. the signature of the func being compiled is something like this:
  T caller(...,%opaque* noalias nocapture sret %D, ...)

  The fix is that when come across such situation, instead of calling some
utility functions to get the size of D's type (which will crash), we simply
assume D has at least N bytes as implified by the copy-instruction.

rdar://14073661 

llvm-svn: 183584
2013-06-07 22:45:21 +00:00
Eli Friedman f60b8ceb7e Fix line endings.
llvm-svn: 183583
2013-06-07 22:42:22 +00:00
Adrian Prantl a4ce906bc0 address some comments on r183474:
- factor the name construction part out from constructSetterName
- rename constructSetterName to the more appropriate constructSetterSelector

no functionality change intended.
rdar://problem/14035789

llvm-svn: 183582
2013-06-07 22:29:12 +00:00
Hal Finkel fa5f6f7440 Disallow i64 div/rem in PPC32 counter loops
On PPC32, [su]div,rem on i64 types are transformed into runtime library
function calls. As a result, they are not allowed in counter-based loops (the
counter-loops verification pass caught this error; this change fixes PR16169).

llvm-svn: 183581
2013-06-07 22:16:19 +00:00
Andrew Kaylor 69cb7d40fd Updating convenience register attach test
llvm-svn: 183580
2013-06-07 22:16:14 +00:00
Quentin Colombet bd5a201c85 Revert commits related to stack warning.
llvm-svn: 183579
2013-06-07 22:14:50 +00:00
Andrew Kaylor 5c282cc886 Don't set stdin to devnull for forked processes
llvm-svn: 183578
2013-06-07 22:12:54 +00:00
Jim Ingham 4e5c821087 Don't retry the Connect when starting up debugserver if the reason for the previous failure was
EINTR.  That means the user was trying to interrupt us, and we should just stop instead.

<rdar://problem/13184758>

llvm-svn: 183577
2013-06-07 22:09:53 +00:00