Commit Graph

87760 Commits

Author SHA1 Message Date
Owen Anderson 893483000d Fix use-after-free error.
llvm-svn: 109288
2010-07-23 23:27:43 +00:00
Tom Care cba9f517ac Added an path-sensitive unreachable code checker to the experimental analyzer checks.
- Created a new class to do post-analysis
- Updated several test cases with unreachable code to expect a warning
- Added some general tests

llvm-svn: 109286
2010-07-23 23:04:53 +00:00
Devang Patel 28499f76c9 Revert r109262.
llvm-svn: 109285
2010-07-23 23:04:41 +00:00
Devang Patel cb9fe9ec16 Revert r109263.
llvm-svn: 109284
2010-07-23 23:04:28 +00:00
Dale Johannesen c17dd5790b Revert 109076. It is wrong and was causing regressions. Add some
comments explaining why it was wrong.  8225024.

Fix the real problem in 8213383: the code that splits very large
blocks when no other place to put constants can be found was not
considering the case that the block contained a Thumb tablejump.

llvm-svn: 109282
2010-07-23 22:50:23 +00:00
Greg Clayton 4eb82d9216 Get rid of using EXC_SOFT_SIGNAL define in host agnostic code.
llvm-svn: 109281
2010-07-23 22:50:09 +00:00
John McCall dd762d1e5b We never want to pop the translation unit DC, so assert if this happens.
llvm-svn: 109280
2010-07-23 22:45:07 +00:00
Evan Cheng df907f4594 - Allow target to specify when is register pressure "too high". In most cases,
it's too late to start backing off aggressive latency scheduling when most
  of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
  For ARM, this is almost always a win on # of instructions. It's runtime
  neutral for most of the tests. But for some kernels with high register
  pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
  54 and sped up by 20%.

llvm-svn: 109279
2010-07-23 22:39:59 +00:00
Sean Callanan 289e07b9d0 Added logging:
- When we JIT an expression, we print the disassembly
  of the generated code
- When we put the structure into the target, we print
  the individual entries in the structure byte for
  byte.

llvm-svn: 109278
2010-07-23 22:19:18 +00:00
Bruno Cardoso Lopes d65cd1d581 Remove trailing whitespace
llvm-svn: 109276
2010-07-23 22:15:26 +00:00
John McCall ad5d61e227 Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.

llvm-svn: 109274
2010-07-23 21:56:41 +00:00
Fariborz Jahanian 946274471d Allow __func__ and __FUNCTION__ and __PRETTY_FUNCTION__ inside blocks.
Radar 8218839.

llvm-svn: 109272
2010-07-23 21:53:24 +00:00
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