Commit Graph

119444 Commits

Author SHA1 Message Date
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
Rafael Espindola b79934657c Materialize functions whose basic blocks are used by global variables. Fixes
PR11677.

llvm-svn: 147425
2012-01-02 07:49:53 +00:00
Rafael Espindola eeb9d9fef6 Small cosmetic cleanups in code I will change anyway.
llvm-svn: 147424
2012-01-02 06:26:22 +00:00
Rafael Espindola b6cc74c809 Small refactoring so that only one of the mergeVisibility/mergeLinkage functions
calls setVisibility/setLinkage.

No functionality change.

llvm-svn: 147423
2012-01-02 06:00:53 +00:00
Douglas Gregor fe620daefa Eliminate ObjCProtocolDecl's end-of-definition location. It is not
used anywhere.

llvm-svn: 147422
2012-01-02 02:22:52 +00:00
Douglas Gregor cf9f3ea6f9 Fix canonicalization of protocol-qualified types
llvm-svn: 147421
2012-01-02 02:00:30 +00:00
Douglas Gregor 1bd9617671 Move ObjCProtocolDecl::EndLoc into its DefinitionData, and give
ObjCProtocolDecl proper source-range information.

llvm-svn: 147420
2012-01-02 01:18:16 +00:00
Douglas Gregor 05a1f4d60b Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. They are no longer needed
llvm-svn: 147419
2012-01-01 22:06:18 +00:00
Abramo Bagnara 123bec89ab Added -Wdisabled-macro-expansion warning.
llvm-svn: 147418
2012-01-01 22:01:04 +00:00
Douglas Gregor da38930cf3 Implement declaration merging for Objective-C protocols across
multiple, disjoint modules. There is far too much duplicating with the
ObjCInterfaceDecl case here, which I'll eliminate shortly.

llvm-svn: 147417
2012-01-01 21:47:52 +00:00
Douglas Gregor a503bb9ce4 Eliminate redundant, empty function
llvm-svn: 147416
2012-01-01 21:39:12 +00:00
Douglas Gregor f610267581 Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.

llvm-svn: 147415
2012-01-01 21:23:57 +00:00
Douglas Gregor c51118238c Don't bother rewriting an Objective-C class or protocol declaration to the module file when we've merely added a definition
llvm-svn: 147414
2012-01-01 20:35:33 +00:00
Douglas Gregor 42ff1bb922 Eliminate ASTMutationListener::UpdatedAttributeList, which is no
longer needed now that we aren't back-patching ObjCProtocolDecls.

llvm-svn: 147413
2012-01-01 20:33:24 +00:00
Douglas Gregor 32c1757730 Wire up redeclaration chains for Objective-C protocols, so that both
forward declarations and definitions of an Objective-C protocol are
represented within a single chain of ObjCProtocolDecls.

llvm-svn: 147412
2012-01-01 20:30:41 +00:00
Craig Topper b910984458 Allow CRC32 instructions to be selected when AVX is enabled.
llvm-svn: 147411
2012-01-01 19:51:58 +00:00
Douglas Gregor a715bfff98 Introduce the core infrastructure needed to model redeclaration chains
for Objective-C protocols, including:
  - Using the first declaration as the canonical declaration
  - Using the definition as the primary DeclContext
  - Making sure that all declarations have a pointer to the definition
  data, and that we know which declaration is the definition
  - Serialization support for redeclaration chains and for adding
  definitions to already-serialized declarations.

However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCProtocolDecls.

llvm-svn: 147410
2012-01-01 19:51:50 +00:00
Craig Topper 1c064e0a89 Fix sfence, lfence, mfence, and clflush to be able to be selected when AVX is enabled. Fix monitor and mwait to require SSE3 or AVX, previously they worked even if SSE3 was disabled. Make prefetch instructions not set the execution domain since they don't use XMM registers.
llvm-svn: 147409
2012-01-01 19:40:22 +00:00