Commit Graph

87748 Commits

Author SHA1 Message Date
Stephen Wilson ebb84b243b Fix a typo.
llvm-svn: 109271
2010-07-23 21:47:22 +00:00
Dan Gohman 7038bd5c1a Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

llvm-svn: 109270
2010-07-23 21:34:51 +00:00
Bruno Cardoso Lopes 6f38011196 Move AVX encoding tests to different files
llvm-svn: 109269
2010-07-23 21:25:26 +00:00
Dan Gohman acafc61023 Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.

llvm-svn: 109268
2010-07-23 21:25:16 +00:00
Dan Gohman 5ae3102459 Micro-optimize SCEVComplexityCompare.
llvm-svn: 109267
2010-07-23 21:20:52 +00:00
Dan Gohman 992db006d0 Add a const qualifier.
llvm-svn: 109266
2010-07-23 21:18:55 +00:00
Dan Gohman 55e244698a Use the proper type for shift counts. This fixes a bootstrap error.
llvm-svn: 109265
2010-07-23 21:08:12 +00:00
Devang Patel 28f167699a There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.
llvm-svn: 109263
2010-07-23 20:38:37 +00:00
Devang Patel 3032354bbe IF directory name is empty then try to extract one using absolute file name.
llvm-svn: 109262
2010-07-23 20:36:13 +00:00
Fariborz Jahanian b59625ecea Test for selector-warning PCH patch.
radar 6507158.

llvm-svn: 109261
2010-07-23 20:32:57 +00:00
Stuart Hastings caf8e3a2db Test case to insure template function declaration refers to correct filename. Radar 8063111.
llvm-svn: 109258
2010-07-23 20:15:49 +00:00
Eli Friedman d4c75cddde Fix for PR7694: make sure to pass in a RecordType to CheckBaseClassAccess;
fixes crashes on both valid and invalid code.  The diagnostic here could
potentially be improved, but it's good enough as-is.

llvm-svn: 109257
2010-07-23 19:25:41 +00:00
Fariborz Jahanian c51609a0b5 PCH read/write for selector reference pool.
Finishes off radar 6507158.

llvm-svn: 109256
2010-07-23 19:11:11 +00:00
Benjamin Kramer 5ea4192b72 Remove useless typedef keyword, fix a clang warning.
llvm-svn: 109254
2010-07-23 18:59:12 +00:00
Bruno Cardoso Lopes ea0e05a3ce Add AVX version of CLMUL instructions
llvm-svn: 109248
2010-07-23 18:41:12 +00:00
Ted Kremenek ac9ca01a80 Dataflow solver: Don't overrwite the initial value of a block with top unless new values are available. Patch by Simone Pellegrini!
llvm-svn: 109243
2010-07-23 18:15:17 +00:00
Dan Gohman 0818684a70 DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
are not demanded. This often allows the anyext to be folded away.

llvm-svn: 109242
2010-07-23 18:03:30 +00:00
Greg Clayton aaa58c6679 Added a new utility class that I have wanted for a while. The CleanUp
class is a templatized class that allows you to have a cleanup function called
on a data value of type T when the value is set or when the object goes
out of scope. It has support for very rudimentary invalid value detection that
can be enabled by using the appropriate constructor. 

Anyone with template experience that can see ways of improving this class
please let me know. The example code shows a few typical scenarios in which
I would like to use it. It is currently coded with simple type T values
in mind (integer file descriptors, pointers, etc), but I am sure some 
specialization might help out the class for more complex types.

There is a lot of documentation including examples in the CleanUp.h header 
file. 

llvm-svn: 109239
2010-07-23 17:42:15 +00:00
Greg Clayton 896dff661a Centralized the Mach exception stop info code by adding it as a first
class citizen on the StopInfo class. 

llvm-svn: 109235
2010-07-23 16:45:51 +00:00
Dan Gohman 2e00e3b12d Make SDNode::dump() print a newline at the end.
llvm-svn: 109234
2010-07-23 16:37:47 +00:00
Douglas Gregor 5cc2c8b9c3 Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!

llvm-svn: 109229
2010-07-23 15:58:24 +00:00
Greg Clayton 572404311a Remove a deadlock condition. A bit of explanation is needed: When calling
ThreadCancel in Host::WillTerminate g_monitor_thread may be blocked on a call
to pthread_cond_wait (for example, line 640).  Now, by default, when a 
cancellation request is serviced g_monitor_thread will again own the mutex
guarding the condition variable it was waiting on.  This causes the call to 
SetValue in Host::WillTerminate to hit a deadlock.

The call to SetValue does not appear to be needed, so removing it solves
the issue.

Patch from Stephen Wilson.

llvm-svn: 109228
2010-07-23 15:47:19 +00:00
Greg Clayton 26661bca20 Remove a premature invalidation of a threads pthread_t handle, thus avoiding
a segfault when calling pthread_cancel.  Also, sets m_read_thread_enabled if
the thread is actually spawned.

Patch from Stephen Wilson.

llvm-svn: 109227
2010-07-23 15:43:25 +00:00
Greg Clayton 19503a2a78 Warnings cleanup patch from Jean-Daniel Dupas.
llvm-svn: 109226
2010-07-23 15:37:46 +00:00
Zhongxing Xu 5e6ef6d957 Add FILE* leak check to StreamChecker. Patch by Lei Zhang.
llvm-svn: 109225
2010-07-23 14:14:59 +00:00
Gabor Greif 4ad7271798 fix constness warnings
llvm-svn: 109224
2010-07-23 13:28:47 +00:00
Eric Christopher 17a8ebcccf Revert r109102 for now as it's causing JIT miscompilations.
I'll try to track down why a bit later.

llvm-svn: 109223
2010-07-23 12:16:56 +00:00
Gabor Greif a1e9c98302 do not (implicitly) dereference iterator many times, cache it instead
llvm-svn: 109222
2010-07-23 10:23:01 +00:00
Eric Christopher 849a8cf815 Revert 109220.
llvm-svn: 109221
2010-07-23 08:53:17 +00:00
Gabor Greif 1025f21ef3 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: 109220
2010-07-23 08:36:07 +00:00
Bill Wendling 8abd1ca8d2 Remove unneeded iostream include.
llvm-svn: 109219
2010-07-23 07:19:31 +00:00
Zhongxing Xu 73ede01cad Change arg type.
llvm-svn: 109218
2010-07-23 05:55:01 +00:00
Mikhail Glushenkov 204fbaf5c2 StringRef'icate.
llvm-svn: 109217
2010-07-23 04:19:39 +00:00
Mikhail Glushenkov dc0a05df55 Formatting.
llvm-svn: 109216
2010-07-23 04:19:34 +00:00
Mikhail Glushenkov 1e5d7c6e82 Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.

llvm-svn: 109215
2010-07-23 03:42:55 +00:00
Greg Clayton 5b9a1ea9c6 Added Mach exception stop descriptions. The chunk of code I just added needs to be placed into a utility location so it can be used by ProcessMacOSX and debugserver.
llvm-svn: 109214
2010-07-23 03:40:38 +00:00
Chris Lattner c0a14c1622 give StringMap a new ctor which allows you to initialize it
with an existing allocator.  The interesting use case of this
is that it allows "StringMap<whatever, BumpPtrAllocator&>" for
when you want to allocate out of a preexisting bump pointer
allocator owned by someone else.

llvm-svn: 109213
2010-07-23 03:29:59 +00:00
Chris Lattner 6ba9d4483f modernize stringset interface
llvm-svn: 109212
2010-07-23 03:21:53 +00:00
Zhongxing Xu 692ac46a70 Delete unnecessary const_cast.
llvm-svn: 109211
2010-07-23 02:54:53 +00:00
Zhongxing Xu cabfb72654 AnalysisContext is not const.
llvm-svn: 109210
2010-07-23 02:49:07 +00:00
Sean Callanan 6dde30e964 Added extensive logging of the code that is actually going
to be executed by the inferior.  This required explicit support
from RecordingMemoryManager for finding the address range
belonging to a particular function.

Also fixed a bug in DisassemblerLLVM where the disassembler
assumed there was an AddressRange available even when it was
NULL.

llvm-svn: 109209
2010-07-23 02:19:15 +00:00
Zhongxing Xu 318e40360d Fix build on Ubuntu 10.04.
llvm-svn: 109208
2010-07-23 02:15:08 +00:00
Bruno Cardoso Lopes d618c8ac64 Declare CLMUL as a subtarget feature
llvm-svn: 109207
2010-07-23 01:22:45 +00:00
Bruno Cardoso Lopes 09dc24beac Add x86 CLMUL (Carry-less multiplication) cpu feature
llvm-svn: 109206
2010-07-23 01:17:51 +00:00
Eric Christopher faf5c76114 80-col.
llvm-svn: 109205
2010-07-23 01:05:59 +00:00
Bruno Cardoso Lopes acd9230b1b Add complete assembler support for FMA3 instructions, with descriptions and encodings taken from the AVX manual
llvm-svn: 109204
2010-07-23 00:54:35 +00:00
Douglas Gregor be2d8c6096 Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.

llvm-svn: 109202
2010-07-23 00:33:23 +00:00
Dale Johannesen f2d75670b7 The only supported calling convention for X86-64 uses
SSE, so we can't return floating point values if this
is disabled.  Detect this error for clang.

With SSE1 only, f64 is a problem; it can be done, but
neither llvm-gcc nor clang has ever generated correct
code for it.  Since nobody noticed this I think it's
OK to treat it as an error for now.

This also handles SSE-sized vectors of floating point.
8207686, 8204109.

llvm-svn: 109201
2010-07-23 00:30:35 +00:00
Sean Callanan 88f0e04e6f Whoops, fixed the LLVM_CONFIGURATION.
llvm-svn: 109200
2010-07-23 00:16:53 +00:00
Sean Callanan ebf7707e53 Modified TaggedASTType to inherit from ClangASTType
and moved it to its own header file for cleanliness.

Added more logging to ClangFunction so that we can
diagnose crashes in the executing expression.

Added code to extract the result of the expression
from the struct that is passed to the JIT-compiled
code.

llvm-svn: 109199
2010-07-23 00:16:21 +00:00