Commit Graph

138234 Commits

Author SHA1 Message Date
Chandler Carruth f12e3a67db Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.

Sorry for the noise. =]

I've also switch the comment block to use a \brief tag and not duplicate
the name.

llvm-svn: 168996
2012-11-30 11:45:22 +00:00
Kostya Serebryany 817b60af38 [asan] simplify the code around doesNotReturn call. It now magically works.
llvm-svn: 168995
2012-11-30 11:08:59 +00:00
Chandler Carruth adc29e11d0 Update to reflect the change of macro name in r168993.
llvm-svn: 168994
2012-11-30 11:04:44 +00:00
Chandler Carruth 9c7462a8b8 Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.

Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.

llvm-svn: 168993
2012-11-30 11:04:18 +00:00
Kostya Serebryany 436462046a [asan] make asan_test.cc more gcc-friendly
llvm-svn: 168992
2012-11-30 10:41:42 +00:00
Patrik Hagglund 086ee1ee50 More strict error checking in parseSpecifier + simplified code.
For example, don't allow empty strings to be passed to getInt.

Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)

llvm-svn: 168991
2012-11-30 10:06:59 +00:00
Kostya Serebryany 6a786e66cf [asan] simplify break_optimization in tests (Jakub Jelinek)
llvm-svn: 168990
2012-11-30 09:52:44 +00:00
Chandler Carruth d9ef81e133 Fix non-determinism introduced in r168970 and pointed out by Duncan.
We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.

This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.

llvm-svn: 168989
2012-11-30 09:34:29 +00:00
Chandler Carruth 77d433dafe Rearrange the comments, control flow, and variable names; no
functionality changed.

Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.

llvm-svn: 168988
2012-11-30 09:26:25 +00:00
Dmitry Vyukov 71d759d392 tsan: intercept mlock() because of the kernel bug
llvm-svn: 168987
2012-11-30 06:50:15 +00:00
Eric Christopher 3c23009117 Add the rest of the experimental fission sections to MC.
llvm-svn: 168986
2012-11-30 06:47:06 +00:00
Dmitry Vyukov 0a4d875c48 tsan: fix bug that leads to spurious use-after-free reports
llvm-svn: 168985
2012-11-30 06:39:01 +00:00
Eli Friedman dea98de3fb Fix the computation of highlight ranges so we produce something sane when
the beginning and end of the range are in different macro arguments.
PR14399.

llvm-svn: 168984
2012-11-30 06:19:40 +00:00
Jyotsna Verma b950ea61fc Use multiclass for the store instructions with MEMri operand.
llvm-svn: 168983
2012-11-30 06:10:22 +00:00
Richard Smith 328aae595c Refactor to reduce duplication in handling of special member functions. No functionality change.
llvm-svn: 168977
2012-11-30 05:11:39 +00:00
Jyotsna Verma ede608cce0 Use multiclass for the load instructions with 'base + register offset'
addressing mode.

llvm-svn: 168976
2012-11-30 04:19:09 +00:00
Meador Inge e3f2b26bfa Move library call simplification statistic to instcombine
The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified.  Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.

llvm-svn: 168975
2012-11-30 04:05:06 +00:00
Chandler Carruth dbd6958183 Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.

This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.

llvm-svn: 168972
2012-11-30 03:08:41 +00:00
Evan Cheng 65df808f62 Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.

rdar://12779436

llvm-svn: 168970
2012-11-30 02:02:42 +00:00
Quentin Colombet 317962381a Add a test case for the new cortex-a5 switch
llvm-svn: 168968
2012-11-30 01:34:36 +00:00
Jordan Rose ba101e1b3b Use the new LLVM_LVALUE_FUNCTION to ban two getAs() calls on rvalues.
If 'x' is a temporary, x.getAs<Foo>() may not be safe if the result is
supposed to persist (if its address is stored somewhere). Since getAs()
can return a null value, the result is almost always stored into a
variable, which of course is not safe when the original value dies.

This has caused several bugs with GCC's "Temporaries May Vanish Sooner Than
You Expect" optimization; in C++11 builds, at least, we'll be able to catch
these problems now.

I would suggest applying these to other getAs() and get*As() methods
(castAs is "better" because sometimes the result is used directly, which
means the temporary will still be live), but these two have both caused
trouble in the analyzer in the past.

llvm-svn: 168967
2012-11-30 01:15:32 +00:00
Tobias Grosser 46c6abb306 Remove unneeded preservation and restore of ValueMap and ClastVars in GPGPU code
generation.

We don't use the exact same way to build loop body for GPGPU codegen as openmp
codegen and other transformations do currently, in which cases 'createLoop'
function is called recursively. GPGPU codegen may fail due to improper restore
of ValueMap and ClastVars .

Contributed by:  Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 168966
2012-11-30 01:05:05 +00:00
Preston Briggs fd0b5c898a Modified dump() to provide a little
more information for dependences between
instructions that don't share a common loop.

Updated the test results appropriately.

llvm-svn: 168965
2012-11-30 00:44:47 +00:00
Tobias Grosser 6f3d0633a4 Add an additional input argument according to chanages of function polly::createLoop.
Contributed-by:  Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 168964
2012-11-30 00:39:49 +00:00
Jordan Rose 142e56d157 Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.

Before:
  void foo() const { ... }

After:
  void foo() const LLVM_LVALUE_FUNCTION { ... }
  void foo() && { ... }

This is used to allow moving the contents of an Optional.

llvm-svn: 168963
2012-11-30 00:38:53 +00:00
Douglas Gregor 8c05893746 Fix unit tests for ModuleLoader change in r168961.
llvm-svn: 168962
2012-11-30 00:01:57 +00:00
Douglas Gregor 7a626570ef Keep track of modules that have failed to build. If we encounter an
import of that module elsewhere, don't try to build the module again:
it won't work, and the experience is quite dreadful. We track this
information somewhat globally, shared among all of the related
CompilerInvocations used to build modules on-the-fly, so that a
particular Clang instance will only try to build a given module once.

Fixes <rdar://problem/12552849>.

llvm-svn: 168961
2012-11-29 23:55:25 +00:00
Kevin Enderby 136d6746c5 Fixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
which would then cause an assert when printed.  rdar://11437956

llvm-svn: 168960
2012-11-29 23:47:11 +00:00
Eli Friedman a92db6773a Fix a small calling-convention bug for x86-32. PR14453.
llvm-svn: 168959
2012-11-29 23:21:04 +00:00
Quentin Colombet 2e9952ef60 Add ARM cortex-a5 subtarget
llvm-svn: 168958
2012-11-29 23:15:27 +00:00
Richard Smith f41d237bf6 Remove out-of-date comment.
llvm-svn: 168957
2012-11-29 23:09:57 +00:00
Quentin Colombet 9b541ff6af Revert commit revision r168953, to change the commit message, which was empty
llvm-svn: 168956
2012-11-29 23:07:08 +00:00
Richard Smith 57000c38fc ubsan: Disable __int128 tests if the host Clang does not support it. These
tests will still fail if compiler-rt was built with a compiler without __int128
support, but the host compiler has __int128 support.

llvm-svn: 168955
2012-11-29 23:03:58 +00:00
Quentin Colombet 2b14712eca (no commit message)
llvm-svn: 168953
2012-11-29 22:58:40 +00:00
Eric Christopher 42e3994e77 More comment.
llvm-svn: 168952
2012-11-29 22:56:13 +00:00
Alexey Samsonov b90501d7da [ASan] use brand new -fsanitize= values for init-order/use-after-return ASan output tests
llvm-svn: 168951
2012-11-29 22:56:01 +00:00
Alexey Samsonov 0e96becfb1 This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.

llvm-svn: 168950
2012-11-29 22:36:21 +00:00
Greg Clayton 50a24bd358 <rdar://problem/12687087>
Emit an error when using "target modules add PATH" where PATH points to a debug info only (dSYM) file.

Also added a "--uuid" option for "target modules add --uuid UUID" to locate and load a module by UUID if the host supports it.

llvm-svn: 168949
2012-11-29 22:16:27 +00:00
Han Ming Ong 929a94f026 <rdar://problem/12780259>
Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.

llvm-svn: 168948
2012-11-29 22:14:45 +00:00
Dan Gohman 913c96da43 Update comment for malloc being a library call now, rather than an instruction.
llvm-svn: 168946
2012-11-29 21:58:47 +00:00
Daniel Malea d01b2953fa Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!

llvm-svn: 168945
2012-11-29 21:49:15 +00:00
Michael Ilseman 05d3bf77a1 copyFastMathFlags utility and test case
llvm-svn: 168943
2012-11-29 21:25:12 +00:00
Eli Bendersky 03bb500052 Add a FileCheck test that makes sure two different CHECKs won't match the
same string

llvm-svn: 168942
2012-11-29 21:24:44 +00:00
Dan Gohman 0584c727f2 Update my email address.
llvm-svn: 168941
2012-11-29 21:17:26 +00:00
Chad Rosier 0987dd1a48 Whitespace.
llvm-svn: 168937
2012-11-29 20:58:08 +00:00
Chad Rosier c19b0695ba Fix 80-column violations.
llvm-svn: 168936
2012-11-29 20:56:58 +00:00
Benjamin Kramer f3e84b1790 Object: Pass the buffer name through when making a copy.
Should bring the buildbots back to life.

llvm-svn: 168935
2012-11-29 20:08:03 +00:00
Eli Bendersky 479b1b5986 Make the test less sensitive to DWARF emission implementation details.
Note: the ":" goes into the regex because FileCheck wrongly complains about
unbalanced brackets otherwise.

llvm-svn: 168934
2012-11-29 20:01:14 +00:00
Quentin Colombet 13cd521b24 Add cortex-a5 subtarget to the supported ARM architectures
llvm-svn: 168933
2012-11-29 19:48:01 +00:00
Justin Holewinski edec332437 Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
llvm-svn: 168932
2012-11-29 19:42:09 +00:00