platform/upstream/llvm.git
11 years agoFix unit tests for ModuleLoader change in r168961.
Douglas Gregor [Fri, 30 Nov 2012 00:01:57 +0000 (00:01 +0000)]
Fix unit tests for ModuleLoader change in r168961.

llvm-svn: 168962

11 years agoKeep track of modules that have failed to build. If we encounter an
Douglas Gregor [Thu, 29 Nov 2012 23:55:25 +0000 (23:55 +0000)]
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

11 years agoFixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
Kevin Enderby [Thu, 29 Nov 2012 23:47:11 +0000 (23:47 +0000)]
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

11 years agoFix a small calling-convention bug for x86-32. PR14453.
Eli Friedman [Thu, 29 Nov 2012 23:21:04 +0000 (23:21 +0000)]
Fix a small calling-convention bug for x86-32.  PR14453.

llvm-svn: 168959

11 years agoAdd ARM cortex-a5 subtarget
Quentin Colombet [Thu, 29 Nov 2012 23:15:27 +0000 (23:15 +0000)]
Add ARM cortex-a5 subtarget

llvm-svn: 168958

11 years agoRemove out-of-date comment.
Richard Smith [Thu, 29 Nov 2012 23:09:57 +0000 (23:09 +0000)]
Remove out-of-date comment.

llvm-svn: 168957

11 years agoRevert commit revision r168953, to change the commit message, which was empty
Quentin Colombet [Thu, 29 Nov 2012 23:07:08 +0000 (23:07 +0000)]
Revert commit revision r168953, to change the commit message, which was empty

llvm-svn: 168956

11 years agoubsan: Disable __int128 tests if the host Clang does not support it. These
Richard Smith [Thu, 29 Nov 2012 23:03:58 +0000 (23:03 +0000)]
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

11 years ago(no commit message)
Quentin Colombet [Thu, 29 Nov 2012 22:58:40 +0000 (22:58 +0000)]
(no commit message)

llvm-svn: 168953

11 years agoMore comment.
Eric Christopher [Thu, 29 Nov 2012 22:56:13 +0000 (22:56 +0000)]
More comment.

llvm-svn: 168952

11 years ago[ASan] use brand new -fsanitize= values for init-order/use-after-return ASan output...
Alexey Samsonov [Thu, 29 Nov 2012 22:56:01 +0000 (22:56 +0000)]
[ASan] use brand new -fsanitize= values for init-order/use-after-return ASan output tests

llvm-svn: 168951

11 years agoThis patch exposes to Clang users three more sanitizers are experimental features...
Alexey Samsonov [Thu, 29 Nov 2012 22:36:21 +0000 (22:36 +0000)]
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

11 years ago<rdar://problem/12687087>
Greg Clayton [Thu, 29 Nov 2012 22:16:27 +0000 (22:16 +0000)]
<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

11 years ago<rdar://problem/12780259>
Han Ming Ong [Thu, 29 Nov 2012 22:14:45 +0000 (22:14 +0000)]
<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

11 years agoUpdate comment for malloc being a library call now, rather than an instruction.
Dan Gohman [Thu, 29 Nov 2012 21:58:47 +0000 (21:58 +0000)]
Update comment for malloc being a library call now, rather than an instruction.

llvm-svn: 168946

11 years agoResolve printf formatting warnings on Linux:
Daniel Malea [Thu, 29 Nov 2012 21:49:15 +0000 (21:49 +0000)]
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

11 years agocopyFastMathFlags utility and test case
Michael Ilseman [Thu, 29 Nov 2012 21:25:12 +0000 (21:25 +0000)]
copyFastMathFlags utility and test case

llvm-svn: 168943

11 years agoAdd a FileCheck test that makes sure two different CHECKs won't match the
Eli Bendersky [Thu, 29 Nov 2012 21:24:44 +0000 (21:24 +0000)]
Add a FileCheck test that makes sure two different CHECKs won't match the
same string

llvm-svn: 168942

11 years agoUpdate my email address.
Dan Gohman [Thu, 29 Nov 2012 21:17:26 +0000 (21:17 +0000)]
Update my email address.

llvm-svn: 168941

11 years agoWhitespace.
Chad Rosier [Thu, 29 Nov 2012 20:58:08 +0000 (20:58 +0000)]
Whitespace.

llvm-svn: 168937

11 years agoFix 80-column violations.
Chad Rosier [Thu, 29 Nov 2012 20:56:58 +0000 (20:56 +0000)]
Fix 80-column violations.

llvm-svn: 168936

11 years agoObject: Pass the buffer name through when making a copy.
Benjamin Kramer [Thu, 29 Nov 2012 20:08:03 +0000 (20:08 +0000)]
Object: Pass the buffer name through when making a copy.

Should bring the buildbots back to life.

llvm-svn: 168935

11 years agoMake the test less sensitive to DWARF emission implementation details.
Eli Bendersky [Thu, 29 Nov 2012 20:01:14 +0000 (20:01 +0000)]
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

11 years agoAdd cortex-a5 subtarget to the supported ARM architectures
Quentin Colombet [Thu, 29 Nov 2012 19:48:01 +0000 (19:48 +0000)]
Add cortex-a5 subtarget to the supported ARM architectures

llvm-svn: 168933

11 years agoCleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
Justin Holewinski [Thu, 29 Nov 2012 19:42:09 +0000 (19:42 +0000)]
Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT

llvm-svn: 168932

11 years agordar://12100355 (part 1)
Shuxin Yang [Thu, 29 Nov 2012 19:38:54 +0000 (19:38 +0000)]
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

11 years agoHandle the situation where CodeGenPrepare removes a reference to a BB that has
Bill Wendling [Thu, 29 Nov 2012 19:38:06 +0000 (19:38 +0000)]
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

11 years agoUse multiclass for 'transfer' instructions.
Jyotsna Verma [Thu, 29 Nov 2012 19:35:44 +0000 (19:35 +0000)]
Use multiclass for 'transfer' instructions.

llvm-svn: 168929

11 years agoNo need to run LICM after loop vectorization because we dont generate invariant code...
Nadav Rotem [Thu, 29 Nov 2012 19:28:29 +0000 (19:28 +0000)]
No need to run LICM after loop vectorization because we dont generate invariant code any more.

llvm-svn: 168928

11 years agoWhen broadcasting invariant scalars into vectors, place the broadcast code in the...
Nadav Rotem [Thu, 29 Nov 2012 19:25:41 +0000 (19:25 +0000)]
When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.

llvm-svn: 168927

11 years agoDocumentation for FileCheck: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 19:21:02 +0000 (19:21 +0000)]
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

11 years agoinstcombine: Migrate puts optimizations
Meador Inge [Thu, 29 Nov 2012 19:15:17 +0000 (19:15 +0000)]
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

11 years agoDocumentation for llvm-link: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:14:35 +0000 (19:14 +0000)]
Documentation for llvm-link: reformat

llvm-svn: 168924

11 years agoFix a memory leak in MachOObjectFile.
Jim Grosbach [Thu, 29 Nov 2012 19:14:11 +0000 (19:14 +0000)]
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

11 years agoDocumentation for llvm-cov: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:10:21 +0000 (19:10 +0000)]
Documentation for llvm-cov: reformat

llvm-svn: 168922

11 years agoFollow up to 168711: It's safe to base this analysis on the found compare, just retur...
Benjamin Kramer [Thu, 29 Nov 2012 19:07:57 +0000 (19:07 +0000)]
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

11 years agoDocumentation for llvm-stress: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat

llvm-svn: 168920

11 years agoDocumentation for opt: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:02:50 +0000 (19:02 +0000)]
Documentation for opt: reformat

llvm-svn: 168919

11 years agoMake sure that we put the rest of the sanitizer libraries on the link line
Eric Christopher [Thu, 29 Nov 2012 18:51:05 +0000 (18:51 +0000)]
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

11 years ago<rdar://problem/12655594>
Greg Clayton [Thu, 29 Nov 2012 18:48:47 +0000 (18:48 +0000)]
<rdar://problem/12655594>

Be sure to resolve the file path for the "target.process.python-os-plugin-path" setting.

llvm-svn: 168916

11 years ago<rdar://problem/12635804>
Greg Clayton [Thu, 29 Nov 2012 18:40:38 +0000 (18:40 +0000)]
<rdar://problem/12635804>

Add new rpath for LLDB: ../../Library/PrivateFrameworks

Also moved the debugserver plists into the Resources group.

llvm-svn: 168915

11 years agoImprove isImpliedCond comment a bit.
Andrew Trick [Thu, 29 Nov 2012 18:35:13 +0000 (18:35 +0000)]
Improve isImpliedCond comment a bit.

llvm-svn: 168914

11 years ago[ASan] Simplify check added in r168861. Bail out from module pass early if the module...
Alexey Samsonov [Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)]
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.

llvm-svn: 168913

11 years agoDocumentation for llc: reformat.
Dmitri Gribenko [Thu, 29 Nov 2012 18:16:11 +0000 (18:16 +0000)]
Documentation for llc: reformat.

llvm-svn: 168912

11 years agoApply Takumi's patch to suppress unused-variable warnings in -Asserts builds.
Matt Beaumont-Gay [Thu, 29 Nov 2012 18:15:49 +0000 (18:15 +0000)]
Apply Takumi's patch to suppress unused-variable warnings in -Asserts builds.

llvm-svn: 168911

11 years agoAdd options to AddressSanitizer passes to make them configurable by frontend.
Alexey Samsonov [Thu, 29 Nov 2012 18:14:24 +0000 (18:14 +0000)]
Add options to AddressSanitizer passes to make them configurable by frontend.

llvm-svn: 168910

11 years agofix a typo
Shuxin Yang [Thu, 29 Nov 2012 18:09:37 +0000 (18:09 +0000)]
fix a typo

llvm-svn: 168909

11 years agoUse newer command line option here.
Eric Christopher [Thu, 29 Nov 2012 18:08:24 +0000 (18:08 +0000)]
Use newer command line option here.

llvm-svn: 168908

11 years agoRemove duplicate test run lines.
Eric Christopher [Thu, 29 Nov 2012 18:08:22 +0000 (18:08 +0000)]
Remove duplicate test run lines.

llvm-svn: 168907

11 years agoDocumentation for lit: more formatting: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 18:03:08 +0000 (18:03 +0000)]
Documentation for lit: more formatting: use 'option' and 'program' directives.

This enables cross-referencing and now '--' in option names are no more turned into en dashes.

llvm-svn: 168906

11 years agoOne more step towards making doInitialization and doFinalization useful for
Pedro Artigas [Thu, 29 Nov 2012 17:47:05 +0000 (17:47 +0000)]
One more step towards making doInitialization and doFinalization useful for
start up and clean up module passes, now that ASAN and TSAN are fixed the
tests pass

llvm-svn: 168905

11 years agoDocumentation for tblgen: formatting
Dmitri Gribenko [Thu, 29 Nov 2012 17:41:05 +0000 (17:41 +0000)]
Documentation for tblgen: formatting

llvm-svn: 168904

11 years agoUpdate to Polly for LLVM r165262 which changes TargetData to Datalayout.
Tobias Grosser [Thu, 29 Nov 2012 17:34:50 +0000 (17:34 +0000)]
Update to Polly for LLVM r165262 which changes TargetData to Datalayout.

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

llvm-svn: 168903

11 years agoDocumentation for lit: formatting improvements.
Dmitri Gribenko [Thu, 29 Nov 2012 17:05:34 +0000 (17:05 +0000)]
Documentation for lit: formatting improvements.

llvm-svn: 168902

11 years agoMatch extern "C" in declaration and definition (swig template)
Daniel Malea [Thu, 29 Nov 2012 16:38:44 +0000 (16:38 +0000)]
Match extern "C" in declaration and definition (swig template)
- Fix for building with gcc 4.6

llvm-svn: 168901

11 years agoNow that the underlying problem has been fixed, add r168411 back.
Rafael Espindola [Thu, 29 Nov 2012 16:38:22 +0000 (16:38 +0000)]
Now that the underlying problem has been fixed, add r168411 back.
Original commit message:

Remove redundant code.

llvm-svn: 168900

11 years agoTest commit.
Patrik Hagglund [Thu, 29 Nov 2012 16:19:11 +0000 (16:19 +0000)]
Test commit.

llvm-svn: 168899

11 years agoDocumentation: formatting improvements
Dmitri Gribenko [Thu, 29 Nov 2012 16:12:13 +0000 (16:12 +0000)]
Documentation: formatting improvements

llvm-svn: 168897

11 years agoMerge function types in C.
Rafael Espindola [Thu, 29 Nov 2012 16:09:03 +0000 (16:09 +0000)]
Merge function types in C.

Among other differences, GCC accepts

  typedef int IA[];
  typedef int A10[10];
  static A10 *f(void);
  static IA  *f(void);
  void g(void) {
    (void)sizeof(*f());
  }

but clang used to reject it with:

  invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []')

The intention of c99's 6.2.7 seems to be that we should use the composite type
and accept as gcc does.

Doing the type merging required some extra fixes:
  * Use the type from the function type in initializations, even if an parameter
    is available.
  * Fix the merging of the noreturn attribute in function types.
  * Make CodeGen  handle the fact that an parameter type can be different from
    the corresponding type in the function type.

llvm-svn: 168895

11 years agoinstcombine: Migrate fputs optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:43 +0000 (15:45 +0000)]
instcombine: Migrate fputs optimizations

This patch migrates the fputs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168893

11 years agoinstcombine: Migrate fwrite optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:39 +0000 (15:45 +0000)]
instcombine: Migrate fwrite optimizations

This patch migrates the fwrite optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168892

11 years agoinstcombine: Migrate fprintf optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:33 +0000 (15:45 +0000)]
instcombine: Migrate fprintf optimizations

This patch migrates the fprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168891

11 years ago[msan] Handle vector manipulation instructions.
Evgeniy Stepanov [Thu, 29 Nov 2012 15:22:06 +0000 (15:22 +0000)]
[msan] Handle vector manipulation instructions.

Handle insertelement, extractelement, shufflevector.

llvm-svn: 168889

11 years ago[msan] Fix getOriginForNaryOp.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)]
[msan] Fix getOriginForNaryOp.

The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).

The new version always picks the origin of the rightmost poisoned operand.

llvm-svn: 168887

11 years agoAdded atomic 64 min/max/umin/umax instrinsics support in the ARM backend.
Silviu Baranga [Thu, 29 Nov 2012 14:41:25 +0000 (14:41 +0000)]
Added atomic 64 min/max/umin/umax instrinsics support in the ARM backend.

llvm-svn: 168886

11 years agomisched: Recompute priority queue when DFSResults are updated.
Benjamin Kramer [Thu, 29 Nov 2012 14:36:26 +0000 (14:36 +0000)]
misched: Recompute priority queue when DFSResults are updated.

This was found by MSVC10's STL debug mode on a test from the test suite. Sadly
std::is_heap isn't standard so there is no way to assert this without writing
our own heap verify, which looks like overkill to me.

llvm-svn: 168885

11 years ago[msan] Basic handling of inline asm.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:32:03 +0000 (14:32 +0000)]
[msan] Basic handling of inline asm.

llvm-svn: 168884

11 years agoTeach the legalizer how to handle operands for VSELECT nodes
Justin Holewinski [Thu, 29 Nov 2012 14:26:28 +0000 (14:26 +0000)]
Teach the legalizer how to handle operands for VSELECT nodes

If we need to split the operand of a VSELECT, it must be the mask operand. We
split the entire VSELECT operand with EXTRACT_SUBVECTOR.

llvm-svn: 168883

11 years agoAllow targets to prefer TypeSplitVector over TypePromoteInteger when computing the...
Justin Holewinski [Thu, 29 Nov 2012 14:26:24 +0000 (14:26 +0000)]
Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors

For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>.

llvm-svn: 168882

11 years ago[msan] Propagate shadow through (x<0) and (x>=0) comparisons.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:25:47 +0000 (14:25 +0000)]
[msan] Propagate shadow through (x<0) and (x>=0) comparisons.

This is a special case of signed relational comparison where result
only depends on the sign of x.

llvm-svn: 168881

11 years ago[msan] Fix shadow & origin store & load alignment.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:05:53 +0000 (14:05 +0000)]
[msan] Fix shadow & origin store & load alignment.

This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.

llvm-svn: 168880

11 years ago[msan] Optimize getOriginPtr.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:43:05 +0000 (13:43 +0000)]
[msan] Optimize getOriginPtr.

Rewrite getOriginPtr in a way that lets subsequent optimizations factor out
the common part of Shadow and Origin address calculation. Improves perf by
up to 5%.

llvm-svn: 168879

11 years ago[msan] Fix a few compilation warnings.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:12:03 +0000 (13:12 +0000)]
[msan] Fix a few compilation warnings.

llvm-svn: 168878

11 years ago[msan] Add a test for r168873.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:11:09 +0000 (13:11 +0000)]
[msan] Add a test for r168873.

llvm-svn: 168877

11 years ago[msan] Transform memcpy and memset to library calls.
Evgeniy Stepanov [Thu, 29 Nov 2012 12:49:04 +0000 (12:49 +0000)]
[msan] Transform memcpy and memset to library calls.

This was already done for memmove, where it is required for correctness.
This change improves performance by avoiding copyingthe same memory twice.
Also, the library functions are given __msan_ prefix to prevent instcombine
pass from converting them back to intrinsics.

llvm-svn: 168876

11 years agoI changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering...
Elena Demikhovsky [Thu, 29 Nov 2012 12:44:59 +0000 (12:44 +0000)]
I changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering.cpp.
The logic was not changed, only names.

llvm-svn: 168875

11 years ago[msan] Update tests (broken in r168873).
Evgeniy Stepanov [Thu, 29 Nov 2012 12:43:56 +0000 (12:43 +0000)]
[msan] Update tests (broken in r168873).

llvm-svn: 168874

11 years ago[msan] Make sure that report callbacks do not get merged.
Evgeniy Stepanov [Thu, 29 Nov 2012 12:30:18 +0000 (12:30 +0000)]
[msan] Make sure that report callbacks do not get merged.

llvm-svn: 168873

11 years ago[asan] disable BuiltinLongJmpTest on Android
Kostya Serebryany [Thu, 29 Nov 2012 12:18:48 +0000 (12:18 +0000)]
[asan] disable BuiltinLongJmpTest on Android

llvm-svn: 168872

11 years agoDocumentation: use correct highlighter
Dmitri Gribenko [Thu, 29 Nov 2012 12:00:32 +0000 (12:00 +0000)]
Documentation: use correct highlighter

llvm-svn: 168871

11 years agoASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 stuff. Conditi...
NAKAMURA Takumi [Thu, 29 Nov 2012 10:22:40 +0000 (10:22 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 stuff. Conditioning-out in macro argument was not accepted on MS cl.exe.

llvm-svn: 168867

11 years agoInitial commit of MemorySanitizer.
Evgeniy Stepanov [Thu, 29 Nov 2012 09:57:20 +0000 (09:57 +0000)]
Initial commit of MemorySanitizer.

Compiler pass only.

llvm-svn: 168866

11 years agoASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 according...
NAKAMURA Takumi [Thu, 29 Nov 2012 09:57:11 +0000 (09:57 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 according to r168856, for now.

I think "i128", that I conditioned out, could be completely removed.
MS Compiler doesn't accept i128. We can assume no one would use i128.

llvm-svn: 168865

11 years ago[asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doIniti...
Kostya Serebryany [Thu, 29 Nov 2012 09:54:21 +0000 (09:54 +0000)]
[asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doInitialization. This is required to allow the upcoming changes in PassManager behavior

llvm-svn: 168864

11 years ago[asan] enable BuiltinLongJmpTest
Kostya Serebryany [Thu, 29 Nov 2012 09:02:14 +0000 (09:02 +0000)]
[asan] enable BuiltinLongJmpTest

llvm-svn: 168863

11 years ago[-cxx-abi microsoft] Also spill the argument-back-references context when mangling...
Timur Iskhodzhanov [Thu, 29 Nov 2012 08:58:47 +0000 (08:58 +0000)]
[-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates

llvm-svn: 168862

11 years ago[asan] when checking the noreturn attribute on the call, also check it on the callee
Kostya Serebryany [Thu, 29 Nov 2012 08:57:20 +0000 (08:57 +0000)]
[asan] when checking the noreturn attribute on the call, also check it on the callee

llvm-svn: 168861

11 years agoubsan: Don't assume that Clang provides __int128 unless it advertises that it does.
Richard Smith [Thu, 29 Nov 2012 05:59:30 +0000 (05:59 +0000)]
ubsan: Don't assume that Clang provides __int128 unless it advertises that it does.

llvm-svn: 168857

11 years agoReject uses of __int128 on platforms that don't support it. Also move the ugly
Richard Smith [Thu, 29 Nov 2012 05:41:51 +0000 (05:41 +0000)]
Reject uses of __int128 on platforms that don't support it. Also move the ugly
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be
properly cleaned up.

llvm-svn: 168856

11 years agoFix sentence construction-o.
Nico Weber [Thu, 29 Nov 2012 05:29:23 +0000 (05:29 +0000)]
Fix sentence construction-o.

llvm-svn: 168855

11 years agoCleaned up a couple of comments.
Preston Briggs [Thu, 29 Nov 2012 04:30:52 +0000 (04:30 +0000)]
Cleaned up a couple of comments.

llvm-svn: 168854

11 years agoRemove 'noreturn' attribute from friend declaration. This attribute will be
Richard Smith [Thu, 29 Nov 2012 04:30:50 +0000 (04:30 +0000)]
Remove 'noreturn' attribute from friend declaration. This attribute will be
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.

llvm-svn: 168853

11 years agoUse MCPhysReg for RegisterClassInfo allocation orders.
Jakob Stoklund Olesen [Thu, 29 Nov 2012 03:34:17 +0000 (03:34 +0000)]
Use MCPhysReg for RegisterClassInfo allocation orders.

This saves a bit of memory.

llvm-svn: 168852

11 years agoFix crash-on-invalid. <rdar://problem/12765391>.
Eli Friedman [Thu, 29 Nov 2012 03:13:49 +0000 (03:13 +0000)]
Fix crash-on-invalid.  <rdar://problem/12765391>.

llvm-svn: 168851

11 years agoAdd an MCPhysReg typedef to replace naked uint16_t.
Jakob Stoklund Olesen [Thu, 29 Nov 2012 02:39:28 +0000 (02:39 +0000)]
Add an MCPhysReg typedef to replace naked uint16_t.

Use this type for arrays of physical registers.

llvm-svn: 168850

11 years agoInstruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe...
Shuxin Yang [Thu, 29 Nov 2012 01:47:31 +0000 (01:47 +0000)]
Instruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe" mode.

Approved by: Eli and Michael.

llvm-svn: 168848

11 years agoThe declaration of a special member can require overload resolution to be
Richard Smith [Thu, 29 Nov 2012 01:34:07 +0000 (01:34 +0000)]
The declaration of a special member can require overload resolution to be
performed, to determine whether that special member is deleted or constexpr.
That overload resolution process can in turn trigger the instantiation of a
template, which can do anything, including triggering the declaration of that
very same special member function. When this happens, do not try to recursively
declare the special member -- that's impossible. Instead, only try to realise
the truth. There is no special member.

llvm-svn: 168847

11 years agoChange SValBuilder::getConditionType() to return BoolTy in C++. Fixes <rdar://proble...
Ted Kremenek [Thu, 29 Nov 2012 01:03:10 +0000 (01:03 +0000)]
Change SValBuilder::getConditionType() to return BoolTy in C++.  Fixes <rdar://problem/12772656>.

llvm-svn: 168846

11 years ago<rdar://problem/12445557>
Greg Clayton [Thu, 29 Nov 2012 00:53:06 +0000 (00:53 +0000)]
<rdar://problem/12445557>

Make stack frames fix up their line table entries when the target has source remappings. Also rearranged how the m_sc.target_sp was filled in so it can be used during the StackFrame::GetSymbolContext(...) function.

llvm-svn: 168845

11 years agoDon't return decorated (i.e., const or pointer)
Sean Callanan [Thu, 29 Nov 2012 00:50:56 +0000 (00:50 +0000)]
Don't return decorated (i.e., const or pointer)
versions of UnknownAnyTy for ObjectiveC value types.
<unknown type>* makes no sense and can cause the
parser to behave very oddly.

<rdar://problem/12518999>

llvm-svn: 168844