platform/upstream/llvm.git
10 years ago[SROA] Start more deeply moving SROA to use ranges rather than just
Chandler Carruth [Thu, 16 Oct 2014 20:24:07 +0000 (20:24 +0000)]
[SROA] Start more deeply moving SROA to use ranges rather than just
iterators.

There are a ton of places where it essentially wants ranges
rather than just iterators. This is just the first step that adds the
core slice range typedefs and uses them in a couple of places. I still
have to explicitly construct them because they've not been punched
throughout the entire set of code. More range-based cleanups incoming.

llvm-svn: 219955

10 years agoNo longer emit diagnostics about unused results (comparisons, etc) from unevaluated...
Aaron Ballman [Thu, 16 Oct 2014 20:13:28 +0000 (20:13 +0000)]
No longer emit diagnostics about unused results (comparisons, etc) from unevaluated contexts. Fixes PR18571.

llvm-svn: 219954

10 years agoR600: Fix nonsensical implementation of computeKnownBits for BFE
Matt Arsenault [Thu, 16 Oct 2014 20:07:40 +0000 (20:07 +0000)]
R600: Fix nonsensical implementation of computeKnownBits for BFE

This was resulting in invalid simplifications of sdiv

llvm-svn: 219953

10 years agoUpdate for llvm change.
Rafael Espindola [Thu, 16 Oct 2014 20:00:22 +0000 (20:00 +0000)]
Update for llvm change.

llvm-svn: 219952

10 years agoDelete -std-compile-opts.
Rafael Espindola [Thu, 16 Oct 2014 20:00:02 +0000 (20:00 +0000)]
Delete -std-compile-opts.

These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951

10 years agoAllow call-slop optzn for destinations with a suitable dereferenceable attribute
Bjorn Steinbrink [Thu, 16 Oct 2014 19:43:08 +0000 (19:43 +0000)]
Allow call-slop optzn for destinations with a suitable dereferenceable attribute

Summary:
Currently, call slot optimization requires that if the destination is an
argument, the argument has the sret attribute. This is to ensure that
the memory access won't trap. In addition to sret, we can also allow the
optimization to happen for arguments that have the new dereferenceable
attribute, which gives the same guarantee.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5832

llvm-svn: 219950

10 years ago[mach-o] Add support for upward linking
Nick Kledzik [Thu, 16 Oct 2014 19:31:28 +0000 (19:31 +0000)]
[mach-o] Add support for upward linking

To deal with cycles in shared library dependencies, the darwin linker supports
marking specific link dependencies as "upward".  An upward link is when a
lower level library links against a higher level library.

llvm-svn: 219949

10 years ago[PECOFF] Support delay-load import table for x86
Rui Ueyama [Thu, 16 Oct 2014 19:30:44 +0000 (19:30 +0000)]
[PECOFF] Support delay-load import table for x86

This patch creates the import address table and sets its
address to the delay-load import table. This also creates
wrapper functions for __delayLoadHelper2.

x86 only for now.

llvm-svn: 219948

10 years agoFix lang-ref doc bug: s/icmp lt/icmp slt/
Jonathan Roelofs [Thu, 16 Oct 2014 19:28:10 +0000 (19:28 +0000)]
Fix lang-ref doc bug: s/icmp lt/icmp slt/

llvm-svn: 219947

10 years ago[asan] make sure coverage is dumped even if leaks are reported
Kostya Serebryany [Thu, 16 Oct 2014 18:59:07 +0000 (18:59 +0000)]
[asan] make sure coverage is dumped even if leaks are reported

llvm-svn: 219946

10 years ago[llvm-objdump] Fix -private-headers for mach-o to print all LC_*_DYLIB variants
Nick Kledzik [Thu, 16 Oct 2014 18:58:20 +0000 (18:58 +0000)]
[llvm-objdump] Fix -private-headers for mach-o to print all LC_*_DYLIB variants

llvm-svn: 219945

10 years agofold: sqrt(x * x * y) -> fabs(x) * sqrt(y)
Sanjay Patel [Thu, 16 Oct 2014 18:48:17 +0000 (18:48 +0000)]
fold: sqrt(x * x * y) -> fabs(x) * sqrt(y)

If a square root call has an FP multiplication argument that can be reassociated,
then we can hoist a repeated factor out of the square root call and into a fabs().

In the simplest case, this:

   y = sqrt(x * x);

becomes this:

   y = fabs(x);

This patch relies on an earlier optimization in instcombine or reassociate to put the
multiplication tree into a canonical form, so we don't have to search over
every permutation of the multiplication tree.

Because there are no IR-level FastMathFlags for intrinsics (PR21290), we have to
use function-level attributes to do this optimization. This needs to be fixed
for both the intrinsics and in the backend.

Differential Revision: http://reviews.llvm.org/D5787

llvm-svn: 219944

10 years agoDebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant...
David Blaikie [Thu, 16 Oct 2014 18:38:36 +0000 (18:38 +0000)]
DebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant value in this case as well.

llvm-svn: 219943

10 years agoFixing comment grammar; NFC.
Aaron Ballman [Thu, 16 Oct 2014 18:09:29 +0000 (18:09 +0000)]
Fixing comment grammar; NFC.

llvm-svn: 219942

10 years agoSpeculatively fix GCC 4.7 build after r219938
Hans Wennborg [Thu, 16 Oct 2014 17:57:41 +0000 (17:57 +0000)]
Speculatively fix GCC 4.7 build after r219938

llvm-svn: 219941

10 years agoSwitching to range-based for loops; NFC.
Aaron Ballman [Thu, 16 Oct 2014 17:53:07 +0000 (17:53 +0000)]
Switching to range-based for loops; NFC.

llvm-svn: 219940

10 years agoFix code to follow the "Don’t use else after a return" rule.
Samuel Benzaquen [Thu, 16 Oct 2014 17:50:19 +0000 (17:50 +0000)]
Fix code to follow the "Don’t use else after a return" rule.

Summary:
Fix code to follow the "Don’t use else after a return" rule.
This is a followup from rL219792.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D5826

llvm-svn: 219939

10 years agoUse iterators and algorithms to possibly make this code a bit tidier
David Blaikie [Thu, 16 Oct 2014 17:23:58 +0000 (17:23 +0000)]
Use iterators and algorithms to possibly make this code a bit tidier

(also, the code executed once the element was found was split half
inside the loop and half after it - now put it all together after the
find operation)

I'm a bit concerned that this code is rather untested (commenting out
this whole function and running check-clang doesn't fail any tests)...

And I wish I had polymorphic lambdas.

llvm-svn: 219938

10 years agoRemove one of SanitizerBlacklist::isIn() overloads. NFC.
Alexey Samsonov [Thu, 16 Oct 2014 17:10:38 +0000 (17:10 +0000)]
Remove one of SanitizerBlacklist::isIn() overloads. NFC.

The final goal is to get rid of all the rest overloads that
accept LLVM objects (llvm::Function and llvm::GlobalVariable),
and pass in source-level entities instead.

llvm-svn: 219937

10 years agoFix MemoryHistory plugin to check whether the plugin
Jason Molenda [Thu, 16 Oct 2014 16:59:23 +0000 (16:59 +0000)]
Fix MemoryHistory plugin to check whether the plugin
was able to create itself before returning the shared
pointer to it.
clang warning.

llvm-svn: 219936

10 years agoUse array_lengthof; NFC.
Hans Wennborg [Thu, 16 Oct 2014 16:54:36 +0000 (16:54 +0000)]
Use array_lengthof; NFC.

llvm-svn: 219935

10 years ago[AArch64] Fix miscompile of sdiv-by-power-of-2.
Juergen Ributzka [Thu, 16 Oct 2014 16:41:15 +0000 (16:41 +0000)]
[AArch64] Fix miscompile of sdiv-by-power-of-2.

When the constant divisor was larger than 32bits, then the optimized code
generated for the AArch64 backend would emit the wrong code, because the shift
was defined as a shift of a 32bit constant '(1<<Lg2(divisor))' and we would
loose the upper 32bits.

This fixes rdar://problem/18678801.

llvm-svn: 219934

10 years ago[AArch64] Enable A53 erratum workaround (835769) by default for Android targets
Bradley Smith [Thu, 16 Oct 2014 16:35:14 +0000 (16:35 +0000)]
[AArch64] Enable A53 erratum workaround (835769) by default for Android targets

llvm-svn: 219933

10 years agotests: move test to more appropriate location
Saleem Abdulrasool [Thu, 16 Oct 2014 16:12:41 +0000 (16:12 +0000)]
tests: move test to more appropriate location

The test is a C++ semantic analysis test, move it to SemaCXX from Sema.  NFC.

llvm-svn: 219932

10 years ago[mips] Account for endianess when expanding BuildPairF64/ExtractElementF64 nodes.
Vasileios Kalintiris [Thu, 16 Oct 2014 15:41:51 +0000 (15:41 +0000)]
[mips] Account for endianess when expanding BuildPairF64/ExtractElementF64 nodes.

Summary:
In order to support big endian targets for the BuildPairF64 nodes we
just need to swap the low/high pair registers. Additionally, for the
ExtractElementF64 nodes we have to calculate the correct stack offset
with respect to the node's register/operand that we want to extract.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5753

llvm-svn: 219931

10 years agoOpenCL: Emit global variables in the constant addr space as constant globals
Tom Stellard [Thu, 16 Oct 2014 15:29:19 +0000 (15:29 +0000)]
OpenCL: Emit global variables in the constant addr space as constant globals

llvm-svn: 219929

10 years agoOpenCL: Add -ffake-address-space-map to a test
Tom Stellard [Thu, 16 Oct 2014 15:29:17 +0000 (15:29 +0000)]
OpenCL: Add -ffake-address-space-map to a test

The ensures there is an explicit address space id in the output.

llvm-svn: 219928

10 years ago[mips] Marked the DI/EI instruction aliases as MIPS32r2
Vasileios Kalintiris [Thu, 16 Oct 2014 15:23:52 +0000 (15:23 +0000)]
[mips] Marked the DI/EI instruction aliases as MIPS32r2

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5751

llvm-svn: 219927

10 years ago[clang-tidy] Minor fixes for the NamespaceCommentCheck.
Alexander Kornienko [Thu, 16 Oct 2014 15:11:54 +0000 (15:11 +0000)]
[clang-tidy] Minor fixes for the NamespaceCommentCheck.

  * Make SmallVector size enough for all groups.
  * Allow trailing period in the comment.
  * Fix "// anonymous namespace qqq".

llvm-svn: 219926

10 years agoTest commit access: remove extra new line at the end of file
Vasileios Kalintiris [Thu, 16 Oct 2014 14:37:00 +0000 (14:37 +0000)]
Test commit access: remove extra new line at the end of file

llvm-svn: 219925

10 years agoUBSAN stable runtime more generic with arm* targets
Renato Golin [Thu, 16 Oct 2014 12:43:10 +0000 (12:43 +0000)]
UBSAN stable runtime more generic with arm* targets

llvm-svn: 219924

10 years ago[clang-tidy] Default options in modules.
Alexander Kornienko [Thu, 16 Oct 2014 11:27:57 +0000 (11:27 +0000)]
[clang-tidy] Default options in modules.

Summary:
This patch allows modules to specify default options for the checks
defined in them. This way a sufficiently configurable check can be registered in
multiple modules with different default options. E.g. the SpacesBeforeComments
option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the
"google-readability-namespace-comment" check without modifying or extending the
check code.

This patch also registers the google-readability-braces-around-statements check
with suitable defaults.

Reviewers: djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

Differential Revision: http://reviews.llvm.org/D5798

llvm-svn: 219923

10 years agoAdd missing header guard.
Benjamin Kramer [Thu, 16 Oct 2014 10:10:07 +0000 (10:10 +0000)]
Add missing header guard.

llvm-svn: 219922

10 years agoclang-format: Fix behavior with comments before conditional expressions
Daniel Jasper [Thu, 16 Oct 2014 09:10:11 +0000 (09:10 +0000)]
clang-format: Fix behavior with comments before conditional expressions

Before:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
                   ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa
                                     : bbbbbbbbbbbbbbbbbbbb);

After:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
               ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);

llvm-svn: 219921

10 years agoMost of this function checks to see if m_process is non-null before
Jason Molenda [Thu, 16 Oct 2014 08:43:27 +0000 (08:43 +0000)]
Most of this function checks to see if m_process is non-null before
dereferencing it, except for this one section of code.  Add a null
check around it.
clang static analyzer fix.

llvm-svn: 219920

10 years agoclang-format: [ObjC] Fix method expression detection.
Daniel Jasper [Thu, 16 Oct 2014 08:38:51 +0000 (08:38 +0000)]
clang-format: [ObjC] Fix method expression detection.

Before:
  return (a)[foo bar : baz];

After:
  return (a)[foo bar:baz];

llvm-svn: 219919

10 years agoAnother logical-or vrs. bitwise-or mixup in ClangUserExpression.
Jason Molenda [Thu, 16 Oct 2014 08:27:27 +0000 (08:27 +0000)]
Another logical-or vrs. bitwise-or mixup in ClangUserExpression.
clang unreachable code warning.

llvm-svn: 219918

10 years agoEnable warnings in the debugserver project file..
Jason Molenda [Thu, 16 Oct 2014 08:16:29 +0000 (08:16 +0000)]
Enable warnings in the debugserver project file..

llvm-svn: 219917

10 years agoA series of bit-flag values should be bitwise-or'ed not logical-or'ed.
Jason Molenda [Thu, 16 Oct 2014 08:15:11 +0000 (08:15 +0000)]
A series of bit-flag values should be bitwise-or'ed not logical-or'ed.
clang unreachable code warning.

llvm-svn: 219916

10 years agoRemove unreachable code.
Jason Molenda [Thu, 16 Oct 2014 08:08:13 +0000 (08:08 +0000)]
Remove unreachable code.

llvm-svn: 219915

10 years agoRemove unreachable code.
Jason Molenda [Thu, 16 Oct 2014 08:07:54 +0000 (08:07 +0000)]
Remove unreachable code.

llvm-svn: 219914

10 years agoAdd /* DISABLES CODE */ annotation before if (0) to mark it as intentional.
Jason Molenda [Thu, 16 Oct 2014 08:07:20 +0000 (08:07 +0000)]
Add /* DISABLES CODE */ annotation before if (0) to mark it as intentional.

llvm-svn: 219913

10 years agoRemove unreachable code.
Jason Molenda [Thu, 16 Oct 2014 08:05:49 +0000 (08:05 +0000)]
Remove unreachable code.

llvm-svn: 219912

10 years agoRemove unreachable code.
Jason Molenda [Thu, 16 Oct 2014 08:05:22 +0000 (08:05 +0000)]
Remove unreachable code.

llvm-svn: 219911

10 years agoXcode recommended these changes to the project file. It recommended
Jason Molenda [Thu, 16 Oct 2014 08:04:28 +0000 (08:04 +0000)]
Xcode recommended these changes to the project file.  It recommended
a number of warnings to be enabled.  The one making the most noise
across the code base right now is CLANG_WARN_UNREACHABLE_CODE = YES.

llvm-svn: 219910

10 years agoRemove unused initialization.
Jason Molenda [Thu, 16 Oct 2014 07:53:46 +0000 (07:53 +0000)]
Remove unused initialization.
clang static analyzer fixit.

llvm-svn: 219909

10 years agoRemove dead store.
Jason Molenda [Thu, 16 Oct 2014 07:52:17 +0000 (07:52 +0000)]
Remove dead store.
clang static analyzer fixit.

llvm-svn: 219908

10 years agoRemove dead store.
Jason Molenda [Thu, 16 Oct 2014 07:49:27 +0000 (07:49 +0000)]
Remove dead store.
clang static analyzer fixit.

llvm-svn: 219907

10 years agoAdds stable-runtime to ubsan to avoid broken ARM tests with asan
Renato Golin [Thu, 16 Oct 2014 07:48:27 +0000 (07:48 +0000)]
Adds stable-runtime to ubsan to avoid broken ARM tests with asan

llvm-svn: 219906

10 years agoRemove dead store.
Jason Molenda [Thu, 16 Oct 2014 07:47:37 +0000 (07:47 +0000)]
Remove dead store.
clang static analyzer fixit.

llvm-svn: 219905

10 years agoRemove unused variable.
Jason Molenda [Thu, 16 Oct 2014 07:41:32 +0000 (07:41 +0000)]
Remove unused variable.
clang static analyzer fixit.

llvm-svn: 219904

10 years agoFrontend: Fix some underscore-then-capital UB
Justin Bogner [Thu, 16 Oct 2014 06:00:55 +0000 (06:00 +0000)]
Frontend: Fix some underscore-then-capital UB

llvm-svn: 219903

10 years agoReapply r219832 - InstCombine: Narrow switch instructions using known bits.
Akira Hatanaka [Thu, 16 Oct 2014 06:00:46 +0000 (06:00 +0000)]
Reapply r219832 - InstCombine: Narrow switch instructions using known bits.

The code committed in r219832 asserted when it attempted to shrink a switch
statement whose type was larger than 64-bit.

llvm-svn: 219902

10 years agospecify dwarf version for Solaris
Alexander Eremin [Thu, 16 Oct 2014 05:55:24 +0000 (05:55 +0000)]
specify dwarf version for Solaris

llvm-svn: 219901

10 years agoPR21246: DebugInfo: Emit the appropriate type (cv qualifiers, reference-ness, etc...
David Blaikie [Thu, 16 Oct 2014 04:21:25 +0000 (04:21 +0000)]
PR21246: DebugInfo: Emit the appropriate type (cv qualifiers, reference-ness, etc) for non-type template parameters

Plumb through the full QualType of the TemplateArgument::Declaration, as
it's insufficient to only know whether the type is a reference or
pointer (that was necessary for mangling, but insufficient for debug
info). This shouldn't increase the size of TemplateArgument as
TemplateArgument::Integer is still longer by another 32 bits.

Several bits of code were testing that the reference-ness of the
parameters matched, but this seemed to be insufficient (various other
features of the type could've mismatched and wouldn't've been caught)
and unnecessary, at least insofar as removing those tests didn't cause
anything to fail.

(Richard - perchaps you can hypothesize why any of these checks might
need to test reference-ness of the parameters (& explain why
reference-ness is part of the mangling - I would've figured that for the
reference-ness to be different, a prior template argument would have to
be different). I'd be happy to add them in/beef them up and add test
cases if there's a reason for them)

llvm-svn: 219900

10 years agoTRE: make TRE a bit more aggressive
Saleem Abdulrasool [Thu, 16 Oct 2014 03:27:30 +0000 (03:27 +0000)]
TRE: make TRE a bit more aggressive

Make tail recursion elimination a bit more aggressive.  This allows us to get
tail recursion on functions that are just branches to a different function.  The
fact that the function takes a byval argument does not restrict it from being
optimised into just a tail call.

llvm-svn: 219899

10 years agoFix bad link in documentation. Thanks to rsmith
Eric Fiselier [Thu, 16 Oct 2014 03:15:31 +0000 (03:15 +0000)]
Fix bad link in documentation. Thanks to rsmith

llvm-svn: 219898

10 years agoBugfix in template instantiation in CXXPseudoDestructorExpr.
Alexey Bataev [Thu, 16 Oct 2014 03:04:35 +0000 (03:04 +0000)]
Bugfix in template instantiation in CXXPseudoDestructorExpr.
Fix for clang crash when instantiating a template with qualified lookup for members in non-class types.
Differential Revision: http://reviews.llvm.org/D5769

llvm-svn: 219897

10 years agoRyan Brown's patch to handle DW_OP_call_frame_cfa addresses
Jason Molenda [Thu, 16 Oct 2014 02:56:12 +0000 (02:56 +0000)]
Ryan Brown's patch to handle DW_OP_call_frame_cfa addresses
as load addreses instead of host addresses.
http://reviews.llvm.org/D5735

llvm-svn: 219896

10 years agoFix accidental over-checking of args in launcherXPCService.
Jason Molenda [Thu, 16 Oct 2014 02:53:57 +0000 (02:53 +0000)]
Fix accidental over-checking of args in launcherXPCService.

llvm-svn: 219895

10 years agoAdd my buildbot to list of libc++ buildbots in documentation
Eric Fiselier [Thu, 16 Oct 2014 02:48:59 +0000 (02:48 +0000)]
Add my buildbot to list of libc++ buildbots in documentation

llvm-svn: 219894

10 years agoFix a potential null pointer deref & a potential memory leak,
Jason Molenda [Thu, 16 Oct 2014 02:08:11 +0000 (02:08 +0000)]
Fix a potential null pointer deref & a potential memory leak,
also reformat to conform to the usual lldb coding conventions
a little better.
clang static analyzer fixit.

llvm-svn: 219893

10 years agoRemove unnecessary update of 'name' local.
Jason Molenda [Thu, 16 Oct 2014 01:55:21 +0000 (01:55 +0000)]
Remove unnecessary update of 'name' local.
clang static analyzer fixit.

llvm-svn: 219892

10 years agoRemove unused change to argc/argv after long option parsing has been completed.
Jason Molenda [Thu, 16 Oct 2014 01:50:14 +0000 (01:50 +0000)]
Remove unused change to argc/argv after long option parsing has been completed.
clang static analyzer fixit.

llvm-svn: 219891

10 years agoEnsure that user_exe_path is non-NULL before derferencing.
Jason Molenda [Thu, 16 Oct 2014 01:42:11 +0000 (01:42 +0000)]
Ensure that user_exe_path is non-NULL before derferencing.
We've already created a FileSpec based on this local and
this code path would never be executed if it is an invalid
FilePath - but the static analyzer doesn't know this and I
want to placate it.
clang static analyzer fixit.

llvm-svn: 219890

10 years agoGuard against NULL derefs.
Jason Molenda [Thu, 16 Oct 2014 01:40:16 +0000 (01:40 +0000)]
Guard against NULL derefs.
clang static analyzer fixits.

llvm-svn: 219889

10 years agoAh, accidentally committed a patch I didn't mean to.
Jason Molenda [Thu, 16 Oct 2014 01:27:31 +0000 (01:27 +0000)]
Ah, accidentally committed a patch I didn't mean to.

llvm-svn: 219888

10 years agoIt's possible for long_options[long_options_index].definition to be null
Jason Molenda [Thu, 16 Oct 2014 01:26:51 +0000 (01:26 +0000)]
It's possible for long_options[long_options_index].definition to be null
from the previous for() loop - check that it is non-null before trying
to deref it.
clang static analyzer fixit.

llvm-svn: 219887

10 years agoCheck that process is non-null before calling a method in it.
Jason Molenda [Thu, 16 Oct 2014 01:23:06 +0000 (01:23 +0000)]
Check that process is non-null before calling a method in it.
clang static analyzer fixit.

llvm-svn: 219886

10 years agoIt's possible for this function to not be passed a CompUnit*; add
Jason Molenda [Thu, 16 Oct 2014 01:21:25 +0000 (01:21 +0000)]
It's possible for this function to not be passed a CompUnit*; add
guards around a few additional uses of the cu local pointer.
clang static analyzer fixit.

llvm-svn: 219885

10 years agoRevert r219832.
Akira Hatanaka [Thu, 16 Oct 2014 01:17:02 +0000 (01:17 +0000)]
Revert r219832.

llvm-svn: 219884

10 years agoDebugInfo: Cleanup testing of non-type template parameters.
David Blaikie [Thu, 16 Oct 2014 00:41:40 +0000 (00:41 +0000)]
DebugInfo: Cleanup testing of non-type template parameters.

Separate out the non-nullable parameters from the nullable ones
(currently only the template template parameter) and demonstrate that
cv-qualifiers aren't preserved for non-null parameters (but are
preserved for null parameters) by adding 'const' to an int* non-type
template parameter.

llvm-svn: 219883

10 years ago[LVI] Add some additional comments about caching and context instructions
Hal Finkel [Thu, 16 Oct 2014 00:40:05 +0000 (00:40 +0000)]
[LVI] Add some additional comments about caching and context instructions

Philip Reames and I had a long conversation about this, mostly because it is
not obvious why the current logic is correct. Hopefully, these comments will
prevent such confusion in the future.

llvm-svn: 219882

10 years agollvm/Support/Options.h: Use \tparam. [-Wdocumentation]
NAKAMURA Takumi [Thu, 16 Oct 2014 00:14:57 +0000 (00:14 +0000)]
llvm/Support/Options.h: Use \tparam. [-Wdocumentation]

llvm-svn: 219881

10 years ago[CMake] clangBasic: Add Core to LINK_COMPONENTS introduced by r219840.
NAKAMURA Takumi [Thu, 16 Oct 2014 00:12:02 +0000 (00:12 +0000)]
[CMake] clangBasic: Add Core to LINK_COMPONENTS introduced by r219840.

llvm-svn: 219880

10 years agoR600: Remove dead function
Matt Arsenault [Thu, 16 Oct 2014 00:08:09 +0000 (00:08 +0000)]
R600: Remove dead function

llvm-svn: 219879

10 years agoRevert "r219834 - Teach ScalarEvolution to sharpen range information"
Sanjoy Das [Wed, 15 Oct 2014 23:46:04 +0000 (23:46 +0000)]
Revert "r219834 - Teach ScalarEvolution to sharpen range information"

This change breaks the asan buildbots:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/13468

llvm-svn: 219878

10 years agoMoving CGF::EmitAlignmentAssumption to IRBuilder
Hal Finkel [Wed, 15 Oct 2014 23:45:08 +0000 (23:45 +0000)]
Moving CGF::EmitAlignmentAssumption to IRBuilder

The functionality contained in CodeGenFunction::EmitAlignmentAssumption has
been moved to IRBuilder (so that it can also be used by LLVM-level code).
Remove this now-duplicate implementation in favor of the IRBuilder code.

llvm-svn: 219877

10 years agoPreserve non-byval pointer alignment attributes using @llvm.assume when inlining
Hal Finkel [Wed, 15 Oct 2014 23:44:41 +0000 (23:44 +0000)]
Preserve non-byval pointer alignment attributes using @llvm.assume when inlining

For pointer-typed function arguments, enhanced alignment can be asserted using
the 'align' attribute. When inlining, if this enhanced alignment information is
not otherwise available, preserve it using @llvm.assume-based alignment
assumptions.

llvm-svn: 219876

10 years agoAdd CreateAlignmentAssumption to IRBuilder
Hal Finkel [Wed, 15 Oct 2014 23:44:22 +0000 (23:44 +0000)]
Add CreateAlignmentAssumption to IRBuilder

Clang CodeGen had a utility function for creating pointer alignment assumptions
using the @llvm.assume intrinsic. This functionality will also be needed by the
inliner (to preserve function-argument alignment attributes when inlining), so
this moves the utility function into IRBuilder where it can be used both by
Clang CodeGen and also other LLVM-level code.

llvm-svn: 219875

10 years ago[AVX512] Add DQ subvector inserts
Adam Nemet [Wed, 15 Oct 2014 23:42:17 +0000 (23:42 +0000)]
[AVX512] Add DQ subvector inserts

In AVX512f we support 64x2 and 32x8 inserts via matching them to 32x4 and 64x4
respectively.  These are matched by "Alt" Pat<>'s (Alt stands for alternative
VTs).

Since DQ has native support for these intructions, I peeled off the non-"Alt"
part of the baseclass into vinsert_for_size_no_alt. The DQ instructions are
derived from this multiclass.  The "Alt" Pat<>'s are disabled with DQ.

Fixes <rdar://problem/18426089>

llvm-svn: 219874

10 years ago[AVX512] Add SKX testing to avx512-insert-extract.ll
Adam Nemet [Wed, 15 Oct 2014 23:42:14 +0000 (23:42 +0000)]
[AVX512] Add SKX testing to avx512-insert-extract.ll

This is in preparation to adding DQ subvector inserts to this testcase.

llvm-svn: 219873

10 years ago[AVX512] Fix test to produce a defined value
Adam Nemet [Wed, 15 Oct 2014 23:42:11 +0000 (23:42 +0000)]
[AVX512] Fix test to produce a defined value

We're inserting into a 8 wide vector, so the index should be < 8.

llvm-svn: 219872

10 years ago[AVX512] Two new attributes in X86VectorVTInfo for subvector insert
Adam Nemet [Wed, 15 Oct 2014 23:42:09 +0000 (23:42 +0000)]
[AVX512] Two new attributes in X86VectorVTInfo for subvector insert

The new attributes are NumElts and the CD8TupleForm.  This prepares the code
to enable x8 and x2 inserts.

NFC, no change in X86.td.expanded except for the new attributes.

llvm-svn: 219871

10 years ago[AVX512] Rename arg from Opcode32/64 to Opcode128/256 in vinsert_for_size
Adam Nemet [Wed, 15 Oct 2014 23:42:04 +0000 (23:42 +0000)]
[AVX512] Rename arg from Opcode32/64 to Opcode128/256 in vinsert_for_size

It's the W bit that selects between 32 or 64 elt type and not the opcode.  The
opcode selects between the width of the insert (128 or 256).

llvm-svn: 219870

10 years agoGive old_state a default value so we won't try to restore
Jason Molenda [Wed, 15 Oct 2014 23:39:31 +0000 (23:39 +0000)]
Give old_state a default value so we won't try to restore
an uninitialized value.  In reality the code block that
initializes it and the code block that restores it will always
match up - but the analyzer doesn't know that and I want to
quiet it, so...
clang static analyzer fixit.

llvm-svn: 219869

10 years agoR600: Remove unnecessary part of computeKnownBitsForTargetNode
Matt Arsenault [Wed, 15 Oct 2014 23:37:49 +0000 (23:37 +0000)]
R600: Remove unnecessary part of computeKnownBitsForTargetNode

Zero-width BFEs are combined away already, so there's no point in
handling them.

llvm-svn: 219868

10 years agoMove variable down to use
Matt Arsenault [Wed, 15 Oct 2014 23:37:42 +0000 (23:37 +0000)]
Move variable down to use

llvm-svn: 219867

10 years agoAdd MachOObjectFile::getUuid()
Alexander Potapenko [Wed, 15 Oct 2014 23:35:45 +0000 (23:35 +0000)]
Add MachOObjectFile::getUuid()

This CL introduces MachOObjectFile::getUuid(). This function returns an ArrayRef to the object file's UUID, or an empty ArrayRef if the object file doesn't contain an LC_UUID load command.
The new function is gonna be used by llvm-symbolizer.

llvm-svn: 219866

10 years agoGive user_id a default invalid value so we don't
Jason Molenda [Wed, 15 Oct 2014 23:27:12 +0000 (23:27 +0000)]
Give user_id a default invalid value so we don't
possibly use it uninitialized in a log message later.
clang static analyzer fixit.

llvm-svn: 219865

10 years ago[Refactor][NfC] ReportLevel should be used as a bool not an int
Johannes Doerfert [Wed, 15 Oct 2014 23:24:28 +0000 (23:24 +0000)]
[Refactor][NfC] ReportLevel should be used as a bool not an int

llvm-svn: 219864

10 years agoFix unused-variable warnings from the clang static analyzer.
Jason Molenda [Wed, 15 Oct 2014 23:13:51 +0000 (23:13 +0000)]
Fix unused-variable warnings from the clang static analyzer.

llvm-svn: 219863

10 years agoUpdating documentation based on my change to remove the template disambiguation.
Chris Bieneman [Wed, 15 Oct 2014 23:11:40 +0000 (23:11 +0000)]
Updating documentation based on my change to remove the template disambiguation.

llvm-svn: 219862

10 years agoFixing the build failure due to compiler warnings and unnecessary disambiguation.
Chris Bieneman [Wed, 15 Oct 2014 23:11:35 +0000 (23:11 +0000)]
Fixing the build failure due to compiler warnings and unnecessary disambiguation.

llvm-svn: 219861

10 years ago[compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, let's renam...
Kuba Brecka [Wed, 15 Oct 2014 22:47:54 +0000 (22:47 +0000)]
[compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, let's rename it to append_list_if

Doing s/append_if/append_list_if/, no functional change.

http://reviews.llvm.org/D5739

llvm-svn: 219860

10 years agoCodeGen: Don't drop thread_local when emitting __thread aliases
David Majnemer [Wed, 15 Oct 2014 22:38:23 +0000 (22:38 +0000)]
CodeGen: Don't drop thread_local when emitting __thread aliases

CodeGen wouldn't mark the aliasee as thread_local if the aliasee was a
tentative definition.

Even if the definition was already emitted, it would never mark the
alias as thread_local.

This fixes PR21288.

llvm-svn: 219859

10 years agoMove SanitizerBlacklist object from CodeGenModule to ASTContext.
Alexey Samsonov [Wed, 15 Oct 2014 22:17:27 +0000 (22:17 +0000)]
Move SanitizerBlacklist object from CodeGenModule to ASTContext.

Soon we'll need to have access to blacklist before the CodeGen
phase (see http://reviews.llvm.org/D5687), so parse and construct
the blacklist earlier.

llvm-svn: 219857

10 years agoMechanical change to FastDemangle to make it closer to the lldb
Jason Molenda [Wed, 15 Oct 2014 22:11:15 +0000 (22:11 +0000)]
Mechanical change to FastDemangle to make it closer to the lldb
coding conventions.  Lots of whitespace et al changes but no
content changes.

llvm-svn: 219856

10 years agoAvoid having "using namespace" for both "clang" and "llvm" namespaces.
Alexey Samsonov [Wed, 15 Oct 2014 22:00:40 +0000 (22:00 +0000)]
Avoid having "using namespace" for both "clang" and "llvm" namespaces.
This is fragile, as there are classes with the same name in both
namespaces (e.g. llvm::Module and clang::Module).

llvm-svn: 219855

10 years agoDefining a new API for debug options that doesn't rely on static global cl::opts.
Chris Bieneman [Wed, 15 Oct 2014 21:54:35 +0000 (21:54 +0000)]
Defining a new API for debug options that doesn't rely on static global cl::opts.

Summary:
This is based on the discussions from the LLVMDev thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075886.html

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5389

llvm-svn: 219854