Commit Graph

137300 Commits

Author SHA1 Message Date
Akira Hatanaka 5fdeac3268 Add assertions in MipsLongBranch which check the size of basic blocks.
llvm-svn: 168078
2012-11-15 20:05:11 +00:00
Douglas Gregor 4b27a64b92 If an excluded header does not exist, just ignore it
llvm-svn: 168077
2012-11-15 19:47:16 +00:00
Jakub Staszak f34e4fa7a6 Return 0 instead of false.
llvm-svn: 168076
2012-11-15 19:40:29 +00:00
Greg Clayton 824e7c0dfb <rdar://problem/12125010>
Handle universal BSD archives correctly when parsing DWARF in .o files with debug map.

llvm-svn: 168075
2012-11-15 19:37:18 +00:00
Ulrich Weigand dcee8ce8ed Use std::stable_sort instead of std::sort when sorting stack slots
to guarantee deterministic code generation.

llvm-svn: 168074
2012-11-15 19:33:30 +00:00
Evan Cheng 4921017afd Clarify my code ownership
llvm-svn: 168073
2012-11-15 19:31:48 +00:00
Sergei Larin 973a44bf7d Add myself as owner of VLIW Instruction Scheduling and Packetization.
llvm-svn: 168072
2012-11-15 19:24:19 +00:00
Jim Ingham ef404fc9c6 Explain how to use "expr -u" as the lldb equivalent of "set unwind-on-signal 0; print".
llvm-svn: 168071
2012-11-15 19:13:33 +00:00
Jordan Rose e37ab50a6e [analyzer] Report leaks at the closing brace of a function body.
This fixes a few cases where we'd emit path notes like this:

  +---+
 1|   v
  p = malloc(len);
  ^   |2
  +---+

In general this should make path notes more consistent and more correct,
especially in cases where the leak happens on the false branch of an if
that jumps directly to the end of the function. There are a couple places
where the leak is reported farther away from the cause; these are usually
cases where there are several levels of nested braces before the end of
the function. This still matches our current behavior for when there /is/
a statement after all the braces, though.

llvm-svn: 168070
2012-11-15 19:11:43 +00:00
Jordan Rose b9263cf112 [analyzer] StreamChecker: Remove now-unnecessary check::EndPath callback.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168069
2012-11-15 19:11:38 +00:00
Jordan Rose 7489ba5e0c [analyzer] MacOSKeychainAPIChecker: Remove now-unnecessary check::EndPath.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168068
2012-11-15 19:11:35 +00:00
Jordan Rose f1f2614017 [analyzer] MallocChecker: Remove now-unnecessary check::EndPath callback.
Also, don't bother to stop tracking symbols in the return value, either.
They are now properly considered live during checkDeadSymbols.

llvm-svn: 168067
2012-11-15 19:11:33 +00:00
Jordan Rose b5b0fc196e [analyzer] Mark symbol values as dead in the environment.
This allows us to properly remove dead bindings at the end of the top-level
stack frame, using the ReturnStmt, if there is one, to keep the return value
live. This in turn removes the need for a check::EndPath callback in leak
checkers.

This does cause some changes in the path notes for leak checkers. Previously,
a leak would be reported at the location of the closing brace in a function.
Now, it gets reported at the last statement. This matches the way leaks are
currently reported for inlined functions, but is less than ideal for both.

llvm-svn: 168066
2012-11-15 19:11:27 +00:00
Anton Korobeynikov 38990beed8 Add ARM EABI to my list of responsibilities.
Update the email address (old works too, but less reliable) while there

llvm-svn: 168065
2012-11-15 19:10:23 +00:00
Jakub Staszak 11d1aee6a2 Simplify code.
llvm-svn: 168064
2012-11-15 19:05:23 +00:00
Fariborz Jahanian 0e3043b2ed block extended signatur option. Change previous option
to a cc1 -fencode-extended-block-signature and pass it
to cc1 and recognize this option to produce extended block
type signature. // rdar://12109031 

llvm-svn: 168063
2012-11-15 19:02:45 +00:00
Argyrios Kyrtzidis 5259524b2f [modules] Use a memory buffer directly as input for the module includes,
instead of messing with virtual files.

llvm-svn: 168062
2012-11-15 18:57:27 +00:00
Argyrios Kyrtzidis 2ec2936778 [modules] Setup the import location of a module file and use it
as the include location of the main file of an imported module.

llvm-svn: 168061
2012-11-15 18:57:22 +00:00
Dmitry Vyukov 933c9889aa tsan: remove unused parameter
llvm-svn: 168060
2012-11-15 18:49:08 +00:00
Dmitry Vyukov f34db58c20 tsan: switch to 4 shadow cells by default (since that's what we use everywhere now)
llvm-svn: 168059
2012-11-15 18:44:22 +00:00
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