platform/upstream/llvm.git
11 years agoAdd a couple of stubs to the release notes for things I noticed while
Chandler Carruth [Mon, 5 Nov 2012 10:17:00 +0000 (10:17 +0000)]
Add a couple of stubs to the release notes for things I noticed while
clearing out my backlog of commit mail.

llvm-svn: 167380

11 years agoOur style for diagnostic messages is to not include a trailing dot.
Matt Beaumont-Gay [Mon, 5 Nov 2012 05:32:00 +0000 (05:32 +0000)]
Our style for diagnostic messages is to not include a trailing dot.

llvm-svn: 167379

11 years agoPR14256: SelectionDAGLowering was renamed to SelectionDAGBuilder a long time ago...
Eli Bendersky [Mon, 5 Nov 2012 02:59:23 +0000 (02:59 +0000)]
PR14256: SelectionDAGLowering was renamed to SelectionDAGBuilder a long time ago.  Fix references to it in documentation and comments.

llvm-svn: 167378

11 years agoConstantFolding.cpp: Whitespace.
NAKAMURA Takumi [Mon, 5 Nov 2012 00:11:11 +0000 (00:11 +0000)]
ConstantFolding.cpp: Whitespace.

llvm-svn: 167377

11 years agoPut the usage-directive inside the nearest namespace or TU decl. We don't want
Nick Lewycky [Sun, 4 Nov 2012 20:21:54 +0000 (20:21 +0000)]
Put the usage-directive inside the nearest namespace or TU decl. We don't want
to have UsingDirectiveDecl inside anything other than those two.

No user-visible functionality change.

llvm-svn: 167376

11 years agoFixes liftime of captured block variables in mrr mode, per John's feedback, as
Fariborz Jahanian [Sun, 4 Nov 2012 18:19:40 +0000 (18:19 +0000)]
Fixes liftime of captured block variables in mrr mode, per John's feedback, as
well as couple of tests which were not being excercised because of TYPOs.

llvm-svn: 167374

11 years agoTests: Pipe test files into 'opt'
Tobias Grosser [Sun, 4 Nov 2012 16:56:20 +0000 (16:56 +0000)]
Tests: Pipe test files into 'opt'

Use 'opt < %s' instead of just 'opt %s' to ensure that no temporary files are
created.

llvm-svn: 167372

11 years agoApply the patch from PR14160. I failed to construct a testcase for this, but
Duncan Sands [Sun, 4 Nov 2012 09:02:45 +0000 (09:02 +0000)]
Apply the patch from PR14160.  I failed to construct a testcase for this, but
I'm applying it anyway since it seems to be obviously correct.

llvm-svn: 167370

11 years agoTest case for r167363.
Lang Hames [Sun, 4 Nov 2012 05:08:08 +0000 (05:08 +0000)]
Test case for r167363.

llvm-svn: 167369

11 years agoRemove alignments from folding tables for scalar FMA4 instructions.
Craig Topper [Sun, 4 Nov 2012 04:40:08 +0000 (04:40 +0000)]
Remove alignments from folding tables for scalar FMA4 instructions.

llvm-svn: 167366

11 years agoAdd new ArchSpec methods, IsCompatibleMatch() and IsExactMatch().
Jason Molenda [Sun, 4 Nov 2012 03:20:05 +0000 (03:20 +0000)]
Add new ArchSpec methods, IsCompatibleMatch() and IsExactMatch().
The operator== method is a synonym for IsExactMatch().

The essential difference between these two is that IsCompatibleMatch()
will say that armv7 and armv7s are compatible and return true.
IsExactMatch() will say that armv7 and armv7s are not a match.

An armv7s cpu can run either generic armv7 binaries or armv7s binaries
(the latter being tuned for it).  When we're picking the slice of a
universal Mach-O file to load in an armv7s Target, we need to be able to
first look for an exact cpu subtype match (armv7s == armv7s) and failing
that, looking for a slice with a compatible architecture.

Update ObjectContainerUniversalMachO::GetObjectFile to prefer an exact
match of the cpu type, falling back to a compatible match if necessary.

<rdar://problem/12593515>

llvm-svn: 167365

11 years agoonly truncate source lines in text diagnostics when
Seth Cantrell [Sat, 3 Nov 2012 23:56:43 +0000 (23:56 +0000)]
only truncate source lines in text diagnostics when
the ellipsis is shorter than the text it replaces

llvm-svn: 167364

11 years agoSupport interleaving of other pragmas with FP_CONTRACT at the beginning of a
Lang Hames [Sat, 3 Nov 2012 22:29:05 +0000 (22:29 +0000)]
Support interleaving of other pragmas with FP_CONTRACT at the beginning of a
compound statement.

llvm-svn: 167363

11 years agoAddress review comments for r167358: explicitly check for CK_BitCast instead of
Dmitri Gribenko [Sat, 3 Nov 2012 22:10:18 +0000 (22:10 +0000)]
Address review comments for r167358: explicitly check for CK_BitCast instead of
checking against a blacklist.

llvm-svn: 167362

11 years agodon't step into the middle of multibyte sequences
Seth Cantrell [Sat, 3 Nov 2012 21:21:17 +0000 (21:21 +0000)]
don't step into the middle of multibyte sequences

llvm-svn: 167361

11 years agofix bug in SourceColumnMap::startOfPreviousColumn
Seth Cantrell [Sat, 3 Nov 2012 21:21:14 +0000 (21:21 +0000)]
fix bug in SourceColumnMap::startOfPreviousColumn

llvm-svn: 167360

11 years agoEscape trigraphs in unittest.
Benjamin Kramer [Sat, 3 Nov 2012 20:58:26 +0000 (20:58 +0000)]
Escape trigraphs in unittest.

llvm-svn: 167359

11 years agoHandle CK_NullToPointer casts in -Wtype-safety properly. Fixes PR14249.
Dmitri Gribenko [Sat, 3 Nov 2012 16:07:49 +0000 (16:07 +0000)]
Handle CK_NullToPointer casts in -Wtype-safety properly.  Fixes PR14249.

llvm-svn: 167358

11 years agoRemove a const_cast by propagating constness to the member function.
Dmitri Gribenko [Sat, 3 Nov 2012 14:24:57 +0000 (14:24 +0000)]
Remove a const_cast by propagating constness to the member function.

llvm-svn: 167357

11 years agoFix the IntegersSubsetTest unit test when compiled with gcc-4.7. The issue here
Duncan Sands [Sat, 3 Nov 2012 14:04:04 +0000 (14:04 +0000)]
Fix the IntegersSubsetTest unit test when compiled with gcc-4.7.  The issue here
is that the unit test doesn't have IntTy equal to APInt, instead it uses a class
derived from APInt.  When, as in these lines, an IntTy& reference is returned
but is assigned to an APInt&, the compiler destroys the temporary the IntTy& was
referring to, leaving the APInt& referring to garbage.  This causes the unittest
to fail systematically on my machine; it can also be caught by running the test
under valgrind.

llvm-svn: 167356

11 years agoStaticAnalyzer/Core/ExprEngineCallAndReturn.cpp: Appease msvc.
NAKAMURA Takumi [Sat, 3 Nov 2012 13:59:36 +0000 (13:59 +0000)]
StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp: Appease msvc.

0 (as nullptr) is incompatible to pointer in type matching on msvc.

llvm-svn: 167355

11 years agoGeneralize the transform that boosts GEP indices to the size of a pointer to
Duncan Sands [Sat, 3 Nov 2012 11:44:17 +0000 (11:44 +0000)]
Generalize the transform that boosts GEP indices to the size of a pointer to
also do it for vectors of pointers.

llvm-svn: 167354

11 years agoAdd a proper algorithm to compute accurate source ranges for diagnostics with
Eli Friedman [Sat, 3 Nov 2012 03:36:51 +0000 (03:36 +0000)]
Add a proper algorithm to compute accurate source ranges for diagnostics with
caret locations and source ranges in macros.  Makes ranges more accurate
in some cases, and fixes an assertion failure.

Fixes <rdar://problem/12472249>.

llvm-svn: 167353

11 years ago[analyzer] Run remove dead on end of path.
Anna Zaks [Sat, 3 Nov 2012 02:54:20 +0000 (02:54 +0000)]
[analyzer] Run remove dead on end of path.

This will simplify checkers that need to register for leaks. Currently,
they have to register for both: check dead and check end of path.

I've modified the SymbolReaper to consider everything on the stack dead
if the input StackLocationContext is 0.

(This is a bit disruptive, so I'd like to flash out all the issues
asap.)

llvm-svn: 167352

11 years ago[analyzer] add LocationContext::inTopFrame() helper.
Anna Zaks [Sat, 3 Nov 2012 02:54:16 +0000 (02:54 +0000)]
[analyzer] add LocationContext::inTopFrame() helper.

llvm-svn: 167351

11 years ago[analyzer] Refactor: Remove Pred from NodeBuilderContext.
Anna Zaks [Sat, 3 Nov 2012 02:54:11 +0000 (02:54 +0000)]
[analyzer] Refactor: Remove Pred from NodeBuilderContext.

Node builders should manage the nodes, not the context.

llvm-svn: 167350

11 years agoFix a little think-o. In FileSpec::operator== we were trying to figure out whether...
Jim Ingham [Sat, 3 Nov 2012 02:12:46 +0000 (02:12 +0000)]
Fix a little think-o.  In FileSpec::operator== we were trying to figure out whether the rhs file was resolved or not by comparing
the resolved version of the rhs FileSpec's directory name with the lhs FileSpec's directory name.  We really meant to compare it
with the rhs FileSpec's directory name...

<rdar://problem/12438838>

llvm-svn: 167349

11 years ago[mips] Set flag neverHasSideEffects flag on floating point conversion
Akira Hatanaka [Sat, 3 Nov 2012 00:53:12 +0000 (00:53 +0000)]
[mips] Set flag neverHasSideEffects flag on floating point conversion
instructions.

llvm-svn: 167348

11 years agoX86 CostModel: Add support for a some of the common arithmetic instructions for SSE4...
Nadav Rotem [Sat, 3 Nov 2012 00:39:56 +0000 (00:39 +0000)]
X86 CostModel: Add support for a some of the common arithmetic instructions for SSE4, AVX and AVX2.

llvm-svn: 167347

11 years agoSimplify these tests again, now that we're past the version skew.
David Blaikie [Sat, 3 Nov 2012 00:27:14 +0000 (00:27 +0000)]
Simplify these tests again, now that we're past the version skew.

llvm-svn: 167346

11 years ago[mips] Set flag isAsCheapAsAMove flag on instruction LUi.
Akira Hatanaka [Sat, 3 Nov 2012 00:26:02 +0000 (00:26 +0000)]
[mips] Set flag isAsCheapAsAMove flag on instruction LUi.

llvm-svn: 167345

11 years agoBe careful not to optimize a SELECT_CC into a SETCC post-legalization if the SETCC...
Owen Anderson [Sat, 3 Nov 2012 00:17:26 +0000 (00:17 +0000)]
Be careful not to optimize a SELECT_CC into a SETCC post-legalization if the SETCC node would be illegal.

llvm-svn: 167344

11 years agoMake sure users know that "target variable" can read variables while running a proces...
Greg Clayton [Sat, 3 Nov 2012 00:10:22 +0000 (00:10 +0000)]
Make sure users know that "target variable" can read variables while running a process by changing the documentation string.

llvm-svn: 167343

11 years agoCaught two cases where we were passing a Stream* without checking for NULL
Enrico Granata [Sat, 3 Nov 2012 00:09:46 +0000 (00:09 +0000)]
Caught two cases where we were passing a Stream* without checking for NULL

llvm-svn: 167342

11 years ago[mips] Stop reserving register AT and use register scavenger when a scratch
Akira Hatanaka [Sat, 3 Nov 2012 00:05:43 +0000 (00:05 +0000)]
[mips] Stop reserving register AT and use register scavenger when a scratch
register is needed.

llvm-svn: 167341

11 years ago[analyzer] Convert SimpleStreamChecker over to CallEvent.
Jordan Rose [Fri, 2 Nov 2012 23:49:35 +0000 (23:49 +0000)]
[analyzer] Convert SimpleStreamChecker over to CallEvent.

llvm-svn: 167340

11 years ago[analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt.
Jordan Rose [Fri, 2 Nov 2012 23:49:33 +0000 (23:49 +0000)]
[analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt.

llvm-svn: 167339

11 years ago[analyzer] Add some convenience accessors to CallEvent, and use them.
Jordan Rose [Fri, 2 Nov 2012 23:49:29 +0000 (23:49 +0000)]
[analyzer] Add some convenience accessors to CallEvent, and use them.

These are CallEvent-equivalents of helpers already accessible in
CheckerContext, as part of making it easier for new checkers to be written
using CallEvent rather than raw CallExprs.

llvm-svn: 167338

11 years ago[analyzer] isCLibraryFunction: check that the function is at TU-scope.
Jordan Rose [Fri, 2 Nov 2012 23:49:24 +0000 (23:49 +0000)]
[analyzer] isCLibraryFunction: check that the function is at TU-scope.

Also, Decls already carry a pointer to the ASTContext, so there's no need
to pass an extra argument to the predicate.

llvm-svn: 167337

11 years agoEmit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class...
David Blaikie [Fri, 2 Nov 2012 23:40:00 +0000 (23:40 +0000)]
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).

llvm-svn: 167336

11 years ago[mips] Do not reserve all 64-bit registers, but only the ones which need to be
Akira Hatanaka [Fri, 2 Nov 2012 23:36:01 +0000 (23:36 +0000)]
[mips] Do not reserve all 64-bit registers, but only the ones which need to be
reserved. Without this fix, RegScavenger::getRegsAvailable incorrectly
returns an empty set of integer registers.

llvm-svn: 167335

11 years agoInclude all the fields so we can correctly emit DW_TAG_structure_type for C++ structs.
David Blaikie [Fri, 2 Nov 2012 23:33:23 +0000 (23:33 +0000)]
Include all the fields so we can correctly emit DW_TAG_structure_type for C++ structs.

llvm-svn: 167334

11 years agoAdd a stub for the x86 cost model impl. Implement a basic cost rule for inserting...
Nadav Rotem [Fri, 2 Nov 2012 23:27:16 +0000 (23:27 +0000)]
Add a stub for the x86 cost model impl. Implement a basic cost rule for inserting/extracting from XMM registers.

llvm-svn: 167333

11 years agoAvoid version skew by making ObjC strict metadata tests resilient to new field.
David Blaikie [Fri, 2 Nov 2012 23:07:41 +0000 (23:07 +0000)]
Avoid version skew by making ObjC strict metadata tests resilient to new field.

llvm-svn: 167332

11 years agoobjective-C mrr block. Block variable layout metadata in
Fariborz Jahanian [Fri, 2 Nov 2012 22:51:18 +0000 (22:51 +0000)]
objective-C mrr block. Block variable layout metadata in
mrr mode.

llvm-svn: 167331

11 years agoRemove empty directory
Nadav Rotem [Fri, 2 Nov 2012 22:35:50 +0000 (22:35 +0000)]
Remove empty directory

llvm-svn: 167330

11 years agoCostModel: add support for Vector Insert and Extract.
Nadav Rotem [Fri, 2 Nov 2012 22:31:56 +0000 (22:31 +0000)]
CostModel: add support for Vector Insert and Extract.

llvm-svn: 167329

11 years agoremove empty directories
Chris Lattner [Fri, 2 Nov 2012 22:29:53 +0000 (22:29 +0000)]
remove empty directories

llvm-svn: 167328

11 years agoFixed a problem where we mistook normal result
Sean Callanan [Fri, 2 Nov 2012 22:28:08 +0000 (22:28 +0000)]
Fixed a problem where we mistook normal result
variables for guard variables because the current
class or method named contained the letters "GV".

llvm-svn: 167327

11 years ago[mips] Fix disassembler test cases.
Akira Hatanaka [Fri, 2 Nov 2012 22:20:10 +0000 (22:20 +0000)]
[mips] Fix disassembler test cases.

llvm-svn: 167326

11 years agoWhen code-completing don't disable the preprocessing record if modules are enabled.
Argyrios Kyrtzidis [Fri, 2 Nov 2012 22:18:44 +0000 (22:18 +0000)]
When code-completing don't disable the preprocessing record if modules are enabled.

llvm-svn: 167325

11 years agoAdd a cost model analysis that allows us to estimate the cost of IR-level instructions.
Nadav Rotem [Fri, 2 Nov 2012 21:48:17 +0000 (21:48 +0000)]
Add a cost model analysis that allows us to estimate the cost of IR-level instructions.

llvm-svn: 167324

11 years agoScalar Bitcasts and Truncs are usually free
Nadav Rotem [Fri, 2 Nov 2012 21:47:47 +0000 (21:47 +0000)]
Scalar Bitcasts and Truncs are usually free

llvm-svn: 167323

11 years ago[mips] Fix bug in test case. Disable machine LICM to prevent instruction from
Akira Hatanaka [Fri, 2 Nov 2012 21:46:42 +0000 (21:46 +0000)]
[mips] Fix bug in test case. Disable machine LICM to prevent instruction from
being moved out of a basic block.

llvm-svn: 167322

11 years agoThread safety analysis: Fixed ICE caused by double delete when late parsed
DeLesley Hutchins [Fri, 2 Nov 2012 21:44:32 +0000 (21:44 +0000)]
Thread safety analysis: Fixed ICE caused by double delete when late parsed
attributes are attached to function declarations nested inside a class method.

llvm-svn: 167321

11 years agoFix test cases I broken when fixing grammar in diagnostic message.
Richard Trieu [Fri, 2 Nov 2012 21:41:42 +0000 (21:41 +0000)]
Fix test cases I broken when fixing grammar in diagnostic message.

llvm-svn: 167320

11 years agoFix grammar of diagnostic message.
Richard Trieu [Fri, 2 Nov 2012 21:33:17 +0000 (21:33 +0000)]
Fix grammar of diagnostic message.

llvm-svn: 167319

11 years agoVext Lowering was missing opportunities
Quentin Colombet [Fri, 2 Nov 2012 21:32:17 +0000 (21:32 +0000)]
Vext Lowering was missing opportunities

llvm-svn: 167318

11 years ago[analyzer] Test SimpleStream on the buildbot.
Anna Zaks [Fri, 2 Nov 2012 21:30:07 +0000 (21:30 +0000)]
[analyzer] Test SimpleStream on the buildbot.

llvm-svn: 167317

11 years ago[analyzer] Factor SimpleStreamChecker pulling out isLeaked().
Anna Zaks [Fri, 2 Nov 2012 21:30:04 +0000 (21:30 +0000)]
[analyzer] Factor SimpleStreamChecker pulling out isLeaked().

llvm-svn: 167316

11 years ago[mips] Use register number instead of name to print register $AT.
Akira Hatanaka [Fri, 2 Nov 2012 21:26:03 +0000 (21:26 +0000)]
[mips] Use register number instead of name to print register $AT.

llvm-svn: 167315

11 years agoFixed the "--force" option for memory read.
Greg Clayton [Fri, 2 Nov 2012 21:14:58 +0000 (21:14 +0000)]
Fixed the "--force" option for memory read.

llvm-svn: 167314

11 years ago[mips] Add function MipsFrameLowering::estimateStackSize.
Akira Hatanaka [Fri, 2 Nov 2012 21:10:22 +0000 (21:10 +0000)]
[mips] Add function MipsFrameLowering::estimateStackSize.

This function estimates stack size and will be called before
PrologEpilogInserter scans the callee-saved registers.

llvm-svn: 167313

11 years ago[mips] Add member field MipsFunctionInfo::IncomingArgSize which holds the size
Akira Hatanaka [Fri, 2 Nov 2012 21:03:58 +0000 (21:03 +0000)]
[mips] Add member field MipsFunctionInfo::IncomingArgSize which holds the size
of the incoming argument area.

llvm-svn: 167312

11 years agoFix a build problem with xlc. The error message was
Rafael Espindola [Fri, 2 Nov 2012 20:57:36 +0000 (20:57 +0000)]
Fix a build problem with xlc. The error message was

"../llvm-git/utils/TableGen/CodeGenSchedule.cpp", line 1594.12: 1540-0218 (S) The call does not match any parameter list for "operator+".
"../llvm-git/include/llvm/ADT/STLExtras.h", line 130.1: 1540-1283 (I) "template <class _Iterator, class Func> llvm::operator+(mapped_iterator<_Iterator,Func>::difference_type, const mapped_iterator<_Iterator,Func> &)" is not a viable candidate.

Patch by Kai.

llvm-svn: 167311

11 years ago[mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive
Akira Hatanaka [Fri, 2 Nov 2012 20:56:25 +0000 (20:56 +0000)]
[mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive
"set .noat" so that the assembler doesn't issue warnings when register $AT is
used.

llvm-svn: 167310

11 years agoXLC supports the same atomic functions as GCC, use them.
Rafael Espindola [Fri, 2 Nov 2012 20:54:45 +0000 (20:54 +0000)]
XLC supports the same atomic functions as GCC, use them.
Patch by Kai.

llvm-svn: 167309

11 years agoFix debug tag type of forward declarations of struct/class in C++.
David Blaikie [Fri, 2 Nov 2012 20:49:01 +0000 (20:49 +0000)]
Fix debug tag type of forward declarations of struct/class in C++.

llvm-svn: 167308

11 years agoImprove x86 android support:
Rafael Espindola [Fri, 2 Nov 2012 20:41:30 +0000 (20:41 +0000)]
Improve x86 android support:
* -Bsymbolic must be added for x86 as well.
* Default CPU name also set to 'core2' for x86 android.
Patch by Edwin Vane.

llvm-svn: 167307

11 years agoAdd test for link flags added by -fcatch-undefined-behavior.
Richard Smith [Fri, 2 Nov 2012 20:34:30 +0000 (20:34 +0000)]
Add test for link flags added by -fcatch-undefined-behavior.

llvm-svn: 167306

11 years agoAdd -lpthread when building with Ubsan on Linux, in preparation for making libclang...
Richard Smith [Fri, 2 Nov 2012 20:32:19 +0000 (20:32 +0000)]
Add -lpthread when building with Ubsan on Linux, in preparation for making libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads.

llvm-svn: 167305

11 years agoChange resolveRelocation parameters so the relocations can find placeholder values...
Andrew Kaylor [Fri, 2 Nov 2012 19:45:23 +0000 (19:45 +0000)]
Change resolveRelocation parameters so the relocations can find placeholder values in the original object buffer.

Some ELF relocations require adding the a value to the original contents of the object buffer at the specified location.  In order to properly handle multiple applications of a relocation, the RuntimeDyld code should be grabbing the original value from the object buffer and writing a new value into the loaded section buffer.  This patch changes the parameters passed to resolveRelocations to accommodate this need.

llvm-svn: 167304

11 years agoSwitched debugserver to use C++11/libc++.
Sean Callanan [Fri, 2 Nov 2012 18:30:51 +0000 (18:30 +0000)]
Switched debugserver to use C++11/libc++.

<rdar://problem/12624679>

llvm-svn: 167303

11 years agoDocumentation: fix typos.
Dmitri Gribenko [Fri, 2 Nov 2012 18:06:51 +0000 (18:06 +0000)]
Documentation: fix typos.

llvm-svn: 167302

11 years agoUpdate test case.
Ted Kremenek [Fri, 2 Nov 2012 17:50:53 +0000 (17:50 +0000)]
Update test case.

llvm-svn: 167301

11 years agoMove -Wimplicit-retain-self to be off-by-default until we can evaluate
Ted Kremenek [Fri, 2 Nov 2012 17:48:49 +0000 (17:48 +0000)]
Move -Wimplicit-retain-self to be off-by-default until we can evaluate
more how noisy it is.

llvm-svn: 167300

11 years agoExtra safeguards to ensure that we never query
Sean Callanan [Fri, 2 Nov 2012 17:09:58 +0000 (17:09 +0000)]
Extra safeguards to ensure that we never query
the runtime if we have complete debug information
for a class.

Also made the Objective-C language runtime return
NULL when asked for the complete debug information
(i.e., information from DWARF, not information from
the runtime) if that information isn't present.  It
used to return a non-authoritative version, which
made it hard for clients to determine whether
complete debug information was available.

<rdar://problem/12608895>

llvm-svn: 167299

11 years ago[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whethe...
Alexey Samsonov [Fri, 2 Nov 2012 15:18:34 +0000 (15:18 +0000)]
[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal

llvm-svn: 167298

11 years ago[Sanitizer] fix printf unittest on 32-bit arch
Alexey Samsonov [Fri, 2 Nov 2012 14:28:17 +0000 (14:28 +0000)]
[Sanitizer] fix printf unittest on 32-bit arch

llvm-svn: 167297

11 years ago[Sanitizer] move unit test for Printf from tsan to sanitizer_common
Alexey Samsonov [Fri, 2 Nov 2012 12:36:11 +0000 (12:36 +0000)]
[Sanitizer] move unit test for Printf from tsan to sanitizer_common

llvm-svn: 167296

11 years agoFix whitespaces
Alexey Samsonov [Fri, 2 Nov 2012 12:20:34 +0000 (12:20 +0000)]
Fix whitespaces

llvm-svn: 167295

11 years ago[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
Alexey Samsonov [Fri, 2 Nov 2012 12:17:51 +0000 (12:17 +0000)]
[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common

llvm-svn: 167294

11 years agoclang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been faili...
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:12 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been failing for big endian targets, for example, ppc.

llvm-svn: 167293

11 years agoclang/test/CodeGen/bitfield-promote.c: FileCheck-ize.
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:06 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: FileCheck-ize.

llvm-svn: 167292

11 years ago[Sanitizer] Use kStderrFd constant instead of hardcoded 2
Alexey Samsonov [Fri, 2 Nov 2012 09:38:47 +0000 (09:38 +0000)]
[Sanitizer] Use kStderrFd constant instead of hardcoded 2

llvm-svn: 167291

11 years ago[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for...
Alexey Samsonov [Fri, 2 Nov 2012 09:23:36 +0000 (09:23 +0000)]
[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports

llvm-svn: 167290

11 years agoEnable the assertion in getIntPtrType (I've audited all users of this method and
Duncan Sands [Fri, 2 Nov 2012 09:02:37 +0000 (09:02 +0000)]
Enable the assertion in getIntPtrType (I've audited all users of this method and
they are now all correct; hopefully the buildbots will agree!).

llvm-svn: 167289

11 years agoAdd a testcase to loop-idiom to cover PR14241 when we start handling
Chandler Carruth [Fri, 2 Nov 2012 08:40:24 +0000 (08:40 +0000)]
Add a testcase to loop-idiom to cover PR14241 when we start handling
strided loops again.

llvm-svn: 167287

11 years agoRevert the switch of loop-idiom to use the new dependence analysis.
Chandler Carruth [Fri, 2 Nov 2012 08:33:25 +0000 (08:33 +0000)]
Revert the switch of loop-idiom to use the new dependence analysis.

The new analysis is not yet ready for prime time. It has a *critical*
flawed assumption, and some troubling shortages of testing. Until it's
been hammered into better shape, let's stick with the working code. This
should be easy to revert itself when the analysis is ready.

Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer
as the induction mechanism. If you have been seeing miscompiles in this
revision range, you really want to test with this backed out. The
results of this miscompile are a bit subtle as they can lead to
downstream passes concluding things are impossible which are in fact
possible.

Thanks to David Blaikie for the majority of the reduction of this
miscompile. I'll be checking in the test case in a non-revert commit.

Revesions reverted here:

r167045: LoopIdiom: Fix a serious missed optimization: we only turned
         top-level loops into memmove.
r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite
         loop.
r166875: LoopIdiom: Recognize memmove loops.
r166874: LoopIdiom: Replace custom dependence analysis with
         DependenceAnalysis.
llvm-svn: 167286

11 years agoFix an obvious typo that causes an assertion failure when running
Duncan Sands [Fri, 2 Nov 2012 07:49:32 +0000 (07:49 +0000)]
Fix an obvious typo that causes an assertion failure when running
test/Transforms/GVN/rle.ll if the (currently disabled) check for a
pointer type in getIntPtrType is turned on.

llvm-svn: 167285

11 years agoTests: remove ModuleID lines
Tobias Grosser [Fri, 2 Nov 2012 06:09:20 +0000 (06:09 +0000)]
Tests: remove ModuleID lines

llvm-svn: 167284

11 years agoTests: move content of .c files in .ll
Tobias Grosser [Fri, 2 Nov 2012 06:08:39 +0000 (06:08 +0000)]
Tests: move content of .c files in .ll

llvm-svn: 167283

11 years agoFix sign compare warning. Patch by Mahesha HS.
Chandler Carruth [Fri, 2 Nov 2012 05:24:00 +0000 (05:24 +0000)]
Fix sign compare warning. Patch by Mahesha HS.

llvm-svn: 167282

11 years agoDelete lines which do nothing from DiagnosticGroups.td.
Eli Friedman [Fri, 2 Nov 2012 03:35:13 +0000 (03:35 +0000)]
Delete lines which do nothing from DiagnosticGroups.td.

llvm-svn: 167281

11 years ago[libclang] Correct how the index inside the local preprocessed entities array
Argyrios Kyrtzidis [Fri, 2 Nov 2012 02:31:22 +0000 (02:31 +0000)]
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.

llvm-svn: 167280

11 years agoAdd missing diagnostic group to format string warning.
Eli Friedman [Fri, 2 Nov 2012 02:14:44 +0000 (02:14 +0000)]
Add missing diagnostic group to format string warning.

llvm-svn: 167279

11 years agoanalyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
NAKAMURA Takumi [Fri, 2 Nov 2012 02:04:01 +0000 (02:04 +0000)]
analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.

llvm-svn: 167278

11 years ago[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.
Jordan Rose [Fri, 2 Nov 2012 01:54:42 +0000 (01:54 +0000)]
[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.

Add FIXMEs for the traits visible from multiple translation units.
Currently the macros hide their key types in an anonymous namespace.

llvm-svn: 167277

11 years ago[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Jordan Rose [Fri, 2 Nov 2012 01:54:06 +0000 (01:54 +0000)]
[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).

Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.

This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.

llvm-svn: 167276

11 years ago[analyzer] Rename 'EmitReport' to 'emitReport'.
Jordan Rose [Fri, 2 Nov 2012 01:53:40 +0000 (01:53 +0000)]
[analyzer] Rename 'EmitReport' to 'emitReport'.

No functionality change.

llvm-svn: 167275