Commit Graph

138117 Commits

Author SHA1 Message Date
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
Shuxin Yang abcc370423 rdar://12100355 (part 1)
This revision attempts to recognize following population-count pattern:

 while(a) { c++; ... ; a &= a - 1; ... },
  where <c> and <a>could be used multiple times in the loop body.

 TODO: On X8664 and ARM, __buildin_ctpop() are not expanded to a efficent 
instruction sequence, which need to be improved in the following commits.

Reviewed by Nadav, really appreciate!

llvm-svn: 168931
2012-11-29 19:38:54 +00:00
Bill Wendling a4a77edf2e Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing
pad in an function. This is fine, but with SjLj EH code, we've already placed a
bunch of code in the 'entry' block, which expects the landing pad to stick
around.

When we get to the situation where CGP has removed the last landing pad, go
ahead and nuke the SjLj instructions from the 'entry' block.
<rdar://problem/12721258>

llvm-svn: 168930
2012-11-29 19:38:06 +00:00
Jyotsna Verma e95559fc16 Use multiclass for 'transfer' instructions.
llvm-svn: 168929
2012-11-29 19:35:44 +00:00
Nadav Rotem ec739205cc No need to run LICM after loop vectorization because we dont generate invariant code any more.
llvm-svn: 168928
2012-11-29 19:28:29 +00:00
Nadav Rotem 8dd6ee8df5 When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.
llvm-svn: 168927
2012-11-29 19:25:41 +00:00
Dmitri Gribenko f589e2418d Documentation for FileCheck: use 'option' and 'program' directives.
This enables option cross-referencing and now '--' in option names are no more turned into en dashes.

llvm-svn: 168926
2012-11-29 19:21:02 +00:00
Meador Inge 75798bb7fe instcombine: Migrate puts optimizations
This patch migrates the puts optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

All the simplifiers from simplify-libcalls have now been migrated to
instcombine.  Yay!  Just a few other bits to migrate (prototype attribute
inference and a few statistics) and simplify-libcalls can finally be put
to rest.

llvm-svn: 168925
2012-11-29 19:15:17 +00:00
Dmitri Gribenko 59aeece231 Documentation for llvm-link: reformat
llvm-svn: 168924
2012-11-29 19:14:35 +00:00
Jim Grosbach aae0a4bd87 Fix a memory leak in MachOObjectFile.
MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.

Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.

rdar://12561773

llvm-svn: 168923
2012-11-29 19:14:11 +00:00
Dmitri Gribenko c9e206f090 Documentation for llvm-cov: reformat
llvm-svn: 168922
2012-11-29 19:10:21 +00:00
Benjamin Kramer ba11a9892c Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate.
Thanks to Andy for catching this.

llvm-svn: 168921
2012-11-29 19:07:57 +00:00
Dmitri Gribenko 1521681b59 Documentation for llvm-stress: reformat
llvm-svn: 168920
2012-11-29 19:05:55 +00:00
Dmitri Gribenko 6c80bcb56f Documentation for opt: reformat
llvm-svn: 168919
2012-11-29 19:02:50 +00:00
Eric Christopher 0499778517 Make sure that we put the rest of the sanitizer libraries on the link line
before libstdc++ like we do with ubsan.

llvm-svn: 168918
2012-11-29 18:51:05 +00:00
Greg Clayton e1e835c626 <rdar://problem/12655594>
Be sure to resolve the file path for the "target.process.python-os-plugin-path" setting.

llvm-svn: 168916
2012-11-29 18:48:47 +00:00
Greg Clayton 1eb0edcd97 <rdar://problem/12635804>
Add new rpath for LLDB: ../../Library/PrivateFrameworks

Also moved the debugserver plists into the Resources group.

llvm-svn: 168915
2012-11-29 18:40:38 +00:00
Andrew Trick fa59403bfd Improve isImpliedCond comment a bit.
llvm-svn: 168914
2012-11-29 18:35:13 +00:00