Commit Graph

119611 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 1b7f2a7638 Revert r146997, "Heed spill slot alignment on ARM."
This patch caused a miscompilation of oggenc because a frame pointer was
suddenly needed halfway through register allocation.

<rdar://problem/10625436>

llvm-svn: 147487
2012-01-03 22:34:35 +00:00
Jakob Stoklund Olesen 4043d92872 Assert when reserved registers have been assigned.
This can only happen if the set of reserved registers changes during
register allocation.

<rdar://problem/10625436>

llvm-svn: 147486
2012-01-03 22:34:31 +00:00
Nadav Rotem 6d31bac85e Revert 147426 because it caused pr11696.
llvm-svn: 147485
2012-01-03 22:19:42 +00:00
Nadav Rotem 1e7dda13c8 Fix incorrect widening of the bitcast sdnode in case the incoming operand is integer-promoted.
llvm-svn: 147484
2012-01-03 22:12:28 +00:00
Ted Kremenek 950e534e60 Force set-xcode-analyzer to use the system version of Python installed on OS X.
llvm-svn: 147483
2012-01-03 22:05:57 +00:00
Douglas Gregor 173d499c25 Add __has_feature(objc_modules)
llvm-svn: 147482
2012-01-03 21:12:26 +00:00
Chad Rosier 493c1b3152 Enhance DAGCombine for transforming 128->256 casts into a vmovaps, rather
then a vxorps + vinsertf128 pair if the original vector came from a load.
rdar://10594409

llvm-svn: 147481
2012-01-03 21:05:52 +00:00
Douglas Gregor 26f9601698 Add a test for the driver-level -fmodules/-fno-modules flags.
llvm-svn: 147480
2012-01-03 21:04:31 +00:00
Ted Kremenek b74c909b3c Add test case for PR 9774, which got fixed along the way.
llvm-svn: 147479
2012-01-03 21:02:04 +00:00
Nick Lewycky 228f5b4ba3 Conform to the style guide; remove 'else' after 'return'. Also remove an extra
if-statement by turning it into an assert. No functionality change.

llvm-svn: 147474
2012-01-03 20:33:00 +00:00
Abramo Bagnara 9f3d1ac419 Added testcases for -Wdisabled-macro-expansion.
llvm-svn: 147473
2012-01-03 20:13:03 +00:00
Owen Anderson fcc041eabf Remove the restriction that target intrinsics can only involve legal types. Targets can perfects well support intrinsics on illegal types, as long as they are prepared to perform custom expansion during type legalization. For example, a target where i64 is illegal might still support the i64 intrinsic operation using pairs of i32's. ARM already does some expansions like this for non-intrinsic operations.
llvm-svn: 147472
2012-01-03 20:09:02 +00:00
Lang Hames c405ac4429 Clarified assert text.
llvm-svn: 147471
2012-01-03 20:05:57 +00:00
Stepan Dyatkovskiy e801459320 Fix for PR11652: assertion failures when Type.cpp is compiled with -Os
llvm-svn: 147470
2012-01-03 20:04:35 +00:00
Douglas Gregor 663b48f13b Re-uglify #public and #private to #__public_macro and #__private_macro.
llvm-svn: 147469
2012-01-03 19:48:16 +00:00
Fariborz Jahanian 3c9707bd90 objc: use objc_suppress_autosynthesis attribute on classes
which should not be default synthesized.

llvm-svn: 147468
2012-01-03 19:46:00 +00:00
Douglas Gregor da82e703d1 Eliminate the uglified keyword __import_module__ for importing
modules. This leaves us without an explicit syntax for importing
modules in C/C++, because such a syntax needs to be discussed
first. In Objective-C/Objective-C++, the @import syntax is used to
import modules.

Note that, under -fmodules, C/C++ programs can import modules via the
#include mechanism when a module map is in place for that header. This
allows us to work with modules in C/C++ without committing to a syntax.

llvm-svn: 147467
2012-01-03 19:32:59 +00:00
Joerg Sonnenberger c2f91c37e8 Don't depend on undefined macros being 0, there are options for the
preprocessor to warn about it.

llvm-svn: 147466
2012-01-03 19:22:38 +00:00
Matt Beaumont-Gay b982d8eb65 Fix malformed assert.
If anybody has strong feelings about 'default: assert(0 && "blah")' vs
'default: llvm_unreachable("blah")', feel free to regularize the instances of
each in this file.

llvm-svn: 147459
2012-01-03 19:03:59 +00:00
Bob Wilson bf9a62dcad Fix missing include of int_lib.h and ppc ifdef for FreeBSD.
Patch provided by Ed Schouten!

llvm-svn: 147458
2012-01-03 18:59:25 +00:00
Fariborz Jahanian 9d4d20af55 objc: introduce objc_suppress_autosynthesis class
attributes for later use.

llvm-svn: 147457
2012-01-03 18:45:41 +00:00
Eric Christopher 2007dc8892 Fix typo.
llvm-svn: 147456
2012-01-03 18:38:37 +00:00
Douglas Gregor 0bf886d41a Under -fmodules, accept #public <macroname> and #private <macroname>
to make a macro public (the default for headers) or private,
respectively.

llvm-svn: 147455
2012-01-03 18:24:14 +00:00
Nick Lewycky bc26b2d162 Fix typo in ruler. No functionality change.
llvm-svn: 147454
2012-01-03 18:22:43 +00:00
Devang Patel c1215324a3 Intel style asm variant does not need '%' prefix.
llvm-svn: 147453
2012-01-03 18:22:10 +00:00
Douglas Gregor 22d0974b40 Introduce a non-uglified syntax for module imports in Objective-C:
@import identifier [. identifier]* ;

llvm-svn: 147452
2012-01-03 18:04:46 +00:00
Douglas Gregor e097d4ba26 Don't attempt to merge a deserialized declaration with existing
declarations in the AST unless modules are enabled. This case doesn't
come up with precompiled headers, and it isn't cheap.

llvm-svn: 147451
2012-01-03 17:31:38 +00:00
Douglas Gregor 2c46b5bd07 Factor the merging of declarations in the AST reader out to a separate
member function template, since the behavior is identical for
ObjCInterfaceDecl and ObjCProtocolDecl. It's expected that all
redeclarable entities will have the same behavior.

llvm-svn: 147450
2012-01-03 17:27:13 +00:00
Douglas Gregor 787869b929 Add -fno-modules to the driver, to turn off modules (although they're off by default anyway).
llvm-svn: 147449
2012-01-03 17:13:05 +00:00
Douglas Gregor ad01b31b94 Add a "Modules" language option, which subsumes the previous
"AutoModuleImport" preprocessor option and is tied to -fmodules.

llvm-svn: 147448
2012-01-03 17:07:34 +00:00
Douglas Gregor 2f197adeeb Rename the command-line option for mapping #include/#import over to
module imports from -fauto-module-import to -fmodules. The new name
will eventually be used to enable modules, and the #include/#import
mapping is a crucial part of the feature.

llvm-svn: 147447
2012-01-03 15:21:29 +00:00
Stepan Dyatkovskiy a3e8b00f75 Type: replaced usage of ID with getTypeID().
llvm-svn: 147446
2012-01-03 14:05:04 +00:00
Elena Demikhovsky 8ec21a2801 Fixed a bug in SelectionDAG.cpp.
The failure seen on win32, when i64 type is illegal.
It happens on stage of conversion VECTOR_SHUFFLE to BUILD_VECTOR.

The failure message is:
llc: SelectionDAG.cpp:784: void VerifyNodeCommon(llvm::SDNode*): Assertion `(I->getValueType() == EltVT || (EltVT.isInteger() && I->getValueType().isInteger() && EltVT.bitsLE(I->getValueType()))) && "Wrong operand type!"' failed.

I added a special test that checks vector shuffle on win32.

llvm-svn: 147445
2012-01-03 11:59:04 +00:00
Tobias Grosser 0e2c1bff8f www: Papers about iterative compilation and non static control
llvm-svn: 147444
2012-01-03 10:10:05 +00:00
Tobias Grosser aec0a97a41 Add Udays PhD thesis
llvm-svn: 147443
2012-01-03 10:00:55 +00:00
Tobias Grosser c1610132ef Update publications
- Add the LLVM Developer Meeting 2012 talk
- Add papers used within Polly and papers interesting to read in general

llvm-svn: 147442
2012-01-03 09:50:29 +00:00
Rafael Espindola 0b0620776a Process attributes in explicit template instatiation definitions. Fixes PR11690.
llvm-svn: 147441
2012-01-03 06:04:21 +00:00
Chandler Carruth 3a5ff5cbd2 Teach the frontend to provide the builtin preprocessor defines for
-ffast-math.

llvm-svn: 147440
2012-01-03 02:46:46 +00:00
Andrew Trick cbcc98fb50 Fix SCEVExpander to handle loops with no preheader when LSR gives it a
"phony" insertion point.

Fixes rdar://10619599: "SelectionDAGBuilder shouldn't visit PHI nodes!" assert

llvm-svn: 147439
2012-01-02 21:25:10 +00:00
Richard Smith dbfd4037fc Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.
Add a test that such characters don't make it through to StringLiteral objects
in error recovery.

llvm-svn: 147438
2012-01-02 18:14:06 +00:00
Howard Hinnant 8e25104b10 1. Fix make_shared<const T>. 2. Allow allocator<const T> as an extension. 3. Refactor work which fixed unique_ptr<const T[]>. 4. Remove no-longer-needed private declarations from unique_ptr. 5. Add constraints to some shared_ptr and weak_ptr constructors and assignment operators so that is_constructible/is_assignable give the correct answers for shared_ptr and weak_ptr. 6. Make defensive preparations in the shared_ptr free functions for the introduction of shared_ptr<T[]> in the future. 7. As an optimization, add move constructor and move assignment to weak_ptr.
llvm-svn: 147437
2012-01-02 17:56:02 +00:00
Douglas Gregor 5dbf4eb66b Diagnose cases where the definition of a particular type is required,
is known (to Clang), but is not visible because the module has not yet
been imported.

llvm-svn: 147436
2012-01-02 17:18:37 +00:00
Duncan Sands 7610e45910 Correct spelling.
llvm-svn: 147435
2012-01-02 16:55:01 +00:00
Chandler Carruth 306bd2c6aa Fix PR11685 by implementing -ffast-math and its various friends in the
Clang driver. This involves a bunch of silly option parsing code to try
to carefully emulate GCC's options. Currently, this takes a conservative
approach, and unless all of the unsafe optimizations are enabled, none
of them are. The fine grained control doesn't seem particularly useful.
If it ever becomes useful, we can add that to LLVM first, and then
expose it here.

This also fixes a few tiny bugs in the flag management around
-fhonor-infinities and -fhonor-nans; the flags now form proper sets both
for enabling and disabling, with the last flag winning.

I've also implemented a moderately terrifying GCC feature where
a language change is also provided by the '-ffast-math' flag by defining
the __FAST_MATH__ preprocessor macro. This feature is tracked and
serialized in the frontend but it isn't used yet. A subsequent patch
will add the preprocessor macro and tests for it.

I've manually tested that codegen appears to respect this, but I've not
dug in enough to see if there is an easy way to test codegen options w/o
relying on the particulars of LLVM's optimizations.

llvm-svn: 147434
2012-01-02 14:19:45 +00:00
Abramo Bagnara 7079d7e310 Added a missing case for -Wdisabled-macro-expansion.
llvm-svn: 147433
2012-01-02 10:08:26 +00:00
Chandler Carruth e517273e50 Undo the hack in r147427 and move this unittest to a better home. This
is testing the bitcode reader's functionality, not VMCore's. Add the
what is a hope sufficient build system mojo to build and run a new
unittest.

Also clean up some of the test's naming. The goal for the file should be
to unittest the Bitcode Reader, and this is just one particular test
among potentially many in the future. Also, reverse my position and
relegate the PR# to a comment, but stash the comment on the same line as
the test name so it doesn't get lost. This makes the code more
self-documenting hopefully w/o losing track of the PR number.

llvm-svn: 147431
2012-01-02 09:19:48 +00:00
Craig Topper 5bacb7e9e5 Miscellaneous shuffle lowering cleanup. No functional changes. Primarily converting the indexing loops to unsigned to be consistent across functions.
llvm-svn: 147430
2012-01-02 09:17:37 +00:00
Craig Topper 53d559641f Make CanXFormVExtractWithShuffleIntoLoad reject loads with multiple uses. Also make it return false if there's not even a load at all. This makes the code better match the code in DAGCombiner that it tries to match. These two changes prevent some cases where vector_shuffles were making it to instruction selection and causing the older shuffle selection code to be triggered. Also needed to fix a bad pattern that this change exposed. This is the first step towards getting rid of the old shuffle selection support. No test cases yet because there's no way to tell whether a shuffle was handled in the legalize stage or at instruction selection.
llvm-svn: 147428
2012-01-02 08:46:48 +00:00
Chandler Carruth ddb10a48fb Fix unittest makefile after r147425. This should unbreak the makefile
build. This didn't show up in the CMake build because the CMake build
for the unittests is rather poorly factored.

This probably isn't the correct fix. This should be a bitcode reader
unittest not a VMCore unittest. I'll move it and clean various parts of
the unittest up in a follow-up patch, but I wanted to unbreak the bots.

llvm-svn: 147427
2012-01-02 08:40:40 +00:00
Nadav Rotem 6c7a0e6c8b Optimize the sequence blend(sign_extend(x)) to blend(shl(x)) since SSE blend instructions only look at the highest bit.
llvm-svn: 147426
2012-01-02 08:05:46 +00:00