Commit Graph

87896 Commits

Author SHA1 Message Date
Ted Kremenek 3d625eb2bf Fix predicate in 'InCachingLexMode' to include 'CurPTHLexer'.
llvm-svn: 109485
2010-07-27 02:58:59 +00:00
Ted Kremenek fee882ac95 PTH generation: Don't save the leading '#' token in a null directive. This unbreaks using PTH with Boost (<rdar://problem/8227989>).
llvm-svn: 109484
2010-07-27 02:58:57 +00:00
Sean Callanan 4edba2d130 Added support for locating a function that is
referenced in the IR.  We don't yet support updating
the call to that function.

llvm-svn: 109483
2010-07-27 02:07:53 +00:00
Bill Wendling 0ff1ef650b It's better to have the arrays, which would trigger the creation of stack
protectors, to be near the stack protectors on the stack. Accomplish this by
tagging the stack object with a predicate that indicates that it would trigger
this. In the prolog-epilog inserter, assign these objects to the stack after the
stack protector but before the other objects.

llvm-svn: 109481
2010-07-27 01:55:19 +00:00
Jordy Rose b052e8f436 Groundwork for C string length tracking. Currently only handles the length of constant string literals, which is not too helpful, and only calls to strlen() are checked.
llvm-svn: 109480
2010-07-27 01:37:31 +00:00
Howard Hinnant 5c67986156 A good start on ecma regex's. Maybe even feature complete, not sure yet. Also an unrelated fix to is_constructible thanks to Daniel Krugler.
llvm-svn: 109479
2010-07-27 01:25:38 +00:00
Dan Gohman 86ac5d85a4 Use AssertingVH for InsertedValues and InsertedPostIncValues, to verify
that the values they refer to aren't being deleted underneath them.

Make sure these containters get cleared by clear(), which IndVarSimplify
and LSR both use before deleting instructions.

llvm-svn: 109478
2010-07-27 01:19:06 +00:00
Sean Callanan b27a62fd13 Fixed a bug in the IR transformer where we were
trying to do replaceUsesOfWith on a constant,
which doesn't work.  Turns out we don't need to
do anything for constants.

llvm-svn: 109477
2010-07-27 01:17:28 +00:00
Sean Callanan 8ade104a0a Changed SymbolContext so when you search for functions
it returns a list of functions as a SymbolContextList.

Rewrote the clients of SymbolContext to use this
SymbolContextList.

Rewrote some of the providers of the data to SymbolContext
to make them respect preferences as to whether the list
should be cleared first; propagated that change out.

ClangExpressionDeclMap and ClangASTSource use this new
function list to properly generate function definitions -
even for functions that don't have a prototype in the
debug information.

llvm-svn: 109476
2010-07-27 00:55:47 +00:00
Douglas Gregor ce3a8293a0 Implement -fno-validate-pch at the -cc1 level, which suppresses most
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.

Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.

This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).

llvm-svn: 109475
2010-07-27 00:27:13 +00:00
Sebastian Redl 66c5eef182 - Fix recording of offsets of types in dependent PCHs.
- Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH.
- Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on.

llvm-svn: 109474
2010-07-27 00:17:23 +00:00
Owen Anderson 761b8bf130 (Hopefully) One last test.
llvm-svn: 109473
2010-07-27 00:04:55 +00:00
Owen Anderson 0f5dcde4b0 Another test.
llvm-svn: 109472
2010-07-27 00:00:47 +00:00
Owen Anderson 79c830fd64 Another test.
llvm-svn: 109471
2010-07-26 23:58:46 +00:00
Douglas Gregor 81c000fb6d When remapping a virtual file, also make an entry for the file with
its absolute path on disk. Also, introduce a fun test for the
precompiled preamble, which almost works...

llvm-svn: 109470
2010-07-26 23:54:23 +00:00
Jakob Stoklund Olesen c698417e52 Add SplitEditor to SplitKit. This class will be used to edit live intervals and
rewrite instructions for live range splitting.

Still work in progress.

llvm-svn: 109469
2010-07-26 23:44:11 +00:00
Dan Gohman c2af77f510 Fix a use-after-free.
llvm-svn: 109468
2010-07-26 23:40:24 +00:00
Fariborz Jahanian 0ebca28f1d 2nd argument of __builtin_expect must be evaluated
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.

llvm-svn: 109467
2010-07-26 23:11:03 +00:00
Chris Lattner 76f0cf457c path renamed.
llvm-svn: 109464
2010-07-26 22:51:00 +00:00
John McCall 5cbe152ffc Test for the presence of EH branch-throughs instead of normal branch-throughs.
I knew this code duplication would bite me.

llvm-svn: 109463
2010-07-26 22:44:58 +00:00
Bill Wendling fa60b0ee51 Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.
llvm-svn: 109462
2010-07-26 22:36:52 +00:00
Eli Friedman f902befe8e And a bit more non-ASCII stuff.
llvm-svn: 109458
2010-07-26 22:28:18 +00:00
Anton Korobeynikov 1e0d76bfd1 Drop some non-ascii stuff
llvm-svn: 109456
2010-07-26 22:23:07 +00:00
Sean Callanan 138e74e347 Fixed a bug where we didn't restore thread and
frame state after running a function.  This
caused nondeterministic crashes in the expression
evaluation code.

llvm-svn: 109454
2010-07-26 22:14:36 +00:00
Benjamin Kramer e93c39045a Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.
llvm-svn: 109452
2010-07-26 22:04:15 +00:00
Bob Wilson f23a06c2e4 Don't call __register_frame from the JIT on systems that use setjmp/longjmp
exception handling.  Also fix an extra underscore typo in one instance of
"__ARM_EABI__".  Radar 8236264.

llvm-svn: 109451
2010-07-26 21:58:00 +00:00
Evan Cheng d4218b8793 On x86, f32 / f64 nodes share the same registers as 128-bit vector values.
llvm-svn: 109450
2010-07-26 21:50:05 +00:00
Evan Cheng e6d6c5dd11 The "excess register pressure" returned by HighRegPressure() is not accurate enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling.
llvm-svn: 109449
2010-07-26 21:49:07 +00:00
Anton Korobeynikov b61a6f2742 Add a note
llvm-svn: 109448
2010-07-26 21:48:35 +00:00
Dan Gohman e83f624f44 Fix an apparent bug.
llvm-svn: 109447
2010-07-26 21:44:15 +00:00
Douglas Gregor 3f4bea0646 Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.

llvm-svn: 109445
2010-07-26 21:36:20 +00:00
Dan Gohman 4888f1a210 Minor code simplification.
llvm-svn: 109443
2010-07-26 21:33:22 +00:00
Dan Gohman 0eb9c124a7 It's not necessary to call flush() on a raw_ostream immediately prior
to deleting it.

llvm-svn: 109441
2010-07-26 21:29:50 +00:00
Dan Gohman 28ade550f4 Fix namespace polution.
llvm-svn: 109440
2010-07-26 21:25:24 +00:00
Dan Gohman a8b949883e Make a variable static.
llvm-svn: 109438
2010-07-26 21:12:29 +00:00
Dan Gohman c0539d2eb6 Use an export file. Plugins must export llvm::Registry symbols.
Also, don't link in all the clang libraries statically.

llvm-svn: 109436
2010-07-26 21:12:10 +00:00
Dan Gohman 9306a8ec1b Add a comment.
llvm-svn: 109435
2010-07-26 21:05:37 +00:00
Bruno Cardoso Lopes 36c2ea6c7a Temporary hack to let codegen assert or generate poor code in case
we are using AVX and no AVX version of the desired intruction is present,
this is better for incremental dev (without fallbacks it's easier to spot
what's missing). Not sure this is the best hack thought (we can also disable
all HasSSE* predicates by dinamically marking them 'false' if AVX is present)

llvm-svn: 109434
2010-07-26 21:01:18 +00:00
Owen Anderson 952e75fbd9 Testing some more.
llvm-svn: 109433
2010-07-26 20:51:45 +00:00
Owen Anderson 73b2f5d910 Test some more.
llvm-svn: 109431
2010-07-26 20:19:04 +00:00
Dan Gohman 14e297e534 Fix library build messages.
llvm-svn: 109430
2010-07-26 20:15:47 +00:00
Dan Gohman 2978d7bcdd Add svn:ignore.
llvm-svn: 109429
2010-07-26 20:11:39 +00:00
Ted Kremenek df4472bca0 Hoist argument type checking into CheckFormatHandler. This is prep for scanf format
string argument type checking.

llvm-svn: 109428
2010-07-26 19:45:54 +00:00
Ted Kremenek 6adb7e35ab Consolidate #args checking for scanf/printf format strings.
llvm-svn: 109427
2010-07-26 19:45:42 +00:00
Devang Patel 6005082354 Revert 109303.
llvm-svn: 109426
2010-07-26 18:49:27 +00:00
Gabor Greif ed79dcb1ab re-commit r109220, the compile error has already been fixed
Simplifying use_iterators by dereferencing
is not a good idea. The codebase does not depend
in this any more, and it may introduce hidden
runtime cost. If you get compile errors, please
dereference your iterator before passing to cast<>
(and friends).

Also: please consider caching the result of
operator* and reusing that instead of dereferencing
many times.

llvm-svn: 109425
2010-07-26 18:48:07 +00:00
Owen Anderson aa7f66ba67 Add an initial implementation of LazyValueInfo updating for JumpThreading. Disabled for now.
llvm-svn: 109424
2010-07-26 18:48:03 +00:00
Anton Korobeynikov 6bcea068db Currently EH lowering code expects typeinfo to be global only.
This assumption is not satisfied due to global mergeing.
Workaround the issue by temporary disablinge mergeing of const globals.
Also, ignore LLVM "special" globals. This fixes PR7716

llvm-svn: 109423
2010-07-26 18:45:39 +00:00
Owen Anderson bb4c4b59a4 Fix a test with malformed IR. Not sure why this didn't fail before.
llvm-svn: 109422
2010-07-26 18:44:56 +00:00
Evan Cheng 23b05d1cf5 ARM fastisel isn't ready.
llvm-svn: 109421
2010-07-26 18:32:55 +00:00