Commit Graph

219010 Commits

Author SHA1 Message Date
Daniel Jasper 9c8a774c48 clang-format: Fix corner case for lambda assignments.
Before:
  std::function<std::string(const std::string &)> my_lambda = [](
      const string &s) { return s; };

After:
  std::function<std::string(const std::string &)> my_lambda =
      [](const string &s) { return s; };

llvm-svn: 256739
2016-01-04 07:29:40 +00:00
Daniel Jasper 06a269574c clang-format: Fix corner-case in ObjC method declaration formatting
Before:
  - (void)shortf:(GTMFoo *)theFoo
     longKeyword:(NSRect)theRect
   longerKeyword:(float)theInterval
           error:(NSError **)theError {
  }

After:
  - (void)shortf:(GTMFoo *)theFoo
        longKeyword:(NSRect)theRect
      longerKeyword:(float)theInterval
              error:(NSError **)theError {
  }

llvm-svn: 256738
2016-01-04 07:29:07 +00:00
Daniel Jasper ffbad0e8aa clang-format: [Proto] Basic support for options with <> for repeated fields.
llvm-svn: 256737
2016-01-04 07:28:12 +00:00
Daniel Jasper ccff4d1e60 clang-format: [Proto] Improve wrapping of message field attributes.
Before:
  optional AAA aaa = 1 [foo =
			    {
			      key: "a"  //
			    },
			bar = {
			  key: "a"  //
			}];

After:
  optional AAA aaa = 1 [
    foo = {
      key: "a"  //
    },
    bar = {
      key: "a"  //
    }
  ];

llvm-svn: 256736
2016-01-04 07:27:33 +00:00
Chandler Carruth 7664127f8c Fix a horrible infloop in value tracking in the face of dead code.
Amazingly, we just never triggered this without:
1) Moving code around for MetadataTracking so that a certain *different*
   amount of inlining occurs in the per-TU compile step.
2) Then you LTO opt or clang with a bootstrap, and get inlining, loop
   opts, and GVN line up everything *just* right.

I don't really know how we didn't hit this before. We really need to be
fuzz testing stuff, it shouldn't be hard to trigger. I'm working on
crafting a reduced nice test case, and will submit that when I have it,
but I want to get LTO build bots going again.

llvm-svn: 256735
2016-01-04 07:23:12 +00:00
Craig Topper ec9a589598 [TableGen] Fix a typo in r256733.
llvm-svn: 256734
2016-01-04 06:35:08 +00:00
Craig Topper 5a6dda5376 [TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC
llvm-svn: 256733
2016-01-04 06:28:49 +00:00
Craig Topper dc6c3fc3d6 [TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.
llvm-svn: 256732
2016-01-04 04:51:51 +00:00
Craig Topper d3dfa14ad3 [TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.
llvm-svn: 256731
2016-01-04 04:51:46 +00:00
David Majnemer ca1c9f074f [X86] Make hasFP constant time
We need a frame pointer if there is a push/pop sequence after the
prologue in order to unwind the stack.  Scanning the instructions to
figure out if this happened made hasFP not constant-time which is a
violation of expectations.  Let's compute this up-front and reuse that
computation when we need it.

llvm-svn: 256730
2016-01-04 04:49:41 +00:00
Eric Fiselier 67ac709e4c Print stacktrace with UBSAN
llvm-svn: 256729
2016-01-04 03:54:58 +00:00
David Majnemer 42a0730c42 [LICM] Make instruction sinking funclet-aware
We had two bugs here:
- We might try to sink into a catchswitch, causing verifier failures.
- We will succeed in sinking into a cleanuppad but we didn't update the
  funclet operand bundle.

This fixes PR26000.

llvm-svn: 256728
2016-01-04 03:37:39 +00:00
Eric Fiselier 5243e190a7 Remove unsafe "__as_link()" cast member function.
"__as_link()" can only be used safely on "__list_node" objects. This patch
moves the "__as_link()" member function from "__list_node_base" to "__list_node"
so it cannot be used incorrectly.

Unsafe downcasts now use a non-member function so we don't defer the type-punned
pointer.

llvm-svn: 256727
2016-01-04 03:27:52 +00:00
Craig Topper cfd8173327 [TableGen] Change TGParser::SetValue to take an ArrayRef instead of std::vector reference. Use None in many places where a default constructed vector was being passed. NFC
llvm-svn: 256726
2016-01-04 03:15:08 +00:00
Craig Topper 1e23ed9eaa [TableGen] Fix a bug that caused the wrong name for a record built from a multiclass containing a defm called NAME that references another multiclass that contains a defm that uses NAME concatenated with other strings.
It would end up doing the concatenations from the second multiclass twice. This occured because SetValue detected a self assignment when trying to set the value of NAME to a VarInit called NAME. NAME is special here and it will get cleaned up later. So add a flag to suppress the self assignment check for this case.

Strangely the self-assignment error was returning false indicating it wasn't an error, but it wasn't doing the right thing. So this also changes it to report an error.

This fixes the names of some AVX512 FMA instructions that showed this double expansion.

llvm-svn: 256725
2016-01-04 03:05:14 +00:00
Ed Maste 6558008935 Remove unused variable
Obtained from FreeBSD r292611

llvm-svn: 256724
2016-01-04 02:10:22 +00:00
Ed Maste 81b4c5f236 Strip trailing whitespace
(There are changes in the copies of these four files in the FreeBSD base
system, and I've changed these ones to reduce gratuitous diffs in future
imports.)

llvm-svn: 256723
2016-01-04 01:43:47 +00:00
Xinliang David Li 74ec5db4bd [PGO] Sync up template file with master
llvm-svn: 256722
2016-01-04 01:22:55 +00:00
NAKAMURA Takumi 0c3b204eae llvm/include/llvm/ProfileData/InstrProfData.inc: Add c++-mode in the header.
llvm-svn: 256721
2016-01-04 00:47:33 +00:00
Dimitry Andric 17f3b0957b Fix one file that I didn't convert properly in r256707.
llvm-svn: 256720
2016-01-03 22:33:32 +00:00
Craig Topper e30b8ca149 Use std::is_sorted and std::none_of instead of manual loops. NFC
llvm-svn: 256719
2016-01-03 19:43:40 +00:00
Craig Topper 1f26d5b1e0 ArrayRef-ize a function. NFC
llvm-svn: 256718
2016-01-03 19:43:23 +00:00
Craig Topper a346705b06 Use std::is_sorted instead of a manual loop. NFC
llvm-svn: 256717
2016-01-03 19:43:20 +00:00
Xinliang David Li 76c3f38774 [PGO] Cleanup: remove reduncant calls in lowering
CoverageMapping data's section and alignment is
already set during creation. No need to call it again
during lowering.

llvm-svn: 256716
2016-01-03 19:38:51 +00:00
Xinliang David Li 5205ca0c70 [PGO] Cleanup: Use covmap header definition in the template file
This is one last remaining instrumentatation related structure
that needs to be migrate to use the centralized template
definition.  With this change, instrumentation code 
related to coverage module header will be kept in sync
with the coverage mapping reader. The remaining code
which makes implicit assumption about covmap control
structure layout in the the lowering pass will cleaned
up in a different patch. This patch is not intended to
have no functional change.

llvm-svn: 256715
2016-01-03 19:26:07 +00:00
Xinliang David Li 20b188c09c [PGO] Cleanup: Use covmap header definition in the template file
This is one last remaining instrumentatation related structure
that needs to be migrate to use the centralized template
definition.  With this change, instrumentation code 
related to coverage module header will be kept in sync
with the coverage mapping reader. The remaining code
which makes implicit assumption about covmap control
structure layout in the the lowering pass will cleaned
up in a different patch. This patch is not intended to
have no functional change.

llvm-svn: 256714
2016-01-03 19:25:54 +00:00
Simon Pilgrim 6e69cbe342 [X86][MMX] Regenerated vector insertion test.
Shows the true horror of what is going on....

llvm-svn: 256713
2016-01-03 19:17:37 +00:00
Xinliang David Li 946558df2d [PGO] Code refactoring to use header struct def /NFC
llvm-svn: 256712
2016-01-03 18:57:40 +00:00
Xinliang David Li 4eb2cd64ff [PGO] Sync up template file with master
llvm-svn: 256711
2016-01-03 18:36:30 +00:00
Xinliang David Li 9e3659aabd [PGO] Introduce coverage map header structure in PGO data template file /NFC
llvm-svn: 256710
2016-01-03 18:35:56 +00:00
Simon Pilgrim 5bf96e41c5 [SelectionDAG] Pulled out common code for CONCAT_VECTORS node creation
Pulled out the similar CONCAT_VECTORS creation code from the 2/3 operand getNode() calls (to handle all UNDEF and all BUILD_VECTOR cases). Added a similar handler to the general getNode() call as well.

llvm-svn: 256709
2016-01-03 18:24:19 +00:00
Simon Pilgrim 3ac854931f [X86][SSE] Added tests for insertion of zero elements into vectors
Many of these could be much better if we just lowered them all as shuffles - especially for the 256-bit vectors.

llvm-svn: 256708
2016-01-03 17:33:32 +00:00
Dimitry Andric 227b928abc Fix several accidental DOS line endings in source files
Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings.  Convert these to native line endings.

There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.

Reviewers: joerg, aaron.ballman

Subscribers: aaron.ballman, sanjoy, dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D15848

llvm-svn: 256707
2016-01-03 17:22:03 +00:00
Simon Pilgrim 569106fe99 [X86][SSE41] Added test cases for improving insertps shuffles
As mentioned on D14261, an upcoming patch will improve combines of insertps instructions. 

llvm-svn: 256706
2016-01-03 17:14:15 +00:00
Simon Pilgrim d17a1df783 [X86][SSE] Added v4f32 shuffle with zero tests
This is mainly test cases for improvements to insertps matching, but pre-SSE41 shuffles could be improved as well

llvm-svn: 256705
2016-01-03 17:02:56 +00:00
Dimitry Andric b1aa87e120 Fix several accidental DOS line endings in source files
Summary:
There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings.

There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those.

Reviewers: joerg, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Differential Revision: http://reviews.llvm.org/D15849

llvm-svn: 256704
2016-01-03 15:55:40 +00:00
Craig Topper 4ceea0a505 [TableGen] Simplify some code slightly. No need to check if the arrays are empty before printing. The loop can be made to print the same thing if the loop is empty. NFC
llvm-svn: 256703
2016-01-03 08:57:41 +00:00
Craig Topper 90b18c4014 Use an ArrayRef to simplify repeated calculation of the array end. NFC
llvm-svn: 256702
2016-01-03 08:45:36 +00:00
Craig Topper 5f167729aa Use std::is_sorted instead of manual loops. NFC
llvm-svn: 256701
2016-01-03 07:33:45 +00:00
Craig Topper 1097df3b4a Use range-based for loop. NFC
llvm-svn: 256700
2016-01-03 07:33:42 +00:00
Craig Topper 322b67f961 [TableGen] Replace a logically negated xor of bools with just an equality comparison for readability. NFC
llvm-svn: 256699
2016-01-03 07:33:39 +00:00
Craig Topper 58a0e7a0d3 [TableGen] Use std::find_if and a lambda instead of manual loops.
llvm-svn: 256698
2016-01-03 07:33:36 +00:00
Craig Topper f58323ef29 [TableGen] Fix a bug introduced in r256627. If the switch was not emitted we still emitted a closing curly brace.
llvm-svn: 256697
2016-01-03 07:33:34 +00:00
Craig Topper 6e526f13f5 [TableGen] Use range-based for loops. NFC
llvm-svn: 256696
2016-01-03 07:33:30 +00:00
Xinliang David Li 37c1fa047d [PGO] simple refactoring (NFC)
llvm-svn: 256695
2016-01-03 04:38:13 +00:00
NAKAMURA Takumi ded575e4eb WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
llvm-svn: 256694
2016-01-03 01:41:00 +00:00
George Rimar 147747ab0b Revert or r256638. I`ve lost a little piece of code when resolved conflicts right before commit. Sorry about that.
Test did not catch this either, so I`ll improve it and recommit later.

Original commit message:
[ELF] - Optimize .eh_frame section: remove CIE if all FDEs referencing it were removed.

This patch performs little optimization for eh_frame section.
If all FDE`s that referenced CIE are removed then CIE is also removed from output. 
That can happen for example when dropping FDEs that point to dropped sections. Testcase showing that is included.
The same optimization was added to ld about 14 years ago: https://sourceware.org/ml/binutils/2001-12/msg00144.html, gold does not do that it seems.

Differential revision: http://reviews.llvm.org/D15564

llvm-svn: 256693
2016-01-02 16:55:01 +00:00
Joseph Tremoulet d425dd13ad [Verifier] Add braces to satisfy buildbots. NFC
Fix build break introduced by r256691.

llvm-svn: 256692
2016-01-02 15:50:34 +00:00
Joseph Tremoulet 131a462690 [WinEH] Verify catchswitch handlers
Summary:
The handler list must be nonempty and consist solely of CatchPads.


Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15842

llvm-svn: 256691
2016-01-02 15:25:25 +00:00
Joseph Tremoulet 06125e52a7 [WinEH] Tighten parentPad verifier checks
Summary: A catchswitch cannot be a parent of a cleanuppad or another catchswitch.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15841

llvm-svn: 256690
2016-01-02 15:24:24 +00:00