platform/upstream/llvm.git
9 years agoPrint out the full output of gtest
Vince Harron [Mon, 19 Jan 2015 18:18:24 +0000 (18:18 +0000)]
Print out the full output of gtest

This patch fixes a bug that prevented all gtest output from being
displayed.

Submitted for Tamas Berghammer

llvm-svn: 226477

9 years agoRemove support for DIVariable's FlagIndirectVariable and expect
Adrian Prantl [Mon, 19 Jan 2015 17:57:29 +0000 (17:57 +0000)]
Remove support for DIVariable's FlagIndirectVariable and expect
frontends to use a DIExpression with a DW_OP_deref instead.

This is not only a much more natural place for this informationl; there
is also a technical reason: The FlagIndirectVariable is used to mark a
variable that is turned into a reference by virtue of the calling
convention; this happens for example to aggregate return values.
The inliner, for example, may actually need to undo this indirection to
correctly represent the value in its new context. This is impossible to
implement because the DIVariable can't be safely modified. We can however
safely construct a new DIExpression on the fly.

llvm-svn: 226476

9 years agoMigrate all uses of DIVariable's FlagIndirectVariable to use a DIExpression
Adrian Prantl [Mon, 19 Jan 2015 17:51:58 +0000 (17:51 +0000)]
Migrate all uses of DIVariable's FlagIndirectVariable to use a DIExpression
with a DW_OP_deref instead.

llvm-svn: 226474

9 years ago[AArch64] Implement GHC calling convention
Greg Fitzgerald [Mon, 19 Jan 2015 17:40:05 +0000 (17:40 +0000)]
[AArch64] Implement GHC calling convention

Original patch by Luke Iannini.  Minor improvements and test added by
Erik de Castro Lopo.

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

From: Erik de Castro Lopo <erikd@mega-nerd.com>
llvm-svn: 226473

9 years ago[Hexagon] Converting halfword to double accumulating multiply intrinsics.
Colin LeMahieu [Mon, 19 Jan 2015 17:36:32 +0000 (17:36 +0000)]
[Hexagon] Converting halfword to double accumulating multiply intrinsics.

llvm-svn: 226472

9 years agoFixed Linux build error in gtest
Vince Harron [Mon, 19 Jan 2015 17:31:22 +0000 (17:31 +0000)]
Fixed Linux build error in gtest

llvm-svn: 226471

9 years agoProduce errors when an assignment expression would use a common symbol.
Rafael Espindola [Mon, 19 Jan 2015 17:30:24 +0000 (17:30 +0000)]
Produce errors when an assignment expression would use a common symbol.

An assignment will produce a symbol with a given section and offset. There is
no way to represent something like "1 byte after a common symbol".

This matches the behavior of GNU as.

Part of PR22217.

llvm-svn: 226470

9 years ago[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather...
Bradley Smith [Mon, 19 Jan 2015 16:37:17 +0000 (16:37 +0000)]
[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather than unpredictable

llvm-svn: 226469

9 years ago[ARM] Fixup sign extend instruction availability w.r.t. DSP extension
Bradley Smith [Mon, 19 Jan 2015 16:36:02 +0000 (16:36 +0000)]
[ARM] Fixup sign extend instruction availability w.r.t. DSP extension

llvm-svn: 226468

9 years agoBring r226038 back.
Rafael Espindola [Mon, 19 Jan 2015 15:16:06 +0000 (15:16 +0000)]
Bring r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats when
needed.

Original message:

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

llvm-svn: 226467

9 years agotsan: remove TSAN_SHADOW_COUNT
Dmitry Vyukov [Mon, 19 Jan 2015 15:01:07 +0000 (15:01 +0000)]
tsan: remove TSAN_SHADOW_COUNT

TSAN_SHADOW_COUNT is defined to 4 in all environments.
Other values of TSAN_SHADOW_COUNT were never tested and
were broken by recent changes to shadow mapping.
Remove it as there is no reason to fix nor maintain it.

llvm-svn: 226466

9 years agoAdd comdat to thunks.
Rafael Espindola [Mon, 19 Jan 2015 14:02:14 +0000 (14:02 +0000)]
Add comdat to thunks.

llvm-svn: 226465

9 years agoTwo fixes sent by C.Bergstrom: MB() does real synch for ARM; _Quad is not used when...
Andrey Churbanov [Mon, 19 Jan 2015 14:00:00 +0000 (14:00 +0000)]
Two fixes sent by C.Bergstrom: MB() does real synch for ARM; _Quad is not used when not available.

llvm-svn: 226464

9 years agoMake this test a bit stricter. NFC.
Rafael Espindola [Mon, 19 Jan 2015 13:59:31 +0000 (13:59 +0000)]
Make this test a bit stricter. NFC.

llvm-svn: 226463

9 years ago[Sanitizers] Intercept statvfs() on FreeBSD
Viktor Kutuzov [Mon, 19 Jan 2015 13:26:25 +0000 (13:26 +0000)]
[Sanitizers] Intercept statvfs() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226462

9 years ago[Msan] Intercept stat() and fstatat() on FreeBSD
Viktor Kutuzov [Mon, 19 Jan 2015 13:22:33 +0000 (13:22 +0000)]
[Msan] Intercept stat() and fstatat() on FreeBSD
Differential Revision: http://reviews.llvm.org/D7051

llvm-svn: 226461

9 years ago[PM] Update Polly for LLVM r226459 which removed another pass argument
Chandler Carruth [Mon, 19 Jan 2015 12:37:33 +0000 (12:37 +0000)]
[PM] Update Polly for LLVM r226459 which removed another pass argument
from an API in the process of preparing for the new pass manager.

llvm-svn: 226460

9 years ago[PM] Replace the Pass argument to SplitEdge with specific analyses used
Chandler Carruth [Mon, 19 Jan 2015 12:36:53 +0000 (12:36 +0000)]
[PM] Replace the Pass argument to SplitEdge with specific analyses used
and updated.

This may appear to remove handling for things like alias analysis when
splitting critical edges here, but in fact no callers of SplitEdge
relied on this. Similarly, all of them wanted to preserve LCSSA if there
was any update of the loop info. That makes the interface much simpler.

With this, all of BasicBlockUtils.h is free of Pass arguments and
prepared for the new pass manager. This is tho majority of utilities
that relied on pass arguments.

llvm-svn: 226459

9 years ago[sanitizer] Make unrecognized flags not fatal.
Evgeniy Stepanov [Mon, 19 Jan 2015 12:22:57 +0000 (12:22 +0000)]
[sanitizer] Make unrecognized flags not fatal.

Print a warning at verbosity=1 and higher instead of dying immediately.

llvm-svn: 226458

9 years ago[PM] Cleanup a dead option to critical edge splitting that I noticed
Chandler Carruth [Mon, 19 Jan 2015 12:12:00 +0000 (12:12 +0000)]
[PM] Cleanup a dead option to critical edge splitting that I noticed
while refactoring this API for the new pass manager.

No functionality changed here, the code didn't actually support this
option.

llvm-svn: 226457

9 years ago[PM] Remove the Pass argument from all of the critical edge splitting
Chandler Carruth [Mon, 19 Jan 2015 12:09:11 +0000 (12:09 +0000)]
[PM] Remove the Pass argument from all of the critical edge splitting
APIs and replace it and numerous booleans with an option struct.

The critical edge splitting API has a really large surface of flags and
so it seems worth burning a small option struct / builder. This struct
can be constructed with the various preserved analyses and then flags
can be flipped in a builder style.

The various users are now responsible for directly passing along their
analysis information. This should be enough for the critical edge
splitting to work cleanly with the new pass manager as well.

This API is still pretty crufty and could be cleaned up a lot, but I've
focused on this change just threading an option struct rather than
a pass through the API.

llvm-svn: 226456

9 years ago[NFC] Update createMachineScheduler() comment
Sergey Dmitrouk [Mon, 19 Jan 2015 12:02:25 +0000 (12:02 +0000)]
[NFC] Update createMachineScheduler() comment

It became invalid after signature changes.

llvm-svn: 226455

9 years agoclang-format: Fix crasher on weird comments.
Daniel Jasper [Mon, 19 Jan 2015 11:49:32 +0000 (11:49 +0000)]
clang-format: Fix crasher on weird comments.

Crashing input:
  /\
  / comment

llvm-svn: 226454

9 years ago[sanitizer] Switch flag parsing to LowLevelAlloc.
Evgeniy Stepanov [Mon, 19 Jan 2015 11:47:13 +0000 (11:47 +0000)]
[sanitizer] Switch flag parsing to LowLevelAlloc.

InternalAlloc is quite complex and its behavior may depend on the values of
flags. As such, it should not be used while parsing flags.

Sadly, LowLevelAlloc does not support deallocation of memory.

llvm-svn: 226453

9 years ago[sanitizer] Simplify code in flag parser.
Evgeniy Stepanov [Mon, 19 Jan 2015 10:54:36 +0000 (10:54 +0000)]
[sanitizer] Simplify code in flag parser.

llvm-svn: 226452

9 years agoclang-format: Fix crasher on incomplete condition compilation.
Daniel Jasper [Mon, 19 Jan 2015 10:52:16 +0000 (10:52 +0000)]
clang-format: Fix crasher on incomplete condition compilation.

Previously crashing input:
  void f(
  #if A
      );
  #else
  #endif

llvm-svn: 226451

9 years agoclang-format: Fix crash on invalid code.
Daniel Jasper [Mon, 19 Jan 2015 10:51:42 +0000 (10:51 +0000)]
clang-format: Fix crash on invalid code.

Input "a<," made clang-format crash.

llvm-svn: 226450

9 years agoclang-format: Fix clang-format crash on invalid code.
Daniel Jasper [Mon, 19 Jan 2015 10:51:23 +0000 (10:51 +0000)]
clang-format: Fix clang-format crash on invalid code.

llvm-svn: 226449

9 years agoclang-format: Fix assertion when trying to build a nullptr StringRef.
Daniel Jasper [Mon, 19 Jan 2015 10:51:05 +0000 (10:51 +0000)]
clang-format: Fix assertion when trying to build a nullptr StringRef.

llvm-svn: 226448

9 years agoclang-format: Fix endless loop on incomplete try-catch-block.
Daniel Jasper [Mon, 19 Jan 2015 10:50:51 +0000 (10:50 +0000)]
clang-format: Fix endless loop on incomplete try-catch-block.

llvm-svn: 226447

9 years agoclang-format: Remove assert that isn't helpful.
Daniel Jasper [Mon, 19 Jan 2015 10:50:08 +0000 (10:50 +0000)]
clang-format: Remove assert that isn't helpful.

This assert would trigger on:
  #d , = }

llvm-svn: 226446

9 years agoMake clang-format work in emacs buffers with unicode characters.
Manuel Klimek [Mon, 19 Jan 2015 10:48:04 +0000 (10:48 +0000)]
Make clang-format work in emacs buffers with unicode characters.

Emacs functions by default use character positions; convert characters
to offsets when handing parameters to clang-format and convert byte
offsets we get from clang-format back to character positions.
Reworked the code a bit so the 0-based to 1-based offset calculations
are done in the same place where we do the multi-byte to offset mapping.

llvm-svn: 226445

9 years agoSuppress the newly added Clang warning for the inaccessible base in this
Chandler Carruth [Mon, 19 Jan 2015 10:43:00 +0000 (10:43 +0000)]
Suppress the newly added Clang warning for the inaccessible base in this
test. Do that after we suppress the warnings for unknown pragmas as this
warning flag is quite new in Clang and so old Clang's would warn all the
time on this file.

llvm-svn: 226444

9 years ago[PM] Relax asserts and always try to reconstruct loop simplify form when
Chandler Carruth [Mon, 19 Jan 2015 10:23:00 +0000 (10:23 +0000)]
[PM] Relax asserts and always try to reconstruct loop simplify form when
we can while splitting critical edges.

The only code which called this and didn't require simplified loops to
be preserved is polly, and the code behaves correctly there anyways.
Without this change, it becomes really hard to share this code with the
new pass manager where things like preserving loop simplify form don't
make any sense.

If anyone discovers this code behaving incorrectly, what it *should* be
testing for is whether the loops it needs to be in simplified form are
in fact in that form. It should always be trying to preserve that form
when it exists.

llvm-svn: 226443

9 years agoAdd back a check removed in r226436
David Majnemer [Mon, 19 Jan 2015 10:21:22 +0000 (10:21 +0000)]
Add back a check removed in r226436

It shouldn't have been removed, the code which replaced it didn't cover
this case.

llvm-svn: 226442

9 years agoSemaDeclCXX.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Mon, 19 Jan 2015 09:49:59 +0000 (09:49 +0000)]
SemaDeclCXX.cpp: Suppress a warning. [-Wunused-variable]

llvm-svn: 226441

9 years ago[Sanitizers] Order initialization of coverage and guard arrays
Viktor Kutuzov [Mon, 19 Jan 2015 09:41:52 +0000 (09:41 +0000)]
[Sanitizers] Order initialization of coverage and guard arrays
Differential Revision: http://reviews.llvm.org/D6892

llvm-svn: 226440

9 years agoSLPVectorizer: limit the number of alias checks to reduce the runtime.
Erik Eckstein [Mon, 19 Jan 2015 09:33:38 +0000 (09:33 +0000)]
SLPVectorizer: limit the number of alias checks to reduce the runtime.

In case of blocks with many memory-accessing instructions, alias checking can take lot of time
(because calculating the memory dependencies has quadratic complexity).
I chose a limit which resulted in no changes when running the benchmarks.

llvm-svn: 226439

9 years ago[sanitizer] Move options-related tests to sanitizer_common.
Evgeniy Stepanov [Mon, 19 Jan 2015 09:21:44 +0000 (09:21 +0000)]
[sanitizer] Move options-related tests to sanitizer_common.

And handle help=1 in standalone LSan.

llvm-svn: 226438

9 years ago[msan] Use internal__exit() instead of _exit().
Evgeniy Stepanov [Mon, 19 Jan 2015 09:20:28 +0000 (09:20 +0000)]
[msan] Use internal__exit() instead of _exit().

llvm-svn: 226437

9 years agoSema: Variable definitions cannot be __attribute__((alias))
David Majnemer [Mon, 19 Jan 2015 09:00:28 +0000 (09:00 +0000)]
Sema: Variable definitions cannot be __attribute__((alias))

Things that are OK:
  extern int var1 __attribute((alias("v1")));
  static int var2 __attribute((alias("v2")));

Things that are not OK:
  int var3 __attribute((alias("v3")));
  extern int var4 __attribute((alias("v4"))) = 4;

We choose to accpet:
  struct S { static int var5 __attribute((alias("v5"))); };

  This code causes assertion failues in GCC 4.8 and ICC 13.0.1, we have
  no reason to reject it.

This partially fixes PR22217.

llvm-svn: 226436

9 years ago[dfsan] Use append_no_rtti_flag instead of manually specifying -fno-rtti.
Evgeniy Stepanov [Mon, 19 Jan 2015 08:26:38 +0000 (08:26 +0000)]
[dfsan] Use append_no_rtti_flag instead of manually specifying -fno-rtti.

llvm-svn: 226435

9 years ago[PowerPC] Minor correction to r226432
Hal Finkel [Mon, 19 Jan 2015 07:44:45 +0000 (07:44 +0000)]
[PowerPC] Minor correction to r226432

We don't need to exclude patchpoints from the implicit r2 dependence in
FastISel because it is added as an implicit operand and, thus, should not
confuse that StackMap code.

By inspection / no test case.

llvm-svn: 226434

9 years ago[MIScheduler] Slightly better handling of constrainLocalCopy when both source and...
Michael Kuperstein [Mon, 19 Jan 2015 07:30:47 +0000 (07:30 +0000)]
[MIScheduler] Slightly better handling of constrainLocalCopy when both source and dest are local
This fixes PR21792.

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

llvm-svn: 226433

9 years ago[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2
Hal Finkel [Mon, 19 Jan 2015 07:20:27 +0000 (07:20 +0000)]
[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2

Our PPC64 ELF V2 call lowering logic added r2 as an operand to all direct call
instructions in order to represent the dependency on the TOC base pointer
value. Restricting this to ELF V2, however, does not seem to make sense: calls
under ELF V1 have the same dependence, and indirect calls have an r2 dependence
just as direct ones. Make sure the dependence is noted for all calls under both
ELF V1 and ELF V2.

llvm-svn: 226432

9 years ago[X86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind...
Craig Topper [Mon, 19 Jan 2015 06:08:02 +0000 (06:08 +0000)]
[X86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind instead of a 32-bit immediate. This matches an equivalent change in llvm.

llvm-svn: 226431

9 years ago[x86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind...
Craig Topper [Mon, 19 Jan 2015 06:07:27 +0000 (06:07 +0000)]
[x86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind instead of a 32-bit immediate. This better aligns with the emitted instruction. It also matches SSE and AVX1 equivalents. Also add auto upgrade support.

llvm-svn: 226430

9 years ago[OPENMP] Disable copyprivate an nowait clauses in 'single' directive.
Alexey Bataev [Mon, 19 Jan 2015 05:20:46 +0000 (05:20 +0000)]
[OPENMP] Disable copyprivate an nowait clauses in 'single' directive.
The copyprivate clause must not be used with the nowait clause in single
directive.

llvm-svn: 226429

9 years ago[tinyptrvector] Add in a MutableArrayRef implicit conversion operator to complement...
Michael Gottesman [Mon, 19 Jan 2015 03:25:33 +0000 (03:25 +0000)]
[tinyptrvector] Add in a MutableArrayRef implicit conversion operator to complement the ArrayRef implicit conversion operator.

llvm-svn: 226428

9 years agoUpdate to reflect the API change to createMCSymbolizer in LLVM r226416.
Chandler Carruth [Mon, 19 Jan 2015 03:07:25 +0000 (03:07 +0000)]
Update to reflect the API change to createMCSymbolizer in LLVM r226416.
This should fix the LLDB build since that change.

llvm-svn: 226427

9 years ago[PM] Lift the analyses into the interface for
Chandler Carruth [Mon, 19 Jan 2015 03:03:39 +0000 (03:03 +0000)]
[PM] Lift the analyses into the interface for
SplitLandingPadPredecessors and remove the Pass argument from its
interface.

Another step to the utilities being usable with both old and new pass
managers.

llvm-svn: 226426

9 years agoChange using => typedef to please the MSVC bots.
Michael Gottesman [Mon, 19 Jan 2015 02:38:16 +0000 (02:38 +0000)]
Change using => typedef to please the MSVC bots.

llvm-svn: 226425

9 years agoHide the state of TinyPtrVector and remove the single element constructor.
Michael Gottesman [Mon, 19 Jan 2015 02:09:54 +0000 (02:09 +0000)]
Hide the state of TinyPtrVector and remove the single element constructor.

There is no reason for this state to be exposed as public. The single element
constructor was superfulous in light of the single element ArrayRef
constructor.

llvm-svn: 226424

9 years agoPR6037
Nathan Sidwell [Mon, 19 Jan 2015 01:44:02 +0000 (01:44 +0000)]
PR6037
Warn on inaccessible direct base

llvm-svn: 226423

9 years ago[x86] Teach Sema to check size of comparison immediate on avx512 cmpps/cmppd buitins.
Craig Topper [Mon, 19 Jan 2015 01:18:22 +0000 (01:18 +0000)]
[x86] Teach Sema to check size of comparison immediate on avx512 cmpps/cmppd buitins.

llvm-svn: 226422

9 years ago[x86] Mark that the AVX-512 cmpps/cmppd builtins need an ICE for the comparison immed...
Craig Topper [Mon, 19 Jan 2015 01:18:19 +0000 (01:18 +0000)]
[x86] Mark that the AVX-512 cmpps/cmppd builtins need an ICE for the comparison immediate. This requires converting to a macro in the header file.

llvm-svn: 226421

9 years ago[multilib] Teach Polly's CMake to use the libdir suffix variable. This
Chandler Carruth [Mon, 19 Jan 2015 01:03:05 +0000 (01:03 +0000)]
[multilib] Teach Polly's CMake to use the libdir suffix variable. This
lets 'ninja check-polly' pass for me with a lib64 build of LLVM.

I've not updated the standalone side as I don't use it and don't have an
easy way to test any changes I've made there. I mostly wanted to be able
to actually run Polly's tests when I update its use of LLVM's APIs
during my refactorings on the (very unlikely) off chance that I make
a change which compiles but does the wrong thing.

llvm-svn: 226420

9 years agoReorder.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:33 +0000 (00:35 +0000)]
Reorder.

llvm-svn: 226419

9 years ago[CMake] examples/Kaleidoscope: Prune redundant libdeps.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:25 +0000 (00:35 +0000)]
[CMake] examples/Kaleidoscope: Prune redundant libdeps.

llvm-svn: 226418

9 years ago[CMake] Update libdeps in examples/Kaleidoscope/Chapter4.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:18 +0000 (00:35 +0000)]
[CMake] Update libdeps in examples/Kaleidoscope/Chapter4.

llvm-svn: 226417

9 years agounique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer
David Blaikie [Sun, 18 Jan 2015 20:45:48 +0000 (20:45 +0000)]
unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer

llvm-svn: 226416

9 years agoAttempt to fix the MSVC build by working around a layering issue
David Blaikie [Sun, 18 Jan 2015 20:43:57 +0000 (20:43 +0000)]
Attempt to fix the MSVC build by working around a layering issue

Since MCStreamer isn't part of Support, the dtor can't be called from
here - so just pass by reference instead. This is rather imperfect, but
will hopefully suffice.

llvm-svn: 226415

9 years agostd::unique_ptrify the MCStreamer argument to createAsmPrinter
David Blaikie [Sun, 18 Jan 2015 20:29:04 +0000 (20:29 +0000)]
std::unique_ptrify the MCStreamer argument to createAsmPrinter

llvm-svn: 226414

9 years agoHandle unscoped enumeration in nested name specifier.
Serge Pavlov [Sun, 18 Jan 2015 20:04:35 +0000 (20:04 +0000)]
Handle unscoped enumeration in nested name specifier.

If an unscoped enum is used as a nested name specifier and the language dialect
is not C++ 11, issue an extension warning.
This fixes PR16951.

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

llvm-svn: 226413

9 years agoR600: Remove redundant test
Matt Arsenault [Sun, 18 Jan 2015 19:30:32 +0000 (19:30 +0000)]
R600: Remove redundant test

This is already covered in ftrunc.ll

llvm-svn: 226412

9 years agoCleaning up the test suite; remove some includes of non-standard file <__config>
Marshall Clow [Sun, 18 Jan 2015 19:05:51 +0000 (19:05 +0000)]
Cleaning up the test suite; remove some includes of non-standard file <__config>

llvm-svn: 226411

9 years agoUpdate error message text.
Serge Pavlov [Sun, 18 Jan 2015 19:05:48 +0000 (19:05 +0000)]
Update error message text.

Previously if an enumeration was used in a nested name specifier in pre-C++11
language dialect, error message was 'XXX is not a class, namespace, or scoped
enumeration'. This patch removes the word 'scoped' as in C++11 any enumeration
may be used in this context.

llvm-svn: 226410

9 years ago[mips] 'CHECK :' is not a valid check directive. Fixed.
Daniel Sanders [Sun, 18 Jan 2015 18:43:10 +0000 (18:43 +0000)]
[mips] 'CHECK :' is not a valid check directive. Fixed.

llvm-svn: 226409

9 years ago[mips] Make whitespace in disassembler tests more consistent. NFC.
Daniel Sanders [Sun, 18 Jan 2015 18:38:36 +0000 (18:38 +0000)]
[mips] Make whitespace in disassembler tests more consistent. NFC.

The tests for the ISA's should now be approximately diffable. That is, the
output of 'diff valid-mips1.txt valid-mips2.txt' should be emit the lines
for instructions that were added/removed to/from MIPS-I by MIPS-II. This
doesn't work perfectly at the moment due to ordering differences but it
should be close.

llvm-svn: 226408

9 years ago[mips] Make whitespace of disassembler tests more consistent by removing blank lines...
Daniel Sanders [Sun, 18 Jan 2015 18:21:19 +0000 (18:21 +0000)]
[mips] Make whitespace of disassembler tests more consistent by removing blank lines. NFC.

llvm-svn: 226407

9 years ago[X86][SSE] Added scalar min/max folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 18:06:23 +0000 (18:06 +0000)]
[X86][SSE] Added scalar min/max folding tests. NFC.

llvm-svn: 226406

9 years ago[X86][SSE] Added float extract and xmm extract/insert stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 17:04:32 +0000 (17:04 +0000)]
[X86][SSE] Added float extract and xmm extract/insert stack folding tests. NFC.

llvm-svn: 226405

9 years ago[X86][SSE] Added scalar conversion stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 16:22:15 +0000 (16:22 +0000)]
[X86][SSE] Added scalar conversion stack folding tests. NFC.

llvm-svn: 226404

9 years ago[PowerPC] Don't hard-code R2 as register when processing TOC relocations
Hal Finkel [Sun, 18 Jan 2015 15:59:44 +0000 (15:59 +0000)]
[PowerPC] Don't hard-code R2 as register when processing TOC relocations

Instructions that have high-order TOC relocations always carry R2 as their base
register, so it does not matter whether we take the register from the
instruction or just hard-code it in PPCAsmPrinter. In the future, however, we
might want to apply these relocations to instructions using a different
register, so taking the register from the instruction is a better thing to do.
No change in functionality here, however.

llvm-svn: 226403

9 years agoRemove redundant semicolon clang-format complained about
Tobias Grosser [Sun, 18 Jan 2015 15:59:16 +0000 (15:59 +0000)]
Remove redundant semicolon clang-format complained about

llvm-svn: 226402

9 years ago[PowerPC] Add some FIXMEs for fastcc and FPR <-> GPR moves
Hal Finkel [Sun, 18 Jan 2015 14:31:10 +0000 (14:31 +0000)]
[PowerPC] Add some FIXMEs for fastcc and FPR <-> GPR moves

So we don't forget, once we support FPR <-> GPR moves on the P8, we'll likely
want to re-visit this part of the calling convention.

llvm-svn: 226401

9 years agoAVX1 stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 12:56:39 +0000 (12:56 +0000)]
AVX1 stack folding tests. NFC.

Begun adding more exhaustive tests - all floating point instructions should now be either tested or have placeholders. We do seem to have a number of missing instructions, I will add a patch for review once the remaining working instructions are added.

I'll then move on to SSE tests and then the integer instructions.

llvm-svn: 226400

9 years ago[PowerPC] Initial PPC64 calling-convention changes for fastcc
Hal Finkel [Sun, 18 Jan 2015 12:08:47 +0000 (12:08 +0000)]
[PowerPC] Initial PPC64 calling-convention changes for fastcc

The default calling convention specified by the PPC64 ELF (V1 and V2) ABI is
designed to work with both prototyped and non-prototyped/varargs functions. As
a result, GPRs and stack space are allocated for every argument, even those
that are passed in floating-point or vector registers.

GlobalOpt::OptimizeFunctions will transform local non-varargs functions (that
do not have their address taken) to use the 'fast' calling convention.

When functions are using the 'fast' calling convention, don't allocate GPRs for
arguments passed in other types of registers, and don't allocate stack space for
arguments passed in registers. Other changes for the fast calling convention
may be added in the future.

llvm-svn: 226399

9 years ago[PM] Update Polly for LLVM r226394 and r226396 which changed some of the
Chandler Carruth [Sun, 18 Jan 2015 10:52:23 +0000 (10:52 +0000)]
[PM] Update Polly for LLVM r226394 and r226396 which changed some of the
block splitting interfaces to accept specific analyses rather than
a pass.

llvm-svn: 226398

9 years ago[PM] Pull the analyses used for another utility routine into its API
Chandler Carruth [Sun, 18 Jan 2015 09:21:15 +0000 (09:21 +0000)]
[PM] Pull the analyses used for another utility routine into its API
rather than relying on the pass object.

This one is a bit annoying, but will pay off. First, supporting this one
will make the next one much easier, and for utilities like LoopSimplify,
this is moving them (slowly) closer to not having to pass the pass
object around throughout their APIs.

llvm-svn: 226396

9 years agoAdd comment after API changes in r225090
David Blaikie [Sun, 18 Jan 2015 02:48:07 +0000 (02:48 +0000)]
Add comment after API changes in r225090

Code review suggestion by Eric Christopher.

llvm-svn: 226395

9 years ago[PM] Sink the specific analyses preserved by SplitBlock into its
Chandler Carruth [Sun, 18 Jan 2015 02:39:37 +0000 (02:39 +0000)]
[PM] Sink the specific analyses preserved by SplitBlock into its
interface, removing Pass from its interface.

This also makes those analyses optional so that passes which don't even
preserve these (or use them) can skip the logic entirely.

llvm-svn: 226394

9 years agoUpdate for tests failing due to improvements in clang's column information for aggreg...
David Blaikie [Sun, 18 Jan 2015 02:17:55 +0000 (02:17 +0000)]
Update for tests failing due to improvements in clang's column information for aggregate expressions

llvm-svn: 226393

9 years ago[PM] Replace another Pass argument with specific analyses that are
Chandler Carruth [Sun, 18 Jan 2015 02:11:23 +0000 (02:11 +0000)]
[PM] Replace another Pass argument with specific analyses that are
optionally updated by MergeBlockIntoPredecessors.

No functionality changed, just refactoring to clear the way for the new
pass manager.

llvm-svn: 226392

9 years ago[PM] Refactor how the LoopRotation pass access the DominatorTree.
Chandler Carruth [Sun, 18 Jan 2015 02:08:05 +0000 (02:08 +0000)]
[PM] Refactor how the LoopRotation pass access the DominatorTree.

Instead of querying the pass every where we need to, do that once and
cache a pointer in the pass object. This is both simpler and I'm about
to add yet another place where we need to dig out that pointer.

llvm-svn: 226391

9 years agoDebugInfo: Attribute complex expressions to the source location of the expression
David Blaikie [Sun, 18 Jan 2015 01:57:54 +0000 (01:57 +0000)]
DebugInfo: Attribute complex expressions to the source location of the expression

Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the
same for complex expressions.

llvm-svn: 226390

9 years agoAddress review feedback from r215780: Use a flag insteda of the heap. No behavior...
Nico Weber [Sun, 18 Jan 2015 01:50:35 +0000 (01:50 +0000)]
Address review feedback from r215780: Use a flag insteda of the heap. No behavior change.

llvm-svn: 226389

9 years agoDebugInfo: Attribute aggregate expressions to the source location of the expression
David Blaikie [Sun, 18 Jan 2015 01:48:19 +0000 (01:48 +0000)]
DebugInfo: Attribute aggregate expressions to the source location of the expression

Just as r225956 did for scalar expressions (CGExprScalar::Visit), do the
same for aggregate expressions.

llvm-svn: 226388

9 years ago[PM] Update Polly for LLVM r226385 which made LoopInfo actually derive
Chandler Carruth [Sun, 18 Jan 2015 01:47:30 +0000 (01:47 +0000)]
[PM] Update Polly for LLVM r226385 which made LoopInfo actually derive
from LoopInfoBase<...>, removing the need for the awkward getBase()
dance.

llvm-svn: 226387

9 years ago[PM] Lift the actual analyses used into the inferface rather than
Chandler Carruth [Sun, 18 Jan 2015 01:45:07 +0000 (01:45 +0000)]
[PM] Lift the actual analyses used into the inferface rather than
accepting a Pass and querying it for analyses.

This is necessary to allow the utilities to work both with the old and
new pass managers, and I also think this makes the interface much more
clear and helps the reader know what analyses the utility can actually
handle. I plan to repeat this process iteratively to clean up all the
pass utilities.

llvm-svn: 226386

9 years ago[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
Chandler Carruth [Sun, 18 Jan 2015 01:25:51 +0000 (01:25 +0000)]
[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
cleaner to derive from the generic base.

Thise removes a ton of boiler plate code and somewhat strange and
pointless indirections. It also remove a bunch of the previously needed
friend declarations. To fully remove these, I also lifted the verify
logic into the generic LoopInfoBase, which seems good anyways -- it is
generic and useful logic even for the machine side.

llvm-svn: 226385

9 years agoRefactor test so it's not lazily emitted on a global, simplifying ordering when more...
David Blaikie [Sun, 18 Jan 2015 00:37:04 +0000 (00:37 +0000)]
Refactor test so it's not lazily emitted on a global, simplifying ordering when more test cases are added

llvm-svn: 226384

9 years agoRecommit r225083 (reverted in r225361) now that calls to aggregate initializers from...
David Blaikie [Sun, 18 Jan 2015 00:14:21 +0000 (00:14 +0000)]
Recommit r225083 (reverted in r225361) now that calls to aggregate initializers from in class non-static data members are explicitly attributed to the desired line.

The code setting the debug location being removed here was accidentally
leaking a location into the call to the non-static data member's ctor
call. Without it the call had no location and could cause assertion
failures if it was inlined. Now that it has a location (and a correct
one at that) this code should hopefully be no longer needed.

It's possible of course that other parts of the debug info are also
relying on the debug locations being set here to leak to where they're
needed - so we might see the same assertions again & will have to
investigate what the dependence was/is. But the chances are good that
any of those are debug info line table quality bugs we've just not found
yet anyway - so it'll be good to flush them out.

llvm-svn: 226383

9 years agoDebugInfo: Correct the debug location of non-static data member initializers
David Blaikie [Sun, 18 Jan 2015 00:12:58 +0000 (00:12 +0000)]
DebugInfo: Correct the debug location of non-static data member initializers

This was causing some trouble for otherwise dead code removed in r225085
(reverted in r225361). The location being set for function arguments was
leaking out to the call which wasn't setting its own location (so a
quality bug turned into a crasher with r225085). Fix this so r225085 can
be recommitted.

llvm-svn: 226382

9 years agoRemove dead code.
Rui Ueyama [Sat, 17 Jan 2015 23:27:37 +0000 (23:27 +0000)]
Remove dead code.

llvm-svn: 226381

9 years agoUpdate comments.
Rui Ueyama [Sat, 17 Jan 2015 22:38:09 +0000 (22:38 +0000)]
Update comments.

llvm-svn: 226380

9 years ago[PM] Cleanup more warnings my refactoring exposed where now we have
Chandler Carruth [Sat, 17 Jan 2015 14:49:23 +0000 (14:49 +0000)]
[PM] Cleanup more warnings my refactoring exposed where now we have
unused variables in a no-asserts build.

I've fixed this by putting the entire loop behind an #ifndef as it
contains nothing other than asserts.

llvm-svn: 226377

9 years ago[PM] Remove a dead field.
Chandler Carruth [Sat, 17 Jan 2015 14:31:35 +0000 (14:31 +0000)]
[PM] Remove a dead field.

This was dead even before I refactored how we initialized it, but my
refactoring made it trivially dead and it is now caught by a Clang
warning. This fixes the warning and should clean up the -Werror bot
failures (sorry!).

llvm-svn: 226376

9 years ago[msan] Fix a uninitialized-use bug in the template argument diffing
Chandler Carruth [Sat, 17 Jan 2015 14:20:14 +0000 (14:20 +0000)]
[msan] Fix a uninitialized-use bug in the template argument diffing
logic.

In one place we would try to check for the difference between integers
even if we were missing one of the integers. This would eventually end
up reading uninitialized data out of the APSInt objects. The fix is to
short circuit the sameness test when we don't have integers on both
sides.

This fixes a test failure I was seeing with MSan. Not sure whether other
bots were seeing it or not, but yay MSan. In particular the feature to
very carefully track origins back through stores throughout the program
was invaluable.

llvm-svn: 226375

9 years ago[PM] Update Polly following LLVM r226373 which refactors LoopInfo in
Chandler Carruth [Sat, 17 Jan 2015 14:16:56 +0000 (14:16 +0000)]
[PM] Update Polly following LLVM r226373 which refactors LoopInfo in
preparation for the new pass manager.

llvm-svn: 226374