Commit Graph

195250 Commits

Author SHA1 Message Date
Johannes Doerfert 3f21e27ad3 Simplify dropConstantScheduleDims [NFC]
llvm-svn: 231304
2015-03-04 22:23:21 +00:00
David Blaikie a8adc1349b Provide an explicit move ctor because MSVC can't synthesize one
llvm-svn: 231303
2015-03-04 22:20:52 +00:00
David Blaikie a4533b1016 Fix the clang self-host -Werror build
Sorry about the breakage.

llvm-svn: 231302
2015-03-04 22:15:41 +00:00
Rui Ueyama 57c62e6ab9 PECOFF: Do not add layout-after edges.
The last use of layout-after edge for PE/COFF was removed in r231290.
Now layout-after edges do nothing. We can stop adding them to the graph.
No functionality change intended.

llvm-svn: 231301
2015-03-04 22:13:25 +00:00
Frederic Riss b8b43d5494 [dsymutil] Add minimal code to emit DIE trees.
This commit adds code to emit DIE trees that have been pruned from the
parts that haven't been marked as kept in the previous pass.

It works by 'cloning' the input DIE tree (as read by libDebugInfoDwarf)
into a tree of DIE objects. Cloning the DIEs means essentially cloning
their attributes. The code in this commit does only handle scalar and
block attributes (scalar because they are trivial, blocks because they
can't be easily replaced by a scalr placeholder), all the other ones
are replaced by placeholder zero values and will be handled in
further commits.

The added tests mostly check that the DIE tree has the correct layout and
also verify that a few chosen scalar and block attributes correctly make
their way into the output.

llvm-svn: 231300
2015-03-04 22:07:44 +00:00
Frederic Riss 77f850e336 DWARFFormValue: Add getAsSignedConstant method.
The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.

llvm-svn: 231299
2015-03-04 22:07:41 +00:00
Frederic Riss ee17fb9b0e Teach DIEInteger to emit FORM_strp and FORM_ref_addr attributes.
To be used/tested by llvm-dsymutil. (llvm-dsymutil does a 'static' link,
no need for relocations for most things, so it'll just emit raw integers
for most attributes)

llvm-svn: 231298
2015-03-04 22:07:36 +00:00
Frederic Riss 8874ce8d4b Make the DWARFAbbreviationDeclaration::AttributeSpec type public.
It was already exposed through the iterators anyway.

llvm-svn: 231297
2015-03-04 22:07:30 +00:00
David Blaikie c7aabbb78e Update LangRef for explicit type changes to 'load' instruction
llvm-svn: 231296
2015-03-04 22:06:14 +00:00
Rafael Espindola 266b8c8043 Expand variables when evaluating absolute expressions.
This allows for variables to be used in .size.
This matches gnu AS functionality.

llvm-svn: 231295
2015-03-04 22:03:21 +00:00
David Blaikie 16a97ebf7f Update LangRef for getelementptr explicit type changes
Here's a rough/first draft - it at least hits the actual textual IR
examples and some of the phrasing. It's probably worth a full pass over,
but I'm not sure how much these docs should reflect the strange
intermediate state we're in anyway.

Totally open to lots of review/feedback/suggestions.

llvm-svn: 231294
2015-03-04 22:02:58 +00:00
Alexey Samsonov 27f4571a5a [Sanitizer] Fix/suppress compiler warnings in unit tests.
llvm-svn: 231293
2015-03-04 21:54:20 +00:00
Sanjay Patel edd04aeb3c don't repeat class / function / variable names in comments; NFC
llvm-svn: 231292
2015-03-04 21:49:03 +00:00
Nemanja Ivanovic 55e757db4a Add Clang support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7951

llvm-svn: 231291
2015-03-04 21:48:22 +00:00
Rui Ueyama 77a4da1991 Define DefinedAtom::sectionSize.
Merge::mergeByLargestSection is half-baked since it's defined
in terms of section size, there's no way to get the section size
of an atom.

Currently we work around the issue by traversing the layout edges
to both directions and calculate the sum of all atoms reachable.
I wrote that code but I knew it's hacky. It's even not guaranteed
to work. If you add layout edges before the core linking, it
miscalculates a size.

Also it's of course slow. It's basically a linked list traversal.

In this patch I added DefinedAtom::sectionSize so that we can use
that for mergeByLargestSection. I'm not very happy to add a new
field to DefinedAtom base class, but I think it's legitimate since
mergeByLargestSection is defined for section size, and the section
size is currently just missing.

http://reviews.llvm.org/D7966

llvm-svn: 231290
2015-03-04 21:40:46 +00:00
Alexey Samsonov 00fb6c9da0 Exclude LLVM sources from lint check.
Checking files from different repository is not nice, and LLVM code
follows its own style guide anyway.

llvm-svn: 231289
2015-03-04 21:38:10 +00:00
Enrico Granata b10e003015 Add a required #include
llvm-svn: 231288
2015-03-04 21:33:45 +00:00
Jim Ingham cfae0b23b9 Fix a thinko in the case where we return a launch error with no error
string.  Return "<unknown error>" rather than the empty launch error...

<rdar://problem/20026469>

llvm-svn: 231287
2015-03-04 21:28:55 +00:00
Paul Robinson 78cc0821f0 Support standard DWARF TLS opcode; Darwin and PS4 use it.
Differential Revision: http://reviews.llvm.org/D8018

llvm-svn: 231286
2015-03-04 20:55:11 +00:00
Nemanja Ivanovic e8effe1edb Add LLVM support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7955

llvm-svn: 231285
2015-03-04 20:44:33 +00:00
Reid Kleckner 4276945161 Try to satisfy sanitizer lint check
llvm-svn: 231284
2015-03-04 20:38:59 +00:00
Kostya Serebryany 46e5d5c669 [sanitizer] Since x32 runs under 64-bit kernel, GetKernelAreaSize should return 0
llvm-svn: 231283
2015-03-04 20:32:06 +00:00
David Blaikie eb6c31f900 Add a FIXME for PR22796, broken ordering of ClassInfo in TableGen
As discussed (at length) in code review of r222935, with Duncan.

llvm-svn: 231282
2015-03-04 19:56:44 +00:00
Tobias Grosser bb8d1562ad Remove unnecessary dynamic memory management
llvm-svn: 231281
2015-03-04 19:33:31 +00:00
Reid Kleckner 533bd17268 Fix test/CodeGen/builtins.c for platforms that don't lower sjlj
Opt in Win64 to supporting sjlj lowering. We have the backend lowering,
so I think this was just an oversight because WinX86_64TargetCodeGenInfo
doesn't inherit from X86_64TargetCodeGenInfo.

llvm-svn: 231280
2015-03-04 19:24:16 +00:00
Rafael Espindola 265ffbeb0c Fix the build of the gold-plugin and examples.
llvm-svn: 231279
2015-03-04 19:15:29 +00:00
Reid Kleckner 77b1811fde Try to fix the build after removing DataLayoutPass
llvm-svn: 231278
2015-03-04 19:10:41 +00:00
Reid Kleckner 107f9e6fcd Add missing <atomic> include to PassRegistry.h
llvm-svn: 231277
2015-03-04 19:06:17 +00:00
Erik Eckstein 8c38b8b873 Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes.
This speeds up multithreaded llvm execution by ~5% (tested with 4 threads).
In an asserts build of llvm this has an even bigger impact.

Note that it's not required to use the lock function.

llvm-svn: 231276
2015-03-04 18:57:11 +00:00
David Blaikie 1c47111a85 Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
Reverted in r231254 due to a self-hosting crash of Clang (see Clang
PR22793). Workaround the crash by using {} instead of = default to
define a dtor.

llvm-svn: 231274
2015-03-04 18:52:32 +00:00
Rafael Espindola f3f185486c Bring r231132 back with a fix.
The issue was that we were always printing the remarks. Fix that and add a test
showing that it prints nothing if -pass-remarks is not given.

Original message:
Correctly handle -pass-remarks in the gold plugin.

llvm-svn: 231273
2015-03-04 18:51:45 +00:00
Tobias Grosser 3027fedce4 Allow to build shared libraries if BUILD_SHARED_LIBS is enabled
Contributed-by: Richard Membarth <richard.membarth@uni-saarland.de>
llvm-svn: 231272
2015-03-04 18:51:27 +00:00
Rui Ueyama addf8ebd97 Remove "inline" from inlined functions.
llvm-svn: 231271
2015-03-04 18:51:19 +00:00
Mehdi Amini 46a43556db Make DataLayout Non-Optional in the Module
Summary:
DataLayout keeps the string used for its creation.

As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().

Get rid of DataLayoutPass: the DataLayout is in the Module

The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.

Make DataLayout Non-Optional in the Module

Module->getDataLayout() will never returns nullptr anymore.

Reviewers: echristo

Subscribers: resistor, llvm-commits, jholewinski

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231270
2015-03-04 18:43:29 +00:00
Reid Kleckner 2ae03e1783 Revert "unique_ptrify ValID::ConstantStructElts"
This reverts r231200 and r231204. The second one added an explicit move
ctor for MSVC.

This change broke the clang-cl self-host due to weirdness in MSVC's
implementation of std::map::insert. Somehow we lost our rvalue ref-ness
when going through variadic placement new:

  template <class _Objty, class... _Types>
  void construct(_Objty *_Ptr,
                 _Types &&... _Args) { // construct _Objty(_Types...) at _Ptr
    ::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
  }

For some reason, Clang decided to call the deleted std::pair copy
constructor at this point. Needs further investigation, once I can
build.

llvm-svn: 231269
2015-03-04 18:31:10 +00:00
Tobias Grosser b021a4faad Add support for conditional 'and' and 'or' expressions
No test cases unfortunately as we do not yet generate isl_ast_op_and_then or
isl_ast_op_or_else. Those will be added in a later commit.

llvm-svn: 231268
2015-03-04 18:14:59 +00:00
Alexander Kornienko df0ab6acdf [clang-tidy] Fix namespace comments. NFC.
llvm-svn: 231267
2015-03-04 18:01:10 +00:00
Gabor Horvath e40c71c10a [analyzer] Individual configuration options can be specified for checkers.
Reviewed by: Anna Zaks

Original patch by: Aleksei Sidorin

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

llvm-svn: 231266
2015-03-04 17:59:34 +00:00
Alex Denisov e1d882c726 New ObjC warning: circular containers.
This commit adds new warning to prevent user from creating 'circular containers'.

Mutable collections from NSFoundation allows user to add collection to itself, e.g.: 

NSMutableArray *a = [NSMutableArray new]; 
[a addObject:a]; 

The code above leads to really weird behaviour (crashes, 'endless' recursion) and 
retain cycles (collection retains itself) if ARC enabled.

Patch checks the following collections: 
  - NSMutableArray, 
  - NSMutableDictionary, 
  - NSMutableSet, 
  - NSMutableOrderedSet, 
  - NSCountedSet. 

llvm-svn: 231265
2015-03-04 17:55:52 +00:00
Wei Mi 4d9347993b Revert the test commit.
llvm-svn: 231264
2015-03-04 17:44:22 +00:00
Zachary Turner fc8588136c Don't #include clang headers from BreakpointLocation.h
llvm-svn: 231263
2015-03-04 17:43:00 +00:00
Wei Mi 20401eecd6 Test commit. It will be reverted in the next commit.
llvm-svn: 231262
2015-03-04 17:41:17 +00:00
Adrian Prantl afdac4b7f0 Update the out-of-date dwarf expressions in these testcases.
llvm-svn: 231261
2015-03-04 17:39:59 +00:00
Adrian Prantl 0f61579602 Fix DwarfExpression::AddMachineRegExpression so it doesn't read past the
end of an expression that ends with DW_OP_plus.
Caught by the ASAN build bots.

llvm-svn: 231260
2015-03-04 17:39:33 +00:00
Marek Olsak d2af89df10 R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32
Required by OpenGL (ARB_gpu_shader5).

llvm-svn: 231259
2015-03-04 17:33:45 +00:00
Nemanja Ivanovic d384cd9907 Test commit. Removed an unnecessary space
llvm-svn: 231257
2015-03-04 17:09:12 +00:00
David Blaikie 0bc56dacba Explicitly default ilistTest::Node's copy constructor
In the presence of a user-declared dtor, calling an implicit copy ctor
is deprecated in C++11.

llvm-svn: 231256
2015-03-04 17:01:18 +00:00
Marshall Clow 7945c8a1bb Nbjoerg suggested a better name for the macro for the default rune table: _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
llvm-svn: 231255
2015-03-04 16:50:02 +00:00
NAKAMURA Takumi 2f99a77487 Revert r231221, "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
It broke seflhosting.

llvm-svn: 231254
2015-03-04 16:24:40 +00:00
NAKAMURA Takumi 84a9697c17 Revert r231132, "Correctly handle -pass-remarks in the gold plugin.", for now, to suppress log floodng in LTO.
llvm-svn: 231253
2015-03-04 16:24:28 +00:00