Commit Graph

215368 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis e053d44309 [CMake] Setup an install component for libclang and c-index-test.
Also don't create libclang dylib symlinks on darwin.

llvm-svn: 252836
2015-11-12 00:46:57 +00:00
David Blaikie fcc796fe30 dwarfdump: Use the right enum for the tu_index section
llvm-svn: 252835
2015-11-12 00:44:35 +00:00
Eric Christopher 2b2d56f059 Provide a frontend based error for always_inline functions that require
target features that the caller function doesn't provide. This matches
the existing backend failure to inline functions that don't have
matching target features - and diagnoses earlier in the case of
always_inline.

Fix up a few test cases that were, in fact, invalid if you tried
to generate code from the backend with the specified target features
and add a couple of tests to illustrate what's going on.

This should fix PR25246.

llvm-svn: 252834
2015-11-12 00:44:12 +00:00
Eric Christopher fbfd97ed5c Move checkTargetFeatures to CodeGenFunction.cpp to make it
more obvious that it's generic.

llvm-svn: 252833
2015-11-12 00:44:07 +00:00
Eric Christopher c7e79dbec8 In preparation to use it in more places rename
checkBuiltinTargetFeatures to checkTargetFeatures and sink
the error handling into the function.

llvm-svn: 252832
2015-11-12 00:44:04 +00:00
Dawn Perchik 66dbb2809d [test] Fix comment.
llvm-svn: 252831
2015-11-12 00:43:22 +00:00
David Blaikie 1e16b12dab dwarfdump: add command line support for dumping the tu_index section
llvm-svn: 252830
2015-11-12 00:42:49 +00:00
Xinliang David Li 4c3ab815ea Fix problems in coding style
llvm-svn: 252829
2015-11-12 00:32:17 +00:00
Vedant Kumar 5eeeab7dcf [Basic] Fix DRY violation, just call getLineTable() (NFC)
llvm-svn: 252828
2015-11-12 00:11:19 +00:00
Nathan Wilson 68b2b9b3dc Add diagnostics which fall under [dcl.spec.concept]p5
Summary: Diagnose when a function concept declaration has parameter(s)

Reviewers: rsmith, faisalv, aaron.ballman, hubert.reinterpretcast

Subscribers: cfe-commits

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

llvm-svn: 252827
2015-11-11 23:53:35 +00:00
Quentin Colombet 10f9813528 [ARM] Enable shrink-wrapping by default.
Differential Revision: http://reviews.llvm.org/D14357

rdar://problem/21942589

llvm-svn: 252825
2015-11-11 23:31:46 +00:00
Reid Kleckner b9204a584c [WinEH] Don't forward branches across empty EH pad BBs
For really simple SEH catchpads, we tried to forward the invoke unwind
edge across the empty block.

llvm-svn: 252822
2015-11-11 23:09:31 +00:00
Manman Ren f93fff27f0 [TLS on Darwin] treat all Darwin platforms in the same way.
rdar://problem/9001553

llvm-svn: 252820
2015-11-11 23:08:18 +00:00
Eric Christopher 2b90a64e31 Extract out a function onto CodeGenModule for getting the map of
features for a particular function, then use it to clean up some
code.

llvm-svn: 252819
2015-11-11 23:05:08 +00:00
Chad Rosier cc9030b60a [LIR] General refactor to improve compile-time and simplify code.
First create a list of candidates, then transform.  This simplifies the code in
that you have don't have to worry that you may be using an invalidated
iterator.

Previously, each time we created a memset/memcpy we would reevaluate the entire
loop potentially resulting in lots of redundant work for large basic blocks.

llvm-svn: 252817
2015-11-11 23:00:59 +00:00
Kostya Serebryany 673283cc7c [sanitizer coverage] reset global counters in __sanitizer_reset_coverage
llvm-svn: 252815
2015-11-11 22:44:25 +00:00
Manman Ren 6815026991 [TLS on Darwin] change how we handle globals with linkonce or weak linkage.
This is about how we handle static member of a template. Before this commit,
we use internal linkage for the IR thread-local variable, which is inefficient.
With this commit, we will start to follow Itanium C++ ABI.

rdar://problem/23415206

Reviewed by John McCall.

llvm-svn: 252814
2015-11-11 22:42:31 +00:00
Johannes Doerfert fdbf201fc9 [FIX] Do not generate code for parameters referencing dead values
Check if a value that is referenced by a parameter is dead and do not
generate code for the parameter in such a case.

llvm-svn: 252813
2015-11-11 22:40:51 +00:00
Hemant Kulkarni b3d4f215bf Fix docs build break for revision r252798
llvm-svn: 252812
2015-11-11 22:14:58 +00:00
David Majnemer f0f224d12d [IR] Add support for empty tokens
When working with tokens, it is often the case that one has instructions
which consume a token and produce a new token.  Currently, we have no
mechanism to represent an initial token state.

Instead, we can create a notional "empty token" by inventing a new
constant which captures the semantics we would like.  This new constant
is called ConstantTokenNone and is written textually as "token none".

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

llvm-svn: 252811
2015-11-11 21:57:16 +00:00
Chris Bieneman 77f211c1aa [CMake] Fixing passthrough for variables starting with the sub-project name
This allows TEST_SUITE variables to be passed from the top-level CMake into the external project.

llvm-svn: 252810
2015-11-11 21:54:31 +00:00
Chris Bieneman 74d20e4853 [CMake] Fixing passthrough for variables starting with COMPILER_RT
This allows COMPILER_RT_* variables to be passed from the top-level CMake into the external project when LLVM_BUILD_EXTERNAL_COMPILER_RT=On.

llvm-svn: 252809
2015-11-11 21:53:08 +00:00
Chris Bieneman 66c126a042 [CMake] [Darwin] [Builtins] Force setting the flags we care about at the end of the compiler command line
Setting CMAKE_*_FLAGS isn't sufficient here because CMAKE_*_FLAGS_${CMAKE_BUILD_TYPE} can override the flags, and there is no way to safely clear that because it is a cached variable (<sarcasm> YAY! </sarcasm>).

llvm-svn: 252807
2015-11-11 21:38:35 +00:00
Sanjoy Das cdafd8490a Introduce deoptimization operand bundles
Summary:
This change introduces the notion of "deoptimization" operand bundles.
LLVM can recognize and optimize these in more precise ways than it can a
generic "unknown" operand bundles.

The current form of this special recognition / optimization is an enum
entry in LLVMContext, a LangRef blurb and a verifier rule.  Over time we
will teach LLVM to do more aggressive optimization around deoptimization
operand bundles, exploiting known facts about kinds of state
deoptimization operand bundles are allowed to track.

Reviewers: reames, majnemer, chandlerc, dexonsmith

Subscribers: llvm-commits

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

llvm-svn: 252806
2015-11-11 21:38:02 +00:00
Evgeniy Stepanov 77ef54288a [asan] Remove a flaky test.
llvm-svn: 252805
2015-11-11 21:37:12 +00:00
Mike Aizatsky 8b2e052429 Adding qualifier for make_unique.
Summary: MSVC gets confused.

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

llvm-svn: 252804
2015-11-11 21:28:40 +00:00
Zachary Turner b8058a5e6e Remove `FindSessionDictionary` and rely on PythonDataObjects.
This had been relegated to a simple forwarding function, so just
delete it in preparation of migrating all of these functions out
of python-wrapper.swig.

llvm-svn: 252803
2015-11-11 21:07:29 +00:00
Mike Aizatsky 608e436564 sancov tool in c++
First batch of sancov.py rewrite in c++.
Supports "-print" and "-coveredfns" commands.

Followup to http://reviews.llvm.org/D14356 in a better location.

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

llvm-svn: 252801
2015-11-11 20:58:20 +00:00
Paul Robinson 8ab79a1e8a Report Windows error code in a fatal error after a system call.
llvm-svn: 252800
2015-11-11 20:49:32 +00:00
David Blaikie 1070a09f17 unique_ptrify the AllocValueProfData helper function introduced in r252783
llvm-svn: 252799
2015-11-11 20:44:52 +00:00
Hemant Kulkarni bdce12a01b [Symbolizer]: Add -pretty-print option
Differential Revision: http://reviews.llvm.org/D13671

llvm-svn: 252798
2015-11-11 20:41:43 +00:00
Devin Coughlin 932d88ca05 [analyzer] Fix scan-build to handle missing output directories.
Cwd::abs_path has a somewhat tricky semantics: if it's operand directory does not exist,
it'll return undefined (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257568).
This may cause scan-build to silently ignore output directory (specified with -o) and
use /tmp instead of trying to create directory. This tiny patch fixes the problem.

A patch by Yury Gribov!

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

llvm-svn: 252797
2015-11-11 20:39:03 +00:00
Akira Hatanaka d932679c71 Move the enum attributes defined in Attributes.h to a table-gen file.
This is a step towards consolidating some of the information regarding
attributes in a single place.

This patch moves the enum attributes in Attributes.h to the table-gen
file. Additionally, it adds definitions of target independent string
attributes that will be used in follow-up commits by the inliner to
check attribute compatibility.

rdar://problem/19836465

llvm-svn: 252796
2015-11-11 20:35:42 +00:00
Tobias Grosser e19fca4525 ScopInfo: Bailing out means assigning isl_set_empty to the AssumedContext
I got this the other way around in 252750. Thank you Johannes for noticing.

llvm-svn: 252795
2015-11-11 20:21:39 +00:00
Tobias Grosser 910cf26811 ScopInfo: Do not try to model the memory accesses in an error block
Error blocks may contain arbitrary instructions, among them some which we can
not modeled correctly. As we do not generate ScopStmts for error blocks anyhow
there is no point in trying to generate access functions for them.

This fixes llvm.org/PR25494

llvm-svn: 252794
2015-11-11 20:15:49 +00:00
Davide Italiano 5be2233a81 [SemaDeclCXX] Use isTemplateParamScope() rather than accessing raw bits.
llvm-svn: 252793
2015-11-11 20:06:35 +00:00
Johannes Doerfert 9d7899ef9c [NFC] Simplify code
llvm-svn: 252792
2015-11-11 20:01:31 +00:00
Yunzhong Gao ea7b3a2320 Add a libLTO diagnostic handler that supports lto_get_error_message API
This is a follow-up from the previous discussion on the thread:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151019/307763.html

The LibLTO lto_get_error_message() API reads error messages from a std::string
sLastErrorString. Instead of passing this string around as an argument, this
patch creates a diagnostic handler and then sends this handler to the
constructor of LTOCodeGenerator.

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

llvm-svn: 252791
2015-11-11 19:59:08 +00:00
Rafael Espindola 0c6a4f197f Add support for processing .eh_frame.
This adds support for:
* Uniquing CIEs
* Dropping FDEs that point to dropped sections

It drops 657 488 bytes from the .eh_frame of a Release+Asserts clang.

The link time impact is smallish. Linking clang with a Release+Asserts
lld goes from 0.488064805 seconds to 0.504763060 seconds (1.034 X slower).

llvm-svn: 252790
2015-11-11 19:54:14 +00:00
Geoff Berry 2ddfc5e60f [DAGCombiner] Improve zextload optimization.
Summary:
Don't fold
  (zext (and (load x), cst)) -> (and (zextload x), (zext cst))
if
  (and (load x) cst)
will match as a zextload already and has additional users.

For example, the following IR:

  %load = load i32, i32* %ptr, align 8
  %load16 = and i32 %load, 65535
  %load64 = zext i32 %load16 to i64
  store i32 %load16, i32* %dst1, align 4
  store i64 %load64, i64* %dst2, align 8

used to produce the following aarch64 code:

	ldr		w8, [x0]
	and	w9, w8, #0xffff
	and	x8, x8, #0xffff
	str		w9, [x1]
	str		x8, [x2]

but with this change produces the following aarch64 code:

	ldrh		w8, [x0]
	str		w8, [x1]
	str		x8, [x2]

Reviewers: resistor, mcrosier

Subscribers: llvm-commits

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

llvm-svn: 252789
2015-11-11 19:42:52 +00:00
Zachary Turner caab921f8a Convert python-wrapper.swig to use PythonDataObjects.
This only begins to port python-wrapper.swig over.  Since this
code can be pretty hairy, I plan to do this incrementally over a
series of patches, each time removing or converting more code
over to the PythonDataObjects code.

llvm-svn: 252788
2015-11-11 19:42:35 +00:00
Zachary Turner a140514733 Create `PythonTuple` and `PythonCallable` wrapper classes.
This adds PythonTuple and PythonCallable classes to PythonDataObjects.
Additionally, unit tests are provided that exercise this functionality,
including invoking manipulating and checking for validity of tuples,
and invoking and checking for validity of callables using a variety
of different syntaxes.

The goal here is to eventually replace the code in python-wrapper.swig
that directly uses the Python C API to deal with callables and name
resolution with this code that can be more easily tested and debugged.

llvm-svn: 252787
2015-11-11 19:42:27 +00:00
David Blaikie 51c402838c dwarfdump: DWP type unit index dumping skeleton
llvm-svn: 252786
2015-11-11 19:40:49 +00:00
Charles Li 542f04cc4d [Lit Test] Updated 26 Lit tests to be C++11 compatible.
Expected diagnostics have been expanded to vary by C++ dialect.
RUN line has also been expanded to: default, C++98/03 and C++11.

llvm-svn: 252785
2015-11-11 19:34:47 +00:00
Reid Kleckner 99f23473a1 [Windows] Add exports for dll_host test broken by r252071 and r251071
llvm-svn: 252784
2015-11-11 19:34:01 +00:00
Xinliang David Li 4d1bef3f76 Refactoring and fix another instance of asan error
llvm-svn: 252783
2015-11-11 19:31:53 +00:00
David Blaikie 0b44dcc44a Format my previous commit
llvm-svn: 252782
2015-11-11 19:30:47 +00:00
David Blaikie 65a8efe441 dwarfdump: First piece of support for DWP dumping
Just a tiny piece of index dumping - the header in this instance.

llvm-svn: 252781
2015-11-11 19:28:21 +00:00
Tobias Grosser 316b5b2507 ScopInfo: Remove unused return value [NFC]
llvm-svn: 252780
2015-11-11 19:28:14 +00:00
Hemant Kulkarni fdba4c0121 Test commit after password reset
llvm-svn: 252779
2015-11-11 19:24:08 +00:00