Commit Graph

137480 Commits

Author SHA1 Message Date
Andrew Trick 7656f6dbf7 misspell
llvm-svn: 168058
2012-11-15 18:40:31 +00:00
Andrew Trick 90f5029118 whitespace
llvm-svn: 168057
2012-11-15 18:40:29 +00:00
Dmitri Gribenko 60d4b99693 Comment to XML conversion: convert some tests to use the new [[@LINE]]
FileCheck feature.  This will hopefully make tests less fragile.

llvm-svn: 168056
2012-11-15 18:37:27 +00:00
Dmitri Gribenko 707cb04a9f Remove unused diagnostics from TableGen files.
llvm-svn: 168055
2012-11-15 18:32:56 +00:00
Chad Rosier 2463f67c49 [reg scavenger] Fix the isUsed/isAliasUsed functions so as to not report a false
positive.

In this particular case, R6 was being spilled by the register scavenger when it
was in fact dead.  The isUsed function reported R6 as used because the R6_R7
alias was reserved (due to the fact that we've reserved R7 as the FP).  The
solution is to only check if the original register (i.e., R6) isReserved and
not the aliases.  The aliases are only checked to make sure they're available.

The test case is derived from one of the nightly tester benchmarks and is rather
intractable and difficult to reproduce, so I haven't included it.
rdar://12592448

llvm-svn: 168054
2012-11-15 18:13:20 +00:00
Greg Clayton fbea0f64e2 <rdar://problem/11782181>
Fixed an issue where lldb was setting breakpoints on too many methods when a partial function name with namespaces or class qualifiers was used. For example setting a breakpoint of "Foo::dealloc" was accidentally settings breakpoints on all objective C functions whose selector was "dealloc"...

llvm-svn: 168053
2012-11-15 18:05:43 +00:00
Howard Hinnant 7166bff4ff Remove aborts under __dynamic_cast which were under _LIBCXX_DYNAMIC_FALLBACK. Change all type_info comparisons to use an inlined is_equal helper. However no change in functionality for this latter change at this time. This is just to encapsulate the comparison and make it a little easier to switch back and forth for testing/debugging.
llvm-svn: 168052
2012-11-15 18:00:42 +00:00
Sergei Larin e822148c80 Fix indeterminism in MI scheduler DAG construction.
Similarly to several recent fixes throughout the code replace std::map use with the MapVector.
Add find() method to the MapVector.

llvm-svn: 168051
2012-11-15 17:45:50 +00:00
Dmitry Vyukov 262465c126 tsan: eevn better handling of signals
add interceptor for poll()
in addition process signals in every atomic op
in addition process signals in blocking libc functions

llvm-svn: 168050
2012-11-15 17:40:49 +00:00
Dmitri Gribenko 0011bbf985 Use empty parens for empty function parameter list instead of '(void)'.
llvm-svn: 168049
2012-11-15 16:51:49 +00:00
Dmitri Gribenko 26491446b3 FileCheck: remove useless 'continue' at the end of a 'while(){}' loop.
llvm-svn: 168048
2012-11-15 16:50:59 +00:00
Benjamin Kramer c1b7841960 Simplify code. No functionality change.
llvm-svn: 168047
2012-11-15 16:40:35 +00:00
Alexander Potapenko bcc00a4174 [ASan] Revert r168040 and r168043 and take a cleaner solution suggested by Kostya: return the known frame name for fake stack instead of looking it up.
llvm-svn: 168046
2012-11-15 15:24:42 +00:00
Benjamin Kramer 671f4c0ce1 Do not cache a pointer to ExprEvalContexts.back().
It may become a dangling pointer if the underlying SmallVector reallocates.
Sadly the testcase is really large and doesn't reduce well because of
SmallVector's reallocation patterns.

Fixes PR14336.

llvm-svn: 168045
2012-11-15 15:18:42 +00:00
Alexander Potapenko 93dcc8d2bd [ASan] Minor fix: return to the last byte of the fake stack if we've raced by.
llvm-svn: 168043
2012-11-15 14:59:19 +00:00
Duncan Sands 5669218d7a Do not handle void types in DataLayout. Patch by Patrick Hägglund.
llvm-svn: 168042
2012-11-15 14:45:30 +00:00
Dmitri Gribenko b2aa9234b6 Use empty parens for empty function parameter list instead of '(void)'.
llvm-svn: 168041
2012-11-15 14:28:07 +00:00
Alexander Potapenko b34db9e883 [ASan] Poison the leftmost shadow byte with a special value so that we can find
the beginning of the fake frame when reporting an use-after-return error.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=126

llvm-svn: 168040
2012-11-15 13:40:44 +00:00
Alexey Samsonov cc9ffd1f8a [UBSan] Add support for building ubsan runtime library on Linux with 'make'. Clang part.
llvm-svn: 168039
2012-11-15 12:40:37 +00:00
Alexey Samsonov 11aec95f4a [UBSan] Add support for building ubsan runtime library on Linux with 'make'. Compiler-rt part.
llvm-svn: 168038
2012-11-15 12:37:55 +00:00
Hans Wennborg 709e015cf1 Make GlobalOpt be conservative with TLS variables (PR14309)
For global variables that get the same value stored into them
everywhere, GlobalOpt will replace them with a constant. The problem is
that a thread-local GlobalVariable looks like one value (the address of
the TLS var), but is different between threads.

This patch introduces Constant::isThreadDependent() which returns true
for thread-local variables and constants which depend on them (e.g. a GEP
into a thread-local array), and teaches GlobalOpt not to track such
values.

llvm-svn: 168037
2012-11-15 11:40:00 +00:00
Guy Benyei a4d31a33b5 Add support for SPIR64 target - the 64bit counterpart of SPIR.
The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures.

llvm-svn: 168036
2012-11-15 10:35:47 +00:00
Duncan Sands ac852c742f Fix a crash observed by Shuxin Yang. The issue here is that LinearizeExprTree,
the utility for extracting a chain of operations from the IR, thought that it
might as well combine any constants it came across (rather than just returning
them along with everything else).  On the other hand, the factorization code
would like to see the individual constants (this is quite reasonable: it is
much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6;
you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo
multiplications of constants as it may at first appear).  This patch therefore
makes LinearizeExprTree stupider: it now leaves optimizing to the optimization
part of reassociate, and sticks to just analysing the IR.

llvm-svn: 168035
2012-11-15 09:58:38 +00:00
Alexander Potapenko 4d533d243d [ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c
The need for this has been reported by Jack Howarth (howarth@bromo.med.uc.edu) who's porting ASan-Darwin to GCC

llvm-svn: 168032
2012-11-15 08:32:16 +00:00
Nick Lewycky c363afb19e Teach the uninitialized field warning about anonymous structs and union members.
Fixes PR14073!

llvm-svn: 168031
2012-11-15 08:19:20 +00:00
Craig Topper 323f614cd1 Revert changing FNEG of v4f32 to Expand. It's legal.
llvm-svn: 168030
2012-11-15 08:09:46 +00:00
Craig Topper bb7060584c Make FNEG and FABS of v4f32 Expand.
llvm-svn: 168029
2012-11-15 08:06:12 +00:00
Craig Topper c8a2adf1ca Make a bunch of floating point operations on vectors Expand so that instruction selection won't fail.
llvm-svn: 168028
2012-11-15 08:02:19 +00:00
Lang Hames 65992f454c Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.

llvm-svn: 168027
2012-11-15 07:51:26 +00:00
Craig Topper 22a6503df6 Add missing documentation for llvm.exp2, llvm.log10, and llvm.log2.
llvm-svn: 168026
2012-11-15 07:01:39 +00:00
Craig Topper 61d045781a Add llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.
llvm-svn: 168025
2012-11-15 06:51:10 +00:00
Nick Lewycky 5cc9ebb723 Revert r167567, restoring the ability of clang to run gcc in cases where it
can't handle the input file type. This resulted in PR14338.

llvm-svn: 168024
2012-11-15 05:36:36 +00:00
Richard Trieu 03c3a2f5bb Fix an off-by-one error by switching < to <= in -Wtautological-constant-out-of-range-compare and added test case.
llvm-svn: 168023
2012-11-15 03:43:50 +00:00
Daniel Jasper 0f9f019ff8 Do not use data recursion in ASTMatchFinder.
The matchers rely on the complete AST being traversed as shown by the new test cases.

llvm-svn: 168022
2012-11-15 03:29:05 +00:00
Andrew Trick 449eb3f3be Fix an obvious merge bug in -join-globalcopies (disabled).
Jakub Staszak spotted this in review. I don't notice these things
until I manually rerun benchmarks. But reducing unit tests is a very
high priority.

llvm-svn: 168021
2012-11-15 02:32:22 +00:00
Jordan Rose 90ba0218e2 [analyzer] Fix test case broken by previous commit.
llvm-svn: 168020
2012-11-15 02:17:09 +00:00
Jordan Rose 2d98b97e10 [analyzer] Make sure calls in synthesized functions have valid path locations.
We do this by using the "most recent" good location: if a synthesized
function 'A' calls another function 'B', the path notes for the call to 'B'
will be placed at the same location as the path note for calling 'A'.

Similarly, the call to 'A' will have a note saying "Entered call from...",
and now we just don't emit that (since the user doesn't have a body to look
at anyway).

Previously, we were doing this for the "Calling..." notes, but not for the
"Entered call from..." or "Returning to caller". This caused a crash when
the path entered and then exiting a call within a synthesized body.

<rdar://problem/12657843>

llvm-svn: 168019
2012-11-15 02:07:23 +00:00
Sean Callanan e0b23b5198 In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets. 
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>

llvm-svn: 168018
2012-11-15 02:02:04 +00:00
Argyrios Kyrtzidis a660ae4421 [PCH] Reading expressions from attributes should be done using ReadExpr(),
not ReadExpr().

Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.

Fixes rdar://12584141 & http://llvm.org/PR13982

llvm-svn: 168017
2012-11-15 01:31:39 +00:00
Eli Friedman 6745c3b732 Fix a trivial bool-related bug I spotted while skimming David Fang's
current list of powerpc-darwin8 failures.

llvm-svn: 168016
2012-11-15 01:21:59 +00:00
Tanya Lattner b634bc91b4 Add link to cfe-users mailing list.
llvm-svn: 168015
2012-11-15 01:13:31 +00:00
Eric Christopher 456c08d69d Add some release notes that say we removed the CellSPU port.
llvm-svn: 168014
2012-11-15 00:59:52 +00:00
NAKAMURA Takumi 00d2a107fb InstCombineAndOrXor.cpp: Escape bracket in doxygen description. [-Wdocumentation]
llvm-svn: 168013
2012-11-15 00:35:50 +00:00
Richard Smith af41696bc4 Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the
type-name is looked up in the context of the complete postfix-expression. Don't
forget to pass the scope into this lookup when the type-name is a template-id;
it might name an alias template which can't be found within the class itself.

Bug spotted by Johannes Schaub on #llvm.

llvm-svn: 168011
2012-11-15 00:31:27 +00:00
Eli Friedman 37feb2d6a6 Fix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the type
BinaryOperator::Opcode.  This is bad form, and the behavior of the static_cast
in this case is unspecified according to the standard.

Fixes a warning that showed up from r167992 on self-host.

llvm-svn: 168010
2012-11-15 00:29:07 +00:00
Jakub Staszak ab83a91709 Use LLVM_DELETED_FUNCTION.
llvm-svn: 168009
2012-11-15 00:25:36 +00:00
Owen Anderson 1aa2751260 Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.
Patch by Pedro Artigas.

llvm-svn: 168008
2012-11-15 00:14:15 +00:00
Fariborz Jahanian a4ca19694e objective-C blocks: make cc1 flag -encode-extended-block-signature
the default. // rdar://12109031

llvm-svn: 168007
2012-11-15 00:01:28 +00:00
Jakub Staszak f33e0f95b0 Remove unneeded #includes.
llvm-svn: 168006
2012-11-14 23:58:57 +00:00
Eli Friedman c2c982c78b Make template diffing handle integral expressions of various widths correctly.
PR14342.

llvm-svn: 168005
2012-11-14 23:57:08 +00:00