Commit Graph

99102 Commits

Author SHA1 Message Date
Douglas Gregor 7a7dc6f504 Add example from C++0x [temp.deduct.type]p21, which already works
llvm-svn: 123237
2011-01-11 15:36:52 +00:00
Abramo Bagnara 1339223186 Added warning about invalid register specification for local variables.
llvm-svn: 123236
2011-01-11 15:16:52 +00:00
Jay Foad c8adf5f458 FixedNumOperandTraits and VariadicOperandTraits assumed that, given a
"this" pointer for any subclass of User, you could static_cast it to
User* and then reinterpret_cast that to Use* to get the end of the
operand list. This isn't a safe assumption in general, because the
static_cast might adjust the "this" pointer. Fixed by having these
OperandTraits classes take an extra template parameter, which is the
subclass of User. This is groundwork for PR889.

llvm-svn: 123235
2011-01-11 15:07:38 +00:00
Frits van Bommel 8e158495f1 Factor the actual simplification out of SimplifyIndirectBrOnSelect and into a new helper function so it can be reused in e.g. an upcoming SimplifySwitchOnSelect.
No functional change.

llvm-svn: 123234
2011-01-11 12:52:11 +00:00
Oscar Fuentes c8cb58e130 Add to the CMake build some options and platform tests supported by
the traditional build.

Patch by arrowdodger!

llvm-svn: 123233
2011-01-11 12:31:54 +00:00
Oscar Fuentes 77c4f70123 Made llvm_replace_compiler_option more robust. Use it on
llvm_process_sources.

llvm-svn: 123232
2011-01-11 12:31:34 +00:00
Francois Pichet bf711d90ed In Microsoft mode, force 64 bit hex integer constants to signed type if the LL or i64 suffix is used. This MSVC behavior.
For example:

void f(long long){ printf("long long"); }
void f(unsigned long long) { printf("unsigned long long"); }
int main() {
   f(0xffffffffffffffffLL);
}
Will print "long long" using MSVC.

This patch also fixes 16 compile errors related to overloading issues when parsing the MSVC 2008 C++ standard lib.

llvm-svn: 123231
2011-01-11 12:23:00 +00:00
Francois Pichet 12df1dc8f2 Microsoft integer suffix changes:
i64 is like LL
i32 is like L

Also set isMicrosoftInteger to true only if the suffix is well formed.

llvm-svn: 123230
2011-01-11 11:57:53 +00:00
Kalle Raiskila a5538cdbf9 Fix a thinko in 123226 that caused test failures on "other" platforms.
llvm-svn: 123229
2011-01-11 11:27:56 +00:00
Francois Pichet 9b76fa9b07 Rename GenericNodeBuilder to GenericNodeBuilderRefCount to avoid namespace clash using MSVC.
llvm-svn: 123228
2011-01-11 10:41:37 +00:00
Eric Christopher 31bb4c5811 Revert the testcase from the previous reverted commit.
llvm-svn: 123227
2011-01-11 09:20:44 +00:00
Kalle Raiskila be9ad1e631 Add a "nop filler" pass to SPU.
Filling no-ops is done just before emitting of assembly,
when the instruction stream is final. No-ops are inserted
to align the instructions so the dual-issue of the pipeline
is utilized. This speeds up generated code with a minimum of 
1% on a select set of algorithms.

This pass may be redundant if the instruction scheduler and 
all subsequent passes that modify the instruction stream 
(prolog+epilog inserter, register scavenger, are there others?)
are made aware of the instruction alignments.

llvm-svn: 123226
2011-01-11 09:07:54 +00:00
Eric Christopher 23bf3bafb7 Temporarily revert 123133, it's causing some regressions and I'm trying
to get a testcase.

llvm-svn: 123225
2011-01-11 09:02:09 +00:00
Chris Lattner 193ce7c4d1 update memdep when an instruction is deleted. This code isn't
actually reached in the testcase in PR8954, but it's safe and good
practice.

llvm-svn: 123224
2011-01-11 08:19:16 +00:00
Chris Lattner e2523b287c when MergeBlockIntoPredecessor merges two blocks, update MemDep if it
is floating around in the ether.

llvm-svn: 123223
2011-01-11 08:16:49 +00:00
Chris Lattner f6ae904e34 Fix FoldSingleEntryPHINodes to update memdep and AA when it deletes
phi nodes.  It is called from MergeBlockIntoPredecessor which is 
called from GVN, which claims to preserve these.

I'm skeptical that this is the actual problem behind PR8954, but
this is a stab in the right direction.

llvm-svn: 123222
2011-01-11 08:13:40 +00:00
Chris Lattner dfcfcb49fa random cleanups
llvm-svn: 123221
2011-01-11 08:00:40 +00:00
Chris Lattner 054d2a8525 merge tests into one crash.ll test.
llvm-svn: 123220
2011-01-11 07:50:07 +00:00
Chris Lattner 63fe78de68 remove a bogus assertion: the latch block of a loop is not
neccesarily an uncond branch to the header.  This fixes 
PR8955 (the assertion tripping).

llvm-svn: 123219
2011-01-11 07:47:59 +00:00
Chris Lattner 23109cb319 the GEP faq says that only inbounds geps are guaranteed to not overflow.
llvm-svn: 123218
2011-01-11 06:44:41 +00:00
Ted Kremenek a00bccc0c5 Rework ExprEngine::processCFGBlockEntrance()
to use a node builder.  This paves the way
for Checkers to interpose (via a "visit" method)
at the entrance to blocks.

llvm-svn: 123217
2011-01-11 06:37:47 +00:00
Ted Kremenek f82068a994 Remove several silly methods from ento::CoreEngine
that just forwarded to ento::SubEngine.

llvm-svn: 123216
2011-01-11 04:49:40 +00:00
Jakob Stoklund Olesen 087f207009 Revert r123207: "Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare."
It didn't.

llvm-svn: 123215
2011-01-11 04:05:39 +00:00
Douglas Gregor aec93c6bbe Ensure that the result type of an Objective-C class message send is
complete. However, if it returns a reference type, don't require the
type it refers to to be complete. Fixes <rdar://problem/8807070>.

llvm-svn: 123214
2011-01-11 03:23:19 +00:00
Douglas Gregor 5cde386e5e When mapping from a function parameter pack to the set of function
parameters it expanded to, map exactly the number of function
parameters that were expanded rather than just running to the end of
the instantiated parameter list. This finishes the implementation of
the last sentence of C++0x [temp.deduct.call]p1.

llvm-svn: 123213
2011-01-11 03:14:20 +00:00
Ted Kremenek f4ef3d3ca1 Rename misc. methods in ento::Worklist to start
with lowercase letter.

llvm-svn: 123212
2011-01-11 02:34:50 +00:00
Ted Kremenek 926c96211e Rename misc. methods in GRSubEngine to start
with a lower-case letter.  No functionality change.

llvm-svn: 123211
2011-01-11 02:34:45 +00:00
Douglas Gregor 0dd423ef33 Implement the last bullet of [temp.deduct.type]p5 and part of the last
sentence of [temp.deduct.call]p1, both of which concern the
non-deducibility of parameter packs not at the end of a
parameter-type-list. The latter isn't fully implemented yet; see the
new FIXME.

llvm-svn: 123210
2011-01-11 01:52:23 +00:00
Michael J. Spencer 0d771edeee Support/Path: Deprecate PathV1::isDirectory and replace all uses with PathV2::is_directory.
llvm-svn: 123209
2011-01-11 01:21:55 +00:00
Michael J. Spencer e503f89b4b Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory.
llvm-svn: 123208
2011-01-11 01:21:20 +00:00
Jakob Stoklund Olesen 9b6853efd6 Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare.
llvm-svn: 123207
2011-01-11 01:18:03 +00:00
Chandler Carruth b1e7f557b7 Teach constant folding to perform conversions from constant floating
point values to their integer representation through the SSE intrinsic
calls. This is the last part of a README.txt entry for which I have real
world examples.

llvm-svn: 123206
2011-01-11 01:07:24 +00:00
Chandler Carruth fdf4969149 FileCheck-ize a test, and move a no-longer calling test case to another
file and make it actually test something...

llvm-svn: 123205
2011-01-11 01:07:20 +00:00
Douglas Gregor 180dda9b6e Make sure that we parse a '>>' that closes two template argument lists
appropritely when there are no other template arguments.

llvm-svn: 123204
2011-01-11 00:45:18 +00:00
Owen Anderson d490c2d2ae Fix a random missed optimization by making InstCombine more aggressive when determining which bits are demanded by
a comparison against a constant.

llvm-svn: 123203
2011-01-11 00:36:45 +00:00
Eric Christopher 1bb2c00f65 Move ExpandAtomic into the integer expansion routines - it's only used there.
llvm-svn: 123202
2011-01-11 00:36:08 +00:00
Douglas Gregor 94a32477fd When we're inside a functional cast, '>' is an operator. Fixes PR8912.
llvm-svn: 123201
2011-01-11 00:33:19 +00:00
Devang Patel 00c84fd125 Test case for r123199.
llvm-svn: 123200
2011-01-11 00:31:01 +00:00
Devang Patel bc47498973 Fix debug info for __block variable referenced outside of block.
llvm-svn: 123199
2011-01-11 00:30:27 +00:00
Douglas Gregor 8008ba75a5 Add testing for unexpanded parameter packs in all of the C++
expression kinds. This is (indirectly) a test verifying that the
recursive AST visitor is visiting the children of these expression
nodes.

llvm-svn: 123198
2011-01-11 00:27:36 +00:00
Rafael Espindola 0ee986c1f1 Add unnamed_addr to constructors and destructors.
llvm-svn: 123197
2011-01-11 00:26:26 +00:00
Eric Christopher 3904343c68 Even if we don't have 7 bytes of stack space we may need to save and
restore the stack pointer from the frame pointer on thumbv6.

Fixes rdar://8819685

llvm-svn: 123196
2011-01-11 00:16:04 +00:00
Bob Wilson bd4520b535 Move DefaultABIInfo::classifyReturnType where it belongs. No functional change.
llvm-svn: 123195
2011-01-10 23:54:17 +00:00
Matt Beaumont-Gay 2083ba400f Only traverse template argument locations if we actually have explicit
template arguments.

llvm-svn: 123194
2011-01-10 23:53:06 +00:00
Eric Christopher d5bbeba8d0 Expand on the safeness of restoring the sp from the fp a bit more.
llvm-svn: 123193
2011-01-10 23:10:59 +00:00
Rafael Espindola b7f60e3474 Add unnamed_addr when creating artificial string globals. For example, in
static const char foo[] = "foo";
static const char *bar = "bar";

the global created to hold "bar" will have it, but foo will not.

llvm-svn: 123192
2011-01-10 22:34:03 +00:00
Dale Johannesen d2b48119b0 Fix PR 8916 (qv for analysis), at least the immediate problem.
There's an inherent tension in DAGCombine between assuming
that things will be put in canonical form, and the Depth
mechanism that disables transformations when recursion gets
too deep.  It would not surprise me if there's a lot of little
bugs like this one waiting to be discovered.  The mechanism
seems fragile and I'd suggest looking at it from a design viewpoint.

llvm-svn: 123191
2011-01-10 21:53:07 +00:00
Chris Lattner 78cdd2a6c6 +0.0 vs -0.0 differences can be handled by looking at the user of the
operation in some cases.

llvm-svn: 123190
2011-01-10 21:01:17 +00:00
Daniel Dunbar c0e8756ba9 McARM: Flush out hard coded known non-predicated mnemonic list.
llvm-svn: 123189
2011-01-10 21:01:03 +00:00
Douglas Gregor 48d2411597 Implement more of C++0x [temp.arg.explicit]p9, allowing extension of
pack expansions in template argument lists and function parameter
lists. The implementation of this paragraph should be complete
*except* for cases where we're substituting into one of the unexpanded
packs in a pack expansion; that's a general issue I haven't solved yet.

llvm-svn: 123188
2011-01-10 20:53:55 +00:00